Re: [OS X TeX] Kanbun (漢文) and French...
Peter Dyballa
Peter_Dyballa at Web.DE
Sat Jan 3 05:51:48 EST 2009
Am 03.01.2009 um 02:10 schrieb Jean-Christophe Helary:
> Your code did not work because Texshop complained about not having
> the "native" font Lucida Bright etc.
I mentioned this, writing about "customisation."
>
> I removed that part and pressed the typeset button and your one
> liner appeared but without the 2 kanji.
Of course, because you were obviously using a font that has no
Japanese glyphs.
>
> I tried the code present in the MacTex package Readme file, but
> that failed too to properly display French.
>
> So, the question is, is there a tutorial somewhere for Texshop/
> Xetex/French so that I can first test a few lines a proceed, with
> what should not such a hard typesetting job ?
There is none, AFAIK. You could write one ...
The important start is: 'texdoc fontspec' on the command line. Or
feed /usr/local/texlive/2008/texmf-dist/doc/xelatex/fontspec/
fontspec.pdf some other way to some PDF viewer or printer.
\usepackage{xltxtra,xunicode} loads with xltxtra.sty some macros that
can be useful, I think mostly in a Latin scripts environment (texdoc
xltxtra), and with (somehow "undocumented") xunicode.sty a file that
translates LaTeX 7-bit constructs like \"i into their proper Unicode
representation (just look into it in some editor). (Therefore a
documentation is not necessary.) Since they both depend on fontspec
they load it if it hasn't been loaded before.
\defaultfontfeatures{Mapping=tex-text} activates a feature for Latin
scripts *inside* XeTeX, so to speak, that translates quoting
characters or constructs like -- or --- into their Unicode values,
where the quoting characters become so-called smart quotes à la
„, ”, “, etc. (I'm not sure about << or >>, it can be activated
locally.) The fontspec manual will show ways to activate this mapping
feature only for certain fonts.
% \setmainfont{Lucida Bright}
\setromanfont{Lucida Bright}
\setsansfont{Lucida Sans}
\setmonofont{Lucida Sans Typewriter}
all declare fonts to be used for \textrm, \textsf, \texttt, again
explained in fontspec manual. It will also show something like:
\newfontfamily\Kanbun{ヒラギノ明朝 Pro W3}
{\Kanbun 漢文}
And in case the name in a Japanese and Latin mixture fails to be
recognised the PostScript name, that has to be ASCII, retrieved from
Font Book/Livre des polices, HiraMinPro-W3 will work. \newfontfamily
allows to activate particular font features à la:
\newfontfamily\Kanbun[Scale=MatchUppercase,Script=Kana]{ヒラギノ
明朝 Pro W3}
And of course you can convert the declaration into a command:
\DeclareRobustCommand{\J}[1]{{\Kanbun #1}}
--
Greetings
Pete
It's not the valleys in life I dread so much as the dips.
– Garfield
More information about the MacOSX-TeX
mailing list