[XeTeX] Dollar signs in Adobe OTF fonts

Easter Sunshine eastersunshine at yahoo.com
Fri Oct 26 19:18:46 CEST 2007


Thank you Akira Kakuto, Will Robertson, and Bruno Voisin; this was very helpful. This is kind of embarrassing for me because grepping for xunicode in my texlive directory reveals that there is some obvious documentation I neglected to read. Sorry.

But in regards to hasbangs, I was following the examples provided in the .zip on scripts.sil.org. Perhaps they should updated or are we waiting for 0.997? (It should be trivial) Just my two cents.

While I appreciate the suggestion, tex-text mappings make less sense to me than putting in actual en dashes and em dashes into the source, especially since the source is UTF-8. Does this somehow contradict my using \$ to typeset a dollar sign?

Easter Sunshine.


Bruno Voisin <bvoisin at mac.com> wrote: Le 26 oct. 07 à 03:52, Easter Sunshine a écrit :

> %&program=xelatex
> %&encoding=UTF-8 Unicode

BTW (given that Will solved the problem related with the absence of  
the xunicode package), the above two lines, specific to TeXShop on  
Mac OS X, refer to a deprecated syntax, no longer supported by  
default. Instead you should use:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

> \usepackage{fontspec}
> \newcommand{\MAINFONT}{Minion Pro}
> \setromanfont{\MAINFONT}

For existing TeX documents to work (should you use at some point copy- 
and-paste from old documents), it's better to also load the tex-text  
remapping, so that ligatures such as -- and --- are remapped to the  
appropriate UTF-8 characters – and —.

For the same reason, in some cases the default loading of Latin  
Modern fonts by the fontspec package leads to problems. I haven't  
looked sufficiently into the issue to determine exactly what's going  
on, but in these cases a fix is to specify the [cm-default] of the  
fontspec package.

And two more things:

- Recently (I don't remember exactly at which version), \setromanfont  
has been changed to \setmainfont in fontspec.

- A useful addition to the default packages loaded by XeLaTeX is  
xltxtra, which performs some additional optimizations for XeLaTeX.

- Sometimes the MatchLowercase font feature (in fontspec's jargon) is  
helpful, by (if I understood correctly) rescaling a font so that its  
x-height matches that of Computer Modern.

All in all, the preamble for your document could become:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass{article}

\usepackage[cm-default]{fontspec}
\usepackage{xunicode,xltxtra}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\MAINFONT}{Minion Pro}
\setmainfont{\MAINFONT}

Hope this helps,

Bruno Voisin
_______________________________________________
XeTeX mailing list
postmaster at tug.org
http://tug.org/mailman/listinfo/xetex


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20071026/6e1a896a/attachment.html 


More information about the XeTeX mailing list