Self-documentation the "Cyrillic with LaTeX" functional test.
[docutils/kirr.git] / docutils / test / functional / expected / xetex-cyrillic.tex
blobaf07cc3bc13c5ca53850b58bde6e2a3655d2c374
1 \documentclass[a4paper,russian]{article}
2 % generated by Docutils <http://docutils.sourceforge.net/>
3 % rubber: set program xelatex
4 \usepackage[no-sscript]{xltxtra} % loads fixltx2e, metalogo, xunicode, fontspec
5 \defaultfontfeatures{Scale=MatchLowercase}
6 \usepackage{ifthen}
7 \usepackage{polyglossia}
8 \setdefaultlanguage{russian}
9 \setotherlanguages{english}
11 %%% Custom LaTeX preamble
12 % Linux Libertine (free, wide coverage, not only for Linux)
13 \setmainfont{Linux Libertine O}
14 \setsansfont{Linux Biolinum O}
15 \setmonofont[HyphenChar=None]{DejaVu Sans Mono}
17 %%% User specified packages and stylesheets
19 %%% Fallback definitions for Docutils-specific commands
21 % titlereference role
22 \providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
24 % hyperlinks:
25 \ifthenelse{\isundefined{\hypersetup}}{
26 \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,unicode=false]{hyperref}
27 \urlstyle{same} % normal text font (alternatives: tt, rm, sf)
28 }{}
31 %%% Body
32 \begin{document}
35 %___________________________________________________________________________
37 \section*{\phantomsection%
38 Заголовок%
39 \addcontentsline{toc}{section}{Заголовок}%
40 \label{id1}%
43 первый пример: "Здравствуй, мир!"
46 %___________________________________________________________________________
48 \section*{\phantomsection%
49 Title%
50 \addcontentsline{toc}{section}{Title}%
51 \label{title}%
54 \otherlanguage{english}{first example: "Hello world".}
57 %___________________________________________________________________________
59 \section*{\phantomsection%
60 Notes%
61 \addcontentsline{toc}{section}{Notes}%
62 \label{notes}%
65 This example tests rendering of Latin and Cyrillic characters by the LaTeX
66 and XeTeX writers. Check the compiled PDF for garbage characters in text and
67 bookmarks.
69 To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref}
70 versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py}
71 sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py}
72 sets it to \texttt{'unicode=false'}. The recommended option for current
73 (2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.
75 \end{document}