summaryrefslogtreecommitdiff
path: root/fonts/newtx/doc/newtxdoc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/newtx/doc/newtxdoc.tex')
-rw-r--r--fonts/newtx/doc/newtxdoc.tex61
1 files changed, 43 insertions, 18 deletions
diff --git a/fonts/newtx/doc/newtxdoc.tex b/fonts/newtx/doc/newtxdoc.tex
index 8078b03f3d..df038a7787 100644
--- a/fonts/newtx/doc/newtxdoc.tex
+++ b/fonts/newtx/doc/newtxdoc.tex
@@ -1,4 +1,4 @@
-% !TEX TS-program = lualatex
+% !TEX TS-program = lualatexmk
\def\fsc{11pt}
\documentclass[\fsc]{article}
\usepackage[margin=1in]{geometry}
@@ -28,7 +28,7 @@
\usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf, optional
\usepackage[scaled=.98,varqu,varl]{zi4}
%\usepackage[nohelv,nott,amsthm,largesc,theoremfont,trueslanted,scosf]{newtx}% Use newtxmath, not a unicode math package
-\usepackage[libertinus,textscale=1,amsthm]{newtx}% Use newtxmath, not a unicode math package
+\usepackage[textscale=1,amsthm,theoremfont,newsu]{newtx}% Use newtxmath, not a unicode math package
%\usepackage{amsthm}
%\usepackage{newtxmath}
%\usepackage[largesc,theoremfont,scosf]{newtxtext}
@@ -84,6 +84,14 @@
\section{Introduction}
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.
+\textsc{Changes as of version 1.73}
+\begin{itemize}
+\item
+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. 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}.
+ 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}.
+% \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{}|.)
+\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{}|.
+\end{itemize}
\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.
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}.
@@ -131,7 +139,7 @@ Supports an arbitrary otf math font with otf text using {\tt TeXGyreTermesX}.
\begin{itemize}
\item Your option list to {\tt newtx[text]} must include {\tt otfmath}, otherwise it will load {\tt newtxmath}.
\item With {\tt newtx}, you may specify some other otf text fonts.
-\item After loading {\tt newtx}, you must load your chosen unicode math package with \verb|\setmathfont{}[]|.
+\item After loading {\tt newtx} with {\tt otfmath} option, you must load your chosen unicode math package with \verb|\setmathfont{}[]|.
\item
You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
\item When using an otf math font, options to {\tt newtx} are passed only to {\tt newtxtext}.
@@ -145,8 +153,8 @@ You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
Supports specially prepared text font packages with {\tt newtxmath}.
\begin{verbatim}
% Without newtx
- \renewcommand*{\rmdefault}{t1ntxmin} % loads minimal version of text font
- \usepackage[]{newtxmath} % specify mathoptions
+ \renewcommand*{\rmdefault}{t1minntx} % loads minimal version of text font
+ \usepackage[]{newtxmath} % specify math options
\usepackage[no-math]{fontspec}
\usepackage{} % the chosen otf text font package, or fontspec \setmainfont, etc
% or, using newtx
@@ -488,7 +496,7 @@ If you process with a unicode engine, {\tt fontspec} will be loaded by {\tt newt
\subsection{Limitations of {\tt newtx}}
-1. When using {\tt newtx} with a unicode engine and specify 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.
+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.
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}.
@@ -547,14 +555,14 @@ If you use the {\tt babel} package, you should load it before {\tt newtxtext}---
More generally, the pattern of the preamble for {\tt pdflatex} should be:
\begin{verbatim}
<encoding options>
-[optional] \usepackage{substitutefont} % so you can change babel's fonts
+%[optional] \usepackage{substitutefont} % now obsolete
[optional] \usepackage[<babel options>]{babel}
\usepackage[p,osf]{newtxtext} % or newtx
% osf in text, lining figures in math
[optional] redefine the plain theorem style if necessary
<other font loading commands>
\usepackage{newtxmath}
-<substitutefont commands>
+%<substitutefont commands> obsolete---Use \DeclareFontFamilySubstitution
\end{verbatim}
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.)
@@ -578,25 +586,41 @@ Here is a specific example following this pattern, but without {\tt theoremfont}
\begin{verbatim}
\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{substitutefont} % now obsolete
\usepackage[greek.polutoniko,english]{babel}
\usepackage[largesc,osf]{newtxtext} %
\usepackage[varqu,varl]{zi4}% inconsolata
\usepackage[type1]{cabin}% sans serif
\usepackage[vvarbb]{newtxmath}
\useosf % use oldstyle figures except in math
-\substitutefont{LGR}{\rmdefault}{Tempora} % use Tempora to render Greek text
+\DeclareFontFamilySubstitution{LGR}{\rmdefault}{Tempora}
+% use Tempora to render Greek text
\end{verbatim}
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}.
-Option {\tt defaultsups} (same effect as {\tt 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 \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.
+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}.
+
+The footnote marker macros in this package work with all LaTeX engines, and with the KOMA classes in all engines.
+Their position and spacing may be modified with the following options:
+\begin{itemize}
+\item
+{\tt supscaled} (or {\tt supscale}): a scale factor to apply to the marker.
+\item {\tt supsraised}:amount to raise the superiors baseline---should be in units like {\tt ex} so that they scale properly.
+\item
+{\tt supLspaced}: kerning to apply to the left of the superscript.
+\item
+{\tt supRspaced}: kerning to apply to the right of the superscript.
+\end{itemize}
+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}.
-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 superior figures 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}.
+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}%
+{\addfontfeature{VerticalPosition=Denominator}3}%
+{\addfontfeature{VerticalPosition=Inferior,RawFeature=+ss19}4} without that option.
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
\begin{verbatim}
-\usepackage{amsmath}
+\usepackage{amsmath} %
\usepackage{amsthm}
\usepackage{newtxmath} % plus other options
\end{verbatim}
@@ -606,7 +630,7 @@ but this may now be simplified to
% other options may be added
\end{verbatim}
-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{2}| renders as \textregistered\textcircled{M}\textcircled{2}.
+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}.
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}.
@@ -841,7 +865,7 @@ The package invoked by
\begin{verbatim}
\usepackage{newtxmath}
\end{verbatim}
-loads the math part of the {\tt txfonts} (with revised metrics and additional glyphs) and should 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.
+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.
\begin{itemize}
\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.
\[\int\quad\oint\quad\iint\quad\iiint\quad\iiiint\quad\oiint\quad\oiiint\quad\varointclockwise\quad\ointctrclockwise\quad\fint\quad\sumint\quad\sqint\]
@@ -872,6 +896,7 @@ Similarly, there are \verb|\smallprod| and \verb|\smallcoprod| which, along with
\end{verbatim}
Don't use these unless you know what you're doing.
\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|;
+\item{\tt propmathfigs} changes the default figure style in math from tabular lining to proportional lining.
\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|;
\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;
\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.
@@ -925,8 +950,8 @@ As of version 1.7, it is simpler to provide {\tt amsthm} as an option to either
\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.
\item Option {\tt subscriptcorrection} enables the special spacing of some subscripts. (The default setting is {\tt nosubscriptcorrection}.)
\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.
-\item {\tt noOT1} affects only those text-math combinations where {\tt operators} is defined by default to 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.
-You may avoid the loss of One solution could be to define the affected operator names individually with commands like
+\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.}
+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
\begin{verbatim}
\DeclareMathOperator{\mIn}{\text{{\fontencoding{\encodingdefault}\selectfont m\'in}}}
\end{verbatim}
@@ -1145,7 +1170,7 @@ Math font packages in \LaTeX\ are susceptible to the ``Too many math alphabets''
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|;
\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.
\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;
-\item same with, eg, \verb|\mathit|;
+\item same with, e.g., \verb|\mathit|;
\item same with an external Fraktur, Blackboard Bold or Script glyphs;
\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;
\item the {\tt bm} package can cost you several slots, even if you make no use of the bold families it adds;