[OS X TeX] LaTeXiT 1.4.1 beta
Bruno Voisin
bvoisin at mac.com
Tue Aug 16 19:48:48 CEST 2005
Le 16 août 05 à 18:09, Pierre Chatelier a écrit :
>> I did a very quick test, selecting the XeLaTeX engine, removing
>> the last line of the preamble:
>> \usepackage[utf8]{inputenc}
>> and replacing it with
>> \usepackage{xunicode,fontspec}
>> \setromanfont[Mapping=tex-text]{Trebuchet MS}
>
> I cannot do that, since I do not have xunicode installed, and not
> doing that, my bounding box *is* ok for your exemple:
>
>> \mathrm{Test}\qquad ax^2+bx+c
>
> Even in Pages... So I do not understand. What happens if you just
> let the default preamble ?
I have just done that (using the default preamble), but I still get,
in Pages, a bounding box which is a reduced a4 page (that, by
dragging the formula from the LaTeXiT window onto the margins of a
Pages document).
However, if the default LaTeXiT preamble is used, then there is not
much point using XeLaTeX: what XeLaTeX allows is the direct use of
AAT and OT fonts in LaTeX, in Unicode encoding, with all the
additional functionalities included in these fonts (bidirectional
typesetting, additional features like initial and final swashes,
etc., depending of the functionalities built-in in the font).
The fontspec package provides an easy interface to this, so that, for
example,
\setromanfont{Trebuchet MS}
replaces the default TeX roman font (CMR) by Trebuchet MS, instead of
your having to write stuff like
\DeclareFontFamily{U}{trebuchet}{}
\DeclareFontShape{U}{trebuchet}{m}{n}
{<-> "Trebuchet\space MS"}{}
\DeclareFontShape{U}{trebuchet}{m}{it}
{<-> "Trebuchet\space MS\space Italic"}{}
\DeclareFontShape{U}{trebuchet}{b}{n}
{<-> "Trebuchet\space MS\space Bold"}{}
\DeclareFontShape{U}{trebuchet}{b}{it}
{<-> "Trebuchet\space MS\space Bold\space Italic"}{}
\DeclareFontShape{U}{trebuchet}{bx}{n}
{<-> ssub * trebuchet/b/n}{}
\DeclareFontShape{U}{trebuchet}{bx}{it}
{<-> ssub * trebuchet/b/it}{}
\renewcommand{\encodingdefault}{U}
\renewcommand{\rmdefault}{trebuchet}
The xunicode package, and the option [Mapping=tex-text], add useful
goodies to this:
- xunicode.sty takes accents and diacritics from the corresponding
Unicode slots in the font, instead of using the TeX construction of
these glyphs.
- The option [Mapping=tex-text] deals similarly with ligatures like
--, to convert them into the corresponding Unicode glyphs.
In particular, these two additions allows legacy TeX input files
(using \'e instead of é, and -- instead of –), to be processed by
XeLaTeX transparently.
If you run the input
\mathrm{Test}\qquad ax^2+bx+c
in LaTeXiT in pdfLaTeX mode, you'll get everything in Computer Modern
fonts; in XeLaTeX mode, still with the default preamble, only the
word Test will be changed (it seems to be in the default OS X font,
Lucida Grande); it is only by replacing the line
\usepackage[utf8]{inputenc}
in the preamble by
\usepackage{fontspec}
\setromanfont{Trebuchet MS}
that you'll get what you expect, namely output using a font specified
at will (here Trebuchet MS).
Bruno--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list