texlive[69756] Master/texmf-dist: newtx (9feb24)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 9 23:07:00 CET 2024


Revision: 69756
          https://tug.org/svn/texlive?view=revision&revision=69756
Author:   karl
Date:     2024-02-09 23:06:59 +0100 (Fri, 09 Feb 2024)
Log Message:
-----------
newtx (9feb24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/fonts/newtx/README
    trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf
    trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex
    trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty
    trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty

Modified: trunk/Master/texmf-dist/doc/fonts/newtx/README
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/newtx/README	2024-02-09 15:15:10 UTC (rev 69755)
+++ trunk/Master/texmf-dist/doc/fonts/newtx/README	2024-02-09 22:06:59 UTC (rev 69756)
@@ -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.

Modified: trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex	2024-02-09 15:15:10 UTC (rev 69755)
+++ trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex	2024-02-09 22:06:59 UTC (rev 69756)
@@ -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 @@
 \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 @@
 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 @@
 \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 @@
 \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 @@
 \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 @@
 <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 @@
 \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}

Modified: trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty	2024-02-09 15:15:10 UTC (rev 69755)
+++ trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty	2024-02-09 22:06:59 UTC (rev 69756)
@@ -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 at rm}{} % not understood by libertinus-otf
 \newcommand*{\ntxtext at sf}{}% not understood by libertinus-otf
 
-
 \newcommand*{\ntxtext at scale}{1}
 \newcommand*{\ntxmath at scale}{1} 
 \DeclareOptionX{scaled}[1]{\renewcommand*{\ntxtext at scale}{#1}\renewcommand*{\ntxmath at scale}{#1}}
@@ -121,6 +120,16 @@
 \DeclareOptionX{ttscale}[]{\renewcommand*{\ntxtext at ttscale}{#1}}
 \DeclareOptionX{rm}[true]{\renewcommand*{\ntxtext at rm}{#1}}
 \DeclareOptionX{sf}[true]{\renewcommand*{\ntxtext at sf}{#1}}
+\newif\iftx at helv \tx at helvtrue
+\newif\iftx at tt \tx at tttrue
+\DeclareOptionX{nohelv}[true]{%
+\@nameuse{if#1}\tx at helvfalse\fi}
+\DeclareOptionX{nott}[true]{%
+\@nameuse{if#1}\tx at ttfalse\fi}
+\def\tx at helvratio{.94}
+\DeclareOptionX{helvratio}[0.94]{%
+\def\tx at helvratio{#1}
+}
 
 \DeclareOptionX{type1}[true]{}% no effect now
 %{%\@nameuse{if#1}\ntx at otftextfalse\fi}
@@ -259,7 +268,8 @@
 \DeclareOptionX{sfracscaling}{%
 \def\tx at sfrSC{#1}}
 % \ntx at Topt contains all unknown options that are not math options. It contains no scale options. \ntx at Mopt lists all the math options.
-\ProcessOptionsX\relax 
+\ProcessOptionsX\relax
+
 %\show\ntx at Mopt
 %\show\ntx at Topt
 %\traceon
@@ -275,8 +285,30 @@
      \PackageWarning{newtx.sty}{Reverting to newtxtext: newtx with option {\tt otfmath} can not handle other text packages.}
      \ntx at id=0
      \ntx at text % revert to newtxtext
-\fi\fi
-
+   \fi
+\else % t1 math
+  \ifnum\ntx at id=0
+    \ifthenelse{\not\equal{\sfdefault}{cmss}}%
+      {\tx at helvfalse}{}
+    \ifthenelse{\not\equal{\ttdefault}{cmtt}}%
+      {\tx at ttfalse}{}
+    \iftx at helv
+      \renewcommand*{\sfdefault}{qhv}
+      \@tempdima=\ntxtext at scale\p@
+      \@tempdima=\tx at helvratio\@tempdima%
+      \edef\qhv at scale{\strip at pt\@tempdima}
+    \else
+      \PassOptionsToPackage{nohelv=true}{newtxtext}
+    \fi
+    \iftx at tt\renewcommand*{\ttdefault}{ntxtt}\fi
+    \ifthenelse{\not\equal{\tx at helvratio}{.94}}%
+      {\PassOptionsToPackage{helvratio=\tx at helvratio}%
+      {newtxtext}}{}
+    \iftx at tt\else%
+      \PassOptionsToPackage{nott=true}{newtxtext}\fi
+    
+  \fi
+\fi
 %\ifntx at badnof\PackageError{newtx.sty}{Incompatible options, nofontspec and otfmath}{Incompatible options, nofontspec and otfmath}\fi
 % Set the text scale macros appropriately
 %\show\ntx at TF

Modified: trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty	2024-02-09 15:15:10 UTC (rev 69755)
+++ trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty	2024-02-09 22:06:59 UTC (rev 69756)
@@ -11,8 +11,8 @@
 %\def\ntx at state{0} % 0 for both, 1 for tutex only, 2 for legacy only
 \def\setstate#1{\if 1\ntx at 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,8 +227,15 @@
 \ProcessOptionsX\relax
 
 \ifntx at 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 at helvfalse}{}
+\ifthenelse{\not\equal{\ttdefault}{cmtt}}%
+  {\ntx at ttfalse}{}
+\ifntx at helv\renewcommand*{\sfdefault}{qhv}\fi
+\ifntx at tt\renewcommand*{\ttdefault}{ntxtt}\fi
+
 % otfmath beats no-math
 \ifntx at otfmath\ntx at nomathfalse\fi
 %\setlength{\ntxsups at raise}{\ntxsups at raised}
@@ -241,8 +248,6 @@
 \ifntx at newtx\let\ntx at scale=\ntxtext at scale\fi
 % following lines required by newtxmath
 % They must follow the definition of \ntx at scaled
-\@tempdima=\ntx at scale\p@\@tempdima=\ntx at helvratio\@tempdima%
-\edef\qhv at scale{\strip at pt\@tempdima}
 \edef\ntx at scaled{s*[\ntx at scale]}% used in fd files
 \providecommand*{\ntx at minfam}{minntx} % won't override value from newtx
 
@@ -552,8 +557,6 @@
 %          \fi}%
 %        \fi
 %    \fi
-  \ifntx at helv\renewcommand*{\sfdefault}{qhv}\fi
-  \ifntx at tt\renewcommand*{\ttdefault}{ntxtt}\fi
   \DeclareRobustCommand\thfamily % new family for theorem font
         {\not at math@alphabet\thfamily\relax
          \fontfamily\thdefault\selectfont}



More information about the tex-live-commits mailing list.