summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-18 22:36:31 +0000
committerKarl Berry <karl@freefriends.org>2010-09-18 22:36:31 +0000
commit732f3ec949d484fffd271e5341aad609013aeeca (patch)
treea9b5ecaaeff1cd19f3c35114e2ffa56e97e447b6 /Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
parentb450abde949b2a7193ba4062666fb892253d26dd (diff)
fontspec (18sep10)
git-svn-id: svn://tug.org/texlive/trunk@19796 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex')
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex48
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex b/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
new file mode 100644
index 00000000000..8f1eb4da52e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
@@ -0,0 +1,48 @@
+
+
+\documentclass{article}
+
+\usepackage{fontspec}
+
+\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
+\setsansfont[Ligatures=TeX,Scale=MatchLowercase]{TeX Gyre Heros}
+\setmonofont[Scale=MatchLowercase]{Inconsolata}
+
+\begin{document}
+\pagestyle{empty}
+
+\section*{The basics of the \textsf{fontspec} package}
+
+The \textsf{fontspec} package enables automatic font selection
+for \LaTeX{} documents typeset with Xe\TeX{} or \LuaTeX.
+The basic command is
+
+{\centering \verb|\fontspec[font features]{font display name}|.\par}
+
+The default, sans serif, and typewriter fonts may be set with the
+\verb|\setmainfont|, \verb|\setsansfont| and \verb|\setmonofont|
+commands, respectively, as shown in the preamble. They take the
+same syntax as the \verb|\fontspec| package. All expected font
+shapes are available:
+
+\begin{center}
+ {\itshape Italics and \scshape small caps\dots}\\
+ {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
+\end{center}
+
+Text fonts in maths mode are also changed (e.g., notice the cosine function in
+`$\cos(n\pi)=\pm 1$') but only if the roman and sans serif fonts are set in
+the preamble; \verb|\setmainfont| will not affect these maths mode fonts when
+called mid-document.
+Maths symbols themselves are not affected.
+
+Notice the font features used to load the default fonts in the preamble.
+The first, \verb|Ligatures=TeX|, enables regular \TeX{} ligatures like
+\verb|``---''| for ``---''.
+The second, \verb|Scale=MatchLowercase|, automatically scales the fonts to
+the same x-height.
+
+Please see the complete \textsf{fontspec} documentation for further
+information.
+
+\end{document}