[XeTeX] Re: [OS X TeX] mediaeval default?

Bruno Voisin bvoisin at mac.com
Mon Jun 14 17:47:24 CEST 2004


Hi,

> I have XeTeX, which works like a charm with the prescribed settings  
> and the simplest document like
>
> \font\A="Hoefler Text" at 12pt
> \A Hello world
> \bye
>
> On the other hand, I have Latex, which works like this
>
> \documentclass{article}
> \begin{document}
> Hello world
> \end{document}
>
> but gives Computer Modern. Latex does not know about \font, and Xetex  
> knows nothing about \documentclass...

I don't understand what you mean here. The following documents work, in  
LaTeX:

> \documentclass{article}
>
> \DeclareFontFamily{U}{hoefl}{}
> \DeclareFontShape{U}{hoefl}{m}{n}%
>   {<-> "Hoefler\space Text"}{}
> \DeclareFontShape{U}{hoefl}{m}{it}%
>   {<-> "Hoefler\space Text\space Italic"}{}
> \DeclareFontShape{U}{hoefl}{bx}{n}%
>   {<-> "Hoefler\space Text\space Black"}{}
> \DeclareFontShape{U}{hoefl}{b}{n}%
>   {<-> ssub * hoefl/bx/n}{}
> \DeclareFontShape{U}{hoefl}{bx}{it}%
>   {<-> "Hoefler\space Text\space Black\space Italic"}{}
> \DeclareFontShape{U}{hoefl}{b}{it}%
>   {<-> ssub * hoefl/bx/it}{}
> \DeclareFontShape{U}{hoefl}{m}{sc}%
>   {<-> "Hoefler\space Text:Letter\space Case=Small\space Caps"}{}
> \renewcommand{\encodingdefault}{U}
> \renewcommand{\rmdefault}{hoefl}
>
> \normalfont\selectfont
>
> \begin{document}
>
> Hello world. In oldstyle numbers: 1234567890.
>
> \end{document}

The commands inserted in the preamble (i.e. before \begin{document})  
make \textrm to correspond to Hoefler Text, \textbf to Hoefler Text  
Black, etc. CM will still be used for maths, though.

You just need to customize TeXShop as indicated here  
<http://scripts.sil.org/cms/scripts/page.php? 
site_id=nrsi&item_id=xetex_texshop>, especially inside the red  
ellipses; this ensures TeXShop uses XeTeX instead of pdfTeX or TeX +  
Ghostscript.

\DeclareFontShape is LaTeX's equivalent to \font (which it uses  
internally).

Maybe you're confusing the format (LaTeX or plain TeX) and the engine  
(pdfTeX or TeX + Ghostscript or XeTeX):

- The engine is the executable file called by TeXShop, and which lives  
in /usr/local/teTeX/bin/powerpc-apple-darwin-current/. Possibilities  
are pdfTeX (calling pdftex to produce PDF output directly out of a .tex  
file), TeX + Ghostscript (actually a script altpdftex calling tex then  
dvips then ps2pdf) and XeTeX (actually the combination of xetex then  
xdv2pdf).

- The format is a set of precompiled macros, in the form of a .fmt or  
.xfmt file living inside /usr/local/teTeX/share/texmf.local/web2c; the  
engine above knows only a very limited set of commands called  
primitives, and it is all the supplementary commands defined in the  
format that make it usable. Formats are compiled ("dumped" in TeX's  
language) at the time the TeX i-package, or XeTeX, is installed. TeX  
(the executable file) comes with a standard set of precompiled macros,  
defined in /usr/local/teTeX/share/texmf.tetex/tex/plain/base/plain.tex  
and called "plain TeX"; that's what people generally call "TeX" for  
short. LaTeX is another, more extensive, format, defined by  
/usr/local/teTeX/share/texmf.tetex/tex/latex/base/latex.ltx and various  
other files from the same directory.

Just to make things even more obscure, TeX distributions use the  
following convention: when an executable file (pdftex, tex or xetex) is  
called, through a symlink (the Unix equivalent of an alias) with the  
name of a format, then the corresponding executable is launched and the  
format of the same name is loaded.

For example, the directory  
/usr/local/teTeX/bin/powerpc-apple-darwin-current/ contains the symlink  
latex to tex. Executing latex from the command line, of through  
TeXShop, then calls the executable file tex *and* loads the precompiled  
format latex.fmt into its memory.

Similarly xetex is available in the form of two commands: xetex which  
launches the executable xetex and preloads the format xetex.xfmt, and  
xelatex which launches the executable xetex and preloads the format  
xelatex.xfmt. Hence the two personal scripts "xetex" and "xelatex" to  
enter in TeXShop's Preferences/Misc, and the button "Personal Script"  
to select as default script in Preferences/Typesetting, to tell TeXShop  
to use xetex and xelatex for plain TeX and LaTeX, respectively, instead  
of pdftex and pdflatex.

Bruno

PS I'm cc'ing the OS X TeX and XeTeX lists, as this might help other  
people (despite the length and unstructured exposition).



More information about the XeTeX mailing list