summaryrefslogtreecommitdiff
path: root/fonts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-10 03:00:43 +0000
committerNorbert Preining <norbert@preining.info>2024-02-10 03:00:43 +0000
commit1d28728327083b2e09300af044d37336abafbe02 (patch)
tree587bf83e2f85c0a4ef67c12707de3395e6194e9c /fonts
parentfa4b456400bb2b415dcbbfe785542c50e9dd61e3 (diff)
CTAN sync 202402100300
Diffstat (limited to 'fonts')
-rw-r--r--fonts/newtx/README6
-rw-r--r--fonts/newtx/doc/newtxdoc.pdfbin684099 -> 684402 bytes
-rw-r--r--fonts/newtx/doc/newtxdoc.tex24
-rw-r--r--fonts/newtx/tex/newtx.sty44
-rw-r--r--fonts/newtx/tex/newtxtext.sty17
5 files changed, 67 insertions, 24 deletions
diff --git a/fonts/newtx/README b/fonts/newtx/README
index 433b51bb16..d66b81e445 100644
--- a/fonts/newtx/README
+++ b/fonts/newtx/README
@@ -1,10 +1,14 @@
This package, initially based on txfonts, provides many fixes and enhancements to the txfonts package, splitting it into two separate packages---newtxtext and newtxmath, which may be run independently of one another. It provides scaling, improved metrics, and other options. In particular, newtxmath offers a libertine option which substitutes Linux Libertine (provided with TeXLive and MikTeX) italic and Greek letters for the default Times letters, providing a good match for the Libertine text font, which is heavier than Computer Modern but lighter than Times, and in my experience, looks very sharp and clear on the screen.
-Current version: 1.737 2024-01-11
+Current version: 1.738 2024-02-08
This material is subject to the LaTeX Project Public License. See http://www.ctan.org/license/lppl1.3
for the details of that license.
+Changes in version 1.738
+1. Documentation updated for newtx.sty usage.
+2. Modified newtx.sty and newtxtext.sty to ensure that default effects of \mathsf and \mathtt are the same in both cases, and to ensure that in both, the prior loading of a sf or tt text font would result in those being used for \mathsf, \mathtt without any further interventions.
+
Changes in version 1.737
Moved all sups code from newtxtext.sty to superiors.sty, version 2, leaving a stub
in place to warn users of the associated newtxtext options about the changes.
diff --git a/fonts/newtx/doc/newtxdoc.pdf b/fonts/newtx/doc/newtxdoc.pdf
index f3d8916ce2..82aed81682 100644
--- a/fonts/newtx/doc/newtxdoc.pdf
+++ b/fonts/newtx/doc/newtxdoc.pdf
Binary files differ
diff --git a/fonts/newtx/doc/newtxdoc.tex b/fonts/newtx/doc/newtxdoc.tex
index a412dd6dba..4390083f97 100644
--- a/fonts/newtx/doc/newtxdoc.tex
+++ b/fonts/newtx/doc/newtxdoc.tex
@@ -27,7 +27,7 @@
%\renewcommand{\rmdefault}{minntx}% Roman and Bold Termes for math
\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[amsthm,largesc,theoremfont,trueslanted,scosf]{newtx}% Use newtxmath, not a unicode math package
\usepackage[textscale=1,amsthm,theoremfont,newsu,scosf]{newtx}% Use newtxmath, not a unicode math package
%\usepackage{amsthm}
%\usepackage{newtxmath}
@@ -108,7 +108,7 @@ or
\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}. \textbf{IMPORTANT: As of version 1.737, the options and code described in this paragraph has been moved to the new {\tt superiors} package.}
+ 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.}
\item
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:
\begin{itemize}
@@ -182,16 +182,19 @@ 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}{t1minntx} % loads minimal version of text font
+ \renewcommand*{\rmdefault}{minntx} % loads minimal version of text font
+ % Load tt and sans text fonts for use in \mathtt, \mathsf
\usepackage[]{newtxmath} % specify math options
\usepackage[no-math]{fontspec}
\usepackage{} % the chosen otf text font package, or fontspec \setmainfont, etc
% or, using newtx
- \usepackage[]{newtx} % options will be passed to text font package and newtxmath---option no-math can be specified here
+ % Load tt and sans text fonts for use in \mathtt, \mathsf
+ \usepackage[]{newtx} % options will be passed to text font package and newtxmath
+ %---option no-math may be specified here
\end{verbatim}
\textsc{Notes:}
\begin{itemize}
-\item No special option requirements---this is the default case.
+\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}.
\item Babel, if used, must be specified before {\tt newtx[text]}, which loads {\tt fontspec}.
\item Polyglossia, if used, must be specified after loading {\tt newtx[text]}.
\end{itemize}
@@ -201,7 +204,8 @@ Supports specially prepared text font packages with {\tt newtxmath}.
\textsc{III: type1 text, type1 math (requires non-unicode engine)}
\begin{verbatim}
% Without newtx
- \renewcommand*{\rmdefault}{t1minntx}% minimal text family, Roman and Bold for math
+ \renewcommand*{\rmdefault}{minntx}% minimal text family, Roman and Bold for math
+ % Load tt and sans text fonts for use in \mathtt, \mathsf
\usepackage{newtxmath} % options will be as passed from newtx
\usepackage{} % the chosen text package
% should load tt and sans math before math
@@ -213,6 +217,7 @@ Supports specially prepared text font packages with {\tt newtxmath}.
\textsc{Notes:}
\begin{itemize}
+\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}.
\item Babel, if used, must be specified before {\tt newtx[text]}.
\end{itemize}
@@ -268,7 +273,7 @@ Aside from options that are passed along to the text and math packages, {\tt new
\begin{itemize}
\item
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]}.
-\item Option {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}.
+\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}.
\item Option {\tt subscriptcorrectionfile} allows you to set your own file specifying subscript corrections.
\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 May, 2022, are:
\begin{verbatim}
@@ -362,7 +367,7 @@ A more realistic preamble than those detailed above would follow the general pat
<General packages, babel (optional) and those necessary for latex>
<latex encoding, sf and tt fonts to be used by newtxmath>
\usepackage[]{newtx} % include all desired options to newtxtext and newtxmath
-% options nohelv, nott to newtxtext will prevent it from overwriting sf and tt choices
+% options nohelv, nott to newtx will prevent it from loading its default sans and tt text fonts in favor of Computer Modern
% option amsthm will correctly load that option, if specified
<fontspec is loaded, add \setmainfont, \setmonofont etc>
% Uncomment example lines below to use polyglossia, which must be loaded after fontspec
@@ -384,8 +389,7 @@ For example:
\usepackage[T1]{fontenc} % Active encoding for use in math text
\usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf
\usepackage[scaled=.98,varqu,varl]{zi4} % mathtt
-\usepackage[nohelv,nott,amsthm,largesc,theoremfont,trueslanted,scosf]{newtx} % this line loads fontspec
-% nohelv and nott stop overwriting initial mathsf and mathtt choices
+\usepackage[amsthm,largesc,theoremfont,trueslanted,scosf]{newtx} % this line loads fontspec
%\setmonofont and \setsansfont could be set here if necessary for use in text
% polyglossia, if used, must be loaded after fontspec
\usepackage{polyglossia}
diff --git a/fonts/newtx/tex/newtx.sty b/fonts/newtx/tex/newtx.sty
index 753b259ef2..ed91042f05 100644
--- a/fonts/newtx/tex/newtx.sty
+++ b/fonts/newtx/tex/newtx.sty
@@ -2,8 +2,8 @@
%Package to simplify loading of newtxmath with a text font family such as newtxtext for all latex engines, or for newtxtext and an otf math package.
-\def\fileversion{1.735}
-\def\filedate{2023/12/18}
+\def\fileversion{1.738}
+\def\filedate{2024/02/08}
\ProvidesPackage{newtx}[%
\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for newtxmath and a supported text font family, or for newtxtext and an otf math package]
@@ -105,7 +105,6 @@
\newcommand*{\ntxtext@rm}{} % not understood by libertinus-otf
\newcommand*{\ntxtext@sf}{}% not understood by libertinus-otf
-
\newcommand*{\ntxtext@scale}{1}
\newcommand*{\ntxmath@scale}{1}
\DeclareOptionX{scaled}[1]{\renewcommand*{\ntxtext@scale}{#1}\renewcommand*{\ntxmath@scale}{#1}}
@@ -121,6 +120,16 @@
\DeclareOptionX{ttscale}[]{\renewcommand*{\ntxtext@ttscale}{#1}}
\DeclareOptionX{rm}[true]{\renewcommand*{\ntxtext@rm}{#1}}
\DeclareOptionX{sf}[true]{\renewcommand*{\ntxtext@sf}{#1}}
+\newif\iftx@helv \tx@helvtrue
+\newif\iftx@tt \tx@tttrue
+\DeclareOptionX{nohelv}[true]{%
+\@nameuse{if#1}\tx@helvfalse\fi}
+\DeclareOptionX{nott}[true]{%
+\@nameuse{if#1}\tx@ttfalse\fi}
+\def\tx@helvratio{.94}
+\DeclareOptionX{helvratio}[0.94]{%
+\def\tx@helvratio{#1}
+}
\DeclareOptionX{type1}[true]{}% no effect now
%{%\@nameuse{if#1}\ntx@otftextfalse\fi}
@@ -259,7 +268,8 @@
\DeclareOptionX{sfracscaling}{%
\def\tx@sfrSC{#1}}
% \ntx@Topt contains all unknown options that are not math options. It contains no scale options. \ntx@Mopt lists all the math options.
-\ProcessOptionsX\relax
+\ProcessOptionsX\relax
+
%\show\ntx@Mopt
%\show\ntx@Topt
%\traceon
@@ -275,8 +285,30 @@
\PackageWarning{newtx.sty}{Reverting to newtxtext: newtx with option {\tt otfmath} can not handle other text packages.}
\ntx@id=0
\ntx@text % revert to newtxtext
-\fi\fi
-
+ \fi
+\else % t1 math
+ \ifnum\ntx@id=0
+ \ifthenelse{\not\equal{\sfdefault}{cmss}}%
+ {\tx@helvfalse}{}
+ \ifthenelse{\not\equal{\ttdefault}{cmtt}}%
+ {\tx@ttfalse}{}
+ \iftx@helv
+ \renewcommand*{\sfdefault}{qhv}
+ \@tempdima=\ntxtext@scale\p@
+ \@tempdima=\tx@helvratio\@tempdima%
+ \edef\qhv@scale{\strip@pt\@tempdima}
+ \else
+ \PassOptionsToPackage{nohelv=true}{newtxtext}
+ \fi
+ \iftx@tt\renewcommand*{\ttdefault}{ntxtt}\fi
+ \ifthenelse{\not\equal{\tx@helvratio}{.94}}%
+ {\PassOptionsToPackage{helvratio=\tx@helvratio}%
+ {newtxtext}}{}
+ \iftx@tt\else%
+ \PassOptionsToPackage{nott=true}{newtxtext}\fi
+
+ \fi
+\fi
%\ifntx@badnof\PackageError{newtx.sty}{Incompatible options, nofontspec and otfmath}{Incompatible options, nofontspec and otfmath}\fi
% Set the text scale macros appropriately
%\show\ntx@TF
diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty
index ac7033051d..8cf041be09 100644
--- a/fonts/newtx/tex/newtxtext.sty
+++ b/fonts/newtx/tex/newtxtext.sty
@@ -11,8 +11,8 @@
%\def\ntx@state{0} % 0 for both, 1 for tutex only, 2 for legacy only
\def\setstate#1{\if 1\ntx@showstate\typeout{State=#1}\fi}
-\def\fileversion{1.737}
-\def\filedate{2024/01/11}
+\def\fileversion{1.738}
+\def\filedate{2024/02/08}
\ProvidesPackage{newtxtext}[%
\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyreTermesX]
@@ -227,7 +227,14 @@
\ProcessOptionsX\relax
\ifntx@supsflag%
-\PackageWarningNoLine{newpxtext}{sups options no longer handled---use superiors package (v2) instead.}\fi
+\PackageWarningNoLine{newtxtext}{sups options no longer handled---use superiors package (v2) instead.}\fi
+
+\ifthenelse{\not\equal{\sfdefault}{cmss}}%
+ {\ntx@helvfalse}{}
+\ifthenelse{\not\equal{\ttdefault}{cmtt}}%
+ {\ntx@ttfalse}{}
+\ifntx@helv\renewcommand*{\sfdefault}{qhv}\fi
+\ifntx@tt\renewcommand*{\ttdefault}{ntxtt}\fi
% otfmath beats no-math
\ifntx@otfmath\ntx@nomathfalse\fi
@@ -241,8 +248,6 @@
\ifntx@newtx\let\ntx@scale=\ntxtext@scale\fi
% following lines required by newtxmath
% They must follow the definition of \ntx@scaled
-\@tempdima=\ntx@scale\p@\@tempdima=\ntx@helvratio\@tempdima%
-\edef\qhv@scale{\strip@pt\@tempdima}
\edef\ntx@scaled{s*[\ntx@scale]}% used in fd files
\providecommand*{\ntx@minfam}{minntx} % won't override value from newtx
@@ -552,8 +557,6 @@
% \fi}%
% \fi
% \fi
- \ifntx@helv\renewcommand*{\sfdefault}{qhv}\fi
- \ifntx@tt\renewcommand*{\ttdefault}{ntxtt}\fi
\DeclareRobustCommand\thfamily % new family for theorem font
{\not@math@alphabet\thfamily\relax
\fontfamily\thdefault\selectfont}