[OS X TeX] unicode characters
Bruno Voisin
bvoisin at mac.com
Mon Jul 9 16:59:59 CEST 2007
Le 9 juil. 07 à 16:05, manan ahmed a écrit :
> On behalf of a number of humanities scholars using LaTex, I am
> wondering if there is an easier way to do transliteration without
> all the h\=a\d{s}\d{s}l\u{e}? Currently, I have macros set up for
> the most common words I use but that method is failing to work
> efficiently.
>
> Any tips will be greatly appreciated.
You can use XeLaTeX, which takes UTF-8 files as input and can use any
font installed on your OS X system. It's now a standard part of
TeXLive, and is installed with both MacTeX/TeXLive-2007 and gwTeX.
There's a web page with greater detail:
<http://scripts.sil.org/xetex>
and a dedicated mailing list (with many members from the humanities
community, as you'll see):
<http://tug.org/mailman/listinfo/xetex>
An example of input file:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt,a4paper]{article}
\usepackage[cm-default]{fontspec}
\usepackage{xunicode,xltxtra}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{Lucida Grande}
\begin{document}
\nonindent h\=a\d{s}\d{s}l\u{e}
\par
\noindent hāṣṣlĕ
\end{document}
The fontspec package makes loading OS X fonts easy (by introducing
\setromanfont, for example), the [cm-default] option to this package
ensures better compatibility with standard LaTeX, the xunicode
package translates standard LaTeX accents such as \=a into calls to
the corresponding glyphs such as ā of the selected font, the
Mapping=tex-text instruction translates (to simplify) TeX-specific
ligatures such as -- into calls to the corresponding glyphs such as
– (an en-dash), the Scale=MatchLowercase instruction scales the font
to better mix with standard LaTeX fonts (meaning Computer Modern
generally), and the xltxtra package does a bit more enhancements to
standard LaTeX.
See also the contents of
/Library/TeX/Documentation/texmf-dist-doc/xetex
/Library/TeX/Documentation/texmf-dist-doc/xelatex
I think there's also a XeTeX showcase included somewhere in the
distribution, but I can't find where it is right now.
Hope this helps,
Bruno Voisin
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list