Debian Codegraph @

texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx

raw
1 \DocumentMetadata{pdfstandard={UA-2,A-4F}, lang=en-GB, tagging=off,
2 % tagging=on, tagging-setup={math/setup=mathml-SE}
3 }
4 \documentclass[paper=a4]{scrartcl}
5 % Packages
6 \usepackage{mathtools, graphics, array}
7 \usepackage[svgnames]{xcolor}
8 \usepackage[hypcap=false]{caption}
9 \usepackage{shortvrb}
10 \usepackage{kpfonts-otf}
11
12 % Math demos
13 \setmathfont{KpMath-Regular.otf}[version=full,
14 StylisticSet={1,2,3,4,5,6,7}]
15 \setmathfont{KpMath-Light.otf}[version=light]
16 \setmathfont{KpMath-Regular.otf}[version=base, CharacterVariant=3]
17 \setmathfont{KpMath-Bold.otf}[version=bold, Style=leqslant, CharacterVariant=3]
18 \setmathfont{KpMath-Sans.otf}[version=sans, Style=leqslant, CharacterVariant=3]
19
20 \usepackage[british,french]{babel} % french layout (lists, …)
21 \usepackage[english]{varioref}
22
23 \usepackage{realscripts}
24 \usepackage{microtype}
25 \usepackage{hyperref}
26 \hypersetup{pdftitle={Kpfonts-otf User’s Guide},
27 pdfauthor={Daniel FLIPO},
28 colorlinks
29 }
30 \newcommand*{\hlabel}[1]{\phantomsection\label{#1}}
31 %
32 \MakeShortVerb{\|}
33
34 \newcommand*{\pkg}[1]{\texttt{#1}}
35 \newcommand*{\opt}[1]{\texttt{#1}}
36 \newcommand*{\optit}[1]{\textit{\color{DarkBlue}#1}}
37 \newcommand*{\file}[1]{\texttt{#1}}
38 \newcommand*{\style}[1]{\textsf{\textbf{#1}}}
39 \newcommand*{\cmd}[1]{\texttt{\textbackslash #1}}
40 \newcommand*{\family}[1]{\textsb{#1}}
41 \newcommand*{\famvar}[1]{\textit{#1}}
42
43 \title{Kp-fonts: OpenType version}
44 \author{\href{mailto:[email protected]}{Daniel \textsc{Flipo}}}
45 \newcommand*{\version}{0.73}
46
47 \begin{document}
48 \selectlanguage{british}
49 \maketitle
50 \thispagestyle{empty}
51
52 \mathversion{full}
53
54 \enlargethispage*{2\baselineskip}
55 \begin{abstract}
56 This bundle provides OpenType versions of Type1 Kp-fonts designed by
57 Christophe Caignaert. See \file{Kpfonts-Doc-English.pdf} for the full
58 documentation of the original Type1 fonts.
59
60 It is usable only with LuaTeX or XeTeX engines; it consists of sixteen Text
61 OpenType fonts, a Roman family \family{KpRoman} in eight shapes and weights
62 ---\famvar{Regular}, \famvar{Italic}, \famvar{Bold},
63 \famvar{Bold\-Italic}, \famvar{Light}, \famvar{Light\-Italic},
64 \famvar{Semi\-bold}, \famvar{Semibold\-Italic}---, a Sans-Serif family
65 \family{KpSans} and a TypeWriter family \family{KpMono}, each of them
66 in four shapes and weights---\famvar{Regular}, \famvar{Italic},
67 \famvar{Bold} and \famvar{Bold\-Italic}--- and six maths OpenType fonts
68 \family{KpMath-Regular}, \family{KpMath-Bold}, \family{KpMath-Light},
69 \family{KpMath-Semibold}, \family{KpMath-Sans} and \family{KpMath-SansBold}.
70
71 \family{KpRoman} and \family{KpSans} families have small caps available in
72 two sizes (SmallCaps and PetiteCaps), upper and lowercase digits
73 ({\addfontfeatures{Numbers=Lowercase} 0123456789}), ancient ligatures
74 {\addfontfeatures{Ligatures=Rare} ct, st} and
75 {\addfontfeatures{Style=Swash}Q} a long-tailed capital Q.
76 Superior and inferior digits and letters have been added to the OpenType
77 \family{KpRoman} and \family{KpSans} fonts for footnotes’ calls and
78 abbreviations 1\textsuperscript{st}, 2\textsuperscript{nd}…
79
80 The support of text fonts covers Latin and Latin Extended~A (U+0020 to U+017F)
81 but neither IPA nor Greek nor Cyrillic alphabets.
82
83 For all maths fonts, Latin and Greek letters are available in Upright and
84 Italic shapes, in Bold and Regular weights:
85 $\symup{a}$ $\symup{\beta}$ $\symup{C}$ $\symup{\Delta}$,
86 $\symit{a}$ $\symit{\beta}$ $\symit{C}$ $\symit{\Delta}$,
87 $\symbfup{a}$ $\symbfup{\beta}$ $\symbfup{C}$ $\symbfup{\Delta}$,
88 $\symbfit{a}$ $\symbfit{\beta}$ $\symbfit{C}$ $\symbfit{\Delta}$.
89
90 % Blackboard Bold capitals are available in two shapes, Serif and Sans:
91 % |\mathbb{ABC}| prints either
92 % \mathversion{full}$\mathbb{ABC}$ (option |[Style=bbsans]|) or
93 % \mathversion{base} $\mathbb{ABC}$ (default).
94 Blackboard Bold capitals are available in two shapes, Serif and Sans:
95 |\mathbb{ABC}| prints either
96 \mathversion{base} $\mathbb{ABC}$ (default) or
97 \mathversion{full}$\mathbb{ABC}$ (option |[Style=bbsans]|)
98 Commands |\mathcal{ABC}| and |\mathscr{ABC}| print respectively
99 \mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathscr{ABC}$
100 while |\mathfrak{ABCabc}| prints $\mathfrak{ABCabc}$.
101
102 File \file{unimath-kpfonts.pdf} shows the full list of Unicode maths symbols
103 provided by Kp-fonts, compared with other common maths fonts.
104 More symbols, specific to Kp-fonts, are listed in
105 section~\ref{ssec:symb-spec-kp}.
106
107 A style file \file{kpfont-otf.sty} is provided to load Kp-fonts easily.
108 It is derived from \file{kpfont.sty} but options differ.
109
110 Please beware of the \emph{experimental} status of the current
111 version~(\version).
112
113 All fonts are covered by OFL licence, style file and documentation
114 are under LPPL-1.3 licence.
115 \end{abstract}
116
117 %\newpage
118 \section{Loading \pkg{kpfonts-otf.sty}}
119
120 For users of the original \pkg{kpfonts.sty} package, the easiest way to
121 try the OpenType version is to load \pkg{kpfonts-otf.sty}:\\[.5\baselineskip]
122 |\usepackage[ |\optit{options}| ]{kpfonts-otf}|\\[.5\baselineskip]
123 this loads \pkg{unicode-math}, \pkg{fontspec} and usually \pkg{realscripts}%
124 \footnote{See option \opt{fakedscripts} below.}, and defines
125 \family{KpRoman} (\family{Regular} or \family{Light} depending on options),
126 \family{KpSans} and \family{KpMono} as Text fonts, \family{KpMath}
127 (\family{Regular} or \family{Light} depending on options) as maths fonts.
128
129 \pkg{kpfonts-otf.sty} also defines all symbols available in \pkg{latexsym} and
130 \pkg{amssymb} under the same names%
131 \footnote{Unicode names often differ from AMS names.}
132 and a bunch of Kp-fonts specifics symbols.
133
134 \subsection{Global options for both text and maths}
135
136 \begin{description}
137 \item[light:] switches to \famvar{light} fonts, metrics are unchanged;
138 \famvar{light} fonts might not look perfect on screen but they print fine.
139
140 Please compare \famvar{regular} (left) and \famvar{light} fonts (right):
141
142 \newcommand*{\test}{Normal or light? Just a matter of taste}
143
144 \medskip
145 \begin{minipage}{.45\textwidth}\test. $E=mc^2$\end{minipage}\hfill
146 \begin{minipage}{.45\textwidth}\ltseries\test. \mathversion{light}$E=mc^2$
147 \end{minipage}
148
149 \medskip\mathversion{base}
150 \begin{minipage}{.45\textwidth}\itshape \test\end{minipage}\hfill
151 \begin{minipage}{.45\textwidth}\ltseries\itshape\test\end{minipage}
152
153 \medskip
154 \begin{minipage}{.45\textwidth}\bfseries \test\end{minipage}\hfill
155 \begin{minipage}{.45\textwidth}\sbseries \test\end{minipage}
156
157 \medskip
158 \begin{minipage}{.45\textwidth}\bfseries\itshape \test\end{minipage}\hfill
159 \begin{minipage}{.45\textwidth}\sbseries\itshape\test\end{minipage}
160
161 \medskip
162 \item[sans:] switches to \famvar{sans-serif} fonts for text and maths.
163
164 \item[nomath:] load neither \pkg{unicode-math} nor \family{KpMath} fonts;
165 useful for documents without maths, or to choose other maths fonts.
166 \item[notext:] do not change any Text font, use the defaults.
167 \item[nosf:] do not change Sans-Serif Text fonts, use the defaults.
168 \item[nott:] do not change Typewriter Text fonts, use the defaults.
169 \item[onlyrm:] equivalent to the last two combined.
170 \item[fulloldstyle:] equivalent to options \opt{oldstyle} and
171 \opt{oldstylemath}.
172 \item[fulloldstylenums:] equivalent to options \opt{oldstylenums} and
173 \opt{oldstylenumsmath}.
174 \end{description}
175
176 \subsection{Options for text fonts \emph{only}}
177
178 \begin{description}
179 \item[lighttext:] switches to \famvar{light} Text fonts.
180
181 Two more weights are provided by \pkg{kpfonts-otf.sty}:
182 with the \famvar{lighttext} (or \famvar{light}) option, \famvar{Semibold} and
183 \famvar{Extrabold} vs \famvar{Light} and \famvar{Semibold} without it.
184 These weights are available through |\ltseries|, |\sbseries| and
185 |\ebseries| commands to be used in a group or alternatively through one
186 argument commands |\textlt{}|, |\textsb{}| and |\texteb{}|.
187
188 |{\sbseries\itshape Foo}| or |\textsb{\textit{Foo}}| print
189 {\sbseries\itshape Foo}.
190
191 \item[sfstext:] switches to \famvar{sans-serif} text fonts.
192
193 \item[fakedscripts :] prevents \pkg{realscripts} to be loaded, super-
194 and sub-scripts will be produced by scaling (this is the way pdflatex works)
195 which gives access to all characters available in the font but produces too
196 tall and too thin glyphs. On the other hand \pkg{realscripts} gives access
197 to the super/sub-scripts available in the font (a reduced set made of
198 digits, lowercase latin letters, parentheses, etc. for the Kpfonts) which are
199 better looking. I would recommend to keep \pkg{realscripts} loaded and to
200 use the starred variants \verb+\textsuperscript*+, \verb+\textsubscript*+,
201 to produce faked super/sub-scripts when needed, coding
202 \verb+H\textsuperscript*{\#}+ to get H\textsuperscript*{\#} while
203 \verb+H\textsuperscript{\#}+ would output H\textsuperscript{\#} (\# missing
204 as superscript).
205
206 \item[oldstylenums:] provides lowercase digits as a default.
207
208 To get uppercase digits locally: |{\addfontfeature{Numbers=Lining} 123}|.
209
210 Examples, upright, italic, bold and bolditalic:
211 \begin{itemize}\addfontfeatures{Numbers=Lowercase}
212 \item 0123456789 !
213 \item \textit{0123456789 !}
214 \item \textbf{0123456789 !}
215 \item \textbf{\textit{0123456789 !}}
216 \end{itemize}
217
218 \item[oldstyle:] provides lowercase digits as a default, long-tailed Q
219 ({\addfontfeatures{Style=Swash}Quebec}) and (for Roman and Sans-Serif
220 fonts only) old style ligatures
221 {\addfontfeatures{Ligatures=Rare}`ct’ and `st’}.
222
223 Examples:
224 \begin{itemize}\addfontfeatures{Style=Swash,Ligatures=Rare}
225 \newcommand*{\test}{Quest for an attractive font!}
226 \item \test
227 \item \textit{\test}
228 \item \textbf{\test}
229 \item \textsc{\test}
230 \item \textbf{\textit{\test}}
231 \item \textsc{\textbf{\test}}
232 \end{itemize}
233
234 \item[veryoldstyle:]\hlabel{veryoldstyle} same as option \opt{oldstyle} but
235 the round `s’ is replaced by the long one `ſ’
236 unless it ends a word or is followed by \textit{b}, \textit{f} or \textit{h}%
237 \footnote{Rules found on
238 \href{https://fr.wikipedia.org/wiki/S_long}{wikipedia}.}
239 and ancient ligatures {\addfontfeatures{RawFeature=+hist;+hlig} si, sl, st}
240 are activated.
241 Coding |\textit{some of Highlands’ mysterious castles…}| will print
242 {\addfontfeatures{RawFeature=+hist;+hlig;+calt}%
243 \textit{some of Highlands’ mysterious castles…}} which is correct.
244
245 The automatic substitution relies on the OpenType feature
246 \texttt{StylisticSet=12}. A round `s’ (resp. long `ſ’) can be forced by
247 coding \texttt{s\char"200B=} or |\shorts{}| (resp. \texttt{ſ}%
248 \footnote{On Unix systems the \texttt{Compose} key can be used:
249 \texttt{Compose f s}.}
250 or |\longs{}|).
251
252 \item[largesmallcaps:] prints larger \textlsc{Small Caps} than the default
253 ones (\textsc{Petite Caps}).
254
255 \item[altfligs :] prints alternative shapes for ligatures
256 {\addfontfeatures{StylisticSet=1}fi, fl, ffi, ffl}
257 instead of fi, fl, ffi, ffl.
258
259 \item[germandbls :] |\SS| prints {\addfontfeatures{StylisticSet=2}\SS} instead
260 of {\char"1E9E} (capital \textit{Eszett}), ditto for small/petite caps.
261
262 \item[eurosym :] replaces the Euro character (€) by the official symbol
263 {\addfontfeatures{StylisticSet=3}(€)} (available in regular, italic,
264 bold and bolditalic).
265 %; the |\KPeuro| command is also provided to print
266 %the official symbol, it accepts an optionnal argument : |\kpeuro[1,50]{}|
267 %prints \kpeuro[1,50] (with a nobreak space).
268
269 \item[harfbuzz :] switches |Renderer=Harfbuzz| for HBLuaTeX engine;
270 up to version 0.34, this renderer was silently activated but seldom useful.
271
272 \end{description}
273
274 \subsection{Options for maths fonts \emph{only}}
275
276 \begin{description}
277
278 \item[lightmath:] uses \famvar{light} maths fonts.
279
280 \item[sfmath:] uses \famvar{sans-serif} maths fonts.
281
282 \item[bbsans:] command |\mathbb| prints Sans-Serif Blackboard Bold capitals
283 with Serif fonts too: compare
284 \mathversion{full}
285 $\mathbb{C}$, $\mathbb{K}$, $\mathbb{N}$, $\mathbb{Q}$, $\mathbb{R}$,
286 $\mathbb{Z}$, with
287 \mathversion{base}
288 $\mathbb{C}$, $\mathbb{K}$, $\mathbb{N}$, $\mathbb{Q}$, $\mathbb{R}$,
289 $\mathbb{Z}$ (default).
290
291 %\item[mathcal:] forces commands |\mathcal| and |\mathscr| to print
292 % \mathversion{full}$\mathcal{A,B,C,D}$ % $\mathscr{ABCD}$
293 % instead of \mathversion{base} $\mathcal{A,B,C,D}$ (default).
294
295 \item[frenchstyle:] Latin uppercase letters and all Greek letters are
296 printed upright, only lowercase Latin letters are printed in italics;
297 this follows the French typographic usage.
298
299 \item[oldstylenumsmath:] prints lowercase digits in maths (default is
300 uppercase).
301
302 \item[narrowiints:] prints condensed repeated integrals :
303
304 \mathversion{full}$\iiint$ and $\displaystyle\iiint$
305 \quad instead of \quad
306 \mathversion{base}$\iiint$ and $\displaystyle\iiint$ (default).
307
308 \item[partialup:] the |\partial| symbol is printed upright $\symup{\partial}$
309 instead of $\partial$.
310
311 \item[fancyReIm:] commands |\Re| and |\Im| print $\RE$ and $\IM$ respectively
312 instead of $\Re$ and $\Im$.
313
314 \item[tight :] horizontal spaces tightened in maths mode (same settings as
315 \pkg{fourier-otf}).
316
317 \item[noDcommand:] do not define |\D| to avoid incompatibilities with other
318 packages.
319
320 \end{description}
321
322 Please note that the \textsf{\textbf{mathcal}} option has been
323 deleted: commands |$\mathcal{ABC}$| and |$\mathscr{ABC}$| now print
324 \mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathcal{ABC}$
325 respectively when \pkg{kpfonts-otf.sty} is loaded.
326
327 \section{Another way to load Kp-fonts}
328 \label{sec:options-standard}
329
330 Loading Kp-fonts through \file{kpfonts-otf.sty} offers only a limited choice
331 of options; the standard commands \cmd{setmainfont}, \cmd{setsansfont},
332 \cmd{setmonofont}, \cmd{setmathfont} offer much more flexibility.
333
334 On the other hand, \file{kpfonts-otf.sty} defines a lot of useful commands
335 to access AMS and specific Kp-fonts symbols. Loading \pkg{kpfonts-otf} with
336 the \opt{symbols} option enables to get all these commands defined without
337 loading any font:
338 \begin{verbatim}
339 \usepackage[symbols]{kpfonts-otf}
340 \end{verbatim}
341 Please note that \pkg{unicode-math}%
342 \footnote{A careful reading of both manuals \file{unicode-math.pdf} and
343 \file{fonspec.pdf} (available in all TeX distributions) is required in
344 order to take full advantage of these packages.}
345 (and \pkg{fontspec}) \emph{are loaded} by this procedure, no need to do it
346 again, unless specific options are required, then \pkg{unicode-math} has to be
347 loaded \emph{before} \pkg{kpfonts-otf}, f.i.:
348 \begin{verbatim}
349 \usepackage[math-style=ISO,bold-style=upright]{unicode-math}
350 \usepackage[symbols]{kpfonts-otf}
351 \end{verbatim}
352 Then, it is up to the user to load Kp-fonts with whatever option he/she likes
353 using commands\\[.5\baselineskip]
354 |\set...font{|\optit{font}|}[|\optit{options}|]|.
355
356 For documents requiring no maths fonts, loading \pkg{fontspec} and using
357 the |\set...font| commands is enough, no need to load \pkg{kpfonts-otf} at all.
358
359 \subsection{Options for Text fonts}
360
361 Here are the options available for Text Kp-fonts:
362 \begin{description}
363 \item[{Numbers=Lowercase}] to get lowercase digits
364 {\addfontfeature{Numbers=Lowercase} 1,2,3} instead of 1,2,3;
365 the default is\\ \style{Numbers=Lining}.
366
367 \item[{SmallCapsFeatures = \{Letters=SmallCaps\}}] the |\textsc{}| command
368 will print larger \textlsc{Small Caps} than the default
369 \textpsc{Petite Caps}.\\
370 The default setting%
371 \footnote{Changed in v0.37 to match the original \pkg{kpfonts} package.},
372 is \style{SmallCapsFeatures = \{Letters=PetiteCaps\}}.
373
374 \item[{Ligatures=TeX}] (default) |'|\quad|!`|\quad|?`|\quad|--|\quad |---|\quad
375 print respectively\quad ’ \quad !` \quad ?`\quad -- \quad ---.
376
377 \item[{Ligatures=Common}] (default) automatic ligatures ff ffi ffl fi fl
378 (plus s\char"200B=).
379
380 \item[{StylisticSet=1}] provides an alternative for glyphs
381 {\addfontfeature{StylisticSet=1} ffi ffl fi fl} (ff is unchanged).
382
383 \item[{Ligatures=Required}] adds {\addfontfeature{Ligatures=Required} ft and tt}
384 ligatures.
385
386 \item[{Ligatures=Rare}] adds {\addfontfeature{Ligatures=Rare} ct and st} ligatures.
387
388 \item[{Style=Swash}] to get the long-tailed capital
389 Q: {\addfontfeature{Style=Swash}Queen, also in small caps (both sizes):
390 \textpsc{Queen} and \textlsc{Queen}}.
391
392 \item[{Style=Historic}] replaces any instance of `s’ by the long variant~`ſ’.
393 It is still possible to get a round `s’ coding it as
394 `\texttt{s\char"200B=}’; this option should no longer be used, it is
395 superseded by \opt{StylisticSet=12} below.
396
397 \item[{StylisticSet=12}] has been described in option \opt{veryoldstyle}
398 p.~\pageref{veryoldstyle}: it operates a contextual substitution of
399 round~`s’ by long~`ſ’. An alias \opt{Style=autolongs} is available if
400 \pkg{kpfonts-otf.sty} has been loaded.
401
402 \item[{Ligatures=Historic}] switches specific ligatures for the long~ſ:
403 {\addfontfeature{Style=Historic,Ligatures=Historic} si, sl, st}.
404
405 \item[{StylisticSet=2}] |\SS| prints {\addfontfeatures{StylisticSet=2}\SS}
406 instead of {\char"1E9E} (capital \textit{Eszett}), ditto for small/petite caps.
407
408 \item[{StylisticSet=3}] replaces the Euro character (€) by the official symbol
409 {\addfontfeatures{StylisticSet=3}(€)} (available in regular, italics,
410 bold and bolditalic).
411
412 \end{description}
413
414 Options may be are chosen for each font, say:
415 \begin{verbatim}
416 \setmonofont{KpMono}[Numbers=Lowercase,Style=Historic]
417 \end{verbatim}
418 but can also be shared by different typefaces:
419 \begin{verbatim}
420 \defaultfontfeatures+[KpRoman,KpSans,KpMono]{Numbers=Lowercase}
421 \defaultfontfeatures+[KpRoman,KpSans]{%
422 Ligatures = Rare,
423 Style = Swash,
424 SmallCapsFeatures = {Letters=PetiteCaps},
425 }
426 \setmainfont{KpRoman}
427 \setsansfont{KpSans}
428 \setmonofont{KpMono}
429 \end{verbatim}
430 Notes :
431
432 1. |\setmonofont{KpMono}|, |\setsansfont{KpSans}|,
433 |\setmainfont{KpRoman}| rely on files \file{KpMono.fontspec},
434 \file{KpSans.fontspec} and \file{KpRoman.fontspec} installed by Kpfonts, to
435 define Italic, Bold, BoldItalic faces,
436 there is no need for options |ItalicFont = |, |BoldFont = |.
437
438 2. Note the |+| ending |\defaultfontfeatures+| : options are \emph{added},
439 not overwriting any other (including those of \file{fontspec.cfg}).
440
441 3. Options can be gathered: |Ligatures={Rare,Historic}| (with braces)
442 is equivalent to |Ligatures=Rare| and |Ligatures=Historic|.
443
444 4. These options can also be switched on and off \emph{locally}
445 using |\addfontfeatures| inside a group, f.i.\ to print lowercase digits
446 {\addfontfeatures{Numbers=Lowercase}1234576890} with a font loaded with option
447 |Numbers=Lining|:
448 \begin{verbatim}
449 {\addfontfeatures{Numbers=Lowercase}1234576890}
450 \end{verbatim}
451 Actually, a shortcut is available in this case: |\oldstylenums{1234576890}|.
452
453 5. With the \family{KpRoman}, it is possible to define two more weights
454 \famvar{Light} and \famvar{Semibold} borrowed from \family{KpLight}:
455 \begin{verbatim}
456 \newfontfamily\KpLight{KpLight}[<same options as KpRoman>]
457 \newcommand*{\ltseries}{\KpLight}
458 \newcommand*{\sbseries}{\KpLight\bfseries}
459 \DeclareTextFontCommand{\textlt}{\ltseries}
460 \DeclareTextFontCommand{\textsb}{\sbseries}
461 \end{verbatim}
462 These weights are then available through |\ltseries|, |\sbseries| commands
463 to be used in a group or alternatively through one argument commands
464 |\textlt{}| and |\textsb{}|.
465
466 With the \family{KpLight}, weights \famvar{Semibold} and \famvar{Extrabold}
467 can be defined similarly.
468
469 \subsection{Options for maths fonts}
470
471 The following options can be passed either to \pkg{unicode-math}%
472 \footnote{See the manual \file{unicode-math.pdf}.}
473 or to |\setmathfont{}|:
474 \begin{description}
475 \item[{math-style =}] \opt{ISO}, \opt{TeX} (default), \opt{french},
476 \opt{upright};
477 \item[{bold-style =}] \opt{ISO}, \opt{TeX} (default), \opt{upright};
478 \item[{partial =}] \opt{upright} (default italic);
479 \item[{nabla =}] \opt{italic} (default upright);
480 \end{description}
481
482 Seven `Style Variants’ are available with Kp-fonts, here are the first three:
483 \begin{description}
484 \item[{Style=mathcal}] (\texttt{+ss01}) commands |\mathcal{}| and |\mathscr{}|
485 print \mathversion{full}$\mathcal{ABC}$ instead of
486 \mathversion{base}$\mathcal{ABC}$ (default), see note below;
487
488 \item[{Style=bbsans}] (\texttt{+ss02}) |\mathbb{}| prints Sans-Serif
489 Blackboard bold capitals \mathversion{full}$\mathbb{ABC}$ for Serif maths fonts
490 \file{KpMath-Regular} and \file{KpMath-light} instead of
491 \mathversion{base}$\mathbb{ABC}$ ;
492
493 \item[{Style=narrowiints}] (\texttt{+ss03}) provides condensed repeated
494 integrals: \mathversion{full}$\iiint$ instead of
495 \mathversion{base}$\iiint$ (default).
496 \end{description}
497
498 \textbf{Note:} if you want commands |$\mathcal{ABC}$| and |$\mathscr{ABC}$| to
499 print \mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathcal{ABC}$
500 respectively, you can use \pkg{unicode-math}’s option |range| this way:\\
501 |\setmathfont{KpMath-Regular}[|\optit{options}|]|\\
502 |\setmathfont{KpMath-Regular}[range={cal,bfcal},StylisticSet=1]|\\
503 Both lines are mandatory: the first one loads \family{KpMath} as usual while
504 the second one modifies |\mathcal{}| command’s output.
505
506 \vspace{\baselineskip}
507 The next four tables present the other Style Variants available:
508 \\[-.5\baselineskip]
509 \begin{minipage}[t]{0.45\linewidth}\centering
510 \captionof{table}{Style=leqslant (\texttt{+ss04})}\hlabel{ss04}
511 \begin{tabular}{@{}lcc@{}}
512 \hline
513 Command & Default & Variant \\
514 \hline
515 \cmd{leq} & $\leq$ & $\leqslant$ \\
516 \cmd{geq} & $\geq$ & $\geqslant$ \\
517 \cmd{nleq} & $\nleq$ & $\nleqslant$ \\
518 \cmd{ngeq} & $\ngeq$ & $\ngeqslant$ \\
519 \cmd{leqq} & $\leqq$ & $\leqqslant$ \\
520 \cmd{geqq} & $\geqq$ & $\geqqslant$ \\
521 \cmd{eqless} & $\eqless$ & $\eqslantless$ \\
522 \cmd{eqgtr} & $\eqgtr$ & $\eqslantgtr$ \\
523 \cmd{lesseqgtr} & $\lesseqgtr$ & $\lesseqslantgtr$ \\
524 \cmd{gtreqless} & $\gtreqless$ & $\gtreqslantless$ \\
525 \cmd{lesseqqgtr} & $\lesseqqgtr$ & $\lesseqqslantgtr$ \\
526 \cmd{gtreqqless} & $\gtreqqless$ & $\gtreqqslantless$ \\
527 \cmd{lesssim} & $\lesssim$ & $\lesssimslant$ \\
528 \cmd{gtrsim} & $\gtrsim$ & $\gtrsimslant$ \\
529 \hline
530 \end{tabular}
531 \end{minipage}\hspace{\fill}
532 \begin{minipage}[t]{0.5\linewidth}\centering
533 \captionof{table}{Style=smaller (\texttt{+ss05})}\hlabel{ss05}
534 \begin{tabular}{@{}lcc@{}}
535 \hline
536 Command & Default & Variant \\
537 \hline
538 \cmd{mid} & $\mid$ & $\shortmid$ \\
539 \cmd{nmid} & $\nmid$ & $\nshortmid$ \\
540 \cmd{parallel} & $\parallel$ & $\shortparallel$ \\
541 \cmd{nparallel} & $\nparallel$ & $\nshortparallel$ \\
542 \cmd{parallelslant} & $\parallelslant$ & $\shortparallelslant$ \\
543 \cmd{nparallelslant} & $\nparallelslant$ & $\nshortparallelslant$ \\
544 \hline
545 \end{tabular}
546 \end{minipage}
547 \par\noindent
548 \begin{minipage}[t]{0.45\linewidth}\centering
549 \captionof{table}{Style=subsetneq (\texttt{+ss06})}\hlabel{ss06}
550 \begin{tabular}{@{}lcc@{}}
551 \hline
552 Command & Default & Variant \\
553 \hline
554 \cmd{subsetneq} & $\subsetneq$ & $\varsubsetneq$ \\
555 \cmd{supsetneq} & $\supsetneq$ & $\varsupsetneq$ \\
556 \cmd{subsetneqq} & $\subsetneqq$ & $\varsubsetneqq$ \\
557 \cmd{supsetneqq} & $\supsetneqq$ & $\varsupsetneqq$ \\
558 \hline
559 \end{tabular}
560 \end{minipage}\hspace{\fill}
561 \begin{minipage}[t]{0.5\linewidth}\centering
562 \captionof{table}{Style=parallelslant (\texttt{+ss07})}\hlabel{ss07}
563 \begin{tabular}{@{}lcc@{}}
564 \hline
565 Command & Default & Variant \\
566 \hline
567 \cmd{parallel} & $\parallel$ & $\parallelslant$ \\
568 \cmd{nparallel} & $\nparallel$ & $\nparallelslant$ \\
569 \cmd{shortparallel} & $\shortparallel$ & $\shortparallelslant$ \\
570 \cmd{nshortparallel} & $\nshortparallel$ & $\nshortparallelslant$ \\
571 \hline
572 \end{tabular}
573 \end{minipage}
574
575 \vspace{\baselineskip}
576 Example: switching styles 4 (leqslant) and 6 (subsetneq) can be achieved
577 coding either\\
578 |\setmathfont{KpMath-Regular.otf}[StylisticSet={4,6}]|\quad or\\
579 |\setmathfont{KpMath-Regular.otf}[Style={leqslant,subsetneq}]|\\
580 but this second syntax is available only if \pkg{kpfonts-otf.sty} has been
581 loaded (eventually with the \opt{symbols} option).
582 \enlargethispage*{\baselineskip}
583
584 \vspace{\baselineskip}
585 \mathversion{full}
586 Table~\vref{cv} shows the available `Glyphs Variants’:
587
588 \begin{table}[ht]
589 \centering
590 \caption{Glyphs Variants}
591 \hlabel{cv}
592 \begin{tabular}{@{}>{\ttfamily}lccl@{}}
593 \hline
594 & Default & Variant & Command\\
595 \hline
596 cv00 & $\Re\quad\Im$ & $\RE\quad\IM$ & \cmd{Re}\quad\cmd{Im}\\
597 cv01 & $\hslash$ & $\mithbar$ & \cmd{hslash} or \cmd{hbar} \\
598 cv02 & $\emptyset$ & $\varemptyset$ & \cmd{emptyset} \\
599 cv03 & $\epsilon$ & $\varepsilon$ & \cmd{epsilon} \\
600 cv04 & $\kappa$ & $\varkappa$ & \cmd{kappa} \\
601 cv05 & $\pi$ & $\varpi$ & \cmd{pi} \\
602 cv06 & $\phi$ & $\varphi$ & \cmd{phi} \\
603 cv07 & $\rho$ & $\varrho$ & \cmd{rho} \\
604 cv08 & $\sigma$ & $\varsigma$ & \cmd{sigma} \\
605 cv09 & $\theta$ & $\vartheta$ & \cmd{theta} \\
606 cv10 & $\Theta$ & $\varTheta$ & \cmd{Theta}\\
607 \hline
608 \end{tabular}
609 \end{table}
610
611 \vspace{\baselineskip}
612 Example: with |\setmathfont{KpMath-Regular.otf}[CharacterVariant={3,6}]|\\
613 commands |\epsilon| and |\phi| print $\varepsilon$
614 and $\varphi$ instead of $\epsilon$ and $\phi$.
615 The same is true of course for all shapes and and weights (upright, bold,
616 bolditalic, sans-derif, etc.): f.i.\ with \opt{math-syle=french}, |\epsilon|
617 and |\phi| print $\symup{\varepsilon}$ and $\symup{\varphi}$ (upright).
618
619 Note about \cmd{hbar}: \pkg{unicode-math} defines \cmd{hbar} as
620 \cmd{hslash} (U+210F) while \pkg{amsmath} provides two different glyphs
621 (italic h with horizontal or diagonal stroke).\\
622 \pkg{kpfonts-otf} now follows \pkg{unicode-math}; the italic h with horizontal
623 stroke can be printed using \cmd{hslash} or \cmd{hbar} together with character
624 variant \texttt{cv01} or with \cmd{mithbar} (replacement for AMS’ command
625 \cmd{hbar}).
626
627 \section{Specific commands defined in \pkg{kpfonts-otf.sty}}
628
629 \subsection{Integrals}
630
631 Kp-fonts offers variants for integral symbols suitable for indefinite
632 integrals, they are coded as |\varint|, |\variint|, |\variiint|, |\variiiint|
633 and |\varidotsint|. Compare $\int f(t)\,dt$ and $\varint f(t)\,dt$ and also
634
635 \[\int f(t)\,dt \qquad\text{and}\qquad\varint f(t)\,dt\]
636
637 |\D{...}| prints an upright `d’ and improves kernings around the differential
638 element:
639 |\displaystyle\varint f(t)\D{t}| prints $\displaystyle\varint f(t)\D{t}$.
640
641
642 \subsection{Specific maths symbols}
643 \label{ssec:symb-spec-kp}
644
645 The next tables present symbols unavailable as Unicode characters, they
646 are coded in Kp-fonts’ private zone.
647
648 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
649 \verb=\mmapsto=&\mmapsto&\verb=\longmmapsto=&\longmmapsto\\
650 \verb=\mmapsfrom=&\mmapsfrom&\verb=\longmmapsfrom=&\longmmapsfrom\\
651 \verb=\Mmapsto=&\Mmapsto&\verb=\Longmmapsto=&\Longmmapsto\\
652 \verb=\Mmapsfrom=&\Mmapsfrom&\verb=\Longmmapsfrom=&\Longmmapsfrom\\
653 \verb=\leftrightdasharrow=&\leftrightdasharrow&\verb=\leadsto=&\leadsto
654 \end{tabular}\end{center}
655
656 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
657 \verb=\boxright=&\boxright&\verb=\boxleft=&\boxleft\\
658 \verb=\circleright=&\circleright&\verb=\circleleft=&\circleleft\\
659 \verb=\Diamondright=&\Diamondright&\verb=\Diamondleft=&\Diamondleft\\
660 \verb=\boxdotright=&\boxdotright&\verb=\boxdotleft=&\boxdotleft\\
661 \verb=\circledotright=&\circledotright&\verb=\circledotleft=&\circledotleft\\
662 \verb=\Diamonddotright=&\Diamonddotright&\verb=\Diamonddotleft=&\Diamonddotleft
663 \end{tabular}\end{center}
664
665 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
666 \verb=\boxRight=&\boxRight&\verb=\boxLeft=&\boxLeft\\
667 \verb=\boxdotRight=&\boxdotRight&\verb=\boxdotLeft=&\boxdotLeft\\
668 \verb=\DiamondRight=&\DiamondRight&\verb=\DiamondLeft=&\DiamondLeft\\
669 \verb=\DiamonddotRight=&\DiamonddotRight&\verb=\DiamonddotLeft=&\DiamonddotLeft
670 \end{tabular}\end{center}
671
672 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
673 \verb=\multimapdot=&\multimapdot&\verb=\multimapdotinv=&\multimapdotinv\\
674 \verb=\multimapdotboth=&\multimapdotboth\\
675 \verb=\multimapbothvert=&\multimapbothvert&\verb=\multimapdotbothvert=&\multimapdotbothvert\\
676 \verb=\multimapdotbothAvert=&\multimapdotbothAvert&\verb=\multimapdotbothBvert=&\multimapdotbothBvert
677 \end{tabular}\end{center}
678
679 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}|r>{$}c<{$}}
680 \verb=\capplus=&\capplus&\verb=\sqcupplus=&\sqcupplus&\verb=\sqcapplus=&\sqcapplus\\
681 \verb=\parallelslant=&\parallelslant&\verb=\colonsim=&\colonsim&\verb=\colonapprox=&\colonapprox\\
682 \verb=\parallelbackslant=&\parallelbackslant&\verb=\Colonsim=&\Colonsim&\verb=\Colonapprox=&\Colonapprox\\
683 \verb=\eqqColon=&\eqqColon&\verb=\Colondash=&\Colondash&\verb=\dashColon=&\dashColon\\
684 \end{tabular}\end{center}
685
686 \begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}|r>{$}c<{$}}
687 \verb=\strictif=&\strictif&\verb=\strictfi=&\strictfi&\verb=\strictiff=&\strictiff\\
688 \verb=\circledvee=&\circledvee&\verb=\circledwedge=&\circledwedge&\verb=\circledbar=&\circledbar\\
689 \verb=\openJoin=&\openJoin&\verb=\opentimes=&\opentimes&\verb=\VvDash=&\VvDash\\
690 \verb=\lambdaslash=&\lambdaslash&\verb=\lambdabar=&\lambdabar&\verb=\Wr=&\Wr
691 \end{tabular}\end{center}
692
693 \begin{center}
694 \renewcommand{\arraystretch}{2}
695 \begin{tabular}{r>{$}c<{$}c|r>{$}c<{$}c}
696
697 \verb+\idotsint+ &\idotsint& $\displaystyle\idotsint$\\
698 \verb+\ointclockwise+ &\ointclockwise&$\displaystyle\ointclockwise$
699 &\verb+\varointctrclockwise+&\varointctrclockwise& $\displaystyle\varointctrclockwise$\\
700 \verb+\oiintclockwise+ &\oiintclockwise&$\displaystyle\oiintclockwise$&\verb+\oiintctrclockwise+&\oiintctrclockwise&$\displaystyle\oiintctrclockwise$\\
701 \verb+\varoiintclockwise+&\varoiintclockwise& $\displaystyle\varoiintclockwise$&\verb+\varoiintctrclockwise+&\varoiintctrclockwise&$\displaystyle\varoiintctrclockwise$\\
702 \verb+\oiiintclockwise+ &\oiiintclockwise&$\displaystyle\oiiintclockwise$&\verb+\oiiintctrclockwise+ &\oiiintctrclockwise&$\displaystyle\oiiintctrclockwise$\\
703 \verb+\varoiiintclockwise+ &\varoiiintclockwise& $\displaystyle\varoiiintclockwise$&\verb+\varoiiintctrclockwise+&\varoiiintctrclockwise&$\displaystyle\varoiiintctrclockwise$\\
704 \verb+\sqiint+&\mbox{$\sqiint$}&$\displaystyle\sqiint$&\verb+\sqiiint+&\mbox{$\sqiiint$}&$\displaystyle\sqiiint$
705 \end{tabular}
706 \end{center}
707
708 The full list of Unicode symbols available with Kp-fonts is shown in file
709 \file{unimath-kpfonts.pdf}.
710
711 \subsection{Wide accents}
712
713 \begin{itemize}
714 \item \cmd{wideoverbar} and \cmd{mathunderbar}%
715 \footnote{\cmd{overline} and \cmd{underline} are not font related,
716 they are based on \cmd{rule}.}
717 \[\wideoverbar{x}\quad \wideoverbar{xy}\quad \wideoverbar{xyz}\quad
718 \wideoverbar{A\cup B}\quad \wideoverbar{A\cup (B\cap C)\cup D}\quad
719 \mathunderbar{m+n+p}\]
720
721 \item \cmd{widehat} and \cmd{widetilde}
722 \[\widehat{x}\; \widehat{xx} \;\widehat{xxx} \;\widehat{xxxx}\;
723 \widehat{xxxxx} \;\widehat{xxxxxx} \;\widetilde{x}\; \widetilde{xx}\;
724 \widetilde{xxx} \;\widetilde{xxxx} \;\widetilde{xxxxx}\;
725 \widetilde{xxxxxx}\]
726
727 \item \cmd{widecheck} and \cmd{widebreve}
728 \[\widecheck{x}\quad \widecheck{xxxx}\quad \widecheck{xxxxxx}\quad
729 \widebreve{x}\quad \widebreve{xxxx}\quad \widebreve{xxxxxx}\]
730
731 \item \cmd{overparen} and \cmd{underparen}
732 \[\overparen{x}\quad \overparen{xy}\quad \overparen{xyz}\quad
733 \mathring{\overparen{A\cup B}}\quad
734 \overparen{A\cup (B\cap C)\cup D}^{\smwhtcircle}\quad
735 \overparen{x+y}^{2}\quad \overparen{a+b+...+z}^{26}\]
736 \[\underparen{x}\quad \underparen{xz} \quad \underparen{xyz}
737 \quad \underparen{x+z}_{2}\quad \underparen{a+b+...+z}_{26}\]
738
739 \item \cmd{overbrace} and \cmd{underbrace}
740 \[\overbrace{a}\quad \overbrace{ab}\quad \overbrace{abc}\quad
741 \overbrace{abcd}\quad \overbrace{abcde}\quad
742 \overbrace{a+b+c}^{3}\quad \overbrace{ a+b+. . . +z }^{26}\]
743 \[\underbrace{a}\quad\underbrace{ab}\quad\underbrace{abc}\quad
744 \underbrace{abcd}\quad \underbrace{abcde}\quad
745 \underbrace{a+b+c}_{3} \quad \underbrace{ a+b+...+z }_{26}\]
746
747 \item \cmd{overrightarrow} and \cmd{overleftarrow}
748 \[\overrightarrow{v}\quad \overrightarrow{M}\quad \overrightarrow{vv}
749 \quad \overrightarrow{AB}\quad \overrightarrow{ABC}
750 \quad \overrightarrow{ABCD} \quad \overrightarrow{ABCDEFGH}.
751 \]
752 \[\overleftarrow{v}\quad \overleftarrow{M}\quad \overleftarrow{vv}
753 \quad \overleftarrow{AB}\quad \overleftarrow{ABC}
754 \quad \overleftarrow{ABCD} \quad \overleftarrow{ABCDEFGH}\]
755
756 \item Finally \cmd{widearc} and \cmd{widearcarrow} (or \cmd{overrightarc})
757 \[\widearc{AMB}\quad \widearcarrow{AMB}\]
758 \end{itemize}
759
760 All the extensible arrows provided by the \pkg{mathtools} package are
761 available (loading \pkg{kpfonts-otf.sty} is required), f.i.:
762 \[X \xLeftrightarrow{\text{above}} Y \xhookrightarrow[\text{under}]{}
763 Z\xmapsto{\text{above}} W\]
764
765 A wide range of extensible vertical delimiters is provided:
766 \[ \left/
767 \begin{pmatrix} a_{1} \\ a_{2} \\ a_{3} \end{pmatrix}
768 \begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \end{bmatrix}
769 \begin{Bmatrix} a_{1} \\ a_{2} \\ a_{3} \end{Bmatrix}
770 \begin{vmatrix} a_{1} \\ a_{2} \\ a_{3} \end{vmatrix}
771 \begin{Vmatrix} a_{1} \\ a_{2} \\ a_{3} \end{Vmatrix}
772 \left\lVvert\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\Vvert
773 \left\lceil \begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rceil
774 \left\lfloor\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rfloor
775 \left\lBrack\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rBrack
776 \left\langle\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rangle
777 \left\lAngle\begin{array}{c} a_{1} \\ a_{2} \\ a_{3} \end{array}\right\rAngle
778 \right\backslash \]
779
780 \subsection{Maths Versions}
781
782 Different versions of the \family{KpMath} fonts may be defined in the
783 document’s preamble:\\
784 |\setmathfont{KpMath-Regular.otf}[version=base|, \optit{options} |]|\\
785 |\setmathfont{KpMath-Bold.otf}[version=bold|, \optit{options} |]|\\
786 |\setmathfont{KpMath-Semibold.otf}[version=semibold|, \optit{options} |]|\\
787 |\setmathfont{KpMath-Sans.otf}[version=sans|, \optit{options} |]|\\
788 |\setmathfont{KpMath-Light.otf}[version=light|, \optit{options} |]|\\
789 then, it is easy to switch from one version to another one with
790 |\mathversion{|\optit{name}|}|.
791
792 %\pagebreak[4]
793 Example\footnote{\mathversion{full}Option \opt{CharacterVariant=3} changes
794 $\epsilon$ into $\varepsilon$.} :
795 \begin{verbatim}
796 \setmathfont{KpMath-Regular.otf}[Style=leqslant, CharacterVariant=3]
797 \setmathfont{KpMath-Bold.otf}[version=bold,
798 Style=leqslant, CharacterVariant=3]
799 \setmathfont{KpMath-Sans.otf}[version=sans,
800 Style=leqslant, CharacterVariant=3]
801 \end{verbatim}
802
803 Here is the same equation in three versions, normal, bold and Sans-Serif:
804 \setmathfont{KpMath-Regular.otf}[Style=leqslant, CharacterVariant=3]
805
806 \[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
807 = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]
808
809 |\mathversion{bold}| \mathversion{bold}
810 \[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
811 = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]
812
813 |\mathversion{sans}| \mathversion{sans}
814 \[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
815 = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]
816
817 To get bold formulas you do not need to define |\mathversion{bold}|, you can
818 just use the |\boldmath| command:
819 f.i. |{\boldmath $E=mc^2$}| prints {\boldmath $E=mc^2$}.
820 \end{document}
821
822 %%% Local Variables:
823 %%% mode: latex
824 %%% TeX-engine: luatex
825 %%% TeX-master: t
826 %%% coding: utf-8
827 %%% End: