[texhax] Using XeTeX to select fonts

Clint Olsen clint.olsen at gmail.com
Mon Jan 28 18:35:17 CET 2013


On Mon, Jan 28, 2013 at 9:27 AM, William Adams <will.adams at frycomm.com> wrote:
>If you really want to use Plain TeX, then you're going to have to get down w/ the code for TeX itself.
>
> One technique of investigation is to use the \show command, e.g., \show \sl \bye
>
> Or, you can look at the source for the TeX format --- I believe that there was once a Literate version of it prepared --- ah, here we are (I think):
>
> http://www.tug.org/TUGboat/tb16-3/tb48bzyl.pdf
>
> William
>
> (a reformed Plain TeX user who now uses LaTeX --- David Kastrup I think it was, had a great analogy about using Plain TeX like to controlling a car using sets of reins attached to a car's engine and steering and brake systems so that one couldn't close the hood lest one cut them off)

It seems that the following can be used to select fonts without too
much trouble using XeTeX. Of course you have to override basic control
sequences to do it:

\font\rm="Hoefler Text"\rm
\font\bf="Hoefler Text/B"
\font\it="Hoefler Text/I"
\font\sl="Hoefler Text:slant=0.2"

\nopagenumbers

\line{This {\sl text} will be {\bf flush} {\it left\/}.\hfil}
\line{\hfil This text will be flush right.}
\line{\hfil This text will be centered.\hfil}
\line{Some text flush left\hfil and some flush right.}
\line{Alpha\hfil centered between Alpha and Omega\hfil Omega}
\line{Five\hfil words\hfil equally\hfil spaced\hfil out.}

\bye

Thanks,

-Clint



More information about the texhax mailing list