Debian Codegraph @

texmf-dist/doc/fonts/xcharter-math/XCharter-Math.ltx

raw
1 %\DocumentMetadata{pdfstandard={A-4,UA-2}, tagging=on, lang=en-GB}
2 \documentclass[a4paper,12pt]{scrartcl}
3
4 \usepackage{mathtools, array, varioref}
5 \usepackage[british]{babel}
6 \usepackage{xcharter-otf}
7 \usepackage{fourier-orns}
8 \setsansfont{Cabin}[Scale=MatchLowercase]
9 \setmonofont{Inconsolatazi4}[Scale=MatchLowercase,
10 HyphenChar=None,StylisticSet={2,3}]
11 \usepackage{subfig}
12 \captionsetup[subtable]{position=top}
13 \usepackage{realscripts}
14 \usepackage{microtype}
15 \usepackage{hyperref}
16 \hypersetup{pdftitle={XCharter-Math User’s Guide},
17 pdfauthor={Daniel FLIPO},
18 bookmarksopen,
19 colorlinks
20 }
21 \newcommand*{\hlabel}[1]{\phantomsection\label{#1}}
22
23 \newcommand*{\FGUT}{Fourier-GUT\textit{enberg}}
24 \newcommand*{\XCotf}{XCharter-Math}
25 \newcommand*{\pkg}[1]{\texttt{#1}}
26 \newcommand*{\file}[1]{\texttt{#1}}
27 \newcommand*{\ttbold}[1]{\texttt{\textbf{#1}}}
28 \newcommand*{\opt}[1]{\texttt{#1}}
29 \newcommand*{\cmd}[1]{\texttt{\textbackslash #1}}
30 \newcommand*{\showtchar}[1]{\cmd{#1}~\csname #1\endcsname}
31 \newcommand*{\showmchar}[1]{\cmd{#1}~$(\csname #1\endcsname)$}
32 \newcommand*{\showmchardollar}[1]{\texttt{\$\cmd{#1}\$}~$(\csname #1\endcsname)$}
33
34 \renewcommand{\labelitemi}{\lefthand}
35
36 \title{\decofourleft\,\XCotf\,\decofourright}
37 \author{Daniel Flipo \\ \texttt{[email protected]}}
38
39 \newcommand*{\version}{0.74}
40
41 \begin{document}
42 \maketitle
43
44 \section{What is \XCotf{}?}
45
46 \XCotf{} is an OpenType maths font based on Bitstream Charter
47 meant to be used with XCharter text fonts.
48
49 Latin and Greek letters and many maths symbols are borrowed or
50 derived from Michael Sharpe’s XCharter fonts. Other sources for maths glyphs
51 were found in MathDesign (by Paul Pichaureau) and \FGUT{} (by Michel Bovani).
52
53 It requires LuaTeX or XeTeX as engine and the \pkg{unicode-math} package%
54 \footnote{Please read the documentation \file{unicode-math.pdf}.}.
55
56 Please note that the current version (\version) is \emph{experimental,
57 do expect metrics and glyphs to change} until version 1.0 is reached.
58 Comments, suggestions and bug reports are welcome!
59
60 \section{Usage}
61
62 \subsection{Calling \cmd{setmathfont}}
63
64 A basic call for \XCotf{} would be:
65 \begin{verbatim}
66 \usepackage{unicode-math}
67 \setmathfont{XCharter-Math.otf} % Call by file name or
68 \setmathfont{XCharter Math} % Call by font name
69 \end{verbatim}
70 this loads \XCotf{} as maths font%
71 \footnote{Both calls work equally well with LuaTeX; with XeTeX a call by font
72 name will fail unless the font is declared as a \emph{system font}.}
73 with the default options, see subsections~\vref{ssection-um},
74 \vref{ssection-cv} and~\vref{ssection-ss} for customisation.
75
76 Please note that the three sets of text fonts have to be chosen separately,
77 f.i.:%\\[.25\baselineskip]
78
79 \pagebreak[4]
80 \noindent
81 \verb+\setmainfont{XCharter} % rm+\\
82 \verb+\setsansfont{Cabin}[Scale=MatchLowercase] % sf+\\
83 \verb+\setmonofont{Inconsolatazi4}[Scale=MatchLowercase] % tt+\\[.25\baselineskip]
84 otherwise you would get Latin Modern for text fonts.
85
86 \subsection{Calling \pkg{xcharter-otf.sty} (recommended)}
87
88 As an alternative to load \XCotf{} you can type:\\[.5\baselineskip]
89 \verb+\usepackage[ +\textit{options}
90 \footnote{Possible \textit{options} are \opt{loose}, \opt{no-text},
91 \opt{fakedscripts},\opt{Scale=} or any of the options described in
92 sections~\ref{ssection-um}, \ref{ssection-cv} and \ref{ssection-ss}.}%
93 \verb+ ]{xcharter-otf}+\\[.5\baselineskip]
94 it loads \pkg{unicode-math} with the default options, sets \XCotf{}
95 as maths font and XCharter Text fonts as Roman fonts
96 (families \textit{sf} and \textit{tt} left unchanged) and does a bit more:
97 \begin{enumerate}
98 \item it loads \pkg{realscripts} for better looking superscripts and footnote
99 calls unless option \opt{fakedscripts} has been activated;
100 \item it redefines the \cmd{TeX}, \cmd{LaTeX} and \cmd{LaTeXe} logos to fit
101 the XCharter fonts unless option \opt{no-logos} has been activated;
102 \item it checks at \verb+\begin{document}+ if packages \pkg{amssymb} or
103 \pkg{latexsym} are loaded and issues warnings in case they are;
104 \item it provides aliases for glyphs named differently in Unicode, so that
105 \pkg{latexsym} or AMS names are also available;
106 \item it defines specific maths characters like
107 \showmchar{varemptyset},
108 \showmchar{parallelslant},
109 \showmchar{shortparallelslant}, etc.;
110 \item it reduces spacing in maths mode: \cmd{thinmuskip}, \cmd{medmuskip}
111 and \cmd{thickmuskip} unless the \opt{loose} option is activated.
112 \end{enumerate}
113
114 Apart from the \opt{loose} option mentioned above, \pkg{xcharter-otf.sty}
115 provides two options \opt{no-text} and \opt{Scale=}\textsl{<decimal>} meant to
116 be used to load the \XCotf{} font together with roman text fonts other than
117 XCharter, while keeping the advantages 1. to~5. pointed in the preceding list,
118 f.i.\\ \verb+\usepackage[no-text,Scale=0.98]{xcharter-otf}+
119
120 Option \opt{no-text} can also be useful if XCharter is to be loaded with
121 specific options, f.i. \\
122 \verb+\usepackage[no-text]{xcharter-otf}+\\
123 \verb|\setmainfont{XCharter}[RawFeature=+onum;+ss01]|
124
125 \section{What is provided?}
126
127 \XCotf{} provides the most common \pkg{unicode-math} glyphs and all glyphs
128 available in the \pkg{amssymb} and \pkg{latexsym} packages.
129 Therefore, the latter two packages \emph{should not} be loaded as they might
130 override \XCotf{} glyphs.
131
132 Sans-serif, typewriter and fraktur alphabets are borrowed from Latin Modern
133 fonts. See in section~\vref{ssec-math-alphabets} how to choose from other
134 maths fonts for these styles.
135
136 A full list of available glyphs is shown in file \file{unimath-xcharter.pdf}.
137
138 \subsection{Upright or slanted?}
139 \label{ssection-um}
140
141 Package \pkg{unicode-math} follows \TeX{} conventions for Latin and Greek
142 letters: in maths mode, the default option (\opt{math-style=TeX}) prints
143 Latin letters $a$…$z$ $A$…$Z$ and lowercase Greek letters $\alpha$…$\omega$
144 slanted (italic) while uppercase Greek letters $\Alpha \Beta \Gamma$…$\Omega$
145 are printed upright.
146 This can be changed by option \opt{math-style} as shown in
147 table~\vref{math-style}.
148
149 \begin{table}[ht]
150 \centering
151 \caption{Effects of the \opt{math-style} package option.}
152 \hlabel{math-style}
153 \begin{tabular}{@{}>{\ttfamily}lcc@{}}
154 \hline
155 \rmfamily Package option & Latin & Greek \\
156 \hline
157 math-style=ISO & $(a,z,B,X)$ & $\symit{(\alpha,\beta,\Gamma,\Xi)}$ \\
158 math-style=TeX & $(a,z,B,X)$ & $(\symit\alpha,\symit\beta,\symup\Gamma,\symup\Xi)$ \\
159 math-style=french & $(a,z,\symup B,\symup X)$ & $(\symup\alpha,\symup\beta,\symup\Gamma,\symup\Xi)$ \\
160 math-style=upright & $(\symup a,\symup z,\symup B,\symup X)$ & $(\symup\alpha,\symup\beta,\symup\Gamma,\symup\Xi)$ \\
161 \hline
162 \end{tabular}
163 \end{table}
164
165 Bold letters are printed upright except lowercase Greek letters
166 which are slanted (the default option is \opt{bold-style=TeX}). This can be
167 changed by option \opt{bold-style} as shown in table~\vref{bold-style}.
168
169 \begin{table}[ht]
170 \centering
171 \caption{Effects of the \opt{bold-style} package option.}
172 \hlabel{bold-style}
173 \begin{tabular}{@{}>{\ttfamily}lcc@{}}
174 \hline
175 \rmfamily Package option & Latin & Greek \\
176 \hline
177 bold-style=ISO & $(\symbfit a, \symbfit z, \symbfit B, \symbfit X)$ & $(\symbfit\alpha, \symbfit\beta, \symbfit\Gamma, \symbfit\Xi)$ \\
178 bold-style=TeX & $(\symbfup a,\symbfup z,\symbfup B,\symbfup X)$ & $(\symbfit\alpha, \symbfit\beta,\symbfup \Gamma,\symbfup \Xi)$ \\
179 bold-style=upright & $(\symbfup a,\symbfup z,\symbfup B,\symbfup X)$ & $(\symbfup \alpha,\symbfup \beta,\symbfup \Gamma,\symbfup \Xi)$ \\
180 \hline
181 \end{tabular}
182 \end{table}
183
184 Other possible customisation: $\nabla$ is printed upright and $\partial$ is
185 printed slanted by default, but \opt{nabla=italic} and
186 \opt{partial=upright} can change this.
187
188 All these options are offered by the \pkg{unicode-math} package, they can
189 be added to the \cmd{setmathfont} call as well%
190 \footnote{IMHO it is easier to add \emph{all options} to the \cmd{setmathfont}
191 command.}, for example:
192
193 \verb+\setmathfont{XCharter-Math.otf}[math-style=french,partial=upright]+\\
194 will print for the code
195 \begin{verbatim}
196 \[ \frac{\partial f}{\partial x} = \alpha \symbf{V} + a\nabla\Gamma
197 + \symbf{\beta}\symbf{M} \]
198 \end{verbatim}
199 \setmathfont{XCharter-Math.otf}[math-style=french,partial=upright]
200 \[\frac{\partial f}{\partial x} = \alpha \symbf{V} + a\nabla\Gamma +
201 \symbf{\beta}\symbf{M} \]
202 while the default settings would print
203 \setmathfont{XCharter-Math.otf}[math-style=TeX,partial=italic]
204 \[\frac{\partial f}{\partial x} = \alpha \symbf{V} + a\nabla\Gamma +
205 \symbf{\beta}\symbf{M} \]
206
207 Both shapes remain available anytime: \verb+$\uppi,\itpi$+
208 prints $\uppi, \itpi$.
209
210 If your text editor is able to handle Greek letters or maths symbols, they can
211 be entered in the code instead control sequences (i.e.
212 $\symup{α}$, $\symup{β}$, $\symup{Γ}$,… for \cmd{alpha}, \cmd{beta},
213 \cmd{Gamma},…).
214
215 \subsection{Character variants}
216 \label{ssection-cv}
217
218 \XCotf{} provides fourteen ``Character Variants'' options, listed on
219 table~\vref{cv}, to choose between different glyphs for Greek characters
220 and some others. Alternative calligraphic capitals for E, Q
221 and T have been added (version~0.50) and an alternative italic v, easier
222 to distinguish from $\nu$ (version~0.51).
223
224 \begin{table}[ht]
225 \centering \caption{Character variants.}
226 \hlabel{cv}
227 \begin{tabular}{@{}>{\ttfamily}lccl@{}}
228 \hline
229 & Default & Variant & Name\\
230 \hline
231 cv00 & $0$ & $\mupvarzero$ & 0 \\
232 cv01 & $\hslash$ & $\mithbar$ & \cmd{hslash} \\
233 cv02 & $\emptyset$ & $\varemptyset$ & \cmd{emptyset} \\
234 cv03 & $\epsilon$ & $\varepsilon$ & \cmd{epsilon} \\
235 cv04 & $\kappa$ & $\varkappa$ & \cmd{kappa} \\
236 cv05 & $\pi$ & $\varpi$ & \cmd{pi} \\
237 cv06 & $\phi$ & $\varphi$ & \cmd{phi} \\
238 cv07 & $\rho$ & $\varrho$ & \cmd{rho} \\
239 cv08 & $\sigma$ & $\varsigma$ & \cmd{sigma} \\
240 cv09 & $\theta$ & $\vartheta$ & \cmd{theta} \\
241 cv10 & $\Theta$ & $\varTheta$ & \cmd{Theta}\\
242 cv11 & $\symit{v}$ & $\mitvarv$ & v\\
243 cv12 & $\symit{w}$ & $\mitvarw$ & w\\
244 cv20 & $\symscr{E}$ & $\varsymscrE$ & \cmd{symcal\{E\}}\\
245 cv21 & $\symscr{Q}$ & $\varsymscrQ$ & \cmd{symcal\{Q\}}\\
246 cv22 & $\symscr{T}$ & $\varsymscrT$ & \cmd{symcal\{T\}}\\
247 \hline
248 \end{tabular}
249 \end{table}
250
251 For instance, to get \cmd{epsilon} and \cmd{phi} typeset as $\varepsilon$
252 and $\varphi$ instead of $\epsilon$ and $\phi$, you can add option
253 \verb+CharacterVariant={3,6}+ to the \cmd{setmathfont} call:
254 \begin{verbatim}
255 \setmathfont{XCharter-Math.otf}[CharacterVariant={3,6}]
256 \end{verbatim}
257
258 This works for all shapes and weights of these characters: f.i.\ %
259 \verb+$\symbf{\epsilon}$+, \verb+$\symbf{\phi}$+ are output as
260 \setmathfont{XCharter-Math.otf}[CharacterVariant={3,6}]$\symbf{\epsilon}$,
261 $\symbf{\phi}$ instead of
262 \setmathfont{XCharter-Math.otf}$\symbf{\epsilon}$, $\symbf{\phi}$.
263
264 Similarly with \opt{math-style=french}, \verb+\epsilon+ and \verb+\phi+
265 are output as $\symup{\varepsilon}$ and $\symup{\varphi}$ (upright).
266
267 Please note that curly braces are mandatory whenever more than one
268 ``Character Variant'' is selected.
269
270 Note about \cmd{hbar} (v\,0.43): \pkg{unicode-math} defines \cmd{hbar} as
271 \cmd{hslash} (U+210F) while \pkg{amsmath} provides two different glyphs
272 (italic $h$ with horizontal or diagonal stroke).\\
273 \pkg{xcharter math} now follows \pkg{unicode-math}; the italic $h$ with
274 horizontal stroke can be printed using \cmd{hslash} or \cmd{hbar} together
275 with character variant \texttt{cv01} or with \cmd{mithbar} (replacement
276 for AMS’ command \cmd{hbar}).
277
278
279 \enlargethispage*{2.5\baselineskip}
280 \subsection{Stylistic sets}
281 \label{ssection-ss}
282
283 \XCotf{} provides six ``Stylistic Sets'' options to choose between different
284 glyphs for families of maths symbols.
285
286 \ttbold{StylisticSet=1}, alias%
287 \footnote{These \texttt{Style} aliases are provided by \file{xcharter-otf.sty}.}
288 \setmathfont{XCharter-Math}[range={cal,bfcal},StylisticSet=1]
289 \ttbold{Style=mathcal}, forces both commands \verb|\mathcal{}| and
290 \verb|\mathscr{}| to print $\mathcal{ABC}$
291 instead of $\mathscr{ABC}$ (the default).
292 Please note that \pkg{unicode-math} recommends to use \cmd{symcal} and
293 \cmd{symscr} instead of \cmd{mathcal} and \cmd{mathscr}.
294
295 If you want to use both commands \verb|$\mathcal{ABC}$| and
296 \verb|$\mathscr{ABC}$| to print $\mathcal{ABC}$ and $\mathscr{ABC}$
297 respectively, you can use \pkg{unicode-math}’s option \verb|range| this way%
298 \footnote{The \pkg{unicode-math} package is not yet able to make use of Unicode
299 Variation Selectors U+FE00 and U+FE01 to switch between `cal’ and `scr’
300 variants but these selectors are already implemented in \XCotf.}%
301 :\\
302 \verb|\setmathfont{XCharter-Math}[|\textit{your options}\verb|]|\\
303 \verb|\setmathfont{XCharter-Math}[range={cal,bfcal},StylisticSet=1]|\\
304 Both lines are mandatory: the first one loads {\XCotf}
305 while the second one modifies \verb|\mathcal{}| command’s output.
306 \setmathfont{XCharter-Math}
307
308 \addtocounter{footnote}{-1}
309 \ttbold{StylisticSet=3}, alias\footnotemark{}
310 \ttbold{Style=upint}, converts integrals signs into their upright
311 variants, see table~\vref{ss03}.
312
313 \vspace{-\baselineskip}
314 \begin{table}[ht]
315 \let\DS\displaystyle
316 \centering
317 \caption{Style=upint\quad (+ss03)}\hlabel{ss03}
318 \begin{tabular}[t]{@{}l*{8}c@{}}
319 \hline
320 Command &\cmd{int} &\cmd{iint} &\cmd{iiint} &\cmd{iiiint}
321 &\cmd{oint} &\cmd{oiint} &\cmd{oiiint} \\
322 \hline
323 Default\rule[-15pt]{0pt}{35pt} &$\DS\int$ &$\DS\iint$ &$\DS\iiint$
324 &$\DS\iiiint$ &$\DS\oint$ &$\DS\oiint$ &$\DS\oiiint$
325 \\[.5\baselineskip]
326 \setmathfont{XCharter-Math.otf}[Style=upint]
327 Upright\rule[-15pt]{0pt}{30pt} &$\DS\int$ &$\DS\iint$ &$\DS\iiint$
328 &$\DS\iiiint$ &$\DS\oint$ &$\DS\oiint$ &$\DS\oiiint$ \\
329 \hline
330 \end{tabular}\\[.5\baselineskip]
331 \setmathfont{XCharter-Math.otf}
332 \begin{tabular}[t]{@{}l*{4}c@{}}
333 \hline
334 Command &\cmd{intclockwise} &\cmd{awint}
335 &\cmd{varointclockwise} &\cmd{ointctrclockwise} \\
336 \hline
337 Default\rule[-15pt]{0pt}{35pt} &$\DS\intclockwise$ &$\DS\awint$
338 &$\DS\varointclockwise$ &$\DS\ointctrclockwise$ \\
339 \setmathfont{XCharter-Math.otf}[Style=upint]
340 Upright\rule[-15pt]{0pt}{30pt} &$\DS\intclockwise$ &$\DS\awint$
341 &$\DS\varointclockwise$ &$\DS\ointctrclockwise$ \\
342 \hline
343 \end{tabular}
344 \end{table}
345 \clearpage
346
347 \enlargethispage*{2.5\baselineskip}
348 \setmathfont{XCharter-Math.otf}
349 \ttbold{StylisticSet=4}, alias%
350 \footnote{These \texttt{Style} aliases are provided by \file{xcharter-otf.sty}.}
351 \ttbold{Style=leqslant}, converts large
352 inequalities into their slanted variants, see table~\vref{ss04}.
353
354 \addtocounter{footnote}{-1}
355 \ttbold{StylisticSet=5}, alias\footnotemark{}
356 \ttbold{Style=smaller}, converts some symbols into
357 their smaller variants, see table~\vref{ss05}.
358 \begin{table}[ht]
359 \centering
360 \caption{Stylistic Sets 4 and 5}
361 \addtocounter{table}{-1}% \subfloat steps counter table?
362 \subfloat[\texttt{Style=leqslant\quad (+ss04)}]{\hlabel{ss04}%
363 \begin{tabular}[t]{@{}lcc@{}}
364 \hline
365 Command & Default & Variant \\
366 \hline
367 \cmd{leq} & $\leq$ & $\leqslant$ \\
368 \cmd{geq} & $\geq$ & $\geqslant$ \\
369 \cmd{nleq} & $\nleq$ & $\nleqslant$ \\
370 \cmd{ngeq} & $\ngeq$ & $\ngeqslant$ \\
371 \cmd{leqq} & $\leqq$ & $\leqqslant$ \\
372 \cmd{geqq} & $\geqq$ & $\geqqslant$ \\
373 \cmd{nleqq} & $\nleqq$ & $\nleqqslant$ \\
374 \cmd{ngeqq} & $\ngeqq$ & $\ngeqqslant$ \\
375 \cmd{eqless} & $\eqless$ & $\eqslantless$ \\
376 \cmd{eqgtr} & $\eqgtr$ & $\eqslantgtr$ \\
377 \cmd{lesseqgtr} & $\lesseqgtr$ & $\lesseqslantgtr$ \\
378 \cmd{gtreqless} & $\gtreqless$ & $\gtreqslantless$ \\
379 \cmd{lesseqqgtr} & $\lesseqqgtr$ & $\lesseqqslantgtr$ \\
380 \cmd{gtreqqless} & $\gtreqqless$ & $\gtreqqslantless$ \\
381 \cmd{lesssim} & $\lesssim$ & $\lesssimslant$ \\
382 \cmd{gtrsim} & $\gtrsim$ & $\gtrsimslant$ \\
383 \cmd{simless} & $\simless$ & $\simlessslant$ \\
384 \cmd{simgtr} & $\simgtr$ & $\simgtrslant$ \\
385 \cmd{smte} & $\smte$ & $\smteslant$ \\
386 \cmd{late} & $\late$ & $\lateslant$ \\
387 \hline
388 \end{tabular}
389 }\hspace{10mm} % eof subfloat
390 \subfloat[\texttt{Style=smaller\quad (+ss05)}]{\hlabel{ss05}%
391 \begin{tabular}[t]{@{}lcc@{}}
392 \hline
393 Command & Default & Variant \\
394 \hline
395 \cmd{in} & $\in$ & $\smallin$ \\
396 \cmd{ni} & $\ni$ & $\smallni$ \\
397 \cmd{mid} & $\mid$ & $\shortmid$ \\
398 \cmd{nmid} & $\nmid$ & $\nshortmid$ \\
399 \cmd{parallel} & $\parallel$ & $\shortparallel$ \\
400 \cmd{nparallel} & $\nparallel$ & $\nshortparallel$ \\
401 \cmd{parallelslant} & $\parallelslant$ & $\shortparallelslant$ \\
402 \cmd{nparallelslant} & $\nparallelslant$ & $\nshortparallelslant$ \\
403 \hline
404 \end{tabular}
405 }% eof subfloat
406 \end{table}
407 \stepcounter{table}% \subfloat steps counter table?
408
409 \addtocounter{footnote}{-1}
410 \ttbold{StylisticSet=6}, alias\footnotemark{}
411 \ttbold{Style=subsetneq}, converts some inclusion
412 symbols, as shown in table~\vref{ss06}.
413
414 \addtocounter{footnote}{-1}
415 \ttbold{StylisticSet=7}, alias\footnotemark{}
416 \ttbold{Style=parallelslant}, converts ``parallel'' symbols into their
417 slanted variants, see table~\vref{ss07}.
418
419 \begin{table}[ht]
420 \centering
421 \caption{Stylistic Sets 6 and 7}
422 \addtocounter{table}{-1}% \subfloat steps counter table?
423 \subfloat[\texttt{Style=subsetneq\quad (+ss06)}]{\hlabel{ss06}%
424 \begin{tabular}[t]{@{}lcc@{}}
425 \hline
426 Command & Default & Variant \\
427 \hline
428 \cmd{subsetneq} & $\subsetneq$ & $\varsubsetneq$ \\
429 \cmd{supsetneq} & $\supsetneq$ & $\varsupsetneq$ \\
430 \cmd{subsetneqq} & $\subsetneqq$ & $\varsubsetneqq$ \\
431 \cmd{supsetneqq} & $\supsetneqq$ & $\varsupsetneqq$ \\
432 \hline
433 \end{tabular}
434 }\hspace{10mm} % eof subfloat
435 \subfloat[\texttt{Style=parallelslant\quad (+ss07)}]{\hlabel{ss07}%
436 \begin{tabular}[t]{@{}lcc@{}}
437 \hline
438 Command & Default & Variant \\
439 \hline
440 \cmd{parallel} & $\parallel$ & $\parallelslant$ \\
441 \cmd{nparallel} & $\nparallel$ & $\nparallelslant$ \\
442 \cmd{shortparallel} & $\shortparallel$ & $\shortparallelslant$ \\
443 \cmd{nshortparallel} & $\nshortparallel$ & $\nshortparallelslant$ \\
444 \hline
445 \end{tabular}
446 } % eof subfloat
447 \end{table}
448 \stepcounter{table}% \subfloat steps counter table?
449
450 To enable Stylistic Sets 4, 6 and 7 for \XCotf{}, you should enter
451 \begin{verbatim}
452 \setmathfont{XCharter-Math.otf}[StylisticSet={4,6,7}] or
453 \usepackage[Style={leqslant,subsetneq,parallelslant}]{xcharter-otf}
454 \end{verbatim}
455 then, \verb+\[x\leq y \quad A \subsetneq B \quad D \parallel D'\]+
456 will print as
457 \setmathfont{XCharter-Math.otf}[StylisticSet={4,6,7}]
458 \[x\leq y \quad A \subsetneq B \quad D \parallel D'\]
459 instead of
460 \setmathfont{XCharter-Math.otf}
461 \[x\leq y \quad A \subsetneq B \quad D \parallel D'\]
462
463 %\clearpage
464 \subsection{Other font features}
465 \label{ssec-other-features}
466
467 To get oldstyle numbers in maths, the feature \texttt{+onum} is available:
468 \begin{verbatim}
469 \setmathfont{XCharter-Math.otf}[Numbers=OldStyle] or
470 \usepackage[Style=fulloldstyle]{xcharter-otf}
471 \end{verbatim}
472
473 \setmathfont{XCharter-Math.otf}[Numbers=OldStyle]
474 $0123456789, \symbf{0123456789}$
475 \setmathfont{XCharter-Math.otf}
476
477 \subsection{Standard LaTeX math commands}
478 \label{ssec-math-commands}
479
480 All standard LaTeX maths commands, all \pkg{amssymb} commands and all
481 \pkg{latexsym} commands are supported by \XCotf{}, for some of them loading
482 \pkg{xcharter-otf.sty} is required.
483
484 Various wide accents are also supported:
485 \begin{itemize}
486 \item \cmd{wideoverbar} and \cmd{mathunderbar}%
487 \footnote{\cmd{overline} and \cmd{underline} are not font related,
488 they are based on \cmd{rule}.}
489 \[\wideoverbar{x}\quad \wideoverbar{xy}\quad \wideoverbar{xyz}\quad
490 \wideoverbar{A\cup B}\quad \wideoverbar{A\cup (B\cap C)\cup D}\quad
491 \mathunderbar{m+n+p}\]
492
493 \item \cmd{widehat} and \cmd{widetilde}
494 \[\widehat{x}\; \widehat{xx} \;\widehat{xxx} \;\widehat{xxxx}\;
495 \widehat{xxxxx} \;\widehat{xxxxxx} \;\widetilde{x}\; \widetilde{xx}\;
496 \widetilde{xxx} \;\widetilde{xxxx} \;\widetilde{xxxxx}\;
497 \widetilde{xxxxxx}\]
498
499 \item \cmd{widecheck} and \cmd{widebreve}
500 \[\widecheck{x}\quad \widecheck{xxxx}\quad \widecheck{xxxxxx}\quad
501 \widebreve{x}\quad \widebreve{xxxx}\quad \widebreve{xxxxxx}\]
502
503 \item \cmd{overparen} and \cmd{underparen}
504 \[\overparen{x}\quad \overparen{xy}\quad \overparen{xyz}\quad
505 \mathring{\overparen{A\cup B}}\quad
506 \overparen{A\cup (B\cap C)\cup D}^{\smwhtcircle}\quad
507 \overparen{x+y}^{2}\quad \overparen{a+b+...+z}^{26}\]
508 \[\underparen{x}\quad \underparen{xz} \quad \underparen{xyz}
509 \quad \underparen{x+z}_{2}\quad \underparen{a+b+...+z}_{26}\]
510
511 \item \cmd{overbrace} and \cmd{underbrace}
512 \[\overbrace{a}\quad \overbrace{ab}\quad \overbrace{abc}\quad
513 \overbrace{abcd}\quad \overbrace{abcde}\quad
514 \overbrace{a+b+c}^{3}\quad \overbrace{ a+b+. . . +z }^{26}\]
515 \[\underbrace{a}\quad\underbrace{ab}\quad\underbrace{abc}\quad
516 \underbrace{abcd}\quad \underbrace{abcde}\quad
517 \underbrace{a+b+c}_{3} \quad \underbrace{ a+b+...+z }_{26}\]
518
519 \item \cmd{overbracket} and \cmd{underbracket}
520 \[\overbracket{a}\quad \overbracket{ab}\quad \overbracket{abc}\quad
521 \overbracket{abcd}\quad \overbracket{abcde}\quad
522 \overbracket{a+b+c}^{3}\quad \overbracket{ a+b+. . . +z }^{26}\]
523 \[\underbracket{a}\quad\underbracket{ab}\quad\underbracket{abc}\quad
524 \underbracket{abcd}\quad \underbracket{abcde}\quad
525 \underbracket{a+b+c}_{3} \quad \underbracket{ a+b+...+z }_{26}\]
526
527 \item \cmd{overrightarrow} and \cmd{overleftarrow}
528 \[\overrightarrow{v}\quad \overrightarrow{M}\quad \overrightarrow{vv}
529 \quad \overrightarrow{AB}\quad \overrightarrow{ABC}
530 \quad \overrightarrow{ABCD} \quad \overrightarrow{ABCDEFGH}.
531 \]
532 \[\overleftarrow{v}\quad \overleftarrow{M}\quad \overleftarrow{vv}
533 \quad \overleftarrow{AB}\quad \overleftarrow{ABC}
534 \quad \overleftarrow{ABCD} \quad \overleftarrow{ABCDEFGH}\]
535
536 \item \cmd{overrightharpoon} and \cmd{overleftharpoon}
537 \[\overrightharpoon{v}\quad \overrightharpoon{M}\quad \overrightharpoon{vv}
538 \quad \overrightharpoon{AB}\quad \overrightharpoon{ABC}
539 \quad \overrightharpoon{ABCD} \quad \overrightharpoon{ABCDEFGH}.
540 \]
541 \[\overleftharpoon{v}\quad \overleftharpoon{M}\quad \overleftharpoon{vv}
542 \quad \overleftharpoon{AB}\quad \overleftharpoon{ABC}
543 \quad \overleftharpoon{ABCD} \quad \overleftharpoon{ABCDEFGH}\]
544
545 \item \cmd{underrightarrow} and \cmd{underleftarrow}
546 \[\underrightarrow{v}\quad \underrightarrow{M}\quad \underrightarrow{vv}
547 \quad \underrightarrow{AB}\quad \underrightarrow{ABC}
548 \quad \underrightarrow{ABCD} \quad \underrightarrow{ABCDEFGH}.
549 \]
550 \[\underleftarrow{v}\quad \underleftarrow{M}\quad \underleftarrow{vv}
551 \quad \underleftarrow{AB}\quad \underleftarrow{ABC}
552 \quad \underleftarrow{ABCD} \quad \underleftarrow{ABCDEFGH}\]
553
554 \item \cmd{underrightharpoon} and \cmd{underleftharpoondown}
555 \[\underrightharpoondown{v}\quad \underrightharpoondown{M}\quad
556 \underrightharpoondown{vv}\quad \underrightharpoondown{AB}\quad
557 \underrightharpoondown{ABC}\quad \underrightharpoondown{ABCD}\quad
558 \underrightharpoondown{ABCDEFGH}.
559 \]
560 \[\underleftharpoondown{v}\quad \underleftharpoondown{M}\quad
561 \underleftharpoondown{vv}\quad \underleftharpoondown{AB}\quad
562 \underleftharpoondown{ABC}\quad \underleftharpoondown{ABCD}
563 \quad \underleftharpoondown{ABCDEFGH}.
564 \]
565
566 \item Finally \cmd{widearc} and \cmd{overrightarc} (loading
567 \pkg{xcharter-otf.sty} is required)
568 \[\widearc{AMB}\quad \overrightarc{AMB}\]
569 \end{itemize}
570
571 All extensible arrows provided by the \pkg{mathtools} package are
572 available in the \XCotf{} font (loading \pkg{xcharter-otf.sty} is required),
573 f.i.:
574 \[X \xLeftrightarrow{\text{above}} Y \xhookrightarrow[\text{under}]{}
575 Z\xmapsto{\text{above}} W\]
576
577 A wide range of extensible vertical delimiters is provided:
578 \[ \left/
579 \begin{pmatrix} a_{1} \\ a_{2} \\ a_{3} \end{pmatrix}
580 \begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \end{bmatrix}
581 \begin{Bmatrix} a_{1} \\ a_{2} \\ a_{3} \end{Bmatrix}
582 \begin{vmatrix} a_{1} \\ a_{2} \\ a_{3} \end{vmatrix}
583 \begin{Vmatrix} a_{1} \\ a_{2} \\ a_{3} \end{Vmatrix}
584 \left\lVvert\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\Vvert
585 \left\lceil \begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rceil
586 \left\lfloor\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rfloor
587 \left\lBrack\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rBrack
588 \left\langle\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rangle
589 \left\lAngle\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rAngle
590 \right\backslash \]
591
592
593 \subsection{Mathematical alphabets}
594 \label{ssec-math-alphabets}
595
596 \begin{itemize}
597 \item All Latin and Greek characters are available in italic, upright, bold
598 and bold italic via the \verb+\symit{}+, \verb+\symup{}+, \verb+\symbf{}+
599 and \verb+\symbfit{}+ commands.
600
601 \setmathfont{XCharter-Math}[range={cal,bfcal},StylisticSet=1]
602 \item Calligraphic alphabet (\cmd{symscr} or \cmd{symcal} command)%
603 \footnote{See section~\ref{ssection-ss} if you need both shapes.},
604 uppercase only:\\
605 $\symscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\
606 $\symcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\
607 also in boldface (\cmd{symbfscr},\cmd{symbfcal} command):\\
608 $\symbfscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\
609 $\symbfcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
610 \setmathfont{XCharter-Math}
611
612 \item Blackboard-bold alphabet (\cmd{symbb} command):\\
613 $\symbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\
614 $\symbb{abcdefghijklmnopqrstuvwxyz\quad 0123456789}$
615
616 \item Fraktur alphabet is borrowed from Latin Modern, medium and bold
617 (\cmd{symfrak}, or \cmd{symbffrak} commands):\\
618 $\symfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ\quad abcdefghijklmnopqrstuvwxyz}$\\
619 $\symbffrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\
620 \hphantom{$\symfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ\quad}$}%
621 $\symbffrak{abcdefghijklmnopqrstuvwxyz}$\\
622 but this can overwritten, i.e.\\
623 \verb+\setmathfont{Asana-Math.otf}[range=frak,Scale=MatchUppercase]+\\
624 \verb+$\symfrak{ABCDEFGHIJKL...XYZ abcdefghijkl...xyz}$+\\
625 \setmathfont{Asana-Math.otf}[range=frak,Scale=MatchUppercase]
626 $\symfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz}$
627
628 \item Sans serif alphabet is borrowed from Latin Modern, (\cmd{symsfup} and
629 \cmd{symsfit} commands):\\
630 $\symsfup{ABCDEFGHIJKLM abcdefghijk}\quad\symsfit{NOPQRSTUVWXYZ
631 mnopqrstuvwxyz}$\\
632 but it can be borrowed from another maths font, i.e.\\
633 \verb+\setmathfont{STIXTwoMath-Regular.otf}[range={sfup,sfit},+\\
634 \verb+ Scale=MatchUppercase]+\\
635 \verb+$\symsfup{ABCD...klm}\quad\symsfit{NOPQ...xyz}$+\\
636 \setmathfont{STIXTwoMath-Regular.otf}[range={sfup,sfit},Scale=MatchUppercase]
637 $\symsfup{ABCDEFGHIJKLM abcdefghijklm}\quad
638 \symsfit{NOPQRSTUVWXYZ nopqrstuvwxyz}$
639
640 \item Typewriter alphabet is borrowed from Latin Modern,
641 (\cmd{symtt} command):\\
642 $\symtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz}$\\
643 but it can be borrowed from another maths font, i.e.\\
644 \verb+\setmathfont{STIXTwoMath-Regular.otf}[range=tt,+\\
645 \verb+ Scale=MatchUppercase]+\\
646 \verb+$\symtt{ABCDE...XYZ abcde...xyz}$+\\
647 \setmathfont{STIXTwoMath-Regular.otf}[range=tt,Scale=MatchUppercase]
648 $\symtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz}$
649 \end{itemize}
650
651 Like Latin Modern, \pkg{xcharter-math} provides only four lowercase latin
652 letters in script (or calligraphic) shape: $\mscre$, $\mscrg$, $\ell$,
653 $\mscro$ (\verb+\mscre+, \verb+\mscrg+, \verb+\ell+, \verb+\mscro+).
654
655 All others have to be borrowed from another maths font if needed, i.e.\\
656 \verb+\setmathfont{Garamond-Math.otf}[range=\symscr/latin,+%
657 \footnote{\texttt{/latin}: lowercase latin only;
658 \texttt{/Latin}: uppercase latin only.}\\
659 \verb+ Scale=MatchLowercase]+\\
660 \verb+$\symscr{a}\symscr{b}\symscr{c} ... \symscr{z}$+\\
661 \setmathfont{XCharter-Math.otf}
662 \setmathfont{Garamond-Math.otf}[range=\symscr/latin, Scale=MatchLowercase]
663 $\symscr{a}\symscr{b}\symscr{c}\symscr{d}\symscr{e}\symscr{f}\symscr{g}
664 \symscr{h}\symscr{i}\symscr{j}\symscr{k}\symscr{l}\symscr{m}\symscr{n}
665 \symscr{o}\symscr{p}\symscr{q}\symscr{r}\symscr{s}\symscr{t}\symscr{u}
666 \symscr{v}\symscr{w}\symscr{x}\symscr{y}\symscr{z}$
667
668 \subsection{Bold variant}
669
670 \setmathfont{XCharter-Math.otf}[BoldFont=XCharter-Math-Bold.otf]
671 In case short maths formulas have to be printed in section titles,
672 a \emph{limited} bold variant has been added.
673 Example of usage: \textbf{\boldmath Einstein’s equation $E=mc^2$}\\
674 \verb+\setmathfont{XCharter-Math-Bold.otf}[version=bold, +\textit{options}\verb+]+\\
675 \verb+\section{\mathversion{bold}Einstein’s equation $E=mc^2$}+
676
677 It is also possible to use the \verb+\boldmath+ command:\\
678 \verb+\setmathfont{XCharter-Math.otf}[BoldFont=XCharter-Math-Bold.otf]+\\
679 \verb+\section{\boldmath Einstein’s equation $E=mc^2$}+
680
681 \subsection{Missing symbols}
682
683 \XCotf{} does not aim at being as complete as \file{STIXTwoMath-Regular} or
684 \file{Cambria}, the current glyph coverage compares with TeXGyre maths fonts.
685 In case some symbols do not show up in the output file, you will see warnings
686 in the \file{.log} file, for instance:
687
688 \setmathfont{STIXTwoMath-Regular.otf}[range={"2964}]
689 \texttt{Missing character: There is no }$⥤$%
690 \texttt{ (U+2964) in font XCharterMath}
691
692 Borrowing them from a more complete font, say \file{Asana-Math},
693 is a possible workaround:
694 \verb+\setmathfont{Asana-Math.otf}[range={"2964},Scale=1.02]+\\
695 scaling is possible, multiple character ranges are separated with commas:\\
696 \verb+\setmathfont{Asana-Math.otf}[range={"294A-"2951,"2964,"2ABB-"2ABE}]+
697
698 Let’s mention \pkg{albatross}, a useful tool to find out the list of fonts
699 providing a given glyph: f.i. type in a terminal
700 ``\texttt{albatross -t U+2964}'',
701 see the manpage or \file{albatross-manual.pdf}.
702
703 \section{Acknowledgements}
704
705 Many thanks to Michael Sharpe for providing the XCharter text fonts in
706 OpenType format.
707
708 I am grateful to George Williams and his co-workers for providing and
709 maintaining FontForge and to Ulrik Vieth for his illuminating paper published
710 in TUGboat~2009 Volume~30 about OpenType Math.
711
712
713 \bigskip
714 \begin{center}\Huge
715 \decotwo
716 \end{center}
717
718 \end{document}
719
720 %%% Local Variables:
721 %%% mode: latex
722 %%% TeX-engine: luatex
723 %%% TeX-master: t
724 %%% coding: utf-8
725 %%% End: