[OS X TeX] Inserting a few words in "non-latin-character" languages
Cyril Niklaus
cyril.niklaus at gmail.com
Sun Oct 3 21:49:54 EDT 2010
On 4 oct. 2010, at 02:17, Alain Schremmer wrote:
> As single, isolated example in the magnum opus, I would like to give translations of the word table in a few "exotic" languages. Of course, I immediately ran into problems.
Peter told you to give XeLaTeX a try, here's a quick example to give you some ideas.
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{verbatim}
\setdefaultlanguage{english}
\setotherlanguage{russian}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{Code2000}
\setmonofont[Scale=MatchLowercase]{Hiragino Kaku Gothic Pro}
\lccode"2019="0027
\begin{document}
Easy way using one font for all scripts :
« I could not find all the characters for таблице, and, of course, I have no clue for the Chinese 表 which I got from Google translate and thought I could copy-paste in a graphics program and make into a pdf but couldn't do. Even with the Vietnamese bảng \verb=\overset{'}{a}= does not properly place the accent. »
One can also use the \verb=\setotherlanguage= option of polyglossia and then simply write \verb=\textrussian{Русский}= :
\textrussian{Русский}. It may be more useful when dealing with text rather than single words.
Of course, if you want to select different fonts for different languages, try using \begin{verbatim}\newfontfamily{\chinois}{Adobe Fangsong Std}{\chinois 表}\end{verbatim}
\newfontfamily{\chinois}{Adobe Fangsong Std}
{\chinois 表}
\begin{verbatim}\newfontfamily{\cyrillique}{Times}{\cyrillique таблице}\end{verbatim}
\newfontfamily{\cyrillique}{Times}
{\cyrillique таблице}
\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exemple polyglossia.pdf
Type: application/pdf
Size: 21399 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20101004/35324e63/attachment.pdf>
-------------- next part --------------
More information about the MacOSX-TeX
mailing list