Debian Codegraph @

texmf-dist/doc/fonts/newtx/newtxdoc.tex

raw
1 % !TEX TS-program = lualatexmk
2 \def\fsc{11pt}
3 \documentclass[\fsc]{article}
4 \usepackage[margin=1in]{geometry}
5 \usepackage[parfill]{parskip}
6 %\pdfmapfile{=newtx.map}
7
8 %\pdfcompresslevel=0
9 %\pdfgentounicode=1
10 %\input glyphtounicode.tex
11 %\usepackage{pdfx} % v 1.6.4 or higher
12 %\InputIfFileExists{glyphtounicode-cmr.tex}{}{}
13 %\InputIfFileExists{glyphtounicode-ntx.tex}{}{}
14 \usepackage{graphicx}
15 \usepackage{url}
16 \usepackage{trace}
17 \usepackage{fonttable}
18 %\usepackage[debugshow]{tracefnt}
19 \usepackage{xcolor}
20 \usepackage{array,booktabs}
21 % some ad-hoc symbol fonts
22 \font\fAMSa=msam10 at \fsc
23 \font\fAMSb=msbm10 at \fsc
24 \font\ebgmi=ntxebgmi at 11.5pt
25 %\pdfmapfile{=newtx.map}
26 \usepackage[T1]{fontenc} % Active encoding for use in math text
27 %\renewcommand{\rmdefault}{minntx}% Roman and Bold Termes for math
28 \usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf, optional
29 \usepackage[scaled=.98,varqu,varl]{zi4}
30 %\usepackage[amsthm,largesc,theoremfont,trueslanted,scosf]{newtx}% Use newtxmath, not a unicode math package
31 \usepackage[amsthm,theoremfont,newsu,scosf]{newtx}% Use newtxmath, not a unicode math package
32 %\usepackage{amsthm}
33 %\usepackage{newtxmath}
34 %\usepackage[largesc,theoremfont,scosf]{newtxtext}
35 %\usepackage[no-math]{fontspec}
36 %\setmainfont{TeXGyreTermesX}
37 %\setsansfont{sourcecodepro}[scale=MatchLowerCase]
38 \makeatletter
39 \@ifundefined{[email protected]}{\typeout{amsthm NO}}{\typeout{amsthm YES}}
40 \makeatother
41 %theorem settings
42 \newtheoremstyle{oldplain}
43 {\topsep} % ABOVESPACE
44 {\topsep} % BELOWSPACE
45 {\itshape} % BODYFONT
46 {} % INDENT (empty value is the same as 0pt)
47 {\bfseries} % HEADFONT
48 {.} % HEADPUNCT
49 {5pt plus 1pt minus 1pt} % HEADSPACE
50 {} % CUSTOM-HEAD-SPEC
51 \theoremstyle{oldplain}
52 \newtheorem{oldthm}{Theorem}[section]
53 \theoremstyle{plain}
54 \newtheorem{thm}{Theorem}[section]
55 % ed theorem settings
56 \DeclareMathSymbol{\bbZ}{\mathord}{lettersA}{218}
57 \DeclareMathSymbol{\Sumop}{\mathop}{largesymbols}{"50}
58 \usepackage{bm}
59 %\usepackage{hyperref}
60 %\iftutex
61 % \setmonofont{inconsolata}[Scale=MatchLowercase]
62 %\fi
63 \title{New TX font package}
64 \author{Michael Sharpe}
65 \date{\today} % Activate to display a given date or no date
66 \begin{document}
67 \makeatletter
68 %\expandafter\show\csname @textsuperior\endcsname
69 %\expandafter\show\csname [email protected]\endcsname
70 \makeatother
71 %%\show\textsfrac
72 %\show\ntx@TF
73 %\makeatother
74 \maketitle
75 %\char"2044{\addfontfeatures{RawFeature=+ss20;+dnom}\color{red}\char"2044}
76 %1\addfontfeatures{VerticalPosition=Inferior}23
77 %{\itshape italic:;}
78 %\textcircled{M}\textcircled{12}\textfrac[2]{37}{78}
79 %\font\inf=ntxinf-Regular-t1 at \fsc
80 %1{\infigures 1}
81 %x\textsf{x}X\textsf{X}
82 %
83 \section{Introduction}
84 This package is meant to be a replacement for Young Ryu's {\tt txfonts}. It is a complete text ({\tt newtxtext}) and math ({\tt newtxmath}) package with roman text font provided by a Times clone, sans serif based on a \textsf{Helvetica} clone, typewriter faces, plus math symbol fonts whose math italic letters are from a Times Italic clone. As of version 1.4, {\tt newtxtext} no longer depends on {\tt txfonts} but is based on the richer source \textsf{TeXGyre Termes}, but {\tt newtxmath} continues to use the {\tt txfonts} math glyphs with many metric adjustments and some wholesale modifications.
85
86 \textsc{Changes as of version 1.735}
87 \begin{itemize}
88 \item
89 If {\tt newtx} or {\tt newtxtext} detects that a prior package loaded {\tt fontspec}, then it avoids trying to reload it. While this reduces the risk of an {\tt option clash error}, it means that the prior package will have complete resposibility for loading {\tt fontspec} with an option to control its math handling, specifically {\tt no-math}. For example, if using the {\tt xeCJK} package together with {\tt newtxtext.sty} and {\tt newtxmath.sty}, a minimal preamble could be something like:
90 \begin{verbatim}
91 \PassOptionsToPackage{no-math}{xeCJK}
92 \documentclass{ctexart}
93 \setCJKmainfont{SimSun}
94 \usepackage{newtx}
95 \end{verbatim}
96 or
97 \begin{verbatim}
98 \documentclass{article}
99 \usepackage[no-math]{xeCJK}
100 \setCJKmainfont{SimSun}
101 \usepackage{newtx}
102 \end{verbatim}
103 \item Because options {\tt no-math} and {\tt otfmath} were mentioned in previous versions of the documentation, I've kept both in the current version even though not logically necessary as one is the negation of the other. In fact, if both are specified, or, equivalently, both are set equal to {\tt true}, then {\tt otfmath wins}.
104 \end{itemize}
105
106 \textsc{Changes as of version 1.73}
107 \begin{itemize}
108 \item
109 Superior letters and figures distinct from numerators have been added along with some special features. The text switch \verb|\sustyle| (or \verb|\sufigures|) or the commands \verb|\textsu|, \verb|\textsup|, \verb|\textsups| may be used to invoke ordinary superiors.
110 The command \verb|\textsuperscript| is reserved for a form of superiors that respond to adjustments you may specify in the package options, and which are used for footnote marker typesetting: \verb|supscale| rescales them, \verb|supsraised| specifies an amount to move them vertically, and \verb|supLspaced|, \verb|supRspaced| specify additional kerning to be applied at the left and right. These changes are applied in the order: scaling, raising, kerning. All except \verb|supscale| should be dimensions with units like {\tt em} which will scale properly. Their relative vertical positions stack up like this: X\textinf{12}X\textde{345}X\textnu{678}X\textsu{90}.
111 There is also a {\tt supscolor} option that will apply a color specified in a form understood by {\tt xcolor}, like {\tt red!70!black}. \textbf{IMPORTANT: As of version 1.737, the options and code described in this paragraph has been moved to the new completely rewritten {\tt superiors} package.}
112 \item
113 Version 1.732 introduces some new mathematical glyphs. First, there are new curly braces invoked by the option {\tt curlybraces} with {\tt height+depth} of 940, 1200, 1800, 2400, 3000 and 3600 em units. Second, there are three new math symbols:
114 \begin{itemize}
115 \item
116 \verb|\laplace|, $\laplace$, which is an inverted \verb|\nabla|, having more weight in the bottom segment than \verb|\Delta|, $\Delta$.
117 \item
118 \verb|\laplac|, $\laplac$. This is the unicode-math name for the official d'Alembertian operator, {\tt U+29E0}. Unlike $\laplace$, it has more weight in the left and top segments than \verb|\laplace|.
119 \item \verb|\dAlembertian|, $\dAlembertian$, rotates $\laplac$ by 180${}^\circ$, making for a glyph whose weight distribution is a better match for the Laplacian.
120 \end{itemize}
121 % \item A word of warning---there is a difference between XeLaTeX and LuaLaTeX that is very irritating. When processing some of the commands where there may be a numeric argument, such as, for example, \verb|{\addfontfeature{VerticalPosition=Superior}5}|, the output will be as expected with XeLaTeX but not with LuaLaTeX if you have set the document figures to be anything but the default tabular, lining. This happens even though the {\tt sups} table has entries for all other forms ({\tt oldstyle}, {\tt taboldstyle} and {\tt lining}) of main body figures, and the {\tt sups} lookup is ahead of the {\tt lnum}, {\tt tnum}, {\tt onum} and {\tt pnum} lookups. (Similarly for the {\tt subs}, {\tt numr} and {\tt dnom} tables.) The only solution I can see for the moment is to undo any possible figure features other than tabular lining before adding another feature. I've done this in {\tt newtxtext.sty} for the basic commands, like the font switches \verb|\sustyle| and \verb|\infstyle|, and their related commands \verb|\textsu{}| and \verb|\textinf{}|, all of which are safe to use with both XeLaTeX and LuaLaTeX. (Likewise for \verb|\destyle|, \verb|\nustyle| and \verb|\textde{}|, \verb|\textnum{}|.)
122 \item Option {\tt scosf}, which specifies oldstyle figure within small caps, has been extended and now works in all LaTeX engines with both the \verb|\scshape| switch and the macro \verb|\textsc{}|.
123 \end{itemize}
124 \textsc{Very Important:} The math package changed substantially as of version 1.5, changing a number of glyphs, adding an option to reduce the sizes of large operators, and changing the integral signs to a choice of upright and slanted forms, each available in twelve variants. The new options are {\tt upint} (upright integrals) and {\tt smallerops} (smaller large operators.) Some previously available options may no longer have any effect. The changes are described in detail in the section on math mode options. A summary of the changes in version 1.5 is given in Appendix 1.
125
126 Version 1.60 likewise has many additions and changes that are summarized in Appendix 2. Most important is that {\tt newtx} is now able to output a PDF/A-1b compliant pdf using {\tt pdflatex}.
127
128 Another important change took place in version 1.65, where {\tt theoremfont} was reimplemented using a new font family, {\tt ntxth} instead of abusing \verb|\textsl|. By default, users of {\tt theoremfont} will see no change in its functionality, including the use of the macro \verb|\textsl| to output italics with upright punctuation. A new option, {\tt trueslanted}, to {\tt newtxtext} has the following effects:
129 \begin{itemize}
130 \item
131 \verb|\textsl| now outputs slanted text rather than italics with upright punctuation text, but not affecting the usage of the {\tt theoremfont} option to {\tt newtxtext}.
132 \item the former behavior of \verb|\textsl| is now available through the new macro \verb|\textth|, \textsc{aka} \verb|\textthit|.
133 \item \verb|\pagestyle{headings}| now functions as intended with slanted rather than upright figures in the headers.
134 \end{itemize}
135 \section{The new {\tt newtx.sty}}
136 Versions 1.7--1.71 added the ability to process {\tt.tex} documents with all current LaTeX engines, adding {\tt fontspec} based macros as replacements for macros and options formerly defined for non-unicode {\tt latex} processing as needed for unicode latex processing. A new option, {\tt thmslshape}, instructs {\tt theoremfont} to use slanted rather than italic shape, with upright punctuation, of course. There are some new macros and options that work only under unicode LaTeX. The {\tt newtxtext} package is modified very substantially to work for all latex engines.
137
138 Also introduced in 1.7 is {\tt newtx.sty}, which to some extent reduces the (human) memory requirements for loading {\tt newtxtext} and/or {\tt newtxmath} in a way that works with all LaTeX engines.
139
140 \textbf{Basic {\tt newtx} options:}
141
142 \begin{itemize}
143 %\item
144 %{\tt type1text} (or {\tt type1} specifies that text processing should use a type1 package. (The default is to use an otf text package if processing with a unicode engine. With a non-unicode engine, a type1 text package is the default.)
145 \item {\tt otfmath} specifies to use an otf math engine rather than the default type1 math package, {\tt newtxmath}.
146 \item Option {\tt scale} or {\tt scaled} will pass the same {scale} option to both the text package and {\tt newtxmath}.
147 \item For dealing with cases where the text package should be loaded with a different scale from {\tt newtxmath}, you specify separately the options {\tt textscale[d]} and {\tt mathscale[d]}. There is one useful special case to notice: the option {\tt textscale[d]=0} selects a text scale factor that matches to the math scale factor, the latter defaulting to 1 unless otherwise specified.
148 \item You may specify as an option to {\tt newtx} any option valid for {\tt newtxmath}: those are mostly passed directly to {\tt newtxmath}. These will have no effect if you specify a unicode math package.
149 \item Other options are passed along to the text package, with the exception of a few handled by {\tt newtx}.
150 \end{itemize}
151
152 The effect of loading the {\tt newtx} package is fundamentally one of three types, depending on the options you specify and the processing engine.
153 \subsection{Basic example preambles.}
154
155 \textsc{I: Otf text, otf math (requires unicode engine)}
156
157 Supports an arbitrary otf math font with otf text using {\tt TeXGyreTermesX}.
158 \begin{verbatim}
159 % Without newtx package:
160 \usepackage[otfmath]{newtxtext}
161 \usepackage{unicode-math} %loads amsmath
162 \setmathfont{}[] %expects your input here for otf math font and options
163 % or, with newtx package:
164 \usepackage[otfmath]{newtx} % pass options to text package
165 \setmathfont{}[] %expects your input here for otf math font and options
166 \end{verbatim}
167 \textsc{Notes:}
168 \begin{itemize}
169 \item Your option list to {\tt newtx[text]} must include {\tt otfmath}, otherwise it will load {\tt newtxmath}.
170 \item With {\tt newtx}, you may specify some other otf text fonts.
171 \item After loading {\tt newtx} with {\tt otfmath} option, you must load your chosen unicode math package with \verb|\setmathfont{}[]|.
172 \item
173 You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
174 \item When using an otf math font, options to {\tt newtx} are passed only to {\tt newtxtext}.
175
176 \item Babel, if used, must be specified before {\tt newtx[text]}, which loads {\tt fontspec}.
177 \item Polyglossia, if used, must be specified after loading {\tt newtx[text]}.
178 \end{itemize}
179
180 \textsc{II: Otf text, type1 math (requires unicode engine)}
181
182 Supports specially prepared text font packages with {\tt newtxmath}.
183 \begin{verbatim}
184 % Without newtx
185 \renewcommand*{\rmdefault}{minntx} % loads minimal version of text font
186 % Load tt and sans text fonts for use in \mathtt, \mathsf
187 \usepackage[]{newtxmath} % specify math options
188 \usepackage[no-math]{fontspec}
189 \usepackage{} % the chosen otf text font package, or fontspec \setmainfont, etc
190 % or, using newtx
191 % Load tt and sans text fonts for use in \mathtt, \mathsf
192 \usepackage[]{newtx} % options will be passed to text font package and newtxmath
193 %---option no-math may be specified here
194 \end{verbatim}
195 \textsc{Notes:}
196 \begin{itemize}
197 \item If you specify no sf text or tt text fonts before {\tt newtxmath}/{\tt newtx}, those packages will load a Helvetica clone and the typewriter font from {\tt txfonts}. If you prefer to use those from Computer Modern and its descendents, specify options {\tt nohelv}, {\tt nott}.
198 \item Babel, if used, must be specified before {\tt newtx[text]}, which loads {\tt fontspec}.
199 \item Polyglossia, if used, must be specified after loading {\tt newtx[text]}.
200 \end{itemize}
201
202
203
204 \textsc{III: type1 text, type1 math (requires non-unicode engine)}
205 \begin{verbatim}
206 % Without newtx
207 \renewcommand*{\rmdefault}{minntx}% minimal text family, Roman and Bold for math
208 % Load tt and sans text fonts for use in \mathtt, \mathsf
209 \usepackage{newtxmath} % options will be as passed from newtx
210 \usepackage{} % the chosen text package
211 % should load tt and sans math before math
212 % or, using newtx
213 % should load tt and sans math before newtx
214 \usepackage[<options>]{newtx} % Incl name of text font package
215 % if not newtxtext
216 \end{verbatim}
217 \textsc{Notes:}
218
219 \begin{itemize}
220 \item If you specify no sf text or tt text fonts before {\tt newtxmath}/{\tt newtx}, those packages will load a Helvetica clone and the typewriter font from {\tt txfonts}. If you prefer to use those from Computer Modern and its descendents, specify options {\tt nohelv}, {\tt nott}.
221 \item Babel, if used, must be specified before {\tt newtx[text]}.
222 \end{itemize}
223
224 Note that with a unicode engine, it is not possible to load a type1 text font package unless you have created custom {\tt tu}-encoded support files.
225
226
227 % With {\tt newtx}, the simplest invocation could be just
228 %\begin{verbatim}
229 %\documentclass{article}
230 %\usepackage{newtx}
231 %\begin{document}
232 %\end{verbatim}
233 %which would work under all LaTeX engines:
234 %\begin{itemize}
235 %\item
236 %Under {\tt [pdf]latex}, the effect is the same as
237 %\begin{verbatim}
238 %\usepackage{newtxtext, newtxmath}
239 %\end{verbatim}
240 %though it is implemented equivalently as
241 %\begin{verbatim}
242 %% specify newtxtext with tabular lining figures for math operators
243 %\renewcommand{\rmdefault}{minntx} % for math use only
244 %\usepackage{newtxmath}
245 %\usepackage{newtxtext}% type1 text by default
246 %\end{verbatim}
247 %
248 %\item Under unicode LaTeX, in the absence of other options, the implementation is
249 %\begin{verbatim}
250 %% specify newtxtext with tabular lining figures for math operators
251 %\renewcommand{\rmdefault}{minntx} % minimal newtxtext for math use only
252 %\usepackage{newtxmath}
253 %\usepackage{newtxtext}% otf text by default, loads [no-math]fontspec
254 %\end{verbatim}
255 %and the effect is to run unicode latex on the {\tt TeXGyreTermesX} font family for text and use {\tt newtxmath} as the math font.
256 %\end{itemize}
257 %
258 %\begin{itemize}
259 %\item
260 %{\tt otfmath} changes the code above to
261 %\begin{verbatim}
262 %\usepackage{newtxtext}
263 %\RequirePackage{fontspec}
264 %\usepackage{unicode-math} %loads amsmath
265 %\end{verbatim}
266 %which expects a subsequent
267 %\begin{verbatim}
268 %\setmathfont{}[]
269 %\end{verbatim}
270 %line to set up a unicode math font as the partner to text from {\tt TeXGyreTermesX}.
271 \subsection{Options to newtx}
272 Aside from options that are passed along to the text and math packages, {\tt newtx} has options it processes internally.
273 \begin{itemize}
274 \item
275 You may set the scale for both text and math by setting {\tt scale} or, equivalently, {\tt scaled}. Alternatively, you may scale text and math separately by means of the options {\tt textscale[d]}, {\tt mathscale[d]}.
276 \item Option {\tt otfmath} is acted upon only under a unicode engine, and specifies unicode math rather than the default---type1 math using {\tt newtxmath}. The effect is the exact opposite to {\tt no-math}, which would specify math not controlled by {\tt fontspec}.
277 \item Option {\tt subscriptcorrectionfile} allows you to set your own file specifying subscript corrections.
278 \item You may specify as an option to {\tt newtx} the name of any supported text package and any options other than scale[d] that are understood by that package. The default text package is {\tt newtxtext}, which need not be specified explicitly. Other valid options as of early June, 2024, are:
279 \begin{verbatim}
280 libertine
281 libertinus
282 etbb --> ETbb
283 ebgaramond
284 MinionPro
285 minion --> MinionPro
286 cochineal
287 garamondx
288 gelasio
289 baskervillef
290 baskerville --> baskervillef
291 Baskerville --> baskervillef
292 BaskervilleF --> baskervillef
293 baskervaldx
294 Baskervaldx --> baskervaldx
295 erewhon
296 Erewhon --> erewhon
297 XCharter
298 xcharter --> XCharter
299 stickstoo --> stickstootext
300 Stickstoo --> stickstootext
301 stix2 --> stickstootext
302 scholax
303 nc --> scholax
304 scholaxf
305 ncf --> scholaxf
306 \end{verbatim}
307 \end{itemize}
308 The sty file {\tt newtx.sty} stores a good deal of information about each of the supported text packages and uses some of this to translate its macros into forms understood by the text package.
309
310 How the following line in your preamble is interpreted depends on the LaTeX engine and the options you set.
311 \begin{verbatim}
312 \usepackage[libertine,vvarbb]{newtx}
313 \end{verbatim}
314 With non-unicode engines such as {\tt latex+dvips} or {\tt pdflatex}, the result will be the same as would be produced by
315 \begin{verbatim}
316 \renewcommand*{\rmdefault}{minlibertine}% Roman and Bold for math
317 \usepackage[vvarbb]{newtxmath} % vvarbb was passed from newtx
318 \usepackage{libertine} % should load tt and sans math before newtx
319 \end{verbatim}
320 The first line, setting the \verb|\rmdefault| temporarily to {\tt minlibertine}, refers to one of three {\tt fd} files included with the distribution: {\tt t1minlibertine.fd}, {\tt ot1minlibertine.fd}, {\tt ly1minlibertine.fd}, and the one used depends on the last encoding specified before {\tt newtx} with a line like
321 \begin{verbatim}
322 \usepackage[T1]{fontenc}
323 \end{verbatim}
324 If you look at, say, {\tt t1minlibertine.fd} (the ``min'' part of the name is supposed to denote ``minimal''), you will see that it leads to {\tt libertine} text fonts with TLF (Tabular Lining Figures). When {\tt newtxmath} is loaded it is sets its {\tt operators} fonts to the corresponding {\tt libertine} text font so that mathematical operator names, numerals, punctuation and accents are chosen from this font. Indeed, this is the only way it will be used.
325
326 Finally, the actual text font package, {\tt libertine}, is loaded with whatever is selected by the text options you specified. For example, if your options specified to {\tt newtx} included {\tt p,osf}, then all figures in text (but not in math) would be in proportional oldstyle shape.
327
328 There is a ``min'' fd family for each possible text font family, each pointing to TLF figured tfm files, but using a family name that will not conflict in any way with the final text font family. Examples are {\tt minntx} (for {\tt newtxtext}), {\tt minetbb} and so on.
329
330 \subsection*{Options and macros particular to {\tt libertine} and {\tt libertinus}}
331
332 These packages are more complex than most text packages because they contain options to control more than just a Roman text font. Libertinus is more straightforward than libertine in its scaling options, which we summarize below.
333
334 \hspace*{.5in}\textbf{Libertinus scale options:}\\
335 \hspace*{.5in}{\tt ScaleRM}\hspace{.5in}Scale for serifed face.\\
336 \hspace*{.5in}{\tt ScaleSF}\hspace{.5in}Scale for sans serif face.\\
337 \hspace*{.5in}{\tt ScaleTT}\hspace{.5in}Scale for typewriter face.\\
338
339 \hspace*{.5in}\textbf{Libertine scale options:}\\
340 \hspace*{.5in}{\tt llscale}\hspace{.5in}Scale for serifed face.\\
341 \hspace*{.5in}{\tt scale}\hspace{.66in}Scale for sans serif face.\\
342 \hspace*{.5in}{\tt ttscale}\hspace{.5in}Scale for typewriter face.\\
343
344 Libertine also has options {\tt rm} and {\tt sf} which limit the loading to the serif face and the san serif face respectively, and a {\tt mono} option that may be set to {\tt false} to prevent loading its typewriter font.
345
346 Though {\tt libertinus} is now the better choice, there are likely to be many existing documents based on {\tt libertine} and I've tried to set up {\tt newtx} to use scale options that map to both. There are new options to {\tt newtx} that affect only these fonts:
347
348 \hspace*{.5in}{\tt ScaleBaseRM}\hspace{.5in}Scale base for serifed face [1].\\
349 \hspace*{.5in}{\tt ScaleBaseSF}\hspace{.5in}Scale base for sans serif face[1].\\
350 \hspace*{.5in}{\tt ScaleBaseTT}\hspace{.5in}Scale base for typewriter face [.88].\\
351
352 The actual scale that will be applied to the serifed face will be {\tt textscale*ScaleBaseRM}, and similarly for {\tt SF} and {\tt TT}. Note that the default base values are 1, 1, .88.
353
354 Any other scale options other than {\tt scale[d]}, {\tt textscale[d]} and {\tt mathscale[d]} are absorbed by {\tt newtx} and will have no effect.
355
356 %When loading {\tt libertine} from {\tt newtx}, as illustrated above, the {\tt newtx} option {\tt scale} (or {\tt scaled}) is mapped to the {\tt libertine} option {\tt llscale} which controls only the libertine serif font. To control the scales for the typewriter and the sans serif components, you need to add options {\tt ScaleTT=} (should be about 85\% of {\tt scale}) and {\tt ScaleSF=}, which is mapped to the {\tt libertine} option {\tt scale=}, which should be close in value to {\tt scale}
357 %
358 %For {\tt libertinus}, the option names are a bit different. While {\tt scale} is translated to {\tt ScaleRM}, the scale factor for libertine serif, the scale factors for typewriter and sans serif are {\tt ScaleTT} and {\tt Scale SF}.
359
360 The {\tt type1} versions of both {\tt libertine} and {\tt libertinus} do not encode the subscript figures, though the glyphs are available in the {\tt.pfb} and {\tt.otf} files. {\tt Newtx} now includes \{T1, OT1, LY1\} support files for those subscripts and make available the \verb|\textfraction| macro making use of the superior and inferior figures. (This is of course only for non-unicode LaTeX.)
361
362 \subsection{A more general layout using {\tt newtx}}
363
364 A more realistic preamble than those detailed above would follow the general pattern:
365 \begin{verbatim}
366 % !TEX TS-program = xelatex
367 \documentclass[11pt,<amsmath options to pass>]{article}
368 <General packages, babel (optional) and those necessary for latex>
369 <latex encoding, sf and tt fonts to be used by newtxmath>
370 \usepackage[]{newtx} % include all desired options to newtxtext and newtxmath
371 % options nohelv, nott to newtx will prevent it from loading its default sans and tt text fonts in favor of Computer Modern
372 % option amsthm will correctly load that option, if specified
373 <fontspec is loaded, add \setmainfont, \setmonofont etc>
374 % Uncomment example lines below to use polyglossia, which must be loaded after fontspec
375 %\usepackage{polyglossia}
376 %\setdefaultlanguage[variant=american]{english}
377 %\setotherlanguages{french,russian}
378 %\usepackage[]{hyperref} % optional
379 \end{verbatim}
380 For example:
381 \begin{verbatim}
382 % !TEX TS-program = xelatex
383 \documentclass[11pt,leqno]{article}
384 \usepackage[margin=1in]{geometry}
385 \usepackage[parfill]{parskip}
386 \usepackage{graphicx}
387 \usepackage{url}
388 \usepackage{xcolor}
389 \usepackage{array,booktabs}
390 \usepackage[T1]{fontenc} % Active encoding for use in math text
391 \usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
392 \usepackage[scaled=.98,varqu,varl]{zi4} % mathtt
393 \usepackage[amsthm,largesc,theoremfont,trueslanted,scosf]{newtx} % this line loads fontspec
394 %\setmonofont and \setsansfont could be set here if necessary for use in text
395 % polyglossia, if used, must be loaded after fontspec
396 \usepackage{polyglossia}
397 \setdefaultlanguage[variant=american]{english}
398 \setotherlanguages{french,russian}
399 \usepackage[]{hyperref}
400 \end{verbatim}
401 If you process with a unicode engine, {\tt fontspec} will be loaded by {\tt newtxtext}, adding the {\tt no-math} option if option {\tt no-math} was specified to {\tt newtxtext} or {\tt newtx}.
402 \subsection{Notes}
403 %\section{Usage with Lua\LaTeX\ and Xe\LaTeX}
404 %As far as I can tell, \textsf{newtxmath} works with both, but requires a very specific loading order and choice of options. Briefly, the math options must all be loaded prior to loading and using {\tt fontspec}. As of version 1.5, {\tt newtxtext} will load fontspec when processing with XeLaTeX or LuaLaTeX unless one or more of the options {\tt nofontspec}, {\tt type1} is specified. (If you specify the option {\tt no-otfmath} to {\tt newtxtext}, it will pass the option {\tt no-math}to the {\tt fontspec} call. This should be done if {\tt fontspec} will not be expected to load an Opentype package or install math support using {\tt mathspec}.)
405 %
406 %\textsc{Example I: TeXGyreTermesX Opentype + STIX (Opentype).}
407 %\begin{verbatim}
408 %% general setup packages
409 %%\usepackage[greek.polutonico,english]{babel} % if using babel
410 %% next line calls fontspec and loads TeXGyreTermesX otf
411 %\usepackage[theoremfont,trueslanted,largesc,p,osf]{newtxtext} % or newtx
412 %% set mono and sans opentype fonts
413 %\usepackage{unicode-math} % can omit if using newtx instead of newtxtext
414 %% can't load type1 math fonts after this point
415 %\setmathfont{STIX}
416 %%\usepackage{polyglossia} % must load after fontspec, if using polyglossia
417 %% polyglossia setup commands
418 %%\usepackage{hyperref} % if using
419 %\end{verbatim}
420 %\textsc{Notes:}
421 %\begin{itemize}
422 %\item
423 %You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
424 %\item Babel, if used, must be specified before {\tt newtxtext}, which loads {\tt fontspec}.
425 %\item Polyglossia, if used, must be specified after loading {\tt newtxtext}.
426 %\end{itemize}
427 %%\textsc{Example II: newtxtext type1 + STIX (Opentype).}
428 %%\begin{verbatim}
429 %%%\usepackage[greek.polutonico,english]{babel} % if using babel
430 %%% next line does not call fontspec, loads newtxtext type1
431 %%\usepackage[type1,theoremfont,trueslanted,largesc,p,osf]{newtxtext}
432 %%\usepackage{fontspec}
433 %%\usepackage{unicode-math}% can't load type1 math fonts after this
434 %%\setmathfont{STIX}
435 %%%\usepackage{polyglossia} % must load after fontspec, if using polyglossia
436 %%% polyglossia setup commands
437 %%\end{verbatim}
438 %%\textsc{Notes:}
439 %%
440 %%\begin{itemize}
441 %%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts.
442 %%\item
443 %%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
444 %%\item Babel, if used, must be specified before {\tt newtxtext}.
445 %%\item Polyglossia, if used, must be specified after loading {\tt fontspec}.
446 %%\end{itemize}
447 %
448 %\textsc{Example II: TeXGyreTermesX Opentype + newtxmath (type1) + polyglossia + other Opentype.}
449 %\begin{verbatim}
450 %\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode
451 %\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
452 %\usepackage[type1]{cabin}% used only by \mathsf, optional
453 %\usepackage{amsmath} % must be loaded before amsthm if using amsthm
454 %\usepackage{amsthm}% load before newtxmath
455 %\usepackage[vvarbb]{newtxmath}
456 %\usepackage[no-math,largesc]{newtxtext}% pass no-math option to fontspec
457 %% Fontspec will be loaded so that Opentype text fonts may be loaded
458 %\setmainfont{TeXGyreTermesX}
459 %%\setmonofont{...}[]
460 %%\setsansfont{...}[]
461 %%\usepackage{polyglossia} % must load after fontspec
462 %%\setdefaultlanguage[variant=american]{english}
463 %%\setotherlanguages{french,russian}
464 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
465 %\end{verbatim}
466 %With the new {\tt newtx.sty}, the above example may be written as:
467 %\begin{verbatim}
468 %\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
469 %\usepackage[type1]{cabin}% used only by \mathsf, optional
470 %\usepackage[nohelv,amsthm,vvarbb,no-math,largesc]{newtx}
471 %%\setmonofont{...}[]
472 %%\setsansfont{...}[]
473 %%\usepackage{polyglossia} % must load after fontspec
474 %%\setdefaultlanguage[variant=american]{english}
475 %%\setotherlanguages{french,russian}
476 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
477 %\end{verbatim}
478 %
479 %\textsc{Notes:}
480 %
481 %\begin{itemize}
482 %\item The {\tt no-math} option to {\tt newtxtext} causes {\tt fontspec} to load with option {\tt no-math}, preventing the package from loading any unicode math font. This option is automatically set internally by {\tt newtxtext} if it detects that {\tt newtxmath} has already been loaded.
483 %\item
484 %You do not need to load {\tt amsmath}: it is loaded by {\tt newtxmath} However, if you wish to load {\tt amsthm}, load {\tt amsmath}, then {\tt amsthm} before {\tt newtxmath}. As of version 1.7. it is simpler to just make use of the option {\tt amsthm} to {\tt newtx} or to {\tt newtxmath}.
485 %\item Babel, if used, must be specified before {\tt newtxtext}.
486 %\item Polyglossia, if used, must be specified after loading {\tt newtxtext}.
487 %\item The {\tt type1} option to {\tt cabin} is important, preventing it from loading {\tt fontspec}, which would lead to an {\tt option clash} error. The same is true for a number of similar packages, like, e.g., {\tt sourcesanspro}.
488 %\end{itemize}
489 %
490 %%\textsc{Example IV: newtxtext type1 + newtxmath (type1) + polyglossia + other Opentype.}
491 %%\begin{verbatim}
492 %%\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode
493 %%\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
494 %%\usepackage[type1]{cabin}% used only by \mathsf, optional
495 %%\usepackage{amsmath} % must be loaded before amsthm if using amsthm
496 %%\usepackage{amsthm}% load before newtxmath
497 %%\usepackage[vvarbb]{newtxmath}
498 %%\usepackage[no-math]{newtxtext}% pass no-math option to fontspec
499 %%% Fontspec will be loaded so that Opentype text fonts may be loaded
500 %%\usepackage{polyglossia} % must load after fontspec
501 %%\setdefaultlanguage[variant=american]{english}
502 %%\setotherlanguages{french,russian}
503 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
504 %%\end{verbatim}
505 %%\textsc{Notes:}
506 %%\begin{itemize}
507 %%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts.
508 %%\item
509 %%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
510 %%\item Babel, if used, must be specified before {\tt newtxtext}.
511 %%\item Polyglossia, if used, must be specified after loading {\tt fontspec}.
512 %%\item The first seven lines of this example preamble could be taken as a basis for a preamble that will compile under all LaTeX engines.
513 %%\end{itemize}
514 %%
515 %
516 %%Be aware that some text packages (e.g., {\tt cabin}) may contain a line like
517 %%\begin{verbatim}
518 %%\RequirePackage{fontspec}
519 %%\end{verbatim}
520 %%which would prevent (``option clash'' error) a subsequent
521 %%\begin{verbatim}
522 %%\usepackage[no-math]{fontspec}
523 %%\end{verbatim}
524 %%unless suppressed by an appropriate option. E.g.,
525 %%\begin{verbatim}
526 %%\usepackage[type1]{cabin}
527 %%\end{verbatim}
528 %%prevents the problem with the {\tt cabin} package.
529
530
531 \subsection{Limitations of {\tt newtx}}
532
533 1. When using {\tt newtx} with a unicode engine and specifying the option {\tt otfmath}, the only text font you will have available is {\tt newtxtext}. You may specify another package, but {\tt newtx} will change it back to {\tt newtxtext} and issue a message to the console and the {\tt log} file.
534
535 2. You can't use an arbitrary text font with {\tt newtx}. It needs considerable information to be available including how to pair it to a variant of {\tt newtxmath}.
536
537 3. Aside from the minor additions of the stacked fraction macro \verb|\textsfrac|, denominator figures for {\tt libertine-type1} and {\tt libertinus-type1} and an extension of \verb|\textfrac| to those packages, {\tt newtx} is simply a convenience: it loads packages and sets options so that you don't have to remember as many details.
538 The original loading via {\tt newtxtext} and {\tt newtxmath} should still work as long as you remember all the loading rules.
539
540 \section{Newtxmath}
541 The math package {\tt newtxmath} works, after possibly replacing its math Roman and Greek letters, with fonts other than Times that are intermediate in weight between Computer Modern and Times. The free font Linux Libertine is one particular target---it is of nearly the same x-height as Computer Modern, but, not being a \emph{modern} font, does not have a high contrast ratio, and so appears denser than Computer Modern but not as much so as Times. It is meant as a replacement for Times, but differs from it in many characteristics, more similar to MinionPro than Times, and provides a better range of variants than Times---three weights (regular, semi-bold and bold) rather than just two, and has expert features in all weights: old-style figures, more extensive and more interesting ligatures, and small caps. In my opinion, the venerable {\tt libertine} package should at this point be substituted by the newer {\tt libertinus} package. As of version 1.0, {\tt newtx} also offers support for MinionPro as a math font, but with limitations described in detail below. More recently, an option to provide math support for the \textsf{garamondx} text font package was added. Version 1.55 adds support for the {SticksToo} text fonts, a reworking of the {\tt STIX2} text fonts.
542
543 The {\tt newtx} package differs from {\tt txfonts} in the following ways:
544 \begin{itemize}
545 \item
546 the new package is split into separate text and math packages that do not need to be used in conjunction;
547 \item both text and math packages offer options not present in the original package, described below, including the option to use \textsf{libertine} Latin and Greek letters to replace \textsf{Times}, as well as a similar option \textsf{minion};
548 \item wide accent glyphs have been corrected (they should have zero depth) so that they no longer collide with the underlying glyph;
549 \item for those who do not like the integral in \textsf{txfonts}, an emboldened version of the Computer Modern integral is made available, matching the weight of the \textsf{txfonts} symbols---this is no longer available since the original \textsf{txfonts} integral have been replaced;
550 \item an upright partial derivative symbol has been added, named \verb|\uppartial|;
551 \item there is now an option to get braces more pleasing to older eyes;
552 \item macros have been added to bring the calls to Greek symbols more into conformity with \textsc{psnfss} and Mathtime Pro~2;
553 \item problems using \textsc{ams} macro packages before \textsf{txfonts} are settled;
554 \item \verb|\coloneq| and \verb|\eqcolon| now point to the correct glyphs;
555 \item The problem with the {\tt ogonek} accent and tabular environments (bad definition of \verb|\k|) is fixed: (the definition of \verb|\k| is removed as of version 1.628, being no longer of use);
556 \item The default encoding for \textsf{newtxtext} is now T$1$, but support is offered also for OT$1$ and LY$1$. As some add-on packages are available only in T$1$, that seems the best current choice.
557 \item Sans serif is by default taken from {\tt TeXGyreHeros}, and by default at 94\% (was 90\% prior to version 1.7) of the scale factor (set by {\tt scaled}, default value {\tt1}). The option {\tt helvratio=.98} will change that to 98\%. (Option {\tt nohelv} prevents loading {\tt TeXGyreHeros}, leaving {\tt cmss} as the default sans font.)
558 \item Typewriter text is by default taken from {\tt ntxtt}. Option {\tt nott} prevents this, leaving {\tt cmtt} as the default typewriter font.
559 \item \verb|\varkappa| $\varkappa$ has been moved from {\tt AMSb} to {\tt lettersA}, and is now accompanied by an upright form \verb|\upvarkappa| $\upvarkappa$ which behaves as it should when using the {\tt frenchmath} option.
560 \end{itemize}
561 \section{Text mode options}
562 Beginning with version 1.4, the text font component of \textsf{newtx} is no longer dependent on the {\tt txfonts}, and is constructed entirely from \textsf{TeXGyre Termes} and some modifications thereof.
563
564 The text mode environment invoked by
565 \begin{verbatim}
566 \usepackage{newtxtext}
567 \end{verbatim}
568 has several options, a number new to version 1.4: you may write
569 \begin{verbatim}
570 \usepackage[scaled=.93]{newtxtext}
571 \end{verbatim}
572 to load the roman and typewriter text fonts at 93\% of normal size, and the sans serif (\textsf{Helvetica} clone) at scale $0.94*0.93$ (was $0.9*0.93$ prior to version 1.7.) This is not of much utility if the package is used with the math package {\tt newtxmath} to which it is already matched, but may be with other math packages. The options
573 \begin{verbatim}
574 \usepackage[scaled=.95,helvratio=.96]{newtxtext}
575 \end{verbatim}
576 load roman and typewriter text fonts at 95\% of normal size, and the sans serif (\textsf{Helvetica} clone) scaled $0.95*0.96$.
577
578 The option \texttt{osf} instructs the text fonts to use old-style figures \oldstylenums{1234567890} rather than the default lining figures $1234567890$. As of version $1.23$, {\tt newtxtext} loads initially with lining figures so the math package uses lining figures in math mode. The option {\tt osf} changes the default to old-style figures in text at the very end of the preamble, forcing the use of old-style figures in text, but not math. In earlier versions, it was necessary to run
579 \verb|\useosf| after loading {\tt newtxmath}. This is no longer required.
580
581 (New in version $1.65$.) Slanted text is now provided as part of the {\tt newtxtext} package, but requires that you specify the new option {\tt trueslanted}. Without this option, \verb|\textsl| will continue to behave as in earlier versions, outputting italic text with upright punctuation.
582
583 \section{Usage with {\tt babel}}
584 If you use the {\tt babel} package, you should load it before {\tt newtxtext}---for example, using {\tt pdflatex}:
585 \begin{verbatim}
586 \usepackage[<babel options>]{babel}
587 \usepackage[osf]{newtxtext} % or newtx
588 \end{verbatim}
589 More generally, the pattern of the preamble for {\tt pdflatex} should be:
590 \begin{verbatim}
591 <encoding options>
592 %[optional] \usepackage{substitutefont} % now obsolete
593 [optional] \usepackage[<babel options>]{babel}
594 \usepackage[p,osf]{newtxtext} % or newtx
595 % osf in text, lining figures in math
596 [optional] redefine the plain theorem style if necessary
597 <other font loading commands>
598 \usepackage{newtxmath}
599 %<substitutefont commands> obsolete---Use \DeclareFontFamilySubstitution
600 \end{verbatim}
601 Under unicode latex engines, parts of {\tt babel} processing such as {\tt babelfont} load {\tt fontspec}, which may conflict with the subsequent functioning of {\tt newtx/newtxtext} because of a fontspec options conflict. (This requires further study.)
602
603 As an example of a {\tt theoremstyle} definition,
604 \begin{verbatim}
605 \usepackage[theoremfont]{newtxtext}
606 %%% modify the default definition of plain to reduce spacing above and below
607 \newtheoremstyle{plain}
608 {0pt} % ABOVESPACE, extra space above
609 {0pt} % BELOWSPACE, extra space below
610 {\slshape} (or {\thfamily})% BODYFONT, italic with upright figures and punctuation
611 % Change previous line if using option trueslanted---\thfamily, not \slshape
612 {} % INDENT (empty value is the same as 0pt)
613 {\bfseries} % HEADFONT
614 {.} % HEADPUNCT
615 {5pt plus 1pt minus 1pt} % HEADSPACE
616 {} % CUSTOM-HEAD-SPEC\newtheorem{thm}{Theorem}[section]
617 \end{verbatim}
618
619 Here is a specific example following this pattern, but without {\tt theoremfont}.
620 \begin{verbatim}
621 \usepackage[LGR,T1]{fontenc} % spell out all text encodings used
622 \usepackage[utf8]{inputenc} %
623 %\usepackage{substitutefont} % now obsolete
624 \usepackage[greek.polutoniko,english]{babel}
625 \usepackage[largesc,osf]{newtxtext} %
626 \usepackage[varqu,varl]{zi4}% inconsolata
627 \usepackage[type1]{cabin}% sans serif
628 \usepackage[vvarbb]{newtxmath}
629 \useosf % use oldstyle figures except in math
630 \DeclareFontFamilySubstitution{LGR}{\rmdefault}{Tempora}
631 % use Tempora to render Greek text
632 \end{verbatim}
633
634 As of version 1.4, there are four normal figure styles: tabular lining, tabular oldstyle, proportional lining and proportional oldstyle, the default figure alignment being \texttt{tabular}. To make \texttt{proportional} the default, use the option \texttt{p} or \texttt{proportional}.
635
636 Option {\tt defaultsups} (same effect as {\tt defaultsups=true}) forces the package to use default footnote markers (or, at least, those in force when the package is loaded) instead of those preferred by the package---Times Roman superior figures instead of spindly ordinary Times lining figures reduced to about 70\%. (Footnote markers in minipages use the default lowercase italic alphabetic characters, unless otherwise specified by redefining \verb|\thempfootnote|.) For better control over position and size of footnote markers, use the {\tt superiors} package after loading {\tt newtxtext}. The \verb|\sustyle| font switch and its related \verb|\textsu| macro know not only about figures, but also the upper and lower case letters, including \texttt{egrave}, so that traditional French expressions like \textlf{1}\textsup{i\`ere} may be typeset correctly. The Times superiors now contain the symbols often required for footnote marker symbols: \textsu{\textasteriskcentered\textdagger\textdaggerdbl\textsection\textparagraph\textbardbl}.
637
638 %The footnote marker macros in this package work with all LaTeX engines, and with the KOMA classes in all engines.
639 %Their position and spacing may be modified with the following options:
640 %\begin{itemize}
641 %\item
642 %{\tt supscaled} (or {\tt supscale}): a scale factor to apply to the marker.
643 %\item {\tt supsraised}:amount to raise the superiors baseline---should be in units like {\tt ex} so that they scale properly.
644 %\item
645 %{\tt supLspaced}: kerning to apply to the left of the superscript.
646 %\item
647 %{\tt supRspaced}: kerning to apply to the right of the superscript.
648 %\end{itemize}
649 As of version 1.7, there are two additional figure forms having the same sizes as the superior figures: denominator figures aligned to the text baseline and inferior figures whose baseline lies below the text baseline. The latter may be called either with \verb|{\infigures 12345}| {\infigures 12345} or \verb|\textinf{6789}| \textinf{6789}, while denominator figures may be called with the font switches \verb|\defigures|, \verb|\destyle| or by the macro \verb|\textde|. Prior to version 1.7, these were arranged a little differently in LaTeX, and only for upright regular text. With version 1.7, these are available under all \LaTeX\ engines. There is also a much improved (at least in unicode latex) \verb|\textfrac| macro that builds a fraction from numerator and denominator figures: e.g., \verb|\textlf{5}\,\textfrac{7}{80}| renders as \textlf{5}\,\textfrac{7}{80}. The macro was changed starting in version 1.630 to add an optional argument for the integer part, and to allow adjustments to the space before and after the fraction solidus by means of the package options {\tt foresolidus} and {\tt aftsolidus}, which have no effect in unicode latex because they are not needed. Now, for example, \verb|\textfrac[5]{7}{80}| renders as \textfrac[5]{7}{80}.
650
651 In version 1.724 this arrangement has been modified (with option {\tt newsu}, an abbreviation for \emph{new superiors}) whose effect is to leave numerator and denominator figures at the same sizes and positions as in 1.7, but adding larger (by 20\%) superiors and inferiors at revised vertical positions. I think the new superior size and position is more suitable for footnote markers than the old values. For a comparison of the two possibilities:\\ \verb|\textsup{1}\textnum{2}\textde{3}\textinf{4}| renders as \textsup{1}\textnum{2}\textde{3}\textinf{4} under option {\tt newsu} and as {\addfontfeature{VerticalPosition=Numerator}12}%
652 {\addfontfeature{VerticalPosition=Denominator}3}%
653 {\addfontfeature{VerticalPosition=Inferior,RawFeature=+ss19}4} without that option.
654
655 Version 1.7 has a new option, {\tt amsthm}, which loads that package in the correct order. Without that option, if you wish to use the {\tt amsthm} package, the load order is
656 \begin{verbatim}
657 \usepackage{amsmath} %
658 \usepackage{amsthm}
659 \usepackage{newtxmath} % plus other options
660 \end{verbatim}
661 but this may now be simplified to
662 \begin{verbatim}
663 \usepackage[amsthm]{newtxmath} % or newtx
664 % other options may be added
665 \end{verbatim}
666
667 Also, as of version 1.630, there is a custom \verb|\textcircled| macro that gives output similar to but a bit lighter than the existing \verb|\textregistered| glyph. E.g., \verb|\textregistered\textcircled{M}\textcircled{20}| renders as \textregistered\textcircled{M}\textcircled{20}.
668
669 Option \texttt{largesc} changes the small cap glyphs from the default petite caps defined in TeXGyre Termes (same size as in txfonts) to a larger size that, in upright shapes, is metrically compatible with Adobe's small caps. These are about 10\% larger than petite caps. For a comparison, \textsc{Small Caps}, {\usefont{T1}{qtm}{m}{sc}Petite Caps}, and \textsc{\textit{Italic Small Caps}}, {\usefont{T1}{qtm}{m}{scit}Italic Petite Caps}.
670
671 Option \texttt{adobesc} is only for those who own licenses for \textsf{Adobe Times Small Caps} and install them into the \texttt{ptmsc} package downloaded from \textsc{ctan}. This option loads \texttt{largesc} and substitutes the Adobe glyphs, where available, including their larger Regular and Bold tabular oldstyle figures.
672
673 The {\tt theoremfont} option changes the default font used for the {\tt plain} theoremstyle of {\tt amsthm}, keeping italic text but substituting upright figures and punctuation, and, provided you have loaded {\tt amsthm} before {\tt newtxtext}, it will redefine the plain theoremstyle. As if version 1.704, you may specify slanted rather than italic for the body font of theorem statements by means of the option {\tt thmslshape}.
674
675 For example, with option {\tt theoremfont}, but no {\tt thmslshape}, you get theorem statements like this, with body font in italic with upright figures, punctuation and delimiters:
676 %%\end{document}
677
678 %\traceon
679
680 \begin{thm}
681 This is Theorem Italic:
682 %\traceoff
683 text numbers are upright---12345; punctuation is in many cases upright (also, parens, braces \{\} and brackets []). What about question marks and exclamations? Also upright! [These fit better with math mode punctuation and figures, like: for all $x\in[0,1]$, let $f(x)\coloneq \exp(\alpha x)$].
684 \end{thm}
685 Compare this to traditional {\tt plain} theoremstyle with the same text:
686 \begin{oldthm}
687 This is Theorem Italic: text numbers are upright---12345; punctuation is in many cases upright (also, parens, braces \{\} and brackets []). What about question marks and exclamations? Also upright! [These fit better with math mode punctuation and figures, like: for all $x\in[0,1]$, let $f(x)\coloneq \exp(\alpha x)$].
688 \end{oldthm}
689
690 If you are using another theorem package (e.g., ntheorem, theorem) you will have to add your own descriptors as specified in its documentation and set the body font family to \verb|\thfamily|.
691
692 \section{Spacing issues}
693 This new version of {\tt newtxtext} has spacing that is a little different, in its default state, from that of the old {\tt newtxtext}. In small part this is due to the finer kerning of TeXGyre Termes, but mostly because the three parameters that govern inter-word spacing are not the same.
694 \begin{verbatim}
695 txfonts Termes
696 fontdimen2 (interword space) .25em .25em
697 fontdimen3 (interword stretch) .15em .2em
698 fontdimen4 (interword shrink) .06em .1em
699 \end{verbatim}
700 That is, {\tt Termes} has the same normal spacing as {\tt txfonts} but its spacing is more flexible in terms of both stretch and shrink. More frequently than not, a paragraph built with {\tt Termes} will occupy more space than the same built with {\tt txfonts}. For this reason, the package offers some ways to change the spacing parameters. This may be important if you are trying to imitate the pagination of a document built using~{\tt txfonts}.
701
702 \textbf{Behavior under [pdf]LaTeX.}\\
703 Option {\tt tighter} sets the three fontdimen values to those of {\tt txfonts}.
704
705 Option {\tt looser} sets the three fontdimen values to \verb|{.3em,.2em,.1em}| respectively.
706
707 If you want full control, the options {\tt spacing, stretch, shrink} allow you to modify one or more of the above fontdimens. For example,
708 \begin{verbatim}
709 \usepackage[stretch=.15em,shrink=.095em]{newtxtext}
710 \end{verbatim}
711
712 \textbf{Behavior under XeLaTeX and LuaLaTeX.}\\
713 Fontspec offers the {\tt WordSpace=} option for individual control of the space, stretch and shrink, with the value being either an ordered triple like \verb|{1.1,1,.8}| or a single number like {\tt .9}, the latter having the same effect as the triple \verb|{.9,.9,.9}|. These three numbers act as multipliers of {\tt space}, {\tt stretch} and {\tt shrink}. The option that you can set is {\tt spcfactor=}, entering either a number or a triple---e.g., {\tt spcfactor=1.1} or \verb|{1.1,1,.8}|. Note however that {\tt tighter} and {\tt looser} will have an effect if {\tt spcfactor} is not set, amounting to \verb|\spcfactor={1,.625,1}| and \verb|\spcfactor={1.2,1,1}| respectively.
714
715
716 %\section{Usage with Lua\LaTeX\ and Xe\LaTeX}
717 %As far as I can tell, \textsf{newtxmath} works with both, but requires a very specific loading order and choice of options. Briefly, the math options must all be loaded prior to loading and using {\tt fontspec}. As of version 1.5, {\tt newtxtext} will load fontspec when processing with XeLaTeX or LuaLaTeX unless one or more of the options {\tt nofontspec}, {\tt type1} is specified. (If you specify the option {\tt no-otfmath} to {\tt newtxtext}, it will pass the option {\tt no-math}to the {\tt fontspec} call. This should be done if {\tt fontspec} will not be expected to load an Opentype package or install math support using {\tt mathspec}.)
718 %
719 %\textsc{Example I: TeXGyreTermesX Opentype + STIX (Opentype).}
720 %\begin{verbatim}
721 %% general setup packages
722 %%\usepackage[greek.polutonico,english]{babel} % if using babel
723 %% next line calls fontspec and loads TeXGyreTermesX otf
724 %\usepackage[theoremfont,trueslanted,largesc,p,osf]{newtxtext} % or newtx
725 %% set mono and sans opentype fonts
726 %\usepackage{unicode-math} % can omit if using newtx instead of newtxtext
727 %% can't load type1 math fonts after this point
728 %\setmathfont{STIX}
729 %%\usepackage{polyglossia} % must load after fontspec, if using polyglossia
730 %% polyglossia setup commands
731 %%\usepackage{hyperref} % if using
732 %\end{verbatim}
733 %\textsc{Notes:}
734 %\begin{itemize}
735 %\item
736 %You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
737 %\item Babel, if used, must be specified before {\tt newtxtext}, which loads {\tt fontspec}.
738 %\item Polyglossia, if used, must be specified after loading {\tt newtxtext}.
739 %\end{itemize}
740 %%\textsc{Example II: newtxtext type1 + STIX (Opentype).}
741 %%\begin{verbatim}
742 %%%\usepackage[greek.polutonico,english]{babel} % if using babel
743 %%% next line does not call fontspec, loads newtxtext type1
744 %%\usepackage[type1,theoremfont,trueslanted,largesc,p,osf]{newtxtext}
745 %%\usepackage{fontspec}
746 %%\usepackage{unicode-math}% can't load type1 math fonts after this
747 %%\setmathfont{STIX}
748 %%%\usepackage{polyglossia} % must load after fontspec, if using polyglossia
749 %%% polyglossia setup commands
750 %%\end{verbatim}
751 %%\textsc{Notes:}
752 %%
753 %%\begin{itemize}
754 %%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts.
755 %%\item
756 %%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
757 %%\item Babel, if used, must be specified before {\tt newtxtext}.
758 %%\item Polyglossia, if used, must be specified after loading {\tt fontspec}.
759 %%\end{itemize}
760 %
761 %\textsc{Example II: TeXGyreTermesX Opentype + newtxmath (type1) + polyglossia + other Opentype.}
762 %\begin{verbatim}
763 %\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode
764 %\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
765 %\usepackage[type1]{cabin}% used only by \mathsf, optional
766 %\usepackage{amsmath} % must be loaded before amsthm if using amsthm
767 %\usepackage{amsthm}% load before newtxmath
768 %\usepackage[vvarbb]{newtxmath}
769 %\usepackage[no-math,largesc]{newtxtext}% pass no-math option to fontspec
770 %% Fontspec will be loaded so that Opentype text fonts may be loaded
771 %\setmainfont{TeXGyreTermesX}
772 %%\setmonofont{...}[]
773 %%\setsansfont{...}[]
774 %%\usepackage{polyglossia} % must load after fontspec
775 %%\setdefaultlanguage[variant=american]{english}
776 %%\setotherlanguages{french,russian}
777 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
778 %\end{verbatim}
779 %With the new {\tt newtx.sty}, the above example may be written as:
780 %\begin{verbatim}
781 %\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
782 %\usepackage[type1]{cabin}% used only by \mathsf, optional
783 %\usepackage[nohelv,amsthm,vvarbb,no-math,largesc]{newtx}
784 %%\setmonofont{...}[]
785 %%\setsansfont{...}[]
786 %%\usepackage{polyglossia} % must load after fontspec
787 %%\setdefaultlanguage[variant=american]{english}
788 %%\setotherlanguages{french,russian}
789 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
790 %\end{verbatim}
791 %
792 %\textsc{Notes:}
793 %
794 %\begin{itemize}
795 %\item The {\tt no-math} option to {\tt newtxtext} causes {\tt fontspec} to load with option {\tt no-math}, preventing the package from loading any unicode math font. This option is automatically set internally by {\tt newtxtext} if it detects that {\tt newtxmath} has already been loaded.
796 %\item
797 %You do not need to load {\tt amsmath}: it is loaded by {\tt newtxmath} However, if you wish to load {\tt amsthm}, load {\tt amsmath}, then {\tt amsthm} before {\tt newtxmath}. As of version 1.7. it is simpler to just make use of the option {\tt amsthm} to {\tt newtx} or to {\tt newtxmath}.
798 %\item Babel, if used, must be specified before {\tt newtxtext}.
799 %\item Polyglossia, if used, must be specified after loading {\tt newtxtext}.
800 %\item The {\tt type1} option to {\tt cabin} is important, preventing it from loading {\tt fontspec}, which would lead to an {\tt option clash} error. The same is true for a number of similar packages, like, e.g., {\tt sourcesanspro}.
801 %\end{itemize}
802 %
803 %%\textsc{Example IV: newtxtext type1 + newtxmath (type1) + polyglossia + other Opentype.}
804 %%\begin{verbatim}
805 %%\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode
806 %%\usepackage[T1]{fontenc} % T1 is active encoding for use in math text
807 %%\usepackage[type1]{cabin}% used only by \mathsf, optional
808 %%\usepackage{amsmath} % must be loaded before amsthm if using amsthm
809 %%\usepackage{amsthm}% load before newtxmath
810 %%\usepackage[vvarbb]{newtxmath}
811 %%\usepackage[no-math]{newtxtext}% pass no-math option to fontspec
812 %%% Fontspec will be loaded so that Opentype text fonts may be loaded
813 %%\usepackage{polyglossia} % must load after fontspec
814 %%\setdefaultlanguage[variant=american]{english}
815 %%\setotherlanguages{french,russian}
816 %%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal}
817 %%\end{verbatim}
818 %%\textsc{Notes:}
819 %%\begin{itemize}
820 %%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts.
821 %%\item
822 %%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
823 %%\item Babel, if used, must be specified before {\tt newtxtext}.
824 %%\item Polyglossia, if used, must be specified after loading {\tt fontspec}.
825 %%\item The first seven lines of this example preamble could be taken as a basis for a preamble that will compile under all LaTeX engines.
826 %%\end{itemize}
827 %%
828 %
829 %%Be aware that some text packages (e.g., {\tt cabin}) may contain a line like
830 %%\begin{verbatim}
831 %%\RequirePackage{fontspec}
832 %%\end{verbatim}
833 %%which would prevent (``option clash'' error) a subsequent
834 %%\begin{verbatim}
835 %%\usepackage[no-math]{fontspec}
836 %%\end{verbatim}
837 %%unless suppressed by an appropriate option. E.g.,
838 %%\begin{verbatim}
839 %%\usepackage[type1]{cabin}
840 %%\end{verbatim}
841 %%prevents the problem with the {\tt cabin} package.
842
843 \textsc{Macros and Options Modified in Version 1.7:}
844 \begin{itemize}
845 \item
846 \verb|\textfrac| works more precisely under unicode tex because it is possible to adjust kerning between all characters. The effect should not be very noticeable, at least in regular style.
847 \item \verb|\textcircled| is much more capable in opentype LaTeX, using customized letters and figures that are precomposed to allow for custom shaping. The precomposed glyphs in opentype are
848 \begin{itemize}
849 \item
850 Upper and lower case letters in English alphabet: \textcircled{A}\dots\textcircled{z}
851 \item all single figures: \textcircled{0}\dots\textcircled{9}
852 \item all double figures from 10 to 20: \textcircled{10}\dots\textcircled{20}
853 \end{itemize}
854
855 %\item {\tt sups}: the package treats this differently in unicode LaTeX and pdflatex, with handling in the unicode case passed off to the {\tt realscripts} package where the footnote marker font is set to \verb|\normalfont|, meaning that superiors from the current (TeXGyreTermesX) text font are employed.
856 \item {\tt theoremfont}, {\tt thmtabular}, {\tt thmlining} all function in a manner similar to that in {\tt pdflatex}.
857 \item {\tt foresolidus, aftsolidus} are not used in unicode tex.
858 \item {\tt scosf} operates more effectively than in [pdf]latex---in the latter, it seems now very difficult to modify the definition of \verb|\scshape|, and this option works only for \verb|\textsc|.
859 \item {\tt oldSS} (opentype only) controls whether the new German capital sharp S is used or whether the old SS is retained. The former is the default but the option {\tt oldSS} forces the latter by setting {\tt StylisticSet=6}. The effects are summarized in the following tables.
860 \makeatletter
861 \ifntx@otftext
862
863 \begin{center}
864 \begin{tabular}{@{} lcl @{}}
865 \hline
866 Glyph name & glyph & macro\\
867 \hline
868 {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}| or \verb|\SS|\\
869 {\tt uni1E9E.ss06} & {\addfontfeature{StylisticSet=6}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=6}\symbol{"1E9E}}| \\
870 {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\
871 {\tt germandbls.sc.ss06} & {\addfontfeature{StylisticSet=6,RawFeature=+smcp}\ss} & \verb|{\addfontfeature{StylisticSet=6}\textsc{\ss}}| \\
872 \hline
873 \end{tabular}
874 \end{center}
875 \fi % \ifntx@otftext
876 \makeatother
877
878 \noindent Effect of choice of {\tt StylisticSet}:
879 \makeatletter
880 \ifntx@otftext
881
882 \begin{center}
883 \begin{tabular}{@{} ccccc @{}}
884 \hline
885 StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\
886 \hline
887 None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\
888
889 =6 & {\addfontfeature{StylisticSet=6}\ss} & {\addfontfeature{StylisticSet=6}\SS} & {\addfontfeature{StylisticSet=6}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=6}\textsc{\ss}}\\
890 \hline
891 \end{tabular}
892 \end{center}
893 \fi % \ifntxotf
894 \end{itemize}
895 \makeatother
896
897 \section{Math mode options}
898 The package invoked by
899 \begin{verbatim}
900 \usepackage{newtxmath}
901 \end{verbatim}
902 loads the math part of the {\tt txfonts} (with revised metrics and additional glyphs) and should normally, in legacy latex, be loaded \emph{after} the text font and its encoding have been specified, as it uses the text font settings to define how operators, numbers, math accents, \verb|\mathrm|, \verb|\mathbf| etc.\ are rendered. You should also load a typewriter font so as not to generate mysterious error messages about \textsf{metafont} trying to generate \texttt{ectt10}. The package offers a number of options.
903 \begin{itemize}
904 \item {\tt upint} (new as of version 1.5) selects upright integrals---the default shape is slanted. Each shape/size of integral takes one of twelve form, illustrated below in the case of display size slanted integrals.
905 \[\int\quad\oint\quad\iint\quad\iiint\quad\iiiint\quad\oiint\quad\oiiint\quad\varointclockwise\quad\ointctrclockwise\quad\fint\quad\sumint\quad\sqint\]
906 named respectively
907 \begin{verbatim}
908 \int \oint \iint \iiint \iiiint \oiint
909 \oiiint \varointclockwise \ointctrclockwise \fint \sumint \sqint
910 \end{verbatim}
911 The three sizes of the upright integrals look like:
912 \begin{center}
913 \begin{tabular}{@{} cl @{}}
914 \hline
915 Glyph & Command\\
916 \hline
917 $\smallintup$ & \verb|\smallint[up]|\\
918 $\intup$ & \verb|\int[up]| \\
919 $\displaystyle{\intup}$ & \verb|\displaystyle{\int[up]}|\\
920 \hline
921 \end{tabular}
922 \end{center}
923 Note that the suffix {\tt up} is not required unless the document's integral style is slanted. You may find the \verb|\smallint| is useful for inline math mode when it is important not to change the line spacing.
924 \item {\tt smallerops} (new as of version 1.5) causes big operators other than integrals to render up to 20\% less tall, so that displayed formulas may occupy less vertical space. For example, in the following display, the first operator is the usual \verb|\sum|, the second is what you would get with {\tt smallerops}, the third is \verb|\sum| and the fourth is \verb|\smallsum|, the latter being used mainly with inline math.
925 \[\sum \Sumop \sum \smallsum\]
926 Similarly, there are \verb|\smallprod| and \verb|\smallcoprod| which, along with \verb|\smallsum|, are of class {\tt mathop}, unlike their Greek letter equivalents.
927 \item (New as of version 1.5.) Two macros allow you to change {\tt fontdimen} values in math mode: \verb|\setSYdimens| and \verb|\setEXdimens|, which allow you to change the {\tt fontdimen} parameters for the {\tt symbol} and {\tt extension} fonts respectively. They may be used only in your preamble. Their arguments can be any valid \TeX\ commands to change {\tt fontdimen} values. For example:
928 \begin{verbatim}
929 \def\setSYdimens{\fontdimen16\font=2pt\fontdimen17\font=1.15\fontdimen17\font }
930 \end{verbatim}
931 Don't use these unless you know what you're doing.
932 \item {\tt varg} causes the math italic letters \verb|g,v,w,y| to be replaced by versions which are more distinctive---eg, useful for distinguishing math italic \verb|v| from \verb|\nu|;
933 \item{\tt propmathfigs} changes the default figure style in math from tabular lining to proportional lining.
934 \item {\tt varvw} causes the math italic letters \verb|v,w| to be replaced by versions which are more distinctive---eg, useful for distinguishing math italic \verb|v| from \verb|\nu|;
935 \item {\tt libertine} loads different versions of math italic and bold math italic based on \textsf{Libertine} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default;
936 \item (new in version 1.55) {\tt stix2} loads different versions of math italic and bold math italic based on \textsf{StixTwoMath} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case. See the documentation to the {\tt SticksToo} package, which contains more details and some math samples.
937 \item (new in version 1.60) {\tt ebgaramond} loads different versions of math italic and bold math italic based on \textsf{EBGaramond} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case. See the end of Appendix 2 for an example of a preamble. You may in addition specify option {\tt alth} which changes the shape of math h from {\ebgmi h} to {\ebgmi\char250}. (The renderings of \verb|\hslash| and \verb|\hbar| are also changed.)
938 \item (new as of version 1.629) {\tt noto, notosans} load different versions of math italic and bold math italic based on \textsf{NotoSerif}, \textsf{NotoSans} rather than \textsf{Times}. There are some intricacies involved, for which there is a separate package, {\tt notomath}, that tries to offer as simple an interface as it was possible for me to devise.
939 \item (new in version 1.75) {\tt gelasio} loads math italic and math bold italic based on the {\tt gelasio} text fooonts, with Greek math letters taken from an enlarged version of those letters from {\tt XCharter}. It is best to use the separate package {\tt gelasiomath}, which adds several features specific to {\tt gelasio}.
940 \item (new in version 1.62) {\tt nc, ncf} load different versions of math italic and bold math italic based on \textsf{ScholaX} (\textsf{New Century Schoolbook}) rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case. The difference is that option {\tt nc} loads math Greek letters from {\tt newtxmath}, while option {\tt ncf} loads math greek from an adaptation of {\tt fourier} Greek.
941 \item {\tt minion} loads different versions of math italic and bold math italic based on \textsf{MinionPro} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default---see the extended discussion below;
942 \item {\tt garamondx} loads different versions of math italic and bold math italic based on \textsf{garamondx} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default.
943 \item {\tt baskervaldx} (or {\tt Baskervaldx}) loads different versions of math italic and bold math italic based on \textsf{Baskervaldx} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default.
944 \item {\tt baskerville} (or {\tt Baskerville}, or {\tt baskervillef} or {\tt BaskervilleF}) loads different versions of math italic and bold math italic based on \textsf{BaskervilleF} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default.
945 \item {\tt charter} (or {\tt xcharter}) loads different versions of math italic and bold math italic based on \textsf{XCharter} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default. \textbf{As of version 1.53, Greek letters in all styles are taken from new alphabets constructed to match the Charter style.}
946 \item {\tt alty} is new as of version 1.611, and applies only when math mode uses Charter alphabets. It causes math italic y to be rendered using a rounder shape that is less problematic than the default shape because it lacks the long tail of the XCharter Italic {\usefont{T1}{XCharter-TLF}{m}{it}y}.
947 \item {\tt noxchvw} (or {\tt noXchvw} is new as of version 1.54, and applies only when math mode uses Charter alphabets. It causes math italic v and w to be rendered using Charter italic glyphs. Use this only if you don't care if math italic v is hard to distinguish from Greek \verb|\nu|.
948
949 \item {\tt cochineal} loads different versions of math italic and bold math italic based on \textsf{cochineal} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case. There are two additional options specific to {\tt cochineal}.
950 \begin{itemize}
951 \item
952 Option {\tt cochf} replaces the default short math italic f with the long italic f used in text.
953 \item Option {\tt cochrho} replaces the default short form of \verb|\rho| with the the long form used in text.
954 \end{itemize}
955 \item {\tt utopia} (or {\tt heuristica} or {\tt erewhon}) loads different versions of math italic and bold math italic based on \textsf{Utopia} rather than \textsf{Times}---the {\tt varg} and {\tt varvw} options are disabled in this case, as the equivalent variant forms are made available by default. The Heuristica or Erewhon font package must be installed to use this option. (Erewhon is based on Heuristica, but is 6\% smaller and has more complete figures styles and small cap styles, as well as a variety of smaller figures---superior, inferior, numerator, denominator.) For example:
956 \begin{verbatim}
957 \usepackage[osf]{erewhon} %extension of Utopia
958 \usepackage[varqu,varl]{inconsolata} % sans typewriter
959 \usepackage[scaled=.95]{cabin} % sans serif
960 \usepackage[utopia,vvarbb]{newtxmath}
961 \end{verbatim}
962 \item the {\tt libertine} option also replaces both slanted and upright Greek symbols by the corresponding Libertine glyphs, and similarly for {\tt minion}, {\tt garamondx}, {\tt ebgaramond}, {\tt stix2}, {\tt xcharter} and {\tt cochineal};
963 \item
964 {\tt cmintegrals} instructs \textsf{newtxmath} to load a thicker version of the Computer Modern integral in place of the \textsf{newtxmath} default---the txfonts integral (identical to the integral in the Wolfram fonts), which is not to everyone's taste---a consequence is that none of the special forms of \textsf{txfonts} integrals are available;
965 \textbf{as of version 1.5, this option does nothing, as the new default is slanted integrals.}
966 \item
967 % The next line is no longer needed, as newtxmath Requires it
968 %\usepackage{amsmath}% loads amstext, amsbsy, amsopn but not amssymb
969 \verb|\usepackage{newtxmath}|
970 requires {\tt amsmath}---there is no need to load it separately.
971 %On the other hand,
972 %\begin{verbatim}
973 %%\usepackage{amsmath} % no longer needed
974 %\usepackage[cmintegrals]{newtxmath}
975 %\end{verbatim}
976 %allows you to use the forms \verb|\iint|, \verb|\iiint|, \verb|\iiiint| and \verb|\idotsint| defined in {\tt amsmath}, but using the pumped-up Computer Modern integral loaded by {\tt newtxmath}.
977 \item If you wish to use \verb|\usepackage{amsthm}|, place it before loading {\tt newtxmath} or the result will be
978 \begin{verbatim}
979 ! LaTeX Error: Command \openbox already defined.
980 \end{verbatim}
981 As of version 1.7, it is simpler to provide {\tt amsthm} as an option to either {\tt newtx} or {\tt newtxmath}.
982 \item {\tt uprightGreek} and {\tt slantedGreek} determine the form of Greek alphabet loaded---the default is {\tt uprightGreek}, which loads upright uppercase and slanted lowercase Greek symbols, as is customary in Anglo-American mathematical typesetting. With the option {\tt slantedGreek}, which you might want to use if you cared about ISO standards, all Greek symbols are slanted. No matter which is set, \verb|\Gammaup| (or \verb|\upGamma|) gives you upright \verb|\Gamma|, etc, and \verb|\Deltait|, \verb|\zetait| give you italic (i.e., slanted) versions of those letters. If you are using a text font family with properly constructed OT$1$--encoded versions, then, no matter what you chose as the default shape for upper case Greek letters, \verb|\mathnormal{\Omega}| etc will always produce the slanted version. (The macro \verb|\mathnormal| means essentially ``use the version of the symbol in {\tt letters}''---i.e., the math italic form. This did not always work as expected in versions prior to 1.45.) Currently, this works as expected with {\tt newtxtext} and {\tt libertine}. The \verb|\mathsf| macro behaves traditionally in a different way, always producing upright Greek and Latin letters. For slanted output, you would need to create a new macro like the \verb|\mathsfsl| described in \emph{The \LaTeX\ Companion 3}.
983 \item Option {\tt frenchmath} sets the default style in math mode for rendering uppercase Roman and Greek letters to upright, and lowercase Greek letters to upright. (Introduced in v.\ 1.28.)
984 \item The option {\tt cmbraces} instructs {\tt newtxmath} to ignore the brace collections from {\tt txfonts}, substituting a collection based on thickened versions of the Computer Modern braces, which I find much easier to distinguish from other delimiters. This works quite well in regular weight but looks a bit clunky in bold. The option {\tt bigdelims}, which superseded {\tt cmbraces}, is now not necessary---it is the default as of version 1.5.
985 \item Option {\tt nonewtxmathopt} (or {\tt scale}, a mistake I cannot now erase) causes newtxmath to not make use of the optical math sizes (7{\tt pt}, 5{\tt pt}), as preferred by some.
986 \item Option {\tt subscriptcorrection} enables the special spacing of some subscripts. (The default setting is {\tt nosubscriptcorrection}.)
987 \item The \textsf{newtxmath} package contains three different Blackboard Bold alphabets, where the original \textsf{txfonts} contained two. The default, triggered by \verb|\mathbb{}|, takes its glyphs from the font which replaces {\tt msbm} and has the same overall appearance of a hollowed-out text font, which I find neither bold nor blackboard-like. The second option, taken from \textsf{txfonts}, is triggered by \verb|\varmathbb{}|, is more geometric and, in my opinion, preferable but not optimal. The option {\tt varbb} makes \verb|\mathbb{}| synonymous with \verb|\varmathbb{}|. The third option is the double-struck glyphs from the STIX collection. See the expanded discussion below.
988 \item {\tt noOT1} affects only those text-math combinations where {\tt operators} is defined by default to {\tt OT1} with Greek uppercase letters. It causes {\tt operators} to keep the same encoding as in tex, allowing operator names to use accented characters, but possibly losing some calls for Greek uppercase. In particular, this can damage the behavior of {\tt siunitx.}
989 You may avoid the loss of accented characters in operator names in several ways. One solution could be to define the affected operator names individually with commands like
990 \begin{verbatim}
991 \DeclareMathOperator{\mIn}{\text{{\fontencoding{\encodingdefault}\selectfont m\'in}}}
992 \end{verbatim}
993 making use of the {\tt amsmath} \verb|\text| macro, which gives you proper scaling in scriptstyle and scriptscriptstyle as well.
994
995 \item {\tt nosymbolsc} causes the package to not load the {\tt symbolsC} fonts, saving a math family. (This font contains mostly exotic symbols, along with some very useful, commonly used symbols like \verb|\coloneq| $\coloneq$, \verb|\eqcolon| $\eqcolon$, \verb|\notin| $\notin$, \verb|\notni| $\notni$, \verb|\neq| $\neq$, \verb|\nsubset| $\nsubset$ and \verb|\nsupset| $\nsupset$, but these have been moved (virtually) to {\tt lettersA} so they may continue to be used even if you use the option {\tt nosymbolsc}.) If this option is selected, then, as of version 1.53, new definitions are made for the missing negated symbols. The package {\tt centernot} is now required.
996 %\item {\tt amssymbols} (the default) and {\tt noamssymbols} determine whether the {\tt txfonts} versions of the \textsc{ams} symbols ({\tt AMSm}) are loaded---if so, they override previous settings in {\tt amsmath}. If you use the option {\tt noamssymbols}, then \verb|\mathbb{}| is set to mean the same as \verb|\varmathbb{}|. (One advantage of {\tt noamssymbols} is that you save two of your precious math families for other purposes, such as setting a couple of external math alphabets by means of the \textsf{mathalfa} package.) \textbf{Important note:} if you load an AMS class, like {\tt amsart}, then some trickery will be involved. From 2018 onward, the AMS classes {\tt noamsfonts} prevents the loading of {\tt AMSa} and {\tt AMSb}, which waste two slots.
997 %The following workaround seems like a reasonable stopgap until then.
998 %\begin{verbatim}
999 %\def\symAMSb{5}
1000 %\documentclass[noamsfonts]{amsart} %or other AMS classes
1001 %\let\symAMSb\@undefined
1002 %\end{verbatim}
1003 %This method of loading the AMS class will save you two slots.
1004 \item {\tt libaltvw} has effect only if the libertine option is selected---in this case, it substitutes for math italic v and w hand-crafted versions based on the Libertine upsilon glyphs.
1005 \item{\tt bigdelims} loads a different math extension font and redefines most of the small and big math delimiters to have larger sizes so that, for example, there is more of a distinction between \verb|(| and \verb|\big(| in math mode. If this option is specified, {\tt cmbraces} is ignored. (This option is unnecessary, as of version 1.5.)
1006 \item{\tt liby} has an effect only if the libertine option is selected---with this option, the math italic y is chosen to be Libertine's italic y instead of the default one from txfonts.
1007 \item As of version $1.18$ of {\tt newtxmath} (and version $1.07$ of {\tt newpxmath}) there are new math accents and macros available.
1008 \begin{itemize}
1009 \item
1010 \verb|\widehat| and \verb|\widetilde| have been extended from $3$ to $6$ sizes, and the smallest is now not as wide as in previous versions. In particular, you can now use, eg, \verb|$\widehat{X}^2$|, which gives $\widehat{X}^2$ without the hat colliding with the superscript.
1011 \item The math double bracket delimiters have been moved to another family so their use is less likely to cause a ``too many math families'' error. The ordinary sizes now have their own macros, \verb|\dlb| and \verb|\drb|, giving, eg, $\dlb 0,T\drb$, as commonly used in probability theory.
1012 \item The new macros \verb|\overgroup|, \verb|\undergroup|, \verb|\overgroupra|, \verb|\overgroupla|, \verb|\undergroupra| and \verb|\undergroupla| are intended as replacements for the \verb|\wideparen| and related macros from the \textsf{yhmath} and \textsf{fourier} packages. In fact, \verb|\overgroup| and \verb|\undergroup| are variants of the existing macros \verb|\overbrace| and \verb|\underbrace|, while the suffixes {\tt ra} and {\tt la} signify right arrow and left arrow respectively. The macro \verb|\widering| places a ring centered over an \verb|\overgroup|, not dissimilar from its use in {\tt yhmath}. Example:
1013 \begin{verbatim}
1014 \[\overgroup{ABC}\quad\overgroupra{ABC}\quad\undergroup{ABC}\quad
1015 \undergroupla{ABC}\quad \widering{ABCD}\]
1016 \end{verbatim}
1017 gives
1018 \[\overgroup{ABC}\quad\overgroupra{ABC}\quad\undergroup{ABC}\quad\undergroupla{ABC}\quad\widering{ABCD}\]
1019 \end{itemize}
1020 \item As of version $1.23$, the package contains new math accents \verb|\widearc| and \verb|\wideOarc| similar in effect to those from \textsf{fourier} and \textsf{kpfonts}. Example:
1021 \begin{verbatim}
1022 \[\widearc{BC}\quad\widearc{ABC}\quad\widearc{ABCD}\quad
1023 \wideOarc{BC}\quad\wideOarc{ABC}\quad\wideOarc{ABCD}\]
1024 \end{verbatim}
1025 gives
1026 \[\widearc{BC}\quad\widearc{ABC}\quad\widearc{ABCD}\quad
1027 \wideOarc{BC}\quad\wideOarc{ABC}\quad\wideOarc{ABCD}\]
1028 %\item {largelibfigs} has effect only if the libertine option is selected---with this option, full-sized figures are substituted in math mode for the default Libertine figures, which are about 8\% below Libertine's Capheight.
1029 \item The option {\tt timesmathacc} changes the default selection of math accents from the Roman text font, forcing the use of the heavier Times accents. (Libertine has much lighter accents which can seem to almost disappear under some conditions.)
1030 \end{itemize}
1031 \bigskip
1032
1033 \subsection{Bold Math Italic macros}
1034 It can be a little awkward to specify bold math italic letters without using the \texttt{bm} package, which may have some unintended consequences for some users. The option \texttt{useBImacros} enables the definitions of macros of the form \verb|\BIA|---\verb|\BIz| that may be used instead, all based on the macro
1035 \begin{verbatim}
1036 \DeclareRobustCommand{\BI@}[1]{%
1037 \begingroup\text{\mathversion{bold}$#1$}\endgroup}
1038 \end{verbatim}
1039 following which, the package conditionally defines, e.g.,
1040 \begin{verbatim}
1041 \DeclareRobustCommand{\BIA}{\BI@{A}}
1042 \end{verbatim}
1043 so that \verb|\BIA| works as expected in all math styles (display, text, script, scriptscript). These macros may be copied with minor changes so that other alphabets may be specified similarly.
1044
1045 \textbf{IMPORTANT:} The Libertine text package is now once again named {\tt libertine}, but requires arguments that are different from the original {\tt libertine} package.
1046
1047 \textsc{Example 1:}
1048 \begin{verbatim}
1049 \usepackage[osf]{newtxtext} % T1, lining figures in math, osf in text
1050 \usepackage{textcomp} % required for special glyphs
1051 %\usepackage{amsmath} % not needed, as it is Required by newtxmath
1052 \usepackage[varvf,vvarbb]{newtxmath}
1053 \usepackage{bm} % load after all math to give access to bold math
1054 %\useosf %no longer required if osf specified
1055 \end{verbatim}
1056 \textsc{Example 2:}
1057 \begin{verbatim}
1058 \usepackage[lining,semibold]{libertine} % a bit lighter than Times--no osf in math
1059 \usepackage[T1]{fontenc} % best for Western European languages
1060 \usepackage{textcomp} % required to get special symbols
1061 \usepackage[varqu,varl]{inconsolata}% a typewriter font must be defined
1062 %\usepackage{amsmath}% not needed, as it is Required by newtxmath
1063 %\usepackage{amsthm}% must be loaded before newtxmath
1064 \usepackage[amsthm,libertine,vvarbb]{newtxmath}
1065 \usepackage[scr=rsfso]{mathalfa}
1066 \usepackage{bm}% load after all math to give access to bold math
1067 %After loading math package, switch to osf in text.
1068 \useosf % for osf in normal text
1069 \end{verbatim}
1070
1071 \textbf{Caution:} If your text font lacks an {\tt OT1} encoded version with uppercase Greek, \verb|\mathrm| and \verb|\mathit| applied to Greek letters won't give you what you expect.
1072 %\section{Usage with Lua\LaTeX\ and Xe\LaTeX}
1073 %As far as I can tell, \textsf{newtxmath} works with both, but requires a very specific loading order and choice of options. Briefly, except for {\tt libertine} text, the math options must all be loaded prior to loading and using {\tt fontspec}. Be aware that some text packages (eg, {\tt cabin}) may contain a line like
1074 %\begin{verbatim}
1075 %\RequirePackage{fontspec}
1076 %\end{verbatim}
1077 %which would prevent (``option clash'' error) a subsequent
1078 %\begin{verbatim}
1079 %\usepackage[no-math]{fontspec}
1080 %\end{verbatim}
1081 %unless suppressed by an appropriate option. E.g.,
1082 %\begin{verbatim}
1083 %\usepackage[type1]{cabin}
1084 %\end{verbatim}
1085 %prevents the problem with the {\tt cabin} package.
1086 %
1087 %The following examples illustrate some general models, the most unintuitive being the first because it loads a small version, {\tt minlibertine}, of libertine text for use in math mode as numbers, basic symbols and operators.
1088 %
1089 %\textsc{Example 3:}
1090 %\begin{verbatim}
1091 %%load text components other than libertine text to be used in math
1092 %\usepackage[T1]{fontenc}
1093 %\usepackage[scaled=.85]{beramono}% used only by \mathtt
1094 %\usepackage[type1]{cabin}% used only for \mathsf
1095 %\usepackage{amsmath}% must be loaded before amsthm, if using
1096 %\usepackage{amsthm}% must be loaded before newtxmath
1097 %\usepackage[libertine]{newtxmath}
1098 %% loads minlibertine because no other Roman text package was specified
1099 %% so that \mathrm and \mathbf also use minlibertine
1100 %\usepackage[scr=rsfso]{mathalfa}
1101 %\usepackage{bm}% load after all math to give access to bold math
1102 %%Now load the otf text fonts using fontspec---won't affect math
1103 %\usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX
1104 %\usepackage{libertine}
1105 %%\usepackage[osf,semibold]{libertine} for osf in text, semibold as bold
1106 %\end{verbatim}
1107 %The next example is similar, but in math mode, numbers, basic symbols, operator names, \verb|\mathrm| and \verb|\mathbf| will render with {\tt fbb-LF}, though math italic and math Greek letters will be from {\tt libertine}. (Note that one specifies the encoding and redefines \verb|\rmdefault|. For reasons I don't yet understand, it may not work to load the font package---i.e., don't substitute \verb|\usepackage{fbb}|, as that will mess up bold in the libertine text package.)
1108 %
1109 %\textsc{Example 4:}
1110 %\begin{verbatim}
1111 %%load text components other than libertine text to be used in math
1112 %\usepackage[T1]{fontenc}
1113 %\renewcommand{\rmdefault}{fbb-LF}% Roman font for use in math mode
1114 %\usepackage[scaled=.85]{beramono}% used only by \mathtt
1115 %\usepackage[type1]{cabin}% used only by \mathsf
1116 %\usepackage{amsmath}% must be loaded before amsthm, if using
1117 %\usepackage{amsthm}% load before newtxmath
1118 %\usepackage[libertine,vvarbb]{newtxmath}
1119 %% does not load minlibertine because another Roman text package was specified
1120 %\usepackage[scr=rsfso]{mathalfa}
1121 %\usepackage{bm}% load after all math to give access to bold math
1122 %%Now load the otf text fonts using fontspec---won't affect math
1123 %\usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX
1124 %\usepackage{libertine}
1125 %\end{verbatim}
1126
1127
1128 \section{Alternate forms of glyphs}
1129 Prior to version 1.5, several math glyphs had alternate forms:
1130 \begin{center}
1131 \begin{tabular}{@{} llll @{}}
1132 \hline
1133 Command & Result & Alternate Commands & Alternate Forms\\
1134 \hline
1135 \verb|\emptyset| & $\emptyset$ & \verb|\varnothing, \emptysetAlt|& $\varnothing, \emptysetAlt$ \\
1136 \verb|\forall| & $\forall$ & \verb|\forallAlt| & $\forallAlt$ \\
1137 \verb|\exists| & $\exists$ & \verb|\existsAlt| & $\existsAlt$ \\
1138 \verb|\nexists| & $\nexists$ & \verb|\nexistsAlt| & $\nexistsAlt$ \\
1139 \hline
1140 \end{tabular}
1141 \end{center}
1142
1143 To use an alternate form throughout your document without changing all occurrences of the usual command, insert something like the following in your preamble after loading \texttt{newtxmath}:
1144 \begin{verbatim}
1145 \let\forall\forallAlt
1146 \end{verbatim}
1147 As of version 1.5, the old {\tt txfonts} versions of \verb|\forall|, \verb|\exists| and \verb|\nexists| have been removed and the {\tt Alt} versions substituted. Both \verb|\forall| and \verb|\forallAlt| generate $\forall$, and similarly with \verb|\exists| and \verb|\nexists|.
1148
1149 \section{Conformity with amsmath}
1150 The {\tt newtxmath} package now contains a \verb|\RequirePackage{amsmath}|, as it uses a number of the macros defined there. Note though that if you wish to use {\tt amsthm}, then you must load them in the following order:
1151 \begin{verbatim}
1152 \usepackage{newtxtext}
1153 ...
1154 \usepackage{amsmath}
1155 \usepackage{amsthm}
1156 \usepackage{newtxmath}
1157 \end{verbatim}
1158 As of version 1.7, it is easier to pass {\tt amsthm} as an option to either {\tt newtxmath} or {\tt newtx}.
1159
1160 To pass options to {\tt amsmath}, you can pass the options as options to \verb|\documentclass|. For example,
1161 \begin{verbatim}
1162 \documentclass[11pt,intlimits]{article}
1163 \usepackage{newtxtext}
1164 \usepackage{newtxmath}
1165 \end{verbatim}
1166 will load {\tt amsmath} with option {\tt intlimits}. As of version 1.14, {\tt newtxmath} respects the {\tt amsmath} macros for placement of limits on integrals.
1167
1168 As of version 1.72, the preamble fragment above may be replaced by
1169
1170 \begin{verbatim}
1171 \documentclass[11pt,intlimits]{article}
1172 \usepackage{newtx} % options to newtx will be passed to text and math
1173 \end{verbatim}
1174
1175
1176 \section{The {\tt minion} option}
1177 This option allows the use of MinionPro as math letters (Latin and Greek) within the math font, but there are some caveats:
1178 \begin{itemize}
1179 \item
1180 you must use a recent version of MinionPro (2.00 minimum, 2.12 or higher prefered), such as the version that comes with recent versions of Adobe Reader. The {\tt MinionPro} package must be generated by {\tt FontPro}, and the CTAN package {\tt minion2newtx} must be installed sepately---it is not in \TeX Live. The details are spelled out in the documentation for the {\tt minion2newtx} package.
1181 \end{itemize}
1182
1183 \section{The \TeX\ math font problem}
1184 Math font packages in \LaTeX\ are susceptible to the ``Too many math alphabets'' error, due to exceeding the limit of just sixteen math font families, or mathgroups, as they are called in \LaTeX. Put in oversimplified terms that do however correctly represent how this all works in \textsf{newtxmath}, the following math fonts are always loaded and permanently (if you didn't prevent loading of some features) occupying slots immediately following \verb|\begin{document}|, and others that may be called for in typesetting a mathematical expression can add to the list as the document grows.
1185
1186 \textsc{Always loaded:}
1187 \begin{verbatim}
1188 0: operators
1189 1: letters
1190 2: symbols
1191 3: largesymbols
1192 4: AMSm (a combination of the old AMSa and AMSb)
1193 5: lettersA
1194 6: symbolsC
1195 7: largesymbolsTXA
1196 8: boldoperators
1197 9: boldletters
1198 10: boldsymbols
1199 11: boldlargesymbols
1200 \end{verbatim}
1201 \textsc{Notes:}
1202 \begin{itemize}
1203 \item If using one of the AMS classes (e.g., {\tt amsart}, {\tt amsbook}), you can save two or more math families by adding the option {\tt noamsfonts} in your \verb|\documentclass| call. As of early 2018, This works only with the most recent versions the AMS classes available in both TexLive and MiKTeX.
1204 \item
1205 The {\tt operators} font is essentially the Roman text font, used for names of operators and as the target for \verb|\mathrm|---its bold version is used as the target for \verb|\mathbf|;
1206 \item {\tt operators} is defined to be the OT$1$ encoded version of the text font in cases where that version is known to contain upright uppercase Greek letters in its first eleven slots---eg, newtxtext, libertine.
1207 \item if you typeset an expression that, say, calls for a single bold glyph from {\tt symbolsC}, that costs you an entire new slot, leaving only two remaining;
1208 \item same with, e.g., \verb|\mathit|;
1209 \item same with an external Fraktur, Blackboard Bold or Script glyphs;
1210 \item if you run out of math alphabets, look first to dropping {\tt AMSm} as well as {\tt symbolsC}, which can save you at least two slots;
1211 \item the {\tt bm} package can cost you several slots, even if you make no use of the bold families it adds;
1212 \item if space is tight, do not call bold versions of the fonts listed above where the bold version is not already loaded, to avoid loading a new mathgroup;
1213 \item if you absolutely need a letter (not a math symbol) from some math font that would normally cost you another mathgroup, you might consider using as if it were text, with something like
1214 \begin{verbatim}
1215 \mbox{{\usefont{U}{ntxmia}{b}{n}X}}
1216 \end{verbatim}
1217 which allows you to use letter X from {\tt boldlettersA} but without any math features;
1218 \item there is a macro \verb|\ShowMathFonts| in {\tt newtxmath} which may be called at any point in your document, which will provide you a list of the mathgroups currently in use. This can be helpful in figuring out where problems occur. The output lines take the form
1219 \begin{verbatim}
1220 (<fam number>: <internal font id> = <tfm name> [newtx name])
1221 \end{verbatim}
1222
1223 \end{itemize}
1224
1225 \section{Bold math fonts}\label{sec:boldmath}
1226 Every math font in the {\tt txfonts} package, and in the {\tt newtx} package, is accompanied by a bold version. Some usage examples are given below. Generally, one may use either \verb|\boldmath| to change an entire formula to bold, or \verb|\boldsymbol| to change one symbol, but the spacing generally works better after loading the {\tt bm} package and using the \verb|\bm| macro.
1227
1228 The text glyphs dotlessi (\verb|\i|) and dotlessj (\verb|\j|) are rarely needed in actual text---in many fonts, roman dotlessi is very similar to the numeral 1. They are however sometimes needed to build special math glyphs. The following table shows how to generate the mathematical forms of dotlessi and dotlessj. I illustrate with only dotlessi---dotlessj is entirely analogous.
1229
1230 \begin{center}
1231 \begin{tabular}{@{} llll @{}}
1232 \hline
1233 Type & Weight & Command & Result \\
1234 \hline
1235 Math Italic & Regular & \verb|$\hat{\imath}$| & $\hat{\imath}$ \\
1236 Math Italic & Bold & \verb|$\bm{\hat{\imath}}$| & $\bm{\hat{\imath}}$ \\
1237 Roman & Regular & \verb|$\hat{\textrm{\i}}$| & $\hat{\textrm{\i}}$\\
1238 Roman & Bold & \verb|$\bm{\hat{\textbf{\i}}}$| & $\bm{\hat{\textbf{\i}}}$\\
1239 \hline
1240 \end{tabular}
1241 \end{center}
1242
1243 In math, bold roman characters are often used to indicate vector quantities, and for this one uses constructions like
1244 \begin{itemize}
1245 \item
1246 \verb|$\mathbf{x}$| produces $\mathbf{x}$;
1247 \item
1248 \verb|$\bm{\mathrm{x}}$| produces $\bm{\mathrm{x}}$ (same as previous but may offer improved spacing);
1249 \item
1250 \verb|$\bm{x}$| produces $\bm{x}$ (not roman);
1251 \item
1252 \verb|$\bm{\hat{\mathbf{x}}}$| produces $\bm{\hat{\mathbf{x}}}$ (with a bold accent);
1253 \item \verb|$\bm{\dot{x}}$| produces $\bm{\dot{x}}$ (bold but not roman);
1254 \item the macro definition
1255 \newcommand{\xyvec}[2]{%
1256 \ensuremath{#1\mkern1.5mu\textbf{\i}#2\mkern1.5mu\textbf{\j}}}
1257 \begin{verbatim}
1258 \newcommand{\xyvec}[2]{%
1259 \ensuremath{#1\mkern1.5mu\textbf{\i}#2\mkern1.5mu\textbf{\j}}}
1260 \end{verbatim}
1261 allows you to write \verb|\xyvec{x}{+y}| to output $\xyvec{x}{+y}$;
1262 \item Another similar macro calls upon the Blackboard Bold alphabets described in detail in the next section:
1263 \renewcommand{\xyvec}[2]{%
1264 \ensuremath{#1\mkern1.5mu\bm{\bbdotlessi}#2\mkern1.5mu\textbf{\bbdotlessj}}}
1265 \begin{verbatim}
1266 \renewcommand{\xyvec}[2]{%
1267 \ensuremath{#1\mkern1.5mu\bm{\bbdotlessi}#2\mkern1.5mu\textbf{\bbdotlessj}}}
1268 \end{verbatim}
1269 so that \verb|\xyvec{x}{+y}| outputs $\xyvec{x}{+y}$.
1270 \item \verb|$\bm{\Gamma}$| produces $\bm{\Gamma}$ (bold Gamma);
1271 \item \verb|$\bm{\hat{\Gamma}}$| produces $\bm{\hat{\Gamma}}$ (bold Gamma with bold accent).
1272 \end{itemize}
1273 (The last two assume that you have effectively set the option {\tt uprightGreek}---the default.)
1274
1275 \section{Blackboard Bold}
1276 Much of what is in this section is a repetition of material from other parts of the document, more expanded and with more emphasis on the differences between the available Blackboard Bold alphabets. It also reflect substantive changes in {\tt newtxmath.sty} version 1.640 that have changed for the better the handling of math alphabets such as \verb|\mathbb| and \verb|\mathscr|. The new handlers maintain consistency of the printed output with prior versions, while greatly improving interactions with the {\tt bm} and {\tt hyperref} packages.
1277
1278 When \textsc{Cost} is mentioned in the following discussion, this is to remind you that you have a total of only sixteen math families available to any document, and it is easy to run out, so I provide the \textsc{Cost} of an option as the number of math families in regular weight only that this would involve. (If you make also use of a bold symbol from one of those families, the \textsc{Cost} could double.)
1279
1280 In the \TeX\ world, Blackboard Bold appeared first in the {\tt amstex} package, with {\tt msam} containing Gothic and {\tt msbm} containing Blackboard Bold. The only weight provided was regular. Those AMS additions, referred to below as \textsf{AMSadd}, were designed to blend well with Computer Modern, with geometric symbols vertically centered on its math axis and line widths matching those in Computer Modern. They are not good matches for the math axis and line width in {\tt newtx}. (\textsc{Cost}=$2$.)
1281
1282 In the original {\tt txfonts}, the \textsf{AMSadd} fonts \verb|msam*| and \verb|msbm*| were replaced by {\tt AMSa} and {\tt AMSb}, with vertical positions and line widths appropriate to Times, each available in regular and bold. (\textsc{Cost}=$2$.) In the {\tt newtx} package, these two seven bit fonts are replaced by one eight bit font. (\textsc{Cost}=$1$.) In the sequel, this will be called \textsf{TXAMSadd}. The Gothic and Blackboard Bold alphabets they contain were not substantially heavier than those in the \textsf{AMSadd} fonts, but the shapes were somewhat different. For example, Blackboard Bold A in the original AMS additions and in the original {\tt txfonts} look as followed, scaled up by a factor of five:\\
1283 \scalebox{5}{\hbox{\fAMSb\char65 }} {\scalefont{5}{$\mathbb{A}$}}\\
1284 In both, there are areas of the glyphs where the narrow gaps between the outlines do not render well at normal text sizes, making for uneven gray blotched areas. In my opinion, neither is good for high quality work. Technically, both work work well with respect to \verb|hyperref| and the macros \verb|\bm|, \verb|\boldmath| and \verb|\boldsymbol|.
1285
1286 The following describe a number of common scenarios relative to the AMS font symbols and show how to minimize additional \textsc{Cost}.
1287 \begin{itemize}
1288 \item
1289 \textbf{I need neither \textsf{AMSadd} nor \textsf{TXAMSadd}:}
1290 \begin{itemize}
1291 \item
1292 Do not load {\tt amssymb}, otherwise \textsf{AMSadd} will be loaded.
1293 \item When loading {\tt newtxmath}, include the option {\tt noamssymbols} to prevent \textsf{TXAMSadd} from loading.
1294 \item If you use one of the AMS classes ({\tt amsart}, {\tt amsbook}, {\tt amsreport}), the default is for that class to load {\tt amsfonts}, but there is a class option {\tt noamsfonts} to prevent this.
1295 \end{itemize}
1296 \item
1297 \textbf{I want to use \textsf{TXAMSadd}, not \textsf{AMSadd}:}
1298 \begin{itemize}
1299 \item
1300 Do not load {\tt amssymb}, otherwise \textsf{AMSadd} will be loaded uselessly, additional \textsc{Cost}=$2$.
1301 \item When loading {\tt newtxmath}, do not include the option {\tt noamssymbols}, so that \textsf{TXAMSadd} will load.
1302 \item If you use one of the AMS classes ({\tt amsart}, {\tt amsbook}, {\tt amsreport}), include the class option {\tt noamsfonts} to prevent \textsf{AMSadd} from loading.
1303 \end{itemize}
1304 \item
1305 \textbf{I want to use \textsf{AMSadd}, not \textsf{TXAMSadd}:}
1306 \begin{itemize}
1307 \item If you use one of the AMS classes ({\tt amsart}, {\tt amsbook}, {\tt amsreport}), do not include the class option {\tt noamsfonts} that prevents \textsf{AMSadd} from loading. Otherwise, load {\tt amssymb}.
1308 \item When loading {\tt newtxmath}, include the option {\tt noamssymbols}, so that \textsf{TXAMSadd} will {\bf NOT} load.
1309 \end{itemize}
1310 \end{itemize}
1311 %Be aware that you may incur additional \textsc{Cost} inadvertently if you load both {\tt amssymb} and {\tt newtxmath}.The following points should be kept in mind when constructing or modifying your preamble involving {\tt newtxmath}:
1312 %\begin{itemize}
1313 %
1314 %{\tt newtxmath} loads the {\tt amsmath} package, so there is no need to explicitly load it.
1315 %\item
1316 %\item Loading the class {\tt amsfonts} is usually an error if you later load {\tt newtxmath}, simply wasting precious math families.
1317 %\item {\tt newtxmath} loads by default the
1318 % \textsf{TXAMSadd} fonts as a replacement for \textsf{AMSadd}, but has an option {\tt noamssymbols} to prevent this.
1319 % \end{itemize}
1320 %More particularly, if you must use one of them, choose the one specifically designed for {\tt newtx} by adopting the following rules.
1321 %\begin{itemize}
1322 %\item do not load the {\tt amssymb} package---the effect would be to add two font math families (four if you use bold) which are in fact intended as a math for Computer Modern, not Times---loading {\tt newtxmath} by default loads replacements suited to Times, and making use of only one math family (provided you make no use of any bold symbol from that font family.)
1323 %\end{itemize}
1324
1325 Newtxmath now has three built-in blackboard bold alphabets, along with package options and macros to call them. In summary:
1326 \begin{itemize}
1327 \item In the absence of one of the options {\tt varbb}, {\tt vvarbb}, and assuming you did not block loading of both \textsf{AMSadd} and \textsf{TXAMSadd}, \verb|\mathbb| will use the alphabet described in the preceding paragraphs, otherwise it will use the alphabet described in the following item.
1328 \item
1329 The second possible alphabet may be specified by the option {\tt varbb}, looking like $\varmathbb{ABC...k}$. It does cooperate with the bolding macro \verb|\bm| and with \verb|hyperref| but, in my opinion, it has appearance problems. It has all uppercase letters, but in versions of {\tt newtx} up to $1.640$, its only lowercase glyph is $\varmathbb{k}$. As of version $1.641$, there is a full lowercase plus \verb|\imath| and \verb|\jmath|. The bold version is identical to the regular version.
1330 \item
1331 The third possibility is specified by the option {\tt vvarbb}, looking like $\vvmathbb{ABC...Za...z0...9}$. It cooperates with the bolding macro \verb|\bm| and with \verb|hyperref| and, in my opinion , looks better than the other two. It is taken from the original STIX math fonts. There is a slightly heavier bold version.
1332 \item No matter which alphabet option you chose, you may use symbols from of of the variant alphabets by means of the macros \verb|\vmathbb|, \verb|\vvmathbb|: e.g., \verb|\vmathbb{N}| gives $\vmathbb{N}$ and \verb|\vvmathbb{C}| gives $\vvmathbb{C}$. Note that for consistency with earlier usage in {\tt newtxmath}, \verb|\varmathbb| is a synonym for \verb|\vmathbb|.
1333 \item In each of the two variant alphabets, there are digits taken from the STIX Blackboard Bold alphabets, as well as {\tt dotlessi} and {\tt dotlessj}.
1334 \item \textbf{Important note:} Under the option {\tt stix2}, there are still three blackboard fonts but the macro \verb|\vmathbb| now points to glyphs from {\tt DSSerif}, a serifed double-struck family that replaces the original variant that is still available under other options. With {\tt stix2}, the {\tt dotlessi} and {\tt dotlessj} glyphs from the {\tt DSSerif} font are provided.%available as \verb|$\imathbbs$| and \verb|$\jmathbbs$|, no matter which blackboard bold option you chose.
1335 As of version $1.659$, the preferred names of $\imath$ and $\jmath$ from other alphabets have been changed so as to follow unicode naming conventions, though the old names will remain as alternatives.
1336 \begin{center}
1337 \begin{tabular}{@{} lll @{}}
1338 \toprule
1339 Old name & New name & Glyph \\
1340 \verb|\imathbb|&\verb|\bbdotlessi|&$\bbdotlessi$\\
1341 \verb|\jmathbb|&\verb|\bbdotlessj|&$\bbdotlessj$\\
1342 \verb|\imathfrak|&\verb|\frakdotlessi|&$\frakdotlessi$\\
1343 \verb|\jmathfrak|&\verb|\frakdotlessj|&$\frakdotlessj$\\
1344 \verb|\imathscr|&\verb|\scrdotlessi|&$\scrdotlessi$\\
1345 \verb|\jmathscr|&\verb|\scrdotlessj|&$\scrdotlessj$\\
1346 \bottomrule
1347 \end{tabular}
1348 \end{center}
1349 \end{itemize}
1350 One interesting feature of the third Blackboard Bold alphabet is that it contains blackboard bold numbers, of which $0$ and $1$ will likely be the most useful, perhaps as operator names. I find $\vvmathbb{1}$=\verb|$\vvmathbb{1}$| useful in specifying an indicator, AKA characteristic function. Here are some examples that hold except with the {\tt stix2} option:
1351 \begin{center}
1352 \begin{tabular}{@{} llll @{}}
1353 \toprule
1354 & Regular & Bold & Remarks \\
1355 \midrule
1356 Default & \verb|$\mathbb{R}$| $\mathbb{R}$& \verb|$\bm{\mathbb{R}}$| $\bm{\mathbb{R}}$& Bold has more interior space\\
1357 & \verb|$\mathbb{R}$| $\mathbb{R}$& \verb|{\boldmath$\mathbb{R}$}| {\boldmath$\mathbb{R}$} & Also ``bold''\\
1358 Variant 1 & \verb|$\varmathbb{R}$| $\varmathbb{R}$ & \verb|$\bm{\varmathbb{R}}$|$\bm{\varmathbb{R}}$ & Bold glyphs same as regular \\
1359 $\dots$or & \verb|$\vmathbb{R}$| $\vmathbb{R}$ & \\
1360 & \verb|$\varmathbb{2}$| $\varmathbb{2}$ & \verb|$\bm{\varmathbb{2}}$| $\bm{\varmathbb{2}}$ & Bold digits are now bolder \\
1361 Variant 2 & \verb|$\vvmathbb{R}$| $\vvmathbb{R}$& \verb|$\bm{\vvmathbb{R}}$| $\bm{\vvmathbb{R}}$ & Truly bold! \\
1362 & \verb|$\vvmathbb{1}$| $\vvmathbb{1}$& \verb|$\bm{\vvmathbb{1}}$| $\bm{\vvmathbb{1}}$ & \\
1363 & \verb|$\vvmathbb{\Gamma}$| $\vvmathbb{\Gamma}$& \verb|$\bm{\vvmathbb{\Gamma}}$| $\bm{\vvmathbb{\Gamma}}$ & Also $\vvmathbb{\gamma}$, $\vvmathbb{\Pi}$, $\vvmathbb{\pi}$ \\
1364 % & $\bm{\mathbb{AB}}$ & $\bm{\vmathbb{A}\vmathbb{B}}$ & $\bm{\vvmathbb{A}\vvmathbb{B}}$ \\
1365 \bottomrule
1366 \end{tabular}
1367 \end{center}
1368 The macros \verb|\varmathbb| and \verb|\vvarmathbb| have been substantially rewritten as of version 1.640. Both accept strings as arguments rather than just single characters, and pass through characters not in the Blackboard Bold alphabet.
1369
1370 Revision 1.640 makes a symbol definition for every Blackboard Bold glyph, like
1371 \begin{verbatim}
1372 \DeclareMathSymbol{\m@thbbch@rA}{\mathord}{lettersA}{132}
1373 \DeclareMathSymbol{\m@thbbch@rimath}{\mathord}{lettersA}{125}
1374 \end{verbatim}
1375 and then parses the argument of, e.g., \verb|\varmathbb|, concatenating the prefix \verb|\m@thbbch@r| with the name of each character in the argument successively. If the resulting macro exists, that definition applies, otherwise the character is passed through to be rendered by the normal means. For example, \verb|$\vvmathbb{A\imath \alpha\pi c}$| renders as $\vvmathbb{A\imath \alpha\pi c}$.
1376
1377 The prefix \verb|\m@thbbch@r| is a carry-over from the txfonts---other alphabets use the simple forms, like \verb|\tx@Bbb| for the \verb|\vvmathbb| letters, \verb|\tx@Scr| for script letters and \verb|\tx@UScr| for upright script letters. So, for example, we have
1378 \begin{verbatim}
1379 \tx@BbbA % slot 193 in lettersA
1380 ...
1381 \tx@BbbZ % slot 218 in lettersA
1382 \tx@Bbba % slot 225 in lettersA
1383 \tx@Bbbz % slot 250 in lettersA
1384 \end{verbatim}
1385 The corresponding digits are named
1386 \begin{verbatim}
1387 \tx@BbbZero % slot 43 in lettersA
1388 ...
1389 \tx@BbbNine % slot 52 in lettersA
1390 \end{verbatim}
1391 which may be \verb|\let| to more convenient forms just as above: e.g., \verb|\let\BBNine\tx@BbbNine| while in a \verb|\makeatletter| block.
1392
1393
1394 \section{Samples from Times and Libertine math packages}
1395 \textsc{TXFONTS:}\\
1396 \begin{verbatim}
1397 \usepackage{txfonts}
1398 \end{verbatim}
1399 \[\includegraphics{sample-tx-crop}\]
1400 \begin{itemize}
1401 \item
1402 Complete match between text and math size and weight;
1403 \item first formula much too cramped;
1404 \item upper limit of integral much too close to integral sign;
1405 \item square on $t$ in integrand comes very close to colliding with it;
1406 \item square root in denominator aligned too far right.
1407 \end{itemize}
1408
1409 \vspace{1pc}
1410 \textsc{NEWTXFONTS:}\\
1411 \begin{verbatim}
1412 \usepackage{newtxtext}
1413 \usepackage{newtxmath}
1414 \end{verbatim}
1415 \[\includegraphics{sample-ntx-crop}\]
1416 \begin{itemize}
1417 \item
1418 Complete match between text and math size and weight;
1419 \item first formula much less cramped;
1420 \item upper limit of integral not too close to integral sign;
1421 \item square not too close to $t$ in exponent;
1422 \item better alignment of square root in denominator.
1423 \end{itemize}
1424
1425 \vspace{1pc}
1426 \textsc{MathTimePro2:}\\
1427 \begin{verbatim}
1428 \usepackage{newtxtext}
1429 \usepackage[lite]{mtpro2}
1430 \end{verbatim}
1431 \[\includegraphics{sample-mtp-crop}\]
1432 \begin{itemize}
1433 \item
1434 Complete match between text and math size and weight;
1435 \item first formula quite spread out;
1436 \item upper limit of integral not too close to integral sign;
1437 \item plenty of space between square and $t$ in exponent.
1438 \end{itemize}
1439
1440 \vspace{1pc}
1441 \textsc{Libertine and MathTimePro2:}\\
1442 \begin{verbatim}
1443 \usepackage{libertine}
1444 \usepackage[T1]{fontenc}
1445 \usepackage[lite]{mtpro2}
1446 \end{verbatim}
1447 \[\includegraphics{sample-libmtp-crop}\]
1448 \begin{itemize}
1449 \item
1450 Mismatch of weight between text and math;
1451 \item first formula quite spread out;
1452 \item upper limit of integral not too close to integral sign;
1453 \item plenty of space between square and $t$ in exponent.
1454 \end{itemize}
1455
1456 \vspace{1pc}
1457 \textsc{Libertine and newtxmath:}\\
1458 \begin{verbatim}
1459 \usepackage{libertine}
1460 \usepackage[T1]{fontenc}
1461 \usepackage[libertine]{newtxmath}
1462 \end{verbatim}
1463 \[\includegraphics{sample-lib-crop}\]
1464 \begin{itemize}
1465 \item
1466 Very good match between text and math in size and weight;
1467 \item first formula not cramped;
1468 \item upper limit of integral not too close to integral sign;
1469 \item space between square and $t$ in exponent;
1470 \item better alignment of square root in denominator.
1471 \end{itemize}
1472
1473 \vspace{1pc}
1474 \textsc{Mathptmx:}\\
1475 \begin{verbatim}
1476 \usepackage{mathptmx}
1477 \end{verbatim}
1478 \[\includegraphics{sample-ptmx-crop}\]
1479 \begin{itemize}
1480 \item
1481 Good match between text and math size and weight, though the summation symbol (from the system {\tt symbol} font) is too small and too dark;
1482 \item first formula well spread;
1483 \item upper limit of integral not too close to integral sign;
1484 \item space between square and $t$ in exponent;
1485 \item there are no upright Greek lowercase letters in this package;
1486 \item good alignment of square root in denominator;
1487 \item infinity symbol not sufficiently large?
1488 \item the package lacks a number of amenities that are present in other packages.
1489 \end{itemize}
1490 \section{Items installed} As well as a collection of PostScript fonts, virtual fonts, font definition files and the central {\tt newtxtext.sty} and {\tt newtxmath.sty} files, the package contains one map file {\tt newtx.map} that must be enabled for the package to function correctly. Its name was changed from {\tt ntx.map} to mirror the package name.) The file \texttt{implementation.pdf} in this distribution provides a manifest of all files installed together with a brief indication of the sources. (This file is somewhat outdated. The file {\tt mathnotes.pdf} adds details about the sources for the math fonts, though it is rather cursory.)
1491
1492 The font files {\tt ntxexmods.pfb} and {\tt ntxbexmods.pfb} were derived from {\tt cmex10.pfb} by FontForgery, thickening the Computer Modern braces to match the weight of the \textsf{txfonts} braces. The pair {\tt ntxexb.pfb} and {\tt ntxbexb.pfb} were similarly derived from {\tt cmsy7.pfb} and {\tt cmex10.pfb} to produce more braces and matching integral signs based on Computer Modern. The {\tt.tfm} files {\tt rtx[b]mio.tfm} are simply unslanted versions of {\tt rtxmi}, from which we construct upright partial derivative symbols.
1493 The last two entries provide us with a way to access custom-encoded versions of {\tt fxlri.pfb} and {\tt fxlbi.map} in order to access some of the unencoded alternate characters---eg, Greek letters, {\tt J.alt} and {\tt v.alt}. The font file \textsf{LibertineTheta-Regular.pfb} was created from the Theta symbol in {\tt fxlri.pfb}, which requires some FontForge help to look correct.
1494
1495 This version contains optical versions of the math italic and symbol fonts at 7\texttt{pt} and 5\texttt{pt}, allowing better rendering in \verb|\scriptstyle| and \verb|\scriptscriptstyle|.
1496 %\newpage
1497 \section{Changed Math Font Tables}
1498 \subsection{letters}
1499 \fonttable{ntxmi}
1500 \newpage
1501 \subsection{lettersA}
1502 \fonttable{ntxmia}
1503 \newpage
1504 \subsection{symbols}
1505 \fonttable{ntxsy}
1506 %\newpage
1507
1508 \subsection{A sample newtx-subs.tex}
1509 You may either copy the entire block below, starting with the line \verb|\begin{...| and ending after the line beginning \verb|\end{|
1510 and pasting it into the top of your document before the \verb|\documentclass...| line, which will allow for easy editing and will write the file to the same folder as your document, or make your own file, omitting those outer two lines.
1511
1512 \begin{verbatim}
1513 \begin{filecontents*}{newtx-subs.tex}
1514 {f}{-3}
1515 {j}{-3}
1516 {p}{-1}
1517 {y}{-1}
1518 {A}{-3}
1519 {B}{-1}
1520 {D}{-1}
1521 {H}{-1}
1522 {I}{-1}
1523 {K}{-1}
1524 {L}{-1}
1525 {M}{-1}
1526 {N}{-0.5}
1527 {P}{-1}
1528 {X}{-1}
1529 {\rho}{-1.5}
1530 {\mu}{-1}
1531 \end{filecontents*}
1532 \end{verbatim}
1533 \subsection*{The {\tt ebgaramond} option to newtxmath}
1534 As {\tt ebgaramond} has an x-height considerably smaller than {\tt newtx}, some amount of scaling is useful to bridge the gap. In making the replacement letters, I increased the size of the EBGaramond letters in math by 5\%, so make some scaling combination for text that compensates for this. The weights of {\tt ebgaramond} used in the substitutions were regular and semibold. This dictates one of the options used for {\tt ebgaramond}.
1535
1536 \textsc{Example preamble not using newtx:}
1537 \begin{verbatim}
1538 \usepackage[lining,semibold,scaled=1.05]{ebgaramond}
1539 % Latex BOLD renders with ebgaramond semibold
1540 \usepackage[T1]{fontenc} % best for Western European languages
1541 \usepackage[varqu,varl]{inconsolata}% a typewriter font for \mathtt
1542 \usepackage{amsmath}% must be loaded before amsthm, if using
1543 \usepackage{amsthm}% must be loaded before newtxmath
1544 \usepackage[ebgaramond,vvarbb,subscriptcorrection,alth]{newtxmath} % STIX Bbb
1545 % Option alth replaces math h with a more traditional shape
1546 \usepackage{bm}% load after all math to give access to bold math
1547 \end{verbatim}
1548 \textsc{Same preamble using newtx:}
1549 \begin{verbatim}
1550 \usepackage[T1]{fontenc} % best for Western European languages
1551 \usepackage[varqu,varl]{inconsolata}% a typewriter font for \mathtt
1552 \usepackage[ebgaramond,semibold,textscale=0,vvarbb,subscriptcorrection,amsthm,alth]{newtx}
1553 \usepackage{bm}% load after all math to give access to bold math
1554 \end{verbatim}
1555 %}
1556
1557 \section{Changes to math character names in version 1.72}
1558 The names of some math characters containing a colon had become inconsistent with {\tt unicode-math} and the {\tt mathtools} package. Revision 1.72 (2023) of {\tt newtx} harmonizes the commands for colon-related math glyphs with the revisions made in 2022 in the {\tt mathtools} package---the last column below shows the new names used for such glyphs in {\tt newtx} that are also in {\tt mathtools}. The changes are consistent with the unicode-math command names.
1559
1560 \begin{center}Math colon symbols in newtxmath and mathtools (MT)\\ \vspace{6pt}
1561 \begin{tabular}{@{} ccccccc @{}}
1562 \toprule
1563 Symbol & u+ & unicode-math & txfonts & legacy newtx & legacy MT & newtx/MT \\
1564 \midrule
1565 $\colonapprox$ & • & • & \verb|\colonapprox| & \verb|\colonapprox| & \verb|\colonapprox| & \verb|\colonapprox| \\
1566 $\colonsim$ & • & • & \verb|\colonsim| & \verb|\colonsim| & \verb|\colonsim| & \verb|\colonsim| \\
1567 $\Colonapprox$ & • & • & \verb|\Colonapprox| & \verb|\Colonapprox| & \verb|\Colonapprox| & \verb|\Colonapprox| \\
1568 $\Colonsim$ & • & • & \verb|\Colonsim| & \verb|\Colonsim| & \verb|\Colonsim| & \verb|\Colonsim| \\
1569 $\coloneq$ & 2254 & \verb|\coloneq| &\verb|\coloneqq| & \verb|\coloneq| & \verb|\coloneqq| & \verb|\coloneq| \\
1570 $\eqcolon$ & 2255 & \verb|\eqcolon| &\verb|\eqqcolon| & \verb|\eqcolon| & \verb|\eqqcolon| & \verb|\eqcolon| \\
1571 $\colondash$ & • & • &\verb|\coloneq| & • & \verb|\coloneq| & \verb|\colondash| \\
1572 $\dashcolon$ & 2239 & \verb|\dashcolon| &\verb|\eqcolon| & • & \verb|\eqcolon| & \verb|\dashcolon| \\
1573 $\Coloneq$ & 2A74 & \verb|\Coloneq| & \verb|\Coloneqq| & \verb|\Coloneqq| & \verb|\Coloneqq| & \verb|\Coloneq| \\
1574 $\Eqcolon$ & • & • &\verb|\Eqqcolon| & \verb|\Eqqcolon| & \verb|\Eqqcolon| & \verb|\Eqcolon| \\
1575 $\Colondash$ & • & • & \verb|\Coloneq| & \verb|\Coloneq| & \verb|\Coloneq| & \verb|\Colondash| \\
1576 $\Dashcolon$ & • & • & \verb|\Eqcolon| & \verb|\Eqcolon| & \verb|\Eqcolon| & \verb|\Dashcolon| \\
1577 \bottomrule
1578 \end{tabular}
1579 \end{center}
1580
1581
1582 For users with existing documents using any of the symbols in the last four rows, the legacy {\tt newtx} commands are aliased to the new commands. Unless the commands \verb|\Coloneqq|, \verb|\Eqqcolon|, \verb|\Coloneq| and \verb|\Eqcolon| have already been defined, the effect is the same as
1583 \begin{verbatim}
1584 \let\Coloneqq\Coloneq
1585 \let\Eqqcolon\Eqcolon
1586 \let\Coloneq\Colondash
1587 \let\Eqcolon\Dashcolon
1588 \end{verbatim}
1589 \section{Appendix 1: Changes made in version 1.5}
1590 \begin{itemize}
1591 \item
1592 The large delimiters have been modified so match the heights in common usage by \texttt{cmex10} and other packages. (Those formerly used by \texttt{newtxmath} were somewhat shorter, resulting in unexpected behavior of \verb|\Big|, \verb|\bigg|, etc.)
1593 \item
1594 The integrals used in previous versions have been discarded and replaced by an upright and a slanted form, the latter being the default. The option {\tt upint} switches to the upright form. (The former option {\tt cmintegrals} now has no effect.) Integrals are of three types: small, textstyle and displaystyle. Each size is available in twelve variants. Assuming slanted (the default) is selected, there are 36 regular-weight forms:
1595 \setlength{\extrarowheight}{8pt}
1596 \begin{center}
1597 \begin{tabular}{@{} llll @{}}
1598 \toprule
1599 Small && Text, Display& \\
1600 \midrule
1601 $\smallint$ & \verb|$\smallint$|& $\int$, $\displaystyle{\int}$& \verb|$\int$|\\
1602 $\smalliint$ & \verb|$\smalliint$|& $\iint$, $\displaystyle{\iint}$&\verb|$\iint$|\\
1603 $\smalliiint$ & \verb|$\smalliiint$|& $\iiint$, $\displaystyle{\iiint}$& \verb|$\iiint$|\\
1604 $\smalliiiint$ & \verb|$\smalliiiint$|& $\iiiint$, $\displaystyle{\iiiint}$& \verb|$\iiiint$|\\
1605 $\smalloint$ & \verb|$\smalloint$|& $\oint$, $\displaystyle{\oint}$& \verb|$\oint$|\\
1606 $\smalloiint$ & \verb|$\smalloiint$|& $\oiint$, $\displaystyle{\oiint}$& \verb|$\oiint$|\\
1607 $\smalloiiint$ & \verb|$\smalloiiint$|& $\oiiint$, $\displaystyle{\oiiint}$& \verb|$\oiiint$|\\
1608 $\smallfint$ & \verb|$\smallfint$|& $\fint$, $\displaystyle{\fint}$& \verb|$\fint$|\\
1609 $\smallsqint$ & \verb|$\smallsqint$|& $\sqint$, $\displaystyle{\sqint}$& \verb|$\sqint$|\\
1610 $\smallsumint$ & \verb|$\smallsumint$|& $\sumint$, $\displaystyle{\sumint}$& \verb|$\sumint$|\\
1611 $\smallvarointclockwise$ & \verb|$\smallvarointclockwise$|& $\varointclockwise$, $\displaystyle{\varointclockwise}$& \verb|$\varointclockwise$|\\
1612 $\smallointctrclockwise$ & \verb|$\smallointctrclockwise$|& $\ointctrclockwise$, $\displaystyle{\ointctrclockwise}$& \verb|$\ointctrclockwise$|\\
1613 \bottomrule
1614 \end{tabular}
1615 \end{center}
1616 \item The overly small delimiters ([\{ in Times are no longer used in math mode, being replaced by bigger versions. The former option {\tt bigdelims} no longer has any effect.
1617 \item There is a new option {\tt smallerops} which chooses smaller renditions (20\% smaller in displaystyle, 10\% smaller in textstyle) of the {\tt bigoperators}:
1618 \begin{verbatim}
1619 \bigsqcup
1620 \bigodot
1621 \bigoplus
1622 \bigotimes
1623 \sum
1624 \prod
1625 \bigcup
1626 \bigcap
1627 \biguplus
1628 \bigwedge
1629 \bigvee
1630 \bigcupdot
1631 \bigcapplus
1632 \bigsqcupplus
1633 \bigsqcapplus
1634 \bigsqcap
1635 \bigtimes
1636 \coprod
1637 \end{verbatim}
1638 \item The dot accents are now taken from a slightly larger series, making available \verb|\dot|, \verb|\ddot|, \verb|\dddot| and \verb|\ddddot|. For best horizontal alignment with other accents, choose the option {\tt timesmathacc} when loading {\tt newtxmath}.
1639 \item New accents have been added and the old vector accent has been replaced. The new accents are:
1640 \verb|\vec|$\quad\vec{}$\\
1641 \verb|\lvec|$\quad\lvec{}$\\
1642 \verb|\lrvec|$\quad\lrvec{}$\\
1643 \verb|\harpoonacc|$\quad\harpoonacc{}$\\
1644 \verb|\lharpoonacc|$\quad\lharpoonacc{}$\\
1645 \verb|\lrharpoonacc|$\quad\lrharpoonacc{}$\\
1646 \verb|\barbar|$\quad\barbar{}$\\
1647 \verb|\bartilde|$\quad\bartilde{}$\\
1648 \verb|\barhat|$\quad\barhat{}$\\
1649 \verb|\tildebar|$\quad\tildebar{}$\\
1650 \verb|\tildetilde|$\quad\tildetilde{}$\\
1651 \verb|\tildehat|$\quad\tildehat{}$\\
1652 \verb|\hatbar|$\quad\hatbar{}$\\
1653 \verb|\hattilde|$\quad\hattilde{}$\\
1654 \verb|\hathat|$\quad\hathat{}$\\
1655 \item New glyphs: (B denotes bigger, S denotes smaller)\\
1656 \verb|\cdotB| $\quad\cdotB$ (cf. \verb|\cdot| $\quad\cdot$)\\
1657 \verb|\cdotBB| $\quad\cdotBB$\\
1658 \verb|\circS| $\quad\circS$ (cf. \verb|\circ| $\quad\circ$)\\
1659 \verb|\bulletS| $\quad\bulletS$ (cf. \verb|\bullet| $\quad\bullet$)\\
1660 \verb|\bulletSS| $\quad\bulletSS$\\
1661 \verb|\bulletSSS| $\quad\bulletSSS$\\
1662 \verb|\primeS| $\quad\primeS$ (cf. \verb|\prime| $\quad\prime$)\\
1663 \item New macros \verb|\setSYdimens| and \verb|\setEXdimens| allow experts to modify some math font dimensions.
1664 \end{itemize}
1665 \def\jj{\mkern-3mu j}
1666
1667 \section{Appendix 2: Changes made in version 1.60}
1668 Versions of {\tt newtx} dated from September, 2019 (1.60 for {\tt newtxmath} make some quite substantial changes, mostly to math mode.
1669 \section{Goals}
1670 Spurred by work of Ross Moore to provide means of generating archivable pdf using {\tt pdflatex}, the main goal was to change {\tt newtx} and {\tt newpx} to meet the requirements for satisfying the {\tt PDF/A-1b} standards by using an appropriate preamble involving the {\tt pdfx} package and other unicode mapping files. Making these changes gave me the opportunity to organize the source files to make them more manageable in future revisions.
1671
1672 A further goal whose time seemed ripe was to rework the spacing of math letters, both Roman and Greek, so they behaved better in superscripts and subscripts. This did not turn out to be so easy. The problem is illustrated by math italic j. If you don't give it enough extra space on the left, it will likely collide with the D in rendering \verb|$D^j$|. On the other hand, if you do give it enough space on the left, it will look bad as a subscript, appearing too far right.
1673
1674 A final goal was to make better use of the remaining space in some of the math fonts by placing some math alphabets in them, avoiding perhaps a waste of those precious sixteen math families.
1675 \section{The important changes}
1676 The following changes were made to both {\tt newtx} and {\tt newpx}.
1677 \subsection{Archivability}
1678 Some of the individual font files from which the math fonts are built turned out to have some fairly minor structural issues. These have all been corrected. The more major issue was the lack of unicode mapping for all characters in the fonts. For the symbol and math extension fonts, this issue was largely solved by Ross Moore's {\tt glyphtounicode} files that are now accessible as part of TeXLive and MiKTeX. The main problem was the math alphabets like math italic, bold math italic, upright Greek and slanted Greek, all of which have now been assigned their own unicode points. For all of these, I constructed new fonts using unicode names for the glyphs, then made \textsf{fontinst} scripts that renamed those unicode values to the original simple names as used in the encoding files so that I could use my old encoding and adjustment files. This exercise has now been carried out for {\tt newtxmath}, {\tt newpxmath}, {\tt newtxmath/libertine}, {\tt newtxmath/cochineal}, {\tt newtxmath/stix2}, {\tt newtxmath/xcharter} and {\tt newtxmath/erewhon.} Each of these can now be considered to have an ``enhanced'' status that allows them to share all the new assets described below.
1679 The other packages which may be specified as an option to {\tt newtxmath} (e.g., {\tt baskervaldx, baskervillef}) must be considered for the moment to be ``unenhanced'' and able to share only some of the new assets. In particular, only the enhanced items can generate archivable pdf.
1680
1681 Also modified were the {\tt sups} fonts in {newtxtext}, where the main issue was unicode mapping. Superior numbers and some superior letters do have assigned unicode values, but in may cases a more creative approach was needed, and provided once again by Ross Moore. I rebuilt the superior font files using those unicode names, solving that particular problem.
1682
1683 Here is a sample preamble showing the elements you will need to specify to generate a pdf satisfying the PDF/A-1b standards, as verified by Adobe Acrobat Pro. (Other verification processes may yield different outcomes.)
1684
1685
1686 \begin{verbatim}
1687 \documentclass[noamsfonts]{amsart} % save 2 math families
1688 %\pdfcompresslevel=0 %Set this only if are going to debug the pdf
1689 %\pdfgentounicode=1 %These to lines no longer needed--LaTeX does it.
1690 %\input glyphtounicode.tex
1691 \usepackage{pdfx} % v 1.6.4 or higher
1692 \InputIfFileExists{glyphtounicode-cmr.tex}{}{}
1693 \InputIfFileExists{glyphtounicode-ntx.tex}{}{}
1694 \usepackage{newtxtext} %T1 is default encoding
1695 \usepackage[scaled=0.95]{inconsolata} % typewriter
1696 \usepackage[leqno]{amsmath}
1697 \usepackage{amsthm}
1698 \usepackage[vvarbb]{newtxmath} % vvarbb gives STIX Bbb
1699 \end{verbatim}
1700
1701
1702 \subsection{Glyph spacing changes} \textbf{(For enhanced packages only)}I reworked the math italics to improve the rendering of some superscripts. This affects (a) parentheses, brackets and braces to inhibit clashes; (b) glyphs like j, f, p, y, \verb|\rho|, \verb|\beta| and \verb|\mu| where a long tail could pose problems intersecting with other glyphs; (c) glyphs like such as D, Q and \verb|\Phi| that are round on the right, where interference is most likely to occur with a superscript. Increasing the left side-bearing of j, etc., helps with superscripts but creates an ugly gap when used as subscripts.
1703
1704
1705 The {\tt subscriptcorrection} option to {\tt newtxmath} has been corrected and enhanced so that it now offers a partial solution the subscript spacing problem. I regret that this option is incompatible with {\tt xy-pic}, both depending on making \verb|_| an active character. {\tt Newtxmath} will detect if the {\tt xy} package is loaded and disable {\tt subscriptcorrection} if so. You would have to correct such issues by manually inserting a negative \verb|\mkern|. For example, you might put in your preamble something like
1706 \begin{verbatim}
1707 \def\jj{\mkern-3mu j}
1708 \end{verbatim}
1709 and then use \verb|$x_{\jj}$| instead of \verb|$x_j$|, turning $x_j$ into $x_{\jj}$.
1710
1711 There are also interactions with {\tt pstricks} that have to be worked around because {\tt subscriptcorrection} redefines \verb|_| as an active character, as do parts of {\tt pstricks}. In particular, the {\tt pstricks} short forms for macros like \verb|\tbput| and \verb|\nbput| for attaching labels beneath node connections must be avoided.
1712
1713
1714 If you do enable {\tt subscriptcorrection}, there is a default correction table in the {\tt sty} file, but the sty file also looks for a file named, e.g., {\tt newtx-subs.tex} if you are using the {\tt newtx} default math letters. There is already such a file located in the {\tt newtx} distribution in the \verb|/tex/latex/| folder. If you wish to make changes to this file, copy the file to your home TeX folder where it will be found by TeX before the one in the distribution. The entries in the file are lines like
1715 \begin{verbatim}
1716 {j}{-3}
1717 \end{verbatim}
1718 each of which will have the same effect as the above macro if the first item in the subscript is j. You can also specify Greek letters with lines like
1719 \begin{verbatim}
1720 {\beta}{-1.5}
1721 \end{verbatim}
1722 The complete list of file names recognized for specifying subscript corrections is:
1723 \begin{verbatim}
1724 newtx-subs.tex
1725 newtx-libertine-subs.tex
1726 newtx-xcharter-subs.tex
1727 newtx-cochineal-subs.tex
1728 newtx-baskervillef-subs.tex
1729 newtx-stickstoo-subs.tex
1730 newtx-garamond-subs.tex
1731 newtx-ebgaramond-subs.tex
1732 newtx-baskervald-subs.tex
1733 newtx-erewhon-subs.tex
1734 newtx-minion-subs.tex
1735 newtx-nc-subs.tex
1736 newtx-ncf-subs.tex
1737 newtx-noto-subs.tex
1738 newtx-notosans-subs.tex
1739 \end{verbatim}
1740
1741 \subsection{New glyphs added} \textbf{(For enhanced packages only)} Math family 1 {\tt (letters)} has been extended from 128 slots to 256, retaining the {\tt OML} encoding of the first 128. Most of additional slots have been allocated to a script font from the old STIX collection and an upright modification of that font.
1742 By default, \verb|$\mathscr{F}$| will produce $\mathscr{F}$.\\
1743 $\bullet$ option {\tt uprightscript} changes the output to {\usefont{OML}{ntxmi}{m}{it}\char201}.\\
1744 In both cases, there are full upper-case and lower-case and {\tt dotlessi}, {\tt dotlessj}. To insert the latter, you can write either \verb|$\mathscr{\imath}$| or \verb|$\imathscr$|, rendered as $\mathscr{\imath}$ in the slanted script case.
1745
1746 There are in fact two additional macros, \verb|\mathslscr| (slanted script) and \verb|\mathuscr| (upright script) that may be used. By default, \verb|\mathscr| is \verb|\let| to \verb|\mathslscr|, but, under option {\tt uprightscript}, \verb|\mathscr| is \verb|\let| to \verb|\mathuscr|.
1747
1748 The secondary letters font {\tt (lettersA)} and math family 2 {\tt(symbols)} have been rearranged. The first of these continues to have a Fraktur alphabet, but it a modification of its original one, having wider vertical stems and a blacker appearance more in keeping with the weight of Times. {\tt Dotlessi} and {\tt dotlessj} have been added and can be specified in math mode by \verb|$\imathfrak$| and \verb|$\jmathfrak$|---\verb|$\mathfrak{\imath}$| also works. There are in addition two subsidiary Bbb alphabets in {\tt lettersA}, specified by the respective options {\tt varbb}, {\tt vvarbb}, and there are corresponding {\tt dotlessi}, {\tt dotlessj} activated by \verb|$\imathbb$|, \verb|$\jmathbb$|, which always render as $\imathbb$, $\jmathbb$ no matter the choice of which Blackboard Bold Alphabet. If you select one of the options {\tt varbb}, {\tt vvarbb}, you will have Bbb digits 0..9 using, e.g., \verb|$\mathbb{1}$| to get~$\vvmathbb{1}$. With both options, the arguments \verb|\imath|, \verb|\jmath| will render as expected, as are all upper and lower case letters.
1749
1750
1751 Among the new symbols added are:\\
1752 $\bullet$ \verb|\hslash|, \verb|\hbar|, \verb|\lambdaslash|, \verb|\lambdabar|, \verb|\Zbar|, \verb|\Angstrom| are now constructed from the native glyphs, but only in the enhanced families.\\
1753 $\bullet$ Euler's constant \verb|$\Euler$| ($\Euler$).\\
1754 $\bullet$ Hermitian transpose \verb|\hermtransp| or \verb|\htransp| is used like \verb|$\mathbf{A}^{\htransp}$| ($\mathbf{A}^{\htransp}$). This usage is similar to simple transpose \verb|$\mathbf{A}^{\transp}$| ($\mathbf{A}^{\transp}$).\\
1755 $\bullet$ Independence (in the probabilistic sense) can use \verb|\Perp|, $\Perp$, and there is a new \verb|\nPerp|, $\nPerp$ for its negation.
1756
1757 \subsection{Adaptive vector accent} The \LaTeX\ macro \verb|\overrightarrow| provides a right arrow with adaptive width, but not matching the vector head of {\tt newtxmath}. Likewise, the {\tt esvect} provides a similar service with a choice of vector heads, none of which match {\tt newtxmath}. I've added code to provide a matching adaptive vector accent and which uses the same macro name, \verb|\vv|, as {\tt esvect}.
1758
1759 For a comparison of these vector accents, \verb|$\vec{XY} \vv{XY} \overrightarrow{XY}$| renders as\\
1760 $\vec{XY} \vv{XY} \overrightarrow{XY}$.\\
1761 $\bullet$ \verb|$\vv{AB}$| renders as $\vv{AB}$.\\
1762 $\bullet$ \verb|$\vv*{AB}{x}$| renders as $\vv*{AB}{x}$. This provides better horizontal spacing of subscripts than \verb|$\vv{AB}_{x}$|, $\vv{AB}_{x}$.\\
1763 $\bullet$ You can also do \verb|$\vv*{AB}{\vv{CD}}$|, which renders as $\vv*{AB}{\vv{CD}}$.\\
1764 $\bullet$ You can change the vertical space between the arrow and the accentee by means of the package option {\tt vecsep}, whose default value is {\tt .25ex}.
1765
1766 \subsection{A widebar accent to complement widehat and widetilde}
1767 The \verb|\widebar| macro added to version 1.7 came to me via Murray Eisenberg. The original version by Hendrik Vogt was the subject of considerable discussion on {\tt stackexchange} a few years ago. It handles very cleverly issues of width, superscript placement and skew. For example: \verb|$\widebar{AB}^C$| gives $\widebar{AB}^C$ and \verb|$\widebar{AB^C}$| gives $\widebar{AB^C}$.
1768 \subsection{Miscellaneous Changes}
1769 \begin{itemize}
1770 \item
1771 The superior letters fonts in {\tt newtx}
1772 have been extended and all glyphs now have appropriate unicode mappings.
1773 \item
1774 The AMS fonts replacement {\tt ntxsym} corrects the former misplacement of \verb|\kbbb|, \verb|\daleth|, \verb|\circledR| and \verb|\circledS|.)
1775 \end{itemize}
1776
1777
1778 %for {\tt newtx}
1779 %\subsection{Operatorname issues}
1780 %For some of the text fonts supported by {\tt newtx}, an {\tt OT1} version of the text fonts has been constructed with Greek capital letters in the first eleven slots, just as in Computer Modern, and some older TeX constructs depend on that. In those cases, even if you set {\tt T1} as your text font encoding before loading {\tt newtxmath} or {\tt newtx}, the operator font will be set to the {\tt OT1} version, not the {\tt T1} version. (You may prevent this by specifying option {\tt noOT1} to {\tt newtxmath} or {\tt newtx}.) Using the {\tt OT1} encoded operators font should not be a problem unless you wish to use accented characters in some operator names. This is the case in Spanish and Portuguese, and possibly other languages. One solution could be to define the affected operators individually with commands like
1781 %\begin{verbatim}
1782 %\DeclareMathOperator{\mIn}{\text{{\fontencoding{T1}\selectfont m\'in}}}
1783 %\end{verbatim}
1784 %making use of the {\tt amsmath} \verb|\text| macro, which gives you proper scaling in scriptstyle and scriptscriptstyle as well.
1785 \makeatletter
1786 %\expandafter\show\csname [email protected]\endcsname
1787 \@ifundefined{[email protected]}{\end{document}}{\makeatother}
1788 %
1789 %\show\nustyle
1790 \subsection{The stacked fraction macro}
1791 Having collected a lot of data about the text fonts it supports, it seemed worthwhile to construct in {\tt newtx} a macro that would work for most of those fonts:
1792 \verb|\textsfrac[1]{17}{32}| renders in {\tt newtxtext} as \textsfrac[1]{17}{32}
1793 and \verb|\textsfrac{9}{64}| as \textsfrac{9}{64}. Compare these with output from the diagonal fraction macro
1794 \verb|\textfrac|: \textfrac[1]{17}{32}, \textfrac{9}{64}. Note: \verb|\textsfrac| is not available unless you load via {\tt newtx.sty}.
1795
1796 There are four options with which you may control the layout of the fractional part.
1797 \begin{itemize}
1798 \item
1799 {\tt sfracvcenter} controls the vertical center of the fraction bar.
1800 \item{\tt sfracbarthick} controls its thickness.
1801 \item{\tt sfracvspacing} controls the vertical space above and below the fraction bar.
1802 \item{\tt sfracscaling} controls the size of the figures in the fraction.
1803 \end{itemize}
1804 The last of these is just a number like .85 by which to scale the denominator figures used in the construction. The first three items may be specified in either {\tt em} units or in {\tt ex} units. If you use a number greater than 6, it is interpreted as a multiple of an {\tt em} (recall that for most fonts, and certainly for those supported by {\tt newtx}, 100{\tt em} is equal to 1{\tt pt} if you are processing at 10{\tt pt}. On the other hand, 1{\tt ex} is the height of the letter x in the current text font. If you specify a number less than 6, it is interpreted in {\tt ex} units.
1805
1806 \end{document}