summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/xits/user-guide.tex
blob: 8b6f8d606634ad1124448594e0a9dde6dfea6c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
\usetypescriptfile[type-xits]
\ctxlua{fonts.otf.features.register_base_substitution('ss01')}
\definefontfeature[math-text][math-text][ss01=yes]
\definefontfeature[frac][default][frac=yes]
\definefontfeature[onum][default][onum=yes]
\usetypescript[xits]
\setupbodyfont[xits]

\starttext

\section{Installation}

\subsection{\CONTEXT}
\CONTEXT\ MkIV are needed for using the math font, text fonts can be used with either MkIV or MkII with \XETEX\ engine, MkII with \PDFTEX\ is not supported.

Recent versions of \CONTEXT\ already have typescripts for XITS, so just
installing the fonts into TEXMF tree is enough.

\subsection{\LATEX}
A modern \TEX\ engine with Unicode and OpenType support is needed, namely
\LUATEX\ or \XETEX. In addition to {\ss fontspec} package, {\ss unicode-math}
is needed for using XITS fonts in math mode.

If you are using \LUATEX\ then you can either install the fonts OS wide or in
TEXMF tree. If you are using \XeTeX\ then you need to either install fonts OS
wide, or adapt your {\ss fontconfig} configuration to look for for fonts
installed under TEXMF tree, otherwise you will not be able to access fonts by
font name.

\subsection{MS Office}
MS Office 2007 or newer is required, the fonts can be installed the regular
way.

\section{Usage}

\subsection{\LATEX}

\subsubsection{Examples}
\startTEX
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}

\begin{document}
Text $x+y=\sqrt{z}$
\end{document}
\stopTEX

\subsection{\CONTEXT}

\subsubsection{Examples}

\startTEX
\usetypescript[xits]
\setupbodyfont[xits]

\starttext
Text $x+y=\sqrt{z}$
\stoptext
\stopTEX

\section{Font features}
\starttable[|lT|l|r|]
\HL
\NC feature\NC Description	\NC Example	 			\NC\SR
\HL
\NC onum \NC Oldstyle numbers	\NC {\addff{onum} 0123456789}		\NC\FR
\NC frac \NC Diagonal fractions	\NC {\addff{frac} 1/2 2/3 3/4 5/6 7/8}	\NC\LR
\NC ss01 \NC Mathematical Calligraphic Alphabet  \NC $\cal ABCDEFGHIJK$	\NC\LR
\HL
\stoptable

\stoptext