# New TX font package

Michael Sharpe

##  1 Introduction

This package is meant to be a replacement for Young Ryu’s txfonts. It is a
complete text (newtxtext) and math (newtxmath) package with roman text font
provided by a Times clone, sans serif based on a Helvetica clone, typewriter
faces, plus math symbol fonts whose math italic letters are from a Times
Italic clone. As of version 1.4, newtxtext no longer depends on txfonts but is
based on the richer source TeXGyre Termes, but newtxmath continues to use the
txfonts math glyphs with many metric adjustments and some wholesale
modifications.

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 upint (upright
integrals) and 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.

Version 1.60 likewise has many additions and changes that are summarized in
Appendix 2. Most important is that newtx is now able to output a PDF/A-1b
compliant pdf using pdflatex.

This math package 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
_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, material typeset in Linux Libertine looks
better than the corresponding material typeset in Times. This seems especially
true on the screen. As of version 1.0, the package 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 garamondx text font
package was added. Version 1.55 adds support for the SticksToo text fonts, a
reworking of the STIX2 text fonts.

The newtx package differs from txfonts in the following ways:

  * •

the new package is split into separate text and math packages that do not need
to be used in conjunction;

  * •

both text and math packages offer options not present in the original package,
described below, including the option to use libertine Latin and Greek letters
to replace Times, as well as a similar option minion;

  * •

wide accent glyphs have been corrected (they should have zero depth) so that
they no longer collide with the underlying glyph;

  * •

for those who do not like the integral in txfonts, an emboldened version of
the Computer Modern integral is made available, matching the weight of the
txfonts symbols;

  * •

an upright partial derivative symbol has been added, named `\uppartial`;

  * •

there is now an option to get braces more pleasing to older eyes;

  * •

macros have been added to bring the calls to Greek symbols more into
conformity with psnfss and Mathtime Pro 2;

  * •

problems using ams macro packages before txfonts are settled;

  * •

`\coloneq` and `\eqcolon` now point to the correct glyphs;

  * •

The problem with the ogonek accent and tabular environments (bad definition of
`\k`) is fixed: (the definition of `\k` is removed as of version 1.628, being
no longer of use);

  * •

The default encoding for 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.

  * •

Sans serif is by default taken from TeXGyreHeros, and by default at 90% of the
scale factor (set by scaled, default value 1). The option helvratio=.98 will
change that to 98%.

  * •

`\varkappa` $\varkappa$ has been moved from AMSb to lettersA, and is now
accompanied by an upright form `\upvarkappa` $\upvarkappa$ which behaves as it
should when using the frenchmath option.

##  2 Text mode options

Beginning with version 1.4, the text font component of newtx is no longer
dependent on the txfonts, and is constructed entirely from TeXGyre Termes and
some modifications thereof.

The text mode environment invoked by

    \usepackage{newtxtext}

has several options, a number new to version 1.4: you may write

    \usepackage[scaled=.93]{newtxtext}

to load the roman and typewriter text fonts at 93% of normal size, and the
sans serif (Helvetica clone) at scale $0.9*0.93$. This is not of much utility
if the package is used with the math package newtxmath to which it is already
matched, but may be with other math packages. The options

    \usepackage[scaled=.95,helvratio=.96]{newtxtext}

load roman and typewriter text fonts at 95% of normal size, and the sans serif
(Helvetica clone) at scale $0.95*0.96$.

The option osf instructs the text fonts to use old-style figures 1234567890
rather than the default lining figures $1234567890$. As of version $1.23$,
newtxtext loads initially with lining figures so the math package uses lining
figures in math mode. The option 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 `\useosf`
after loading newtxmath. This is no longer required.

If you use the babel package, you should load it before newtxtext—for example:

    \usepackage[<babel options>]{babel}
    \usepackage[osf]{newtxtext}

More generally, the pattern of the preamble should be:

    <encoding options>
    [optional] \usepackage{substitutefont} % so you can change babel’s fonts
    [optional] \usepackage[<babel options>]{babel}
    \usepackage[p,osf]{newtxtext}% osf in text, lining figures in math
    [optional] redefine the plain theorem style if necessary
    <other font loading commands>
    \usepackage{newtxmath}
    <substitutefont commands>

As an example of a theoremstyle definition,

    \usepackage[theoremfont]{newtxtext}
    %%% modify the default definition of plain to reduce spacing above and below
    \newtheoremstyle{plain}
    {0pt}   % ABOVESPACE, extra space above
    {0pt}   % BELOWSPACE, extra space below
    {\slshape}  % BODYFONT, italic with upright figures and punctuation
    {}       % INDENT (empty value is the same as 0pt)
    {\bfseries} % HEADFONT
    {.}         % HEADPUNCT
    {5pt plus 1pt minus 1pt} % HEADSPACE
    {}          % CUSTOM-HEAD-SPEC\newtheorem{thm}{Theorem}[section]

Here is a specific example following this pattern, but without theoremfont.

    \usepackage[LGR,T1]{fontenc} % spell out all text encodings used
    \usepackage[utf8]{inputenc} %
    \usepackage{substitutefont} % so we can use fonts other than those in babel
    \usepackage[greek.polutoniko,english]{babel}
    \usepackage[largesc,osf]{newtxtext} %
    \usepackage[varqu,varl]{zi4}% inconsolata
    \usepackage{cabin}% sans serif
    \usepackage[vvarbb]{newtxmath}
    \useosf % use oldstyle figures except in math
    \substitutefont{LGR}{\rmdefault}{Tempora} % use Tempora to render Greek text

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 tabular. To make proportional the default, use the
option p or proportional.

Option defaultsups (same effect as defaultsups=true) forces the package to use
the LaTeX 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
`\thempfootnote`.) For better control over position and size of footnote
markers, use the superiors package after loading newtxtext. The `\sustyle`
font switch and its related `\textsu` macro know not only about figures, but
also the lower case letters, including egrave, so that traditional French
expressions like 1ière may be typeset correctly.

As of version 1.625, there are now denominator figures (aligned to the text
baseline) which may be called either with `{\infigures 12345}` 12345 or
`\textin{6789}` 6789\. Currently, these are available only in regular weight,
upright shape. There is a new macro `\textfrac` that builds a fraction from
superior figures and denominator figures: e.g., `\textlf{5}\,\textfrac{7}{80}`
renders as 5 780. 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
foresolidus and aftsolidus. Now, for example, `\textfrac[5]{7}{80}` renders as
[5]780.

Also, as of version 1.630, there is a custom `\textcircled` macro that gives
output very similar to the existing `\textregistered` glyph. E.g.,
`\textregistered\textcircled{S}\textcircled{2}` renders as ®Ⓢ②.

Option 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, Small Caps, Petite Caps,
and Italic Small Caps, Italic Petite Caps.

Option adobesc is only for those who own licenses for Adobe Times Small Caps
and install them into the ptmsc package downloaded from ctan. This option
loads largesc and substitutes the Adobe glyphs, where available, including
their larger Regular and Bold tabular oldstyle figures.

The theoremfont option changes the default font used for the plain
theoremstyle of amsthm, keeping italic text but substituting upright figures
and punctuation, and, provided you have loaded amsthm before newtxtext, it
will redefine the plain theoremstyle. For example, with this option, you get
theorem statements like this:

######  Theorem 2.1.

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)$].

Compare this to traditional plain theoremstyle with the same text:

######  Theorem 2.1.

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)$].

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 to `\slshape`.

##  3 Spacing issues

This new version of newtxtext has spacing that is a little different, in its
default state, from that of the old 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.

                                   txfonts     Termes
    fontdimen2 (interword space)   .25em       .25em
    fontdimen3 (interword stretch) .15em       .2em
    fontdimen4 (interword shrink)  .06em       .1em

That is, Termes has the same normal spacing as txfonts but its spacing is more
flexible in terms of both stretch and shrink. More frequently than not, a
paragraph built with Termes will occupy more space than the same built with
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 txfonts.

Option tighter sets the three fontdimen values to those of txfonts.

Option looser sets the three fontdimen values to `{.3em,.2em,.1em}`
respectively.

If you want full control, the options spacing, stretch, shrink allow you to
modify one or more of the above fontdimens. For example,

    \usepackage[stretch=.15em,shrink=.095em]{newtxtext}

##  4 Math mode options

The package invoked by

    \usepackage{newtxmath}

loads the math part of the txfonts (with revised metrics and additional
glyphs) and should be loaded _after_ the text font and its encoding have been
specified, as it uses the text font settings to define how operators, numbers,
math accents, `\mathrm`, `\mathbf` etc. are rendered. You should also load a
Typewriter font so as not to generate mysterious error messages about metafont
trying to generate ectt10. The package offers a number of options.

  * •

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.

$\int\quad\oint\quad\iint\quad\iiint\quad\iiiint\quad\oiint\quad\oiiint\quad\varointclockwise\quad\ointctrclockwise\quad\fint\quad\sumint\quad\sqint$

named respectively

        \int \oint \iint \iiint \iiiint \oiint
    \oiiint \varointclockwise \ointctrclockwise \fint \sumint \sqint

The three sizes of the upright integrals look like:

Glyph | Command
---|---
$\smallintup$ | `\smallint[up]`
$\intup$ | `\int[up]`
$\displaystyle{\intup}$ | `\displaystyle{\int[up]}`

Note that the suffix up is not required unless the document’s integral style
is slanted. You may find the `\smallint` is useful for inline math mode when
it is important not to change the line spacing.

  * •

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 `\sum`, the second is what you would get with smallerops, the third
is `\sum` and the fourth is `\smallsum`, the latter being used mainly with
inline math.

$\sum\Sumop\sum\smallsum$

Similarly, there are `\smallprod` and `\smallcoprod` which, along with
`\smallsum`, are of class mathop, unlike their Greek letter equivalents.

  * •

(New as of version 1.5.) Two macros allow you to change fontdimen values in
math mode: `\setSYdimens` and `\setEXdimens`, which allow you to change the
fontdimen parameters for the symbol and extension fonts respectively. They may
be used only in your preamble. Their arguments can be any valid TeX commands
to change fontdimen values. For example:

        \def\setSYdimens{\fontdimen16\font=2pt\fontdimen17\font=1.15\fontdimen17\font }

Don’t use these unless you know what you’re doing.

  * •

varg causes the math italic letters `g,v,w,y` to be replaced by versions which
are more distinctive—eg, useful for distinguishing math italic `v` from `\nu`;

  * •

varvw causes the math italic letters `v,w` to be replaced by versions which
are more distinctive—eg, useful for distinguishing math italic `v` from `\nu`;

  * •

libertine loads different versions of math italic and bold math italic based
on Libertine rather than Times—the varg and varvw options are disabled in this
case, as the equivalent variant forms are made available by default;

  * •

(new in version 1.55) stix2 loads different versions of math italic and bold
math italic based on StixTwoMath rather than Times—the varg and varvw options
are disabled in this case. See the documentation to the SticksToo package,
which contains more details and some math samples.

  * •

(new in version 1.60) ebgaramond loads different versions of math italic and
bold math italic based on EBGaramond rather than Times—the varg and varvw
options are disabled in this case. See the end of Appendix 2 for an example of
a preamble.

  * •

(new as of version 1.629) noto, notosans load different versions of math
italic and bold math italic based on NotoSerif, NotoSans rather than Times.
There are some intricacies involved, for which there is a separate package,
notomath, that tries to offer as simple an interface as it was possible for me
to devise.

  * •

(new in version 1.62) nc, ncf load different versions of math italic and bold
math italic based on ScholaX (New Century Schoolbook) rather than Times—the
varg and varvw options are disabled in this case. The difference is that
o[tion nc loads math Greek letters from newtxmath, while option ncf loads math
greek from an adaptation of fourier Greek.

  * •

minion loads different versions of math italic and bold math italic based on
MinionPro rather than Times—the varg and varvw options are disabled in this
case, as the equivalent variant forms are made available by default—see the
extended discussion below;

  * •

garamondx loads different versions of math italic and bold math italic based
on garamondx rather than Times—the varg and varvw options are disabled in this
case, as the equivalent variant forms are made available by default.

  * •

baskervaldx (or Baskervaldx) loads different versions of math italic and bold
math italic based on Baskervaldx rather than Times—the varg and varvw options
are disabled in this case, as the equivalent variant forms are made available
by default.

  * •

baskerville (or Baskerville, or baskervillef or BaskervilleF) loads different
versions of math italic and bold math italic based on BaskervilleF rather than
Times—the varg and varvw options are disabled in this case, as the equivalent
variant forms are made available by default.

  * •

charter (or xcharter) loads different versions of math italic and bold math
italic based on XCharter rather than Times—the varg and varvw options are
disabled in this case, as the equivalent variant forms are made available by
default. As of version 1.53, Greek letters in all styles are taken from new
alphabets constructed to match the Charter style.

  * •

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 y.

  * •

noxchvw (or 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 `\nu`.

  * •

cochineal loads different versions of math italic and bold math italic based
on cochineal rather than Times—the varg and varvw options are disabled in this
case. There are two additional options specific to cochineal.

    * –

Option cochf replaces the default short math italic f with the long italic f
used in text.

    * –

Option cochrho replaces the default short form of `\rho` with the the long
form used in text.

  * •

utopia (or heuristica or erewhon) loads different versions of math italic and
bold math italic based on Utopia rather than Times—the varg and 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:

        \usepackage[osf]{erewhon} %extension of Utopia
    \usepackage[varqu,varl]{inconsolata} % sans typewriter
    \usepackage[scaled=.95]{cabin} % sans serif
    \usepackage[utopia,vvarbb]{newtxmath}

  * •

the libertine option also replaces both slanted and upright Greek symbols by
the corresponding Libertine glyphs, and similarly for minion, garamondx,
ebgaramond, stix2, xcharter and cochineal;

  * •

cmintegrals instructs newtxmath to load a thicker version of the Computer
Modern integral in place of the 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 txfonts integrals are
available; as of version 1.5, this option does nothing, as the new default is
slanted integrals.

  * •

the combination

        % The next line is no longer needed, as newtxmath Requires it
    %\usepackage{amsmath}% loads amstext, amsbsy, amsopn but not amssymb
    \usepackage{newtxmath}

causes no error, unlike the same combination with txfonts, but does nothing
significant. (Recall that amsmath is loaded automatically if you use an ams
document class such as amsart or amsbook, as is amsthm.)

  * •

If you wish to use `\usepackage{amsthm}`, place it before loading newtxmath or
the result will be

        ! LaTeX Error: Command \openbox already defined.

  * •

uprightGreek and slantedGreek determine the form of Greek alphabet loaded—the
default is uprightGreek, which loads upright uppercase and slanted lowercase
Greek symbols, as is customary in Anglo-American mathematical typesetting.
With the option slantedGreek, which you might want to use if you cared about
ISO standards, all Greek symbols are slanted. No matter which is set,
`\Gammaup` (or `\upGamma`) gives you upright `\Gamma`, etc, and `\Deltait`,
`\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, `\mathnormal{\Omega}` etc will always produce the slanted version.
(The macro `\mathnormal` means essentially “use the version of the symbol in
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 newtxtext and
libertine.

  * •

Option 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.)

  * •

The option cmbraces instructs newtxmath to ignore the brace collections from
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 bigdelims, which superseded cmbraces, is now not necessary—it is the
default as of version 1.5.

  * •

Option nonewtxmathopt (or scale, a mistake I cannot now erase) causes
newtxmath to not make use of the optical math sizes (7pt, 5pt), as preferred
by some.

  * •

Option subscriptcorrection enables the special spacing of some subscripts.
(The default is nosubscriptcorrection.)

  * •

The newtxmath package contains three different Blackboard Bold alphabets,
where original txfonts contained two. The default, triggered by `\mathbb{}`,
takes its glyphs from the font which replaces 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 txfonts, is triggered by
`\varmathbb{}`, is more geometric and, in my opinion, preferable but not
optimal. The option varbb makes `\mathbb{}` synonymous with `\varmathbb{}`.
The third option is the double-struck glyphs from the STIX collection. See the
expanded discussion below.

  * •

noOT1 affects only those text-math combinations where operators is defined by
default to OT1 with Greek uppercase letters. It causes operators to keep the
same encoding as in tex, allowing operatornames to use accented charaters, but
losing Greek uppercase.

  * •

nosymbolsc causes the package to not load the symbolsC fonts, saving a math
family. (This font contains mostly exotic symbols, along with some very
useful, commonly used symbols like `\coloneq` $\coloneq$, `\eqcolon`
$\eqcolon$, `\notin` $\notin$, `\notni` $\notni$, `\neq` $\neq$, `\nsubset`
$\nsubset$ and `\nsupset` $\nsupset$, but these have been moved (virtually) to
lettersA so they may continue to be used even if you use the option
nosymbolsc.) If this option is selected, then, as of version 1.53, new
definitions are made for the missing negated symbols. The package centernot is
now required.

  * •

amssymbols (the default) and noamssymbols determine whether the txfonts
versions of the ams symbols (AMSm) are loaded—if so, they override previous
settings in amsmath. If you use the option noamssymbols, then `\mathbb{}` is
set to mean the same as `\varmathbb{}`. (One advantage of 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 mathalfa package.)
Important note: if you load an AMS class, like amsart, then some trickery will
be involved. The AMS classes have an option, noamsfonts which currently (2017)
does not work as advertised, but is fixed in TeXLive 2018. It is supposed to
prevent the loading of AMSa and AMSb, which waste two slots. The following
workaround seems like a reasonable stopgap until then.

        \def\symAMSb{5}
    \documentclass[noamsfonts]{amsart} %or other AMS classes
    \let\symAMSb\@undefined

This method of loading the AMS class will save you two slots.

  * •

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.

  * •

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 `(` and `\big(` in math mode. If this option
is specified, cmbraces is ignored. (This option is unnecessary, as of version
1.5.)

  * •

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.

  * •

As of version $1.18$ of newtxmath (and version $1.07$ of newpxmath) there are
new math accents and macros available.

    * –

`\widehat` and `\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, `$\widehat{X}^2$`, which gives $\widehat{X}^{2}$ without the hat
colliding with the superscript.

    * –

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, `\dlb` and `\drb`, giving, eg, $\dlb
0,T\drb$, as commonly used in probability theory.

    * –

The new macros `\overgroup`, `\undergroup`, `\overgroupra`, `\overgroupla`,
`\undergroupra` and `\undergroupla` are intended as replacements for the
`\wideparen` and related macros from the yhmath and fourier packages. In fact,
`\overgroup` and `\undergroup` are variants of the existing macros
`\overbrace` and `\underbrace`, while the suffixes ra and la signify right
arrow and left arrow respectively. The macro `\widering` places a ring
centered over an `\overgroup`, not dissimilar from its use in yhmath. Example:

                \[\overgroup{ABC}\quad\overgroupra{ABC}\quad\undergroup{ABC}\quad
        \undergroupla{ABC}\quad \widering{ABCD}\]

gives

$\overgroup{ABC}\quad\overgroupra{ABC}\quad\undergroup{ABC}\quad\undergroupla{ABC}\quad\widering{ABCD}$

  * •

As of version $1.23$, the package contains new math accents `\widearc` and
`\wideOarc` similar in effect to those from fourier and kpfonts. Example:

        \[\widearc{BC}\quad\widearc{ABC}\quad\widearc{ABCD}\quad
    \wideOarc{BC}\quad\wideOarc{ABC}\quad\wideOarc{ABCD}\]

gives

$\widearc{BC}\quad\widearc{ABC}\quad\widearc{ABCD}\quad\wideOarc{BC}\quad\wideOarc{ABC}\quad\wideOarc{ABCD}$

  * •

The option 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.) If your language uses accented operator names, do not use this
option.

###  4.1 Bold Math Italic macros

It can be a little awkward to specify bold math italic letters without using
the bm package, which may have some unintended consequences for some users.
The option useBImacros enables the definitions of macros of the form
`\BIA`—`\BIz` that may be used instead, all based on the macro

    \DeclareRobustCommand{\BI@}[1]{%
    \begingroup\text{\mathversion{bold}$#1$}\endgroup}

following which, the package conditionally defines, e.g.,

    \DeclareRobustCommand{\BIA}{\BI@{A}}

so that `\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.

IMPORTANT: The Libertine text package is now once again named libertine, but
requires arguments that are different from the original libertine package.

Example 1:

    \usepackage[osf]{newtxtext} % T1, lining figures in math, osf in text
    \usepackage{textcomp} % required for special glyphs
    %\usepackage{amsmath} % not needed, as it is Required by newtxmath
    \usepackage[varvf,vvarbb]{newtxmath}
    \usepackage{bm} % load after all math to give access to bold math
    %\useosf %no longer required if osf specified

Example 2:

    \usepackage[lining,semibold]{libertine} % a bit lighter than Times--no osf in math
    \usepackage[T1]{fontenc} % best for Western European languages
    \usepackage{textcomp} % required to get special symbols
    \usepackage[varqu,varl]{inconsolata}% a typewriter font must be defined
    \usepackage{amsmath,amsthm}% must be loaded before newtxmath
    \usepackage[libertine,vvarbb]{newtxmath}
    \usepackage[scr=rsfso]{mathalfa}
    \usepackage{bm}% load after all math to give access to bold math
    %After loading math package, switch to osf in text.
    \useosf % for osf in normal text

Caution: If your text font lacks an OT1 encoded version with uppercase Greek,
`\mathrm` and `\mathit` applied to Greek letters won’t give you what you
expect.

##  5 Usage with LuaLaTeX and XeLaTeX

As far as I can tell, newtxmath works with both, but requires a very specific
loading order and choice of options. Briefly, except for libertine text, the
math options must all be loaded prior to loading and using fontspec. Be aware
that some text packages (eg, cabin) may contain a line like

    \RequirePackage{fontspec}

which would prevent (“option clash” error) a subsequent

    \usepackage[no-math]{fontspec}

unless suppressed by an appropriate option. E.g.,

    \usepackage[type1]{cabin}

prevents the problem with the cabin package.

The following examples illustrate some general models, the most unintuitive
being the first because it loads a small version, minlibertine, of libertine
text for use in math mode as numbers, basic symbols and operators.

Example 3:

    %load text components other than libertine text to be used in math
    \usepackage[T1]{fontenc}
    \usepackage[scaled=.85]{beramono}% used only by \mathtt
    \usepackage[type1]{cabin}% used only by \mathsf
    \usepackage{amsmath,amsthm}% must be loaded before newtxmath
    \usepackage[libertine]{newtxmath}
    % loads minlibertine because no other Roman text package was specified
    % so that \mathrm and \mathbf also use minlibertine
    \usepackage[scr=rsfso]{mathalfa}
    \usepackage{bm}% load after all math to give access to bold math
    %Now load the otf text fonts using fontspec---won’t affect math
    \usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX
    \usepackage{libertine}
    %\usepackage[osf,semibold]{libertine} for osf in text, semibold as bold

The next example is similar, but in math mode, numbers, basic symbols,
operator names, `\mathrm` and `\mathbf` will render with fbb-LF, though math
italic and math Greek letters will be from libertine. (Note that one specifies
the encoding and redefines `\rmdefault`. For reasons I don’t yet understand,
it may not work to load the font package—ie, don’t substitute
`\usepackage{fbb}`, as that will mess up bold in the libertine text package.)

Example 4:

    %load text components other than libertine text to be used in math
    \usepackage[T1]{fontenc}
    \renewcommand{\rmdefault}{fbb-LF}% Roman font for use in math mode
    \usepackage[scaled=.85]{beramono}% used only by \mathtt
    \usepackage[type1]{cabin}% used only by \mathsf
    \usepackage{amsmath,amsthm}% load before newtxmath
    \usepackage[libertine,vvarbb]{newtxmath}
    % does not load minlibertine because another Roman text package was specified
    \usepackage[scr=rsfso]{mathalfa}
    \usepackage{bm}% load after all math to give access to bold math
    %Now load the otf text fonts using fontspec---won’t affect math
    \usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX
    \usepackage{libertine}

##  6 Alternate forms of glyphs

Prior to version 1.5, several math glyphs had alternate forms:

Command | Result | Alternate Commands | Alternate Forms
---|---|---|---
`\emptyset` | $\emptyset$ | `\varnothing, \emptysetAlt` | $\varnothing,\emptysetAlt$
`\forall` | $\forall$ | `\forallAlt` | $\forallAlt$
`\exists` | $\exists$ | `\existsAlt` | $\existsAlt$
`\nexists` | $\nexists$ | `\nexistsAlt` | $\nexistsAlt$

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 newtxmath:

    \let\forall\forallAlt

As of version 1.5, the old txfonts versions of `\forall`, `\exists` and
`\nexists` have been removed and the Alt versions substituted. Both `\forall`
and `\forallAlt` generate $\forall$, and similarly with `\exists` and
`\nexists`.

##  7 Conformity with amsmath

The newtxmath package now contains a `\RequirePackage{amsmath}`, as it uses a
number of the macros defined there. To pass options to amsmath, you can pass
the options as options to `\documentclass`. For example,

    \documentclass[11pt,intlimits]{article}
    \usepackage{newtxtext}
    \usepackage{newtxmath}

will load amsmath with option intlimits. As of version 1.14, newtxmath
respects the amsmath macros for placement of limits on integrals.

##  8 The minion option

This option allows the use of MinionPro as math letters (Latin and Greek)
within the math font, but there are some caveats:

  * •

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 MinionPro package must be generated by FontPro, and the CTAN
package minion2newtx must be installed sepately—it is not in TeXLive. The
details are spelled out in the documentation for the minion2newtx package.

##  9 The TeX math font problem

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 newtxmath, the following
math fonts are always loaded and permanently (if you didn’t prevent loading of
some features) occupying slots immediately following `\begin{document}`, and
others that may be called for in typesetting a mathematical expression can add
to the list as the document grows.

Always loaded:

    0: operators
    1: letters
    2: symbols
    3: largesymbols
    4: AMSm (a combination of the old AMSa and AMSb)
    5: lettersA
    6: symbolsC
    7: largesymbolsTXA
    8: boldoperators
    9: boldletters
    10: boldsymbols
    11: boldlargesymbols

Notes:

  * •

If using one of the AMS classes (e.g., amsart, amsbook), you can save two or
more math families by adding the option noamsfonts in your `\documentclass`
call. As of early 2018, This works only with the most recent versions the AMS
classes available in both TexLive and MiKTeX.

  * •

The operators font is essentially the Roman text font, used for names of
operators and as the target for `\mathrm`—its bold version is used as the
target for `\mathbf`;

  * •

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
forst eleven slots—eg, newtxtext, libertine.

  * •

if you typeset an expression that, say, calls for a single bold glyph from
symbolsC, that costs you an entire new slot, leaving only two remaining;

  * •

same with, eg, `\mathit`;

  * •

same with an external Fraktur, Blackboard Bold or Script glyphs;

  * •

if you run out of math alphabets, look first to dropping AMSm as well as
symbolsC, which can save you at least two slots;

  * •

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;

  * •

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

        \mbox{{\usefont{U}{ntxmia}{b}{n} X}}

which allows you to use letter X from boldlettersA but without any math
features;

  * •

there is a macro `\ShowMathFonts` in 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

        (<fam number>: <internal font id> = <tfm name> [newtx name])

##  10 Bold math fonts

Every math font in the txfonts package, and in the newtx package, is
accompanied by a bold version. Some usage examples are given below. Generally,
one may use either `\boldmath` to change an entire formula to bold, or
`\boldsymbol` to change one symbol, but the spacing generally works better
after loading the bm package and using the `\bm` macro.

The text glyphs dotlessi (`\i`) and dotlessj (`\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.

Type | Weight | Command | Result
---|---|---|---
Math Italic | Regular | `$\hat{\imath}$` | $\hat{\imath}$
Math Italic | Bold | `$\bm{\hat{\imath}}$` | $\bm{\hat{\imath}}$
Roman | Regular | `$\hat{\textrm{\i}}$` | $\hat{\textrm{\i}}$
Roman | Bold | `$\bm{\hat{\textbf{\i}}}$` | $\bm{\hat{\textbf{\i}}}$

In math, bold roman characters are often used to indicate vector quantities,
and for this one uses constructions like

  * •

`$\mathbf{x}$` produces $\mathbf{x}$;

  * •

`$\bm{\mathrm{x}}$` produces $\bm{\mathrm{x}}$ (same as previous but may offer
improved spacing);

  * •

`$\bm{x}$` produces $\bm{x}$ (not roman);

  * •

`$\bm{\hat{\mathbf{x}}}$` produces $\bm{\hat{\mathbf{x}}}$ (with a bold
accent);

  * •

`$\bm{\dot{x}}$` produces $\bm{\dot{x}}$ (bold but not roman);

  * •

the macro definition

        \newcommand{\xyvec}[2]{%
    \ensuremath{#1\mkern1.5mu\bm{\textbf{\i}}#2\mkern1.5mu\bm{\textbf{\j}}}}

allows you to write `\xyvec{x}{+y}` to output $x\mkern
1.5mu\bm{\textbf{\i}}+y\mkern 1.5mu\bm{\textbf{\j}}$;

  * •

`$\bm{\Gamma}$` produces $\bm{\Gamma}$ (bold Gamma);

  * •

`$\bm{\hat{\Gamma}}$` produces $\bm{\hat{\Gamma}}$ (bold Gamma with bold
accent).

(The last two assume that you have effectively set the option uprightGreek—the
default.)

##  11 Blackboard bold

As mentioned briefly above, the package now has a new blackboard bold alphabet
built-in, and some new macros to call the non-default versions. To summarize,
the problems are:

  * •

the default, called by `\mathbb` is quite ugly and indistinct, but does
cooperate with the bolding macros `\bm` and `\boldsymbol`;

  * •

the original variant form called with the macro `\varmathbb` is better, but
the macro conflicts with `\bm`. (In fact, the bold version is identical to the
regular version, but it is still not right that it conflicts with them.) The
problem stems from the part of the definition of `\varmathbb` which allows you
to insert an argument with more than one character, like `\varmathbb{ABC}`.
Another problem with `\varmathbb` is that it conflicts with hyperref—if you
use the macro in a moveable argument such as a section heading, you will
provoke a LaTeX error message. The solution is to use macros that take a
single character as argument, like `\vmathbb{A}` and `\vvmathbb{A}`, which
both cooperate with hyperref.

  * •

the third, new, alphabet is borrowed from the STIX fonts—it is sharp and quite
clear, geometric in design. The macro `\vvmathbb` provided to access this
alphabet. The new option vvarbb effectively makes `\mathbb` mean the same as
`\vvmathbb`. (The reason for including these in the newtx package rather than
calling them from the mathalfa package is that newtx leaves very little space
for new math symbol fonts and math alphabets, and this way requires no
additional such resources.

  * •

Important note: Under the option stix2, there are still three blackboard fonts
but the macro `\vmathbb` now points to glyphs from DSSerif, a serifed double-
struck family that replaces the original variant that is still available under
other options. With stix2, the dotlessi and dotlessj glyphs from the DSSerif
font are available as `$\imathbbs$` and `$\jmathbbs$`, no matter which
blackboard bold option you chose.

One interesting feature of the new 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}$=`$\vvmathbb{1}$` useful in specifying an
indicator, AKA characteristic function. Here are some examples:

| Regular | Bold | Remarks
---|---|---|---
Default |  `$\mathbb{R}$` $\mathbb{R}$ |  `$\bm{\mathbb{R}}$` $\bm{\mathbb{R}}$ |
Variant 1 |  `$\varmathbb{R}$` $\varmathbb{R}$ |  | Bold is same as regular
$\dots$or |  `$\vmathbb{R}$` $\vmathbb{R}$ |  | Single char. argument
Variant 2 |  `$\vvmathbb{R}}$` $\vvmathbb{R}$ |  `{\boldmath $\vvmathbb{R}$}` $\vvmathbb{R}$ | Make a macro for this!

The macros `\vmathbb` and `\vvmathbb` have been substantially rewritten as of
version 1.55 and can now accept strings as arguments rather than just single
characters. At some point in time, the `\bm` and `\boldsymbol` macros stopped
working with the prior versions of these macros, and that remains a problem
with the new versions. If you need only a few blackboard bold symbols, it may
be better practice to define macros for each, including bold versions you
might need. E.g., the your preamble:

    \let\bbZ\undefined
    \DeclareMathSymbol{\bbZ}{\mathord}{lettersA}{218} % Z may not always be in this slot

Then, `\bm` will correctly understand

    \bbZ\;\bm{\bbZ}

and render it as

##  12 Samples from free Times and Libertine packages

TXFONTS:

    \usepackage{txfonts}

  * •

Complete match between text and math size and weight;

  * •

first formula much too cramped;

  * •

upper limit of integral much too close to integral sign;

  * •

square on $t$ in integrand comes very close to colliding with it;

  * •

square root in denominator aligned too far right.

NEWTXFONTS:

    \usepackage{newtxtext}
    \usepackage{newtxmath}

  * •

Complete match between text and math size and weight;

  * •

first formula much less cramped;

  * •

upper limit of integral not too close to integral sign;

  * •

square not too close to $t$ in exponent;

  * •

better alignment of square root in denominator.

MathTimePro2:

    \usepackage{newtxtext}
    \usepackage[lite]{mtpro2}

  * •

Complete match between text and math size and weight;

  * •

first formula quite spread out;

  * •

upper limit of integral not too close to integral sign;

  * •

plenty of space between square and $t$ in exponent.

Libertine and MathTimePro2:

    \usepackage{libertine}
    \usepackage[T1]{fontenc}
    \usepackage[lite]{mtpro2}

  * •

Mismatch of weight between text and math;

  * •

first formula quite spread out;

  * •

upper limit of integral not too close to integral sign;

  * •

plenty of space between square and $t$ in exponent.

Libertine and newtxmath:

    \usepackage{libertine}
    \usepackage[T1]{fontenc}
    \usepackage[libertine]{newtxmath}

  * •

Very good match between text and math in size and weight;

  * •

first formula not cramped;

  * •

upper limit of integral not too close to integral sign;

  * •

space between square and $t$ in exponent;

  * •

better alignment of square root in denominator.

Mathptmx:

    \usepackage{mathptmx}

  * •

Good match between text and math size and weight, though the summation symbol
(from the system symbol font) is too small and too dark;

  * •

first formula well spread;

  * •

upper limit of integral not too close to integral sign;

  * •

space between square and $t$ in exponent;

  * •

there are no upright Greek lowercase letters in this package;

  * •

good alignment of square root in denominator;

  * •

infinity symbol not sufficiently large?

  * •

the package lacks a number of amenities that are present in other packages.

##  13 Items installed

As well as a collection of PostScript fonts, virtual fonts, font definition
files and the central newtxtext.sty and newtxmath.sty files, the package
contains one map file newtx.map that must be enabled for the package to
function correctly. Its name was changed from ntx.map to mirror the package
name.) The file 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 mathnotes.pdf adds details about the
sources for the math fonts, though it is rather cursory.)

The font files ntxexmods.pfb and ntxbexmods.pfb were derived from cmex10.pfb
by FontForgery, thickening the Computer Modern braces to match the weight of
the txfonts braces. The pair ntxexb.pfb and ntxbexb.pfb were similarly derived
from cmsy7.pfb and cmex10.pfb to produce more braces and matching integral
signs based on Computer Modern. The .tfm files rtx[b]mio.tfm are simply
unslanted versions of rtxmi, from which we construct upright partial
derivative symbols. The last two entries provide us with a way to access
custom-encoded versions of fxlri.pfb and fxlbi.map in order to access some of
the unencoded alternate characters—eg, Greek letters, J.alt and v.alt. The
font file LibertineTheta-Regular.pfb was created from the Theta symbol in
fxlri.pfb, which requires some FontForge help to look correct.

This version contains optical versions of the math italic and symbol fonts at
7pt and 5pt, allowing better rendering in `\scriptstyle` and
`\scriptscriptstyle`.

##  14 Appendix 1: Changes made in version 1.5

  * •

The large delimiters have been modified so match the heights in common usage
by cmex10 and other packages. (Those formerly used by newtxmath were somewhat
shorter, resulting in unexpected behavior of `\Big`, `\bigg`, etc.)

  * •

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 upint
switches to the upright form. (The former option 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:

Small |  | Text, Display |
---|---|---|---
$\smallint$ | `$\smallint$` |  $\int$, $\displaystyle{\int}$ | `$\int$`
$\smalliint$ | `$\smalliint$` |  $\iint$, $\displaystyle{\iint}$ | `$\iint$`
$\smalliiint$ | `$\smalliiint$` |  $\iiint$, $\displaystyle{\iiint}$ | `$\iiint$`
$\smalliiiint$ | `$\smalliiiint$` |  $\iiiint$, $\displaystyle{\iiiint}$ | `$\iiiint$`
$\smalloint$ | `$\smalloint$` |  $\oint$, $\displaystyle{\oint}$ | `$\oint$`
$\smalloiint$ | `$\smalloiint$` |  $\oiint$, $\displaystyle{\oiint}$ | `$\oiint$`
$\smalloiiint$ | `$\smalloiiint$` |  $\oiiint$, $\displaystyle{\oiiint}$ | `$\oiiint$`
$\smallfint$ | `$\smallfint$` |  $\fint$, $\displaystyle{\fint}$ | `$\fint$`
$\smallsqint$ | `$\smallsqint$` |  $\sqint$, $\displaystyle{\sqint}$ | `$\sqint$`
$\smallsumint$ | `$\smallsumint$` |  $\sumint$, $\displaystyle{\sumint}$ | `$\sumint$`
$\smallvarointclockwise$ | `$\smallvarointclockwise$` |  $\varointclockwise$, $\displaystyle{\varointclockwise}$ | `$\varointclockwise$`
$\smallointctrclockwise$ | `$\smallointctrclockwise$` |  $\ointctrclockwise$, $\displaystyle{\ointctrclockwise}$ | `$\ointctrclockwise$`

  * •

The overly small delimiters ([{ in Times are no longer used in math mode,
being replaced by bigger versions. The former option bigdelims no longer has
any effect.

  * •

There is a new option smallerops which chooses smaller renditions (20% smaller
in displaystyle, 10% smaller in textstyle) of the bigoperators:

        \bigsqcup
    \bigodot
    \bigoplus
    \bigotimes
    \sum
    \prod
    \bigcup
    \bigcap
    \biguplus
    \bigwedge
    \bigvee
    \bigcupdot
    \bigcapplus
    \bigsqcupplus
    \bigsqcapplus
    \bigsqcap
    \bigtimes
    \coprod

  * •

The dot accents are now taken from a slightly larger series, making available
`\dot`, `\ddot`, `\dddot` and `\ddddot`. For best horizontal alignment with
other accents, choose the option timesmathacc when loading newtxmath.

  * •

New accents have been added and the old vector accent has been replaced. The
new accents are: `\vec`$\quad\vec{}$
`\lvec`$\quad\lvec{}$
`\lrvec`$\quad\lrvec{}$
`\harpoonacc`$\quad\harpoonacc{}$
`\lharpoonacc`$\quad\lharpoonacc{}$
`\lrharpoonacc`$\quad\lrharpoonacc{}$
`\barbar`$\quad\barbar{}$
`\bartilde`$\quad\bartilde{}$
`\barhat`$\quad\barhat{}$
`\tildebar`$\quad\tildebar{}$
`\tildetilde`$\quad\tildetilde{}$
`\tildehat`$\quad\tildehat{}$
`\hatbar`$\quad\hatbar{}$
`\hattilde`$\quad\hattilde{}$
`\hathat`$\quad\hathat{}$

  * •

New glyphs: (B denotes bigger, S denotes smaller)
`\cdotB` $\quad\cdotB$ (cf. `\cdot` $\quad\cdot$)
`\cdotBB` $\quad\cdotBB$
`\circS` $\quad\circS$ (cf. `\circ` $\quad\circ$)
`\bulletS` $\quad\bulletS$ (cf. `\bullet` $\quad\bullet$)
`\bulletSS` $\quad\bulletSS$
`\bulletSSS` $\quad\bulletSSS$
`\primeS` $\quad\primeS$ (cf. `\prime` $\quad\prime$)

  * •

New macros `\setSYdimens` and `\setEXdimens` allow experts to modify some math
font dimensions.

##  15 Appendix 2: Changes made in version 1.60

Versions of newtx dated from September, 2019 (1.60 for newtxmath make some
quite substantial changes, mostly to math mode.

##  16 Goals

Spurred by work of Ross Moore to provide means of generating archivable pdf
using pdflatex, the main goal was to change newtx and newpx to meet the
requirements for satisfying the PDF/A-1b standards by using an appropriate
preamble involving the 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.

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 `$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.

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.

##  17 The important changes

The following changes were made to both newtx and newpx.

###  17.1 Archivability

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 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
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 newtxmath,
newpxmath, newtxmath/libertine, newtxmath/cochineal, newtxmath/stix2,
newtxmath/xcharter and 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. The other packages which may be specified as an option to
newtxmath (e.g., 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.

Also modified were the sups fonts in newtxtext, where the main issue was
unicode mapping. Superior number 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.

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.)

    \documentclass[noamsfonts]{amsart} % save 2 math families
    \pdfcompresslevel=0
    \pdfgentounicode=1
    \input glyphtounicode.tex
    \usepackage{pdfx} % v 1.6.4 or higher
    \InputIfFileExists{glyphtounicode-cmr.tex}{}{}
    \InputIfFileExists{glyphtounicode-ntx.tex}{}{}
    \usepackage{newtxtext} %T1 is default encoding
    \usepackage[scaled=0.95]{inconsolata}  % typewriter
    %\usepackage[leqno]{amsmath}
    \usepackage{amsthm}
    \usepackage[vvarbb]{newtxmath} % vvarbb gives STIX Bbb

Version 1.6.3 of pdfx from February 2019 mishandles math accents. A fix is now
available and will become part of the upcoming pdfx v1.6.4.

###  17.2 Glyph spacing changes

(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, `\rho`, `\beta` and
`\mu` where a long tail could pose problems intersecting with other glyphs;
(c) glyphs like such as D, Q and `\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.

The subscriptcorrection option to 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 xy-pic, both depending on making `_` an
active character. Newtxmath will detect if the xy package is loaded and
disable subscriptcorrection if so. You would have to correct such issues by
manually inserting a negative `\mkern`. For example, you might put in your
preamble something like

    \def\jj{\mkern-3mu j}

and then use `$x_{\jj}$` instead of `$x_j$`, turning $x_{j}$ into
$x_{\mkern-3.0muj}$.

If you do enable subscriptcorrection, there is a default correction table in
the sty file, but the sty file also looks for a file named, e.g., newtx-
subs.tex if you are using the newtx default math letters. There is already
such a file located in the newtx distribution in the `/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

    {j}{-3}

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

    {\beta}{-1.5}

The complete list of file names recognized for specifying subscript
corrections is:

    newtx-subs.tex
    newtx-libertine-subs.tex
    newtx-xcharter-subs.tex
    newtx-cochineal-subs.tex
    newtx-baskervillef-subs.tex
    newtx-stickstoo-subs.tex
    newtx-garamond-subs.tex
    newtx-ebgaramond-subs.tex
    newtx-baskervald-subs.tex
    newtx-erewhon-subs.tex
    newtx-minion-subs.tex
    newtx-nc-subs.tex
    newtx-ncf-subs.tex
    newtx-noto-subs.tex
    newtx-notosans-subs.tex

###  17.3 New glyphs added

(For enhanced packages only) Math family 1 (letters) has been extended from
128 slots to 256, retaining the 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. By default,
`$\mathscr{F}$` will produce $\mathscr{F}$.
$\bullet$ option uprightscript changes the output to .
In both cases, there are full upper-case and lower-case and dotlessi,
dotlessj. To insert the latter, you can write either `$\mathscr{\imath}$` or
`$\imathscr$`, rendered as $\mathscr{\imath}$ in the slanted script case.

The secondary letters font (lettersA) and math family 2 (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 Times. Dotlessi and dotlessj have
been added and can be specified in math mode by `$\imathfrak$` and
`$\jmathfrak$`—`$\mathfrak{\imath}$` also works. There are in addition two
subsidiary Bbb alphabets in lettersA, specified by the respective options
vmathbb, vvmathbb, and there are corresponding dotlessi, dotlessj activated by
`$\imathbb$`, `$\jmathbb$`, which always render as $\imathbb$, $\jmathbb$ mo
matter the choice of which Blackboard Bold Alphabet. If you select one of the
options varbb, vvarbb, you will have Bbb digits 0..9 using, e.g.,
`$\mathbb{1}$` to get $\vvmathbb{1}$.

Among the new symbols added are:
$\bullet$ `\hslash`, `\hbar`, `\lambdaslash`, `\lambdabar`, `\Zbar`,
`\Angstrom` are now constructed from the native glyphs, but only in the
enhanced families.
$\bullet$ Euler’s constant `$\Euler$` ($\Euler$).
$\bullet$ Hermitian transpose `\hermtransp` or `\htransp` is used like
`$\mathbf{A}^{\htransp}$` ($\mathbf{A}^{\htransp}$). This usage is similar to
simple transpose `$\mathbf{A}^{\transp}$` ($\mathbf{A}^{\transp}$).
$\bullet$ Independence (in the probabilistic sense) can use `\Perp`, $\Perp$,
and there is a new `\nPerp`, $\nPerp$ for the negation.

###  17.4 Adaptive vector accent

The LaTeX macro `\overrightarrow` provides a right arrow with adaptive width,
but not matching the vector head of newtxmath. Likewise, the esvect provides a
similar service with a choice of vector heads, none of which match newtxmath.
I’ve added code to provide a matching adaptive vector accent and which uses
the same macro name, `\vv`, as esvect. For a comparison of these vector
accents, `$\vec{XY} \vv{XY} \overrightarrow{XY}$` renders as
$\vec{XY}\vv{XY}\overrightarrow{XY}$.
$\bullet$ `$\vv{AB}$` renders as $\vv{AB}$.
$\bullet$ `$\vv*{AB}{x}$` renders as $\vv*{AB}{x}$. This provides better
horizontal spacing of subscripts than `$\vv{AB}_{x}$`, $\vv{AB}_{x}$.
$\bullet$ You can also do `$\vv*{AB}{\vv{CD}}$`, which renders as
$\vv*{AB}{\vv{CD}}$.
$\bullet$ You can change the vertical space between the arrow and the accentee
by means of the package option vecsep, whose default value is .25ex.

###  17.5 Miscellaneous Changes

  * •

The superior letters fonts in newtx have been extended and all glyphs now have
appropriate unicode mappings.

  * •

The AMS fonts replacement, ntxsym corrects the former misplacement of `\kbbb`,
`\daleth`, `\circledR` and `\circledS`.)

##  18 Changed Font Tables

###  18.1 letters

ntxmi

###  18.2 lettersA

ntxmia

###  18.3 symbols

ntxsy

###  18.4 A sample newtx-subs.tex

You may either copy the entire block below, starting with the line
`\begin{...` and ending after the line beginning `\end{` and pasting it into
the top of your document before the `\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.

    \begin{filecontents*}{newtx-subs.tex}
    {f}{-3}
    {j}{-3}
    {p}{-1}
    {y}{-1}
    {A}{-3}
    {B}{-1}
    {D}{-1}
    {H}{-1}
    {I}{-1}
    {K}{-1}
    {L}{-1}
    {M}{-1}
    {N}{-0.5}
    {P}{-1}
    {X}{-1}
    {\rho}{-1.5}
    {\mu}{-1}
    \end{filecontents*}

### The ebgaramond option to newtxmath

As ebgaramond has an x-height considerably smaller than newtx, some amount of
scaling is useful to bridge the gap. In making the replacement letters, I
increased the size of the EBGaramond letters by 5%, so make some scaling
combination that compensates for this. The weights of ebgaramond used in the
substitutions were regular and semibold. This dictates one of the options used
for ebgaramond.

Example preamble:

    \usepackage[lining,semibold,scaled=1.05]{ebgaramond}
    % Latex BOLD renders with ebgaramond semibold
    \usepackage[T1]{fontenc} % best for Western European languages
    \usepackage{textcomp} % required to get special symbols
    \usepackage[varqu,varl]{inconsolata}% a typewriter font must be defined
    \usepackage{amsmath,amsthm}% must be loaded before newtxmath
    \usepackage[ebgaramond,vvarbb,subscriptcorrection]{newtxmath} % STIX Bbb
    \usepackage{bm}% load after all math to give access to bold math