[XeTeX]   in XeTeX

Zdenek Wagner zdenek.wagner at gmail.com
Fri Nov 11 16:33:20 CET 2011


2011/11/11 Le Farfadet Spatial <le.farfadet.spatial at free.fr>:
>
> Hello everybody out there!
>
> On 11/11/2011 15:11, Zdenek Wagner wrote:
>>
>> How does XeTeX convert \language to the rules
>
> As far as I know, the language is a parameter transmitted to packages that
> have different rules depending on the language used. It also affects, for
> instance, the way punctuation is composed.
>
I still do not understand the internal mechanism. I know how
punctuation is handled in French, the category of a few characters is
set to 13 and defined as some macros. But how can XeTeX regognize
whether the space token with category 10 has to be converted to a
nonbreakable space? This is not an easy task on macro level. Consider
the words "louka a pole". then I wish to have "louka a~pole". However,
I cannot convert a space after "a" to nonbreakable, e.g. in "jdu na
pole" both spaces should be breakable. Thus on macro level all
characters would have to be active and redefined as compex macros.
Such processing is possible by encTeX or LuaTeX but not in XeTeX.

>> for inserting
>> nonbreakable spaces after nonsyllabic prepositions in Czech and
>> Slovak?
>
> In some cases, it is possible that XeTeX does not have a way to know that a
> non breakable space is needed. In such cases, use tilda (~).
>
>> How does it know that I am in "verbatim" mode and the
>> nonbreakable spaces must not be used?
>
> When you are using verbatim mode, it means that you ask XeTeX not to do the
> processing it usually does, but just to print the characters that are given
> inside the verbatim environment. Therefore, if you put a unicode symbol in a
> verbatim environment, the standard behaviour is to print this symbol. When
> you put a tilda in verbatim environment, the expected result is a tilda. If
> you do not want a character to appear in a verbatim environment, just do not
> put it in.
>
How does XeTeX recognize a verbatim mode? I can recognize it on a
macro level according to the category of a space but is it also
harcoded somewhere in XeTeX? I think not. And of course I ask XeTeX to
do its work. What I do in verbatim mode is that I select fixed-width
font, change category of a space token to 12 (thus it is not a place
for a line break), set \hypnechar of the font to -1 which means that
words cannot be hypnenated, set the category of the end-of-line
character to 13 and define it as \par. The verbatim mode is NOT
hardwired inside XeTeX, it breaks lines into paragraphs using the same
algorithm but the parameters are set in such a way that no breakable
point in a line exists and thus it is typesed as typed in the tex file
(see The TeXbook for detailed explanation).

>    Best regards.
>
>                                    Yoann
>
> --
> L'antre du farfadet :
> http://le.farfadet.spatial.free.fr/
> Textes, musiques et peintures
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the XeTeX mailing list