texlive[69168] Master/texmf-dist: newtx (19dec23)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 19 22:06:08 CET 2023


Revision: 69168
          https://tug.org/svn/texlive?view=revision&revision=69168
Author:   karl
Date:     2023-12-19 22:06:08 +0100 (Tue, 19 Dec 2023)
Log Message:
-----------
newtx (19dec23)

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/newtxmath.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	2023-12-19 00:42:58 UTC (rev 69167)
+++ trunk/Master/texmf-dist/doc/fonts/newtx/README	2023-12-19 21:06:08 UTC (rev 69168)
@@ -1,10 +1,16 @@
 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.734 2023-11-14
+Current version: 1.735 2023-12-18
 
 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.735
+1. Modified some option handling in newtxtext.sty and newtx.sty in order to clarify the 
+roles of no-math and otfmath. See the documentation for details.
+2. Changed the code surrounding loading of fontspec, with any such loading now conditional on fontspec not having been loaded by a prior package. This puts all responsibility 
+for loading the options to fontspec on any prior package.`
+
 Changes in version 1.734
 Option thmslshape to newtxtext was failing because I had messed up ztmrsl.{pfb,afm}
 in a recent version. Corrected. (Thanks Matthew Bertucci.)

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	2023-12-19 00:42:58 UTC (rev 69167)
+++ trunk/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex	2023-12-19 21:06:08 UTC (rev 69168)
@@ -82,6 +82,25 @@
 %
 \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.735}
+\begin{itemize}
+\item
+If {\tt newtx} or {\tt newtxtext} detects that a prior package loaded {\tt fontspec}, then it avoids trying to reload it. While this reduces the risk of an {\tt option clash error}, it means that the prior package will have complete reposibility for loading {\tt fontspec} with an option to control its math handling, specifically {\tt no-math}. For example, if using the {\tt xeCJK} package together with {\tt newtxtext.sty} and {\tt newtxmath.sty}, a minimal preamble could be something like:
+\begin{verbatim}
+\PassOptionsToPackage{no-math}{xeCJK}
+\documentclass{ctexart}
+\setCJKmainfont{SimSun}
+\usepackage{newtx}
+\end{verbatim}
+or
+\begin{verbatim}
+\documentclass{article}
+\usepackage[no-math]{xeCJK}
+\setCJKmainfont{SimSun}
+\usepackage{newtx}
+\end{verbatim}
+\item Because options {\tt no-math} and {\tt otfmath} were mentioned in previous versions of the documentation, I've kept both in the current version even though not logically necessary as one is the negation of the other. In fact, if both are specified, or, equivalently, both are set equal to {\tt true}, then {\tt otfmath wins}.
+\end{itemize}
 
 \textsc{Changes as of version 1.73}
 \begin{itemize}
@@ -166,7 +185,7 @@
     \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
+    \usepackage[]{newtx} % options will be passed to text font package and newtxmath---option no-math can be specified here
 \end{verbatim}
 \textsc{Notes:}
 \begin{itemize}
@@ -247,7 +266,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}.
+\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 no 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}
@@ -372,7 +391,7 @@
 \setotherlanguages{french,russian}
 \usepackage[]{hyperref}
 \end{verbatim}
-If you process with a unicode engine, {\tt fontspec} will be loaded by {\tt newtxtext}.
+If you process with a unicode engine, {\tt fontspec} will be loaded by {\tt newtxtext}, adding the {\tt no-math} option if option {\tt no-math} was specified to {\tt newtxtext} or {\tt newtx}. 
 \subsection{Notes}
 %\section{Usage with Lua\LaTeX\ and Xe\LaTeX}
 %As far as I can tell, \textsf{newtxmath} works with both, but requires a very specific loading order and choice of options. Briefly,  the math options must all be loaded prior to loading and using {\tt fontspec}. As of version 1.5, {\tt newtxtext} will load fontspec when processing with XeLaTeX or LuaLaTeX unless one or more of the options {\tt nofontspec}, {\tt type1} is specified. (If you specify the option {\tt no-otfmath} to {\tt newtxtext}, it will pass the option {\tt no-math}to the {\tt fontspec} call. This should be done if  {\tt fontspec} will not be expected to load an Opentype package or install  math support using {\tt mathspec}.)
@@ -1185,7 +1204,7 @@
 \item if space is tight, do not call bold versions of the fonts listed above where the bold version is not already loaded, to avoid loading a new mathgroup; 
 \item if you absolutely need a letter (not a math symbol) from some math font that would normally cost you another mathgroup, you might consider using as if it were text, with something like
 \begin{verbatim}
-\mbox{{\usefont{U}{ntxmia}{b}{n} X}}
+\mbox{{\usefont{U}{ntxmia}{b}{n}X}}
 \end{verbatim}
 which allows you to use letter X from {\tt boldlettersA} but without any math features;
 \item there is a macro \verb|\ShowMathFonts| in {\tt newtxmath} which may be called at any point in your document, which will provide you a list of the mathgroups currently in use. This can be helpful in figuring out where problems occur. The output lines take the form

Modified: trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty	2023-12-19 00:42:58 UTC (rev 69167)
+++ trunk/Master/texmf-dist/tex/latex/newtx/newtx.sty	2023-12-19 21:06:08 UTC (rev 69168)
@@ -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.732}
-\def\filedate{2023/11/05}
+\def\fileversion{1.735}
+\def\filedate{2023/12/18}
 \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]
 
@@ -163,7 +163,8 @@
 }
 \DeclareOptionX{etbb}[true]{%
 	\@nameuse{if#1}\def\ntx at TF{ETbb}\def\ntx at MF{libertine}
-	\def\ntx at id{2}\def\ntx at minfam{minlibertine}\fi}
+	\def\ntx at id{2}\def\ntx at minfam{minlibertine}%
+	\def\ntx at sc{ETbb at scale}\fi}
 \DeclareOptionX{ebgaramond}[true]{\@nameuse{if#1}
 	\def\ntx at sc{EBGaramond at scale}\def\ntx at TF{ebgaramond}
 	\let\ntx at MF\ntx at TF\def\ntx at id{3}\def\ntx at minfam{minebgaramond}\fi}
@@ -554,7 +555,8 @@
   \typeout{II}
     \renewcommand*{\rmdefault}{\ntx at minfam} % Roman and Bold text for math
     \usepackage[]{newtxmath} % options will be as passed from newtx
-    \usepackage[no-math]{fontspec}
+    \@ifpackageloaded{fontspec}{}{%
+      \usepackage[no-math]{fontspec}}
     \ifnum\ntx at id=10\relax % libertinus
       \usepackage[nomath]{\ntx at TF}
     \else

Modified: trunk/Master/texmf-dist/tex/latex/newtx/newtxmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newtx/newtxmath.sty	2023-12-19 00:42:58 UTC (rev 69167)
+++ trunk/Master/texmf-dist/tex/latex/newtx/newtxmath.sty	2023-12-19 21:06:08 UTC (rev 69168)
@@ -177,8 +177,7 @@
 %\newcommand*{\loadsupfile}[1]{\readsufile{#1}%creates toks tx at tA. tx at tB
 %\def\tx at sp{\the\tx at tA \the\tx at tB}\enablespcorrection}
 \def\tx at subs{newtx-subs.tex}
-\newread\tx at su
-
+\newread\tx at s
 \def\readsufile#1{%
   \tx at tA={}
   \tx at tB={}

Modified: trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty	2023-12-19 00:42:58 UTC (rev 69167)
+++ trunk/Master/texmf-dist/tex/latex/newtx/newtxtext.sty	2023-12-19 21:06:08 UTC (rev 69168)
@@ -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.734}
-\def\filedate{2023/11/14}
+\def\fileversion{1.735}
+\def\filedate{2023/12/18}
 \ProvidesPackage{newtxtext}[%
 \filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyreTermesX]
 
@@ -43,11 +43,13 @@
 
 % Engine check
 \newif\ifntx at newtx
+\@ifundefined{ntx at otfmathtrue}{\newif\ifntx at otfmath}{}
+ % default is type1 math
+%
 \@ifundefined{ntx at otftexttrue}{% not run from newtx.sty
-  \newif\ifntx at otftext%
-  \newif\ifntx at otfmath % default is type1 math
-  %iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex
-  \iftutex\ntx at otftexttrue\fi %  otf text for unicode latex
+   \newif\ifntx at otftext
+   \iftutex\ntx at otftexttrue\fi %  otf text for unicode 
+%iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex
   %\newif\ifntx at nofontspec 
   % default is to load fontspec iftutex  
   % might have been defined in newtx.sty
@@ -58,7 +60,8 @@
 }
 %%%%%%%%%%%%%%%%%%
 %
-%\newif\ifntx at nomath\ntx at nomathfalse % ?????
+\newif\ifntx at nomath\ntx at nomathfalse % load fontspec with no-math
+
 \newif\ifntx at lining\ntx at liningtrue
 \newif\ifntx at tabular\ntx at tabulartrue % default is tabular lining figures
 %\@ifundefined{ver at newtxmath.sty}{\iftutex\ntx at otfmathtrue\fi}{}
@@ -69,6 +72,12 @@
 
 \DeclareOptionX{nofontspec}[true]{}
 
+\DeclareOptionX{no-math}[true]{%
+\@nameuse{if#1}\ntx at nomathtrue\fi
+}
+\DeclareOptionX{otfmath}[true]{%
+\@nameuse{if#1}\ntx at otfmathtrue\fi
+}
 \def\ntx at defaultfeatures{}
 \DeclareOptionX{defaultfeatures}{\def\ntx at defaultfeatures{#1}}
 
@@ -215,6 +224,8 @@
 %\def\ntx at sfrSC{#1}}
 \ProcessOptionsX\relax
 
+% otfmath beats no-math
+\ifntx at otfmath\ntx at nomathfalse\fi
 \setlength{\ntxsups at raise}{\ntxsups at raised}
 \setlength{\ntxsups at scale}{\ntxsups at scaledval\p@}
 \ntxsups at scale=\ntx at scale\ntxsups at scale %
@@ -240,7 +251,13 @@
 
 \iftutex
 \setstate1
-  \RequirePackage[no-math]{fontspec}
+ \@ifpackageloaded{fontspec}{}{%
+  \ifntx at nomath
+    \RequirePackage[no-math]{fontspec}
+  \else
+    \RequirePackage{fontspec}
+  \fi%
+ } 
   %\ifxetex\XeTeXtracingfonts=1\fi % causing unwanted warnings in Tectonic system
   \ifluatex  % avoid possibly uncorrected "system" fonts
     \directlua{fonts.names.set_location_precedence{



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