[XeTeX] default char classes

Barry MacKichan barry at mackichan.com
Sun Mar 9 16:18:45 CET 2008


Yes, that is how we do it now.

I don't actually write multilingual documents myself, but we sell 
software (Scientific WorkPlace, etc.) that does, and so we are looking 
for ways to make things simpler for our customers.

The main thing I'm after is to reinforce the concept in LaTeX of 
separating content and form. The choice of a font for a particular range 
of unicode characters is strictly a matter of form, yet the author has 
to do different things in his document, depending on his choice of fonts.

1. If he uses a font like Minion Pro, which contains Hebrew characters, 
he needs to do nothing.
2. If he uses a less inclusive font, he has to apply tags (or if he uses 
CJK, since the fonts are uniformly bad for western characters).

Hiding these details from the user is the appeal of XeTeX and 
XeTeXinterchartoks.

--Barry

Sven Siegmund wrote:
Hi Barry,

have you considered the option of the fontspec package to define
shortcuts for selecting fonts? You take Adobe Garamond Pro as the main
font:

   \setmainfont{Adobe Garamond Pro}

and if you want Adobe hebrew for short runs of Hebrew text, you can
define a font selection command, e.g.  \heb:

   \newfontfamily{\heb}[Script=Hebrew]{Adobe Hebrew}


It's just that you have to select the font manually every time the
Script changes. I can imagine, if you do this 5 time on a page, you
eventually want XeTeX or fontspec to be more intelligent and recognize
the script used just by the code values of Characters used. Yes, that
would be great. I jsut can't judge how much effort it would take to
enable that.

S.

2008/3/9, Barry MacKichan <barry at mackichan.com>:
 
> I'd like to express my support for this idea.
>  Would it be worth considering an enhancement to fontspec so that we
>  could write, e.g.,
>  \setmainfont[UprightFont={Hebrew={Adobe Hebrew},CJK={NSimSun}}]{Adobe
>  Garamond Pro]
>  to choose 'Adobe Garamond Pro' as the main font, except in the Hebrew
>  unicode area, in which case use 'Adobe Hebrew', and the CJK area, in
>  which case use 'NSimSun'?
>
>  I realize this is a significant amount of work, but it would free
>  authors of multilingual works to choose the best available fonts for
>  each language. The syntax would probably be different from my example,
>  which I made up without much thought.
>
>  --Barry MacKichan
>  > Message: 7
>  > Date: Sat, 8 Mar 2008 03:52:49 +1030
>  > From: Will Robertson <wspr81 at gmail.com>
>  > Subject: [XeTeX] default char classes
>  > To: Mailing list <xetex at tug.org>
>  > Message-ID: <9FF2E842-4DCE-49C6-807B-1BF506847B8E at gmail.com>
>  > Content-Type: text/plain; charset="us-ascii"
>  >
>  > Hello,
>  >
>  > It occurs to me that it would be good to define default char classes
>  > to most of the unicode blocks. Does this seem like a sensible idea? If
>  > so, should I look into it or does someone else want to do it? My time
>  > is very limited, so it's only a thought at this stage.
>  >
>  > Will
>  >
>  _______________________________________________
>  XeTeX mailing list
>  postmaster at tug.org
>  http://tug.org/mailman/listinfo/xetex
>
>     

-------------- next part --------------
An embedded message was scrubbed...
From: Barry MacKichan <barry at mackichan.com>
Subject: Re: [XeTeX] XeTeX Digest, Vol 48, Issue 13
Date: Sun, 09 Mar 2008 08:13:12 -0700
Size: 3927
Url: http://tug.org/pipermail/xetex/attachments/20080309/fcef8f41/attachment.eml 


More information about the XeTeX mailing list