Debian Codegraph @

texmf-dist/doc/fonts/gelasiomath/gelasiomath-doc.tex

raw
1 % !TEX TS-program = lualatexmk
2 %!TEX encoding = UTF-8 Unicode
3
4 \documentclass[11pt]{article}
5 \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
6 \geometry{letterpaper} % ... or a4paper or a5paper or ...
7 \RequirePackage{etoolbox,trace,bm}
8
9 %\geometry{landscape} % Activate for for rotated page geometry
10 \usepackage[parfill]{parskip}
11 \usepackage{graphicx,fonttable}
12 \usepackage{array,booktabs}
13 \usepackage[T1]{fontenc} % Active encoding for use in math text
14 \usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
15 \usepackage[scaled=.98,varqu,varl]{zi4} % for \mathtt
16 \usepackage[vvarbb]{gelasiomath}
17
18 \iftutex\setmonofont{inconsolata.otf}\fi
19 %\else
20 %\RequirePackage{pdftexcmds}
21 %\usepackage{zi4}
22 %\fi
23 %\usepackage[gelasio]{newtx}
24 %\usepackage{xchsc}
25 \usepackage{booktabs}
26 %\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Gill Sans}
27 %\setmonofont[Scale=MatchLowercase]{Andale Mono}
28
29 \title{Gelasiomath}
30 \author{Michael Sharpe}
31 %\date{} % Activate to display a given date or no date
32
33 \begin{document}
34 \maketitle
35 The newest versions of {\tt newtx.sty} and {\tt newtxmath.sty}
36 and the new {\tt gelasiomath.sty}
37 provide support for the {\tt Gelasio} text fonts and the associated {\tt gelasio} package. Its main features are:
38 \begin{itemize}
39 \item
40 Math support for {\tt gelasio};
41 \item small caps (regular, italic, bold and bold italic) for {\tt gelasio} by means of a work-around using {\tt XCharter} small caps enlarged by 2\%;
42 \item access to numerator, denominator and inferior figures from {\tt pdflatex}. (The {\tt Gelasio} fonts have these figures but {\tt gelasio.sty} does not offer support for them under {\tt pdflatex}.)
43 \item
44 Math figures are lining, rather than simply following the text figure style, which is, by default, oldstyle. E.g., \verb|$1X$| gives $1X$, not 1$X$.
45 \end{itemize}
46
47 The simplest and most capable way to use these support macros is through the small {\tt gelasiomath} package, which works with all LaTeX engines.
48 \begin{verbatim}
49 \usepackage[<options>]{gelasiomath}
50 \end{verbatim}
51 The only options handled directly by {\tt gelasiomath} are {\tt scale} and {\tt scosf}. The {\tt scale} option sets appropriate scales for {\tt gelasio}, {\tt xcharter} and {\tt newtxmath}, taking into account that {\tt gelasio} requires a reduction by the factor {\tt.92} to match {\tt newtxmath}. Option {\tt scosf} specifies that figures in amall caps should be transformed to oldstyle, no matter what the figure style for {\tt gelasio} was set to.
52
53 All other options added to {\tt gelasiomath} are passed along to {\tt gelasio} and {\tt newtxmath}.
54 E.g., to use {\tt gelasio} with lining figures except in small caps, at its natural size with matching math scale, you could write
55 \begin{verbatim}
56 \usepackage[scale=1.087,lining,scosf]{gelasiomath}
57 \end{verbatim}
58
59 %The basic method to load {\tt gelasio} with math support is to include in your preamble the lines
60 %\begin{verbatim}
61 %\usepackage[scale=.92]{gelasio}
62 %\usepackage[gelasio]{newtxmath}
63 %\end{verbatim}
64 %or just
65 %\begin{verbatim}
66 %\usepackage[gelasio]{newtx}
67 %\end{verbatim}
68 %Loading using {\tt newtx} is preferred as it offers scaling both text and math without fiddling arithmetic as well as other enhancements described below. For the remainder of this description, I'll assume you are making use of {\tt newtx}.
69
70 %To add support for XCharter small caps, add to your preamble the line
71 %\begin{verbatim}
72 %\usepackage{xchsc}
73 %\end{verbatim}
74 %No options are available.
75
76 %I recommend applying \verb|\textsc| and \verb|\scshape| only to text, not figures, as {\tt XCharter} figures do not match {\tt Gelasio} figures very well. For example:\\
77
78 The insertion of {\tt xcharter} small caps is complicated by the fact that xcharter capital letters are not a good match for gelasio capitals, and figures are an even worse mismatch. In {\tt gelasiomath}, LaTeX's font switch \verb|\scshape| is redefined to {\tt xcharter} small caps at the appropriate scale, and this in turn leads to a corresponding change of the macro \verb|\textsc|. The following table illustrates the problems with capitals and figures.
79
80 \begin{center}
81 \begin{tabular}{@{} ccc @{}}
82 \toprule
83 Source & Typeset source & Comments \\
84 \midrule
85 Reg. 2345 \verb|{\scshape| SmCap 2345\verb|}|& Reg. 2345 {\scshape SmCap 2345} & figures do not match \\
86 Reg. 2345 \verb|{\scshape| SmCap\verb|}| 2345& Reg. 2345 {\scshape SmCap} 2345 & Caps not good match \\
87 S\verb|{\scshape| mall\verb|}| C\verb|{\scshape| ap\verb|}|& S{\scshape mall} C{\scshape ap}& Better IMO\\
88 \bottomrule
89 \end{tabular}
90 \end{center}
91
92 The macro \verb|\textsc| is left as is and a new macro \verb|\textSC| is defined so as to exclude capitals and figures from the font change to {\tt xcharter}, making use of an {\tt expl3 regex} method I learned from a posting by Enrico Gregorio. (The regex tries to find all capitals in the argument string---this depends on the use of macros to specify non-ASCII capitals.) I found no way to make an equivalent font switch \verb|\SCshape|. The following lines compare the effects of \verb|\textSC| versus \verb|\textsc| for regular, italic, bold and bold italic.
93
94
95 \textSC{Small Caps 2345} v. \textsc{Small Caps 2345}\\
96 {\itshape \textSC{Small Caps 2345} v. \textsc{Small Caps 2345}}\\
97 {\bfseries \textSC{Small Caps 2345} v. \textsc{Small Caps 2345}}\\
98 {\bfseries\itshape \textSC{Small Caps 2345} v. \textsc{Small Caps 2345}}
99
100 Users of XeLaTeX/LuaLaTeX will have to contend with irritating LaTeX Font Warnings about \verb|TU/Gelasio(?)/m/sc[it]| being undefined, but the output will be correct.
101
102 {\bfseries\textSC{New Text Commands}:}
103 \begin{itemize}
104 \item
105 In unicode tex, font switches \verb|\nufigures|, \verb|\defigures| and \verb|\infigures| are defined for numerators, denominators and inferiors as well as the corresponding macros \verb|\textnum|, \verb|\textde|, and \verb|\textinf|.
106 \item (All engines)
107 \verb|\textlf|, \verb|\texttlf|, \verb|\textosf|, \verb|\texttosf| give their arguments in lining figures, tabular lining figures, oldstyle figures and tabular oldstyle figures respectively.
108 \item For {\tt pdflatex}, macros \verb|\textnum|, \verb|\textde|, and \verb|\textinf| are provided, but not the corresponding font switch commands. (These work by changing the baseline of the superior figures.)
109 \item A \verb|\textfrac| macro is provided, intended for regular weight only. E.g., \verb|\textfrac{3}{16}| gives \textfrac{3}{16} and \verb|\textfrac[2]{3}{16}| gives \textfrac[2]{3}{16}.
110 \item
111 There is a stacked fraction macro, \verb|\textsfrac|. E.g.,
112 \verb|\textsfrac[1]{7}{32}| gives \textsfrac[1]{7}{32}. See the documentation for {\tt newtx} for details about the options available. The small denominator figures have configurable size and are made available for general use with the macro \verb|\textsmde|.
113 \end{itemize}
114 See the documentation for the {\tt newtx} package for detailed information about math typesetting, bearing in mind that {\tt gelasiomath} takes care of loading {\tt gelasio} and {\tt newtxmath}. Here is a sample basic preamble using unicode latex.
115
116 \begin{verbatim}
117 % !TEX TS-program = lualatex
118 \documentclass[11pt,leqno]{article}
119 \usepackage[margin=1in]{geometry}
120 \usepackage[parfill]{parskip}
121 \usepackage{array,booktabs}
122 \usepackage[T1]{fontenc} % Active encoding for use in math text
123 \usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
124 \usepackage[scaled=.98,varqu,varl]{zi4} % for \mathtt
125 % the next line loads fontspec
126 \usepackage[amsthm,vvarbb,scosf]{gelasiomath}
127 %\setmonofont and \setsansfont could be set here if
128 % necessary for use in text passages
129 \end{verbatim}
130 Here is a well-known nonsense fragment from \emph{The TeXBook.}
131
132 With a price of \pounds 148, almost anything can be found \textsc{Floating In \textbf{Fields}.} --- ?`But aren't Kafka's
133 Schlo{\ss} and {\AE}sop's {\OE}uvres often \emph{na{\"\i}ve} vis-\`{a}-vis
134 the d{\ae}monic ph{\oe}nix's official r\^{o}le in fluffy souffl\'{e}s?
135
136 \newcommand\ibinom[2]{\genfrac\lbrace\rbrace{0pt}{}{#1}{#2}}
137 % \section*{...}
138 The following is borrowed from \emph{The \LaTeX\ Companion Third Edition}.
139
140 First some large operators both in text:
141 \smash{$ \iiint\limits_{\mathcal{Q}} f(x,y,z)\,dx\,dy\,dz $} and
142 $ \prod_{\gamma\in\Gamma_{\widetilde{C}}}
143 \partial(\widetilde{X}_\gamma) $; and also on display:
144
145 \begin{equation} \begin{split} \iiiint\limits_{\mathbf{Q}} f(w,x,y,z)dwdxdydz
146 & \leq \oint_{\bm{\partial Q}} f’ \left( \max \left\lbrace
147 \frac{\lVert w \rVert}{\lvert w^2 + x^2 \rvert} ;
148 \frac{\lVert z \rVert}{\lvert y^2 + z^2 \rvert} ;
149 \frac{\lVert w \oplus z \rVert}{\lVert x \oplus y \rVert}
150 \right\rbrace \right) \\
151 & \precapprox \biguplus_{\mathbb{Q} \Subset \bar{\mathbf{Q}}}
152 \left[ f^{\ast} \left(
153 \frac{\left\lmoustache\mathbb{Q}(t)\right\rmoustache}
154 {\sqrt {1 - t^2}}
155 \right) \right]_{t=\alpha}^{t=\vartheta} - ( \Delta + \nu - v )^3
156 \end{split} \end{equation}
157
158 For $x$ in the open interval $ \left] -1, 1 \right[ $ the infinite
159 sum in Equation~(2) is convergent; however, this does
160 not hold throughout the closed interval $ \left[ -1, 1 \right] $.
161
162 \begin{equation}
163 (1 - x)^{-k} = 1 + \sum_{j=1}^{\infty} (-1)^j \ibinom{k}{j} x^j
164 \text{\quad for $k \in \mathbb{N}$; $k \neq 0$.} %\label{eq:binom1}
165 \end{equation}
166
167 %\fonttable{Gelasio-Regular-tlf-ot1}
168 \end{document}