[XeTeX] XeTeX 1.0 - request for comments

Jonathan Kew jonathan_kew at sil.org
Thu Oct 20 00:11:49 CEST 2005


On 19 Oct 2005, at 10:42 pm, Pavel Straňák wrote:

> On 19.10.2005, at 21:49, William F. Adams wrote:
>
>
>> On Oct 19, 2005, at 2:21 PM, Florian Grammel wrote:
>>
>>
>>> Another wish would be a macro that gives replacement patterns for  
>>> ligatures like fi, fl,...(as long as the fonts don't include  
>>> them) and perhaps also for the common shorthands like -- --- ``  
>>> ''. As for the quotation marks it would really be very nice to be  
>>> able to choose which real marks they will be expanded to. (Or is  
>>> this yet available and I just don't know how to do it?)
>>>
>>
>> That's what the ``mapping=tex-text'' option in a font declaration  
>> does.
>>
>> William
>>
>>
> Unless I am mistaken, your  answer is true only for the first part  
> of the quote.
>
> I would also love to see the option to expand the quotation marks  
> depending on the language.
> Let's take Czech for example:
>
> In CsLaTeX I can say \csprimeson and \csprimesoff to typeset Czech  
> quotation marks.
> In XeLaTeX with Fontspec I would love "mapping=tex-text" to change  
> the behavoir depending on locale specified by babel or \XeTeXlocale  
> "cs", or something like that. CsLaTeX uses \usepackage{czech} for  
> this.

You can create alternate font-mapping files that change the quotation  
marks to different characters; "tex-text" is not in any way built in  
to the XeTeX program, it's just a mapping file created with TECkit  
(http://scripts.sil.org/teckit) and stored in texmf/fonts/misc/xetex/ 
fontmapping. So create a variant called "tex-text-cs.tec" and then  
use fontspec to load this mapping when typesetting Czech.

>
> Ideally this would also control all the features provided by  
> CsLaTeX, but I don't know if it is possible, or how hard it would  
> be. We have some special typographic rules, controled by  Cs(La) 
> TeX: In adition to different quotation marks, in dividing words  
> like propan-butan the hyphen can (and should) be typed on the end  
> of line 1 as well as on the begining of line 2.

Would this be true whenever there is a hyphen in the original source  
text, and you break the line there? If so, I imagine it's done by  
making hyphen an active character that expands to \discretionary{-}{-} 
{-} or something like that. This is no different under XeTeX; the  
same mechanisms should still work.

> You can limit the minimal number of characters before and after  
> hyphen (usually 2 and 3 respectivelly).
> There are some more things, like controlling of localization of  
> headings, dates etc.
> For those, who can understand it (I can't unfortunatelly), the  
> implementation is here:
> /usr/local/teTeX/share/texmf.tetex/tex/csplain/czech.sty
>
> Being just a user, I am not sure some of these things are not  
> possible now.
> In case they are not, is this a reasonable thing to include them in  
> future XeTeX?

I don't know the details, but I believe they should be possible.  
Basically, you can use all the same macros to control the typography,  
you just want to discard any character-encoding stuff in order to  
work directly with Unicode text and fonts instead.

But someone who knows more about exactly what the Czech requirements  
are, and how they're implemented, would need to work through this in  
more detail.

Jonathan



More information about the XeTeX mailing list