[XeTeX] Font sizes in footnotes, and dashes
Jonathan Kew
jonathan_kew at sil.org
Fri May 20 14:26:36 CEST 2005
On 20 May 2005, at 1:07 pm, Tara Andrews wrote:
> Hi,
>
> I am a newcomer to XeTeX and to TeX in general; so far it has proven
> to be exactly what I was looking for before I made my long-overdue
> switch to LaTeX. I have two problems remaining that I've been unable
> to figure out, and am hoping someone on this list can help.
>
> The first is to do with font sizes. I have the following commands
> defined:
> \usepackage{fontspec}
> \font\armfont="Mshtakan"
> \def\arm#1{{\armfont #1}}
>
> which work fine for the body text. When I want to have Armenian text
> within a footnote, e.g.
> \footnote{The number 471 is rendered in Armenian as \arm{XXX} ...}
> % in the real source, I have Armenian characters in the place of XXX.
>
> Using the \arm command here causes the Armenian text to be the same
> size as the body text, rather than the same size as the footnote text.
> I am unsure how best to get the Armenian text size to scale down to
> the default footnote size.
\font\armfont=.... is a basic TeX font-loading command that will load
the given font at one specific size (10pt, by default, in the absence
of "...at <size>").
In LaTeX, using the fontspec package, a more appropriate thing to do
would be:
\newfontinstance\armfont{Mshtakan}
\newcommand[1]{\arm}{{\armfont #1}}
which creates a command that will select this font at the current size,
whatever that may be. See the fontspec documentation for more details;
e.g., you could add a scaling factor if this makes the Armenian blend
better with the main text font surrounding it.
(I hope my \newcommand is correct here, I don't normally write LaTeX.)
> The second problem is that when I use UTF-8 em-dashes, word separation
> becomes confused. Is there any way to let the relevant program (be it
> XeTeX, TeX, or whatever) know that it is okay to split a word on the
> em-dash, and that a hyphen is not needed?
If you have literal em-dashes in your text, you could make these
"active characters" that permit a break after themselves; something
like this should do it:
\catcode"2014=\active
\def^^^^2014{\char"2014\penalty0\relax}
HTH,
Jonathan
More information about the XeTeX
mailing list