missing Dstroke & dstroke
I'm slowly getting into using DocBookInContext module for producing PDF output out of DocBook sources. One problem which I encountered is that I cannot get proper characters for two Croatian national letters: Dstroke & dstroke which are rendered as "D" & "d" and I see in mfonts.pdf (Fonts in ConTeXt) manual on p. 22nd that these chars are also not properly rendered. Is it some missing feature in ConTeXt since I remember that similar thing was present with LaTeX and it required some special *.sty file since those two characters cannot be handled like the rest of TeX accents? Any hint? Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
On Thu, Jan 23, 2003 at 02:22:24PM +0100, Gour wrote:
I'm slowly getting into using DocBookInContext module for producing PDF output out of DocBook sources.
Good to hear you put it to good use.
One problem which I encountered is that I cannot get proper characters for two Croatian national letters: Dstroke & dstroke which are rendered as "D" & "d" and I see in mfonts.pdf (Fonts in ConTeXt) manual on p. 22nd that these chars are also not properly rendered.
Is it some missing feature in ConTeXt since I remember that similar thing was present with LaTeX and it required some special *.sty file since those two characters cannot be handled like the rest of TeX accents?
As was discussed some time ago the mapping of Unicode characters in ConTeXt requires more work. The default encoding uses a simple compatibility: enco-def.tex: \definecharacter Dstroke {D} \definecharacter dstroke {d} I think it would be a good idea to try to use Sebastian Rahtz's mappings for LaTeX (texmf/tex/xmltex/passivetex/ucharacters.sty) in ConTeXt as well. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl
Simon Pepping (spepping@scaprea.hobby.nl) wrote:
Good to hear you put it to good use.
Yes, I'm at the beginning still exploring the paths of possible customizations, and therefore I'll try not to ask stupid questions (as before) before doing my homework :-) The possibility to author DocBook documents and get TeX quality output with the coherent package like ConTeXt looks worth some learning curve.
As was discussed some time ago the mapping of Unicode characters in ConTeXt requires more work. The default encoding uses a simple compatibility:
enco-def.tex: \definecharacter Dstroke {D} \definecharacter dstroke {d}
Thank you for your pointer for further "research". I've found that enco-mis.tex handles this D&dstroke mechanism since they are resolved as \DJ & \dj commands, but I don't have any idea whether it can be used somehow to solve my problem. Any hint? Sincerely, Gour
I think it would be a good idea to try to use Sebastian Rahtz's mappings for LaTeX (texmf/tex/xmltex/passivetex/ucharacters.sty) in ConTeXt as well.
Yes, it looks nice. I hope that by improving Unicode mappings, the need for handling different encodings will be reduced, at least. Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
On Fri, Jan 24, 2003 at 02:58:54PM +0100, Gour wrote:
Simon Pepping (spepping@scaprea.hobby.nl) wrote:
As was discussed some time ago the mapping of Unicode characters in ConTeXt requires more work. The default encoding uses a simple compatibility:
enco-def.tex: \definecharacter Dstroke {D} \definecharacter dstroke {d}
Thank you for your pointer for further "research". I've found that enco-mis.tex handles this D&dstroke mechanism since they are resolved as \DJ & \dj commands, but I don't have any idea whether it can be used somehow to solve my problem.
It is dependent on the encoding of your output font. In enco-en.tex I see this: \definecharacter dmacron 158 \definecharacter Eth 208 These seem to be other names for dstroke and Dstroke. If you use an ec-encoded font and you say this: \definecharacter dstroke 158 \definecharacter Dstroke 208 would that help? Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl
Simon Pepping (spepping@scaprea.hobby.nl) wrote:
It is dependent on the encoding of your output font. In enco-en.tex I see this:
\definecharacter dmacron 158 \definecharacter Eth 208
These seem to be other names for dstroke and Dstroke. If you use an ec-encoded font and you say this:
\definecharacter dstroke 158 \definecharacter Dstroke 208
would that help?
Well I'm doing test with the simple DocBook sample doc encoded as utf-8 which contains all the 10 Croatian national chars (ccaron, cacute, dstroke, scaron and zcaron with their uppercase counterparts). My test *.tex file is simple: % cont-en \input xtag-docbook \setupcolors[state=start] \setupinteraction[state=start,color=blue] \setupindenting[medium] \setupheadertexts[section][pagenumber] \setupheader[leftwidth=.7\hsize,style=slanted] \setuppagenumbering[location=] \setupitemize[each][packed][before=,after=,indentnext=no] % \setupXMLDB[pagebreaks=all] % \setupXMLDB[pagebreaks=sectionblocks] \setupXMLDB[pagebreaks=none] \starttext \processXMLfilegrouped{\jobname.xml} \stoptext which means that the font is a default one and probably doesn't contain Croatiancharacters, but, nevertheless, I get them all except dstroke & Dstroke. I understand it's because ConTeXt "draws" them or use constructs like: \definecharacter scaron {\buildtextaccent\textcaron s} to "produce" scaron. The same mechanism is present in LaTeX too, with the difference that there it also works with dstroke. (Another Croatian ConTeXt user also told me that there are problems in ConTeXt with dstokes when they need to be build i.e. when they are not present in the font). So, I'm interested how to "teach" ConTeXt to build Dstroke & dstroke i.e. how touse this \DJ & \dj commands present in enco-mis.tex? In LaTeX (LyX) I just enter Cro chars, select Croatian as language (bael) and everything works. However, I am trying to achieve the same with ConTeXt considering it much more superior in comparison with many clashing packages in LaTeX, but there is always some price to pay :-( Sincerely, Gour
Simon Pepping (spepping@scaprea.hobby.nl) wrote:
\definecharacter dmacron 158 \definecharacter Eth 208
Eth is actually not a correct one, ie. it doesn't describe Dstroke.
These seem to be other names for dstroke and Dstroke. If you use an ec-encoded font and you say this:
\definecharacter dstroke 158 \definecharacter Dstroke 208
would that help?
I "solved" the problem by putting the following in enco-def.tex: \definecharacter Dstroke {\DJ} \definecharacter dstroke {\dj} However I'm not sure whether it's a correct solution. It works with cmr font, but I have to see what will happen with the properly filled Unicode font which has glyphs for dstroke & Dstroke. Now, the interesting thing is that for amacron & Amacron I get black boxes, although it looks that everything should be OK (provided that other accents in Croatian characters are properly built) since in enco-def.tex it is written: \definecharacter Amacron {\buildtextaccent\textmacron A} \definecharacter amacron {\buildtextaccent\textmacron a} and it implies that everything should be OK. Anyway, I'm going in further exploration of ConTeXt and font/encoding stuff. (I'm doing everything with DocBookInConTeXt module and utf-8 encoding DocBook file(s), hoping to get perfect tuning for DocBook processing.) Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
At 05:54 PM 1/28/2003 +0100, Gour wrote:
I "solved" the problem by putting the following in enco-def.tex:
\definecharacter Dstroke {\DJ} \definecharacter dstroke {\dj}
better is (enco-def) \definecharacter dstroke {\pseudoencodeddj} \definecharacter Dstroke {\pseudoencodedDJ} and (in enco-mis) \definecharacter dj {\dstroke} \definecharacter Dj {\Dstroke} \definecharacter DJ {\Dstroke}
However I'm not sure whether it's a correct solution. It works with cmr font, but I have to see what will happen with the properly filled Unicode font which has glyphs for dstroke & Dstroke.
Being dutch, I never saw them as the same glyphs -) [btw, there is an excellent doc about hungarian typo things, written by Gyongyi Bujdoso from the matex user group] Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Fri, Jan 31, 2003 at 11:28:41PM +0100, Hans Hagen wrote:
\definecharacter dstroke {\pseudoencodeddj} \definecharacter Dstroke {\pseudoencodedDJ}
Last time i tried those letters didn't work in e.g. \startitemize. The bar was (mis)placed over center of the whole line of text... so I had to choose words more carefully (dj and DJ are rare letters in Croatian) when typing text in itemize lists :(
At 12:54 PM 2/1/2003 +0100, you wrote:
On Fri, Jan 31, 2003 at 11:28:41PM +0100, Hans Hagen wrote:
\definecharacter dstroke {\pseudoencodeddj} \definecharacter Dstroke {\pseudoencodedDJ}
Last time i tried those letters didn't work in e.g. \startitemize. The bar was (mis)placed over center of the whole line of text... so I had to choose words more carefully (dj and DJ are rare letters in Croatian) when typing text in itemize lists :(
those macro's were send to me and taken from some latex file; this teaches me to write my own -) \def\pseudoencodeddj % like in babel, but safer {\leavevmode\hbox\bgroup \setbox\scratchbox\hbox{d}% \scratchdimen\ht\scratchbox \advance\scratchdimen 1ex \scratchdimen.45\scratchdimen \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 \advance\dimen2 .5ex \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} \def\pseudoencodedDJ % like in babel, but safer {\leavevmode \hbox\bgroup \setbox\scratchbox\hbox{D}% \scratchdimen.55\ht\scratchbox \dimen2\expandafter\withoutpt\the\fontdimen1\font\scratchdimen \advance\dimen2 .15ex \advance\dimen2 -.15\fontdimen7\font \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} there are probably better alternatives possible, some day ... Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Sat, Feb 01, 2003 at 02:36:23PM +0100, Hans Hagen wrote:
those macro's were send to me and taken from some latex file; this teaches me to write my own -)
Yes, I ripped them out from babel package and sent them to you :) In the meantime I didn't do much typesetting in Croatian so I forgot about the problem. One reason I ripped them out is because I couldn't easily explain how the letters look like (now that I think of it, I could've sent you .ps :) The other reason is that I like how Latex draws them, so that you can do it the same way in context :) Anyway, thanks.. :)
At 12:54 PM 2/1/2003 +0100, you wrote:
On Fri, Jan 31, 2003 at 11:28:41PM +0100, Hans Hagen wrote:
\definecharacter dstroke {\pseudoencodeddj} \definecharacter Dstroke {\pseudoencodedDJ}
Last time i tried those letters didn't work in e.g. \startitemize. The bar was (mis)placed over center of the whole line of text... so I had to choose words more carefully (dj and DJ are rare letters in Croatian) when typing text in itemize lists :(
\def\pseudoencodeddj % like in babel, but safer {\leavevmode\hbox\bgroup \setbox\scratchbox\hbox{d}% \scratchdimen\ht\scratchbox \advance\scratchdimen 1ex \scratchdimen.45\scratchdimen \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 \advance\dimen2 .5ex \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} \def\pseudoencodedDJ % like in babel, but safer {\leavevmode \hbox\bgroup \setbox\scratchbox\hbox{D}% \scratchdimen.55\ht\scratchbox \dimen2\expandafter\withoutpt\the\fontdimen1\font\scratchdimen \advance\dimen2 .15ex \advance\dimen2 -.15\fontdimen7\font \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (4)
-
Gour
-
Hans Hagen
-
Simon Pepping
-
Zeljko Vrba