From: Graham Percival Date: Sun, 2 Mar 2008 22:08:30 +0000 (-0800) Subject: Added xelatex template from Till. X-Git-Tag: release/2.11.42-1~7^2~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4f8545a62f0dc5c79261d4fee2019415163b5dd9;p=lilypond.git Added xelatex template from Till. --- diff --git a/Documentation/user/templates.itely b/Documentation/user/templates.itely index b8d9893ae8..c621d1e61f 100644 --- a/Documentation/user/templates.itely +++ b/Documentation/user/templates.itely @@ -255,3 +255,60 @@ d4 c b a @@bye @end example + + +@appendixsubsec xelatex + +@verbatim +\documentclass{article} +\usepackage{ifxetex} +\ifxetex +%xetex specific stuff +\usepackage{xunicode,fontspec,xltxtra} +\setmainfont[Numbers=OldStyle]{Times New Roman} +\setsansfont{Arial} +\else +%This can be empty if you are not going to use pdftex +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{mathptmx}%Times +\usepackage{helvet}%Helvetica +\fi +%Here you can insert all packages that pdftex also understands +\usepackage[ngerman,finnish,english]{babel} +\usepackage{graphicx} + +\begin{document} +\title{A short document with lilypond and xelatex} +\maketitle + +Normal \textbf{font} commands inside the \emph{text} work, +because they \textsf{are supported by \LaTeX{} and XeteX.} +If you want to use specific commands like \verb+\XeTeX+, you +should include them again in a \verb+\ifxetex+ environment. +You can use this to print the \ifxetex \XeTeX{} command \else +XeTeX command \fi which is not known to normal \LaTeX . + +In normal text you can easily use lilypond commands, like this: + +\begin{lilypond} +{a2 b c'8 c' c' c'} +\end{lilypond} + +\noindent +and so on. + +The fonts of snippets set with lilypond will have to be set from +inside +of the snippet. For this you should read the AU on how to use +lilypond-book. + +\selectlanguage{ngerman} +Auch Umlaute funktionieren ohne die \LaTeX -Befehle, wie auch alle +anderen +seltsamen Zeichen: __ ______, wenn sie von der Schriftart +unterst__tzt werden. +\end{document} +@end verbatim + +