diff options
author | Norbert Preining <norbert@preining.info> | 2023-12-20 03:01:51 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-12-20 03:01:51 +0000 |
commit | 04c437f630dc0457787999e2779770fa77bdb601 (patch) | |
tree | 1a8de076bf460f11a4eec923f1b1b41932d856f9 /fonts/newtx | |
parent | 60e9a31bad8271499f6b5f9280174e76bd62814f (diff) |
CTAN sync 202312200301
Diffstat (limited to 'fonts/newtx')
-rw-r--r-- | fonts/newtx/README | 8 | ||||
-rw-r--r-- | fonts/newtx/doc/newtxdoc.pdf | bin | 682647 -> 684538 bytes | |||
-rw-r--r-- | fonts/newtx/doc/newtxdoc.tex | 27 | ||||
-rw-r--r-- | fonts/newtx/tex/newtx.sty | 10 | ||||
-rw-r--r-- | fonts/newtx/tex/newtxmath.sty | 3 | ||||
-rw-r--r-- | fonts/newtx/tex/newtxtext.sty | 33 |
6 files changed, 62 insertions, 19 deletions
diff --git a/fonts/newtx/README b/fonts/newtx/README index ac852001a7..b39f28cc8f 100644 --- a/fonts/newtx/README +++ b/fonts/newtx/README @@ -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.) diff --git a/fonts/newtx/doc/newtxdoc.pdf b/fonts/newtx/doc/newtxdoc.pdf Binary files differindex e2206ca01a..0d8c08b21b 100644 --- a/fonts/newtx/doc/newtxdoc.pdf +++ b/fonts/newtx/doc/newtxdoc.pdf diff --git a/fonts/newtx/doc/newtxdoc.tex b/fonts/newtx/doc/newtxdoc.tex index e7c72ca40d..735a929122 100644 --- a/fonts/newtx/doc/newtxdoc.tex +++ b/fonts/newtx/doc/newtxdoc.tex @@ -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 @@ Supports specially prepared text font packages with {\tt newtxmath}. \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 @@ 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}. +\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 @@ For example: \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 @@ The {\tt operators} font is essentially the Roman text font, used for names of o \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 diff --git a/fonts/newtx/tex/newtx.sty b/fonts/newtx/tex/newtx.sty index c080939912..753b259ef2 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.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@TF{ETbb}\def\ntx@MF{libertine} - \def\ntx@id{2}\def\ntx@minfam{minlibertine}\fi} + \def\ntx@id{2}\def\ntx@minfam{minlibertine}% + \def\ntx@sc{ETbb@scale}\fi} \DeclareOptionX{ebgaramond}[true]{\@nameuse{if#1} \def\ntx@sc{EBGaramond@scale}\def\ntx@TF{ebgaramond} \let\ntx@MF\ntx@TF\def\ntx@id{3}\def\ntx@minfam{minebgaramond}\fi} @@ -554,7 +555,8 @@ \typeout{II} \renewcommand*{\rmdefault}{\ntx@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@id=10\relax % libertinus \usepackage[nomath]{\ntx@TF} \else diff --git a/fonts/newtx/tex/newtxmath.sty b/fonts/newtx/tex/newtxmath.sty index b624d0c7aa..0a52052a8d 100644 --- a/fonts/newtx/tex/newtxmath.sty +++ b/fonts/newtx/tex/newtxmath.sty @@ -177,8 +177,7 @@ %\newcommand*{\loadsupfile}[1]{\readsufile{#1}%creates toks tx@tA. tx@tB %\def\tx@sp{\the\tx@tA \the\tx@tB}\enablespcorrection} \def\tx@subs{newtx-subs.tex} -\newread\tx@su - +\newread\tx@s \def\readsufile#1{% \tx@tA={} \tx@tB={} diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty index 1b694330c0..b487cbc6de 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.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@newtx +\@ifundefined{ntx@otfmathtrue}{\newif\ifntx@otfmath}{} + % default is type1 math +% \@ifundefined{ntx@otftexttrue}{% not run from newtx.sty - \newif\ifntx@otftext% - \newif\ifntx@otfmath % default is type1 math - %iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex - \iftutex\ntx@otftexttrue\fi % otf text for unicode latex + \newif\ifntx@otftext + \iftutex\ntx@otftexttrue\fi % otf text for unicode +%iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex %\newif\ifntx@nofontspec % default is to load fontspec iftutex % might have been defined in newtx.sty @@ -58,7 +60,8 @@ } %%%%%%%%%%%%%%%%%% % -%\newif\ifntx@nomath\ntx@nomathfalse % ????? +\newif\ifntx@nomath\ntx@nomathfalse % load fontspec with no-math + \newif\ifntx@lining\ntx@liningtrue \newif\ifntx@tabular\ntx@tabulartrue % default is tabular lining figures %\@ifundefined{ver@newtxmath.sty}{\iftutex\ntx@otfmathtrue\fi}{} @@ -69,6 +72,12 @@ \DeclareOptionX{nofontspec}[true]{} +\DeclareOptionX{no-math}[true]{% +\@nameuse{if#1}\ntx@nomathtrue\fi +} +\DeclareOptionX{otfmath}[true]{% +\@nameuse{if#1}\ntx@otfmathtrue\fi +} \def\ntx@defaultfeatures{} \DeclareOptionX{defaultfeatures}{\def\ntx@defaultfeatures{#1}} @@ -215,6 +224,8 @@ %\def\ntx@sfrSC{#1}} \ProcessOptionsX\relax +% otfmath beats no-math +\ifntx@otfmath\ntx@nomathfalse\fi \setlength{\ntxsups@raise}{\ntxsups@raised} \setlength{\ntxsups@scale}{\ntxsups@scaledval\p@} \ntxsups@scale=\ntx@scale\ntxsups@scale % @@ -240,7 +251,13 @@ \iftutex \setstate1 - \RequirePackage[no-math]{fontspec} + \@ifpackageloaded{fontspec}{}{% + \ifntx@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{ |