diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-25 21:44:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-25 21:44:31 +0000 |
commit | 970b9568709de24f70ca3c96e1f83b6ccf788344 (patch) | |
tree | 14c8fffbf4cbbd29b5536e32480922301b06f9d9 /Master/texmf-dist/doc | |
parent | d2f833a4d692ce771540f311f77907177cb7f3bd (diff) |
newtx (25dec21)
git-svn-id: svn://tug.org/texlive/trunk@61408 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/fonts/newtx/README | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf | bin | 1227113 -> 350683 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex | 386 |
3 files changed, 352 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/fonts/newtx/README b/Master/texmf-dist/doc/fonts/newtx/README index 92587de1e24..c28e7d17cd4 100644 --- a/Master/texmf-dist/doc/fonts/newtx/README +++ b/Master/texmf-dist/doc/fonts/newtx/README @@ -1,12 +1,23 @@ 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.659 2021-10-21 +Current version: 1.7 2021-12-24 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.7 +1. Very substantial modifications to newtxtext, adding new options and +permitting use under all latex engines. +2. Addition of a widebar macro to newtxmath. +3. Added subscript figures. +4. Added newtx.sty which should simplify preambles, especially when using a +unicode engine. Depending on the engine and the options you pass, it can +load text from either legacy newtx text or from TeXGyreTermesX Opentype and +math from legacy newtx math or your choice of a matching unicode math package. +5. Much improved \textfrac macro, at least with unicode engines. + Changes in version 1.659 -1. Small modifucations too some lowercase Blackboard Bold letters in lettersA. +1. Small modifications to some lowercase Blackboard Bold letters in lettersA. 2. Corrected an encoding omission so that fraktur dotlessi and dotlessj are now available using the macros \frakdotlessi and \frakdotlessj. 3. Changes to newtxmath.sty and documentation to explain changes in preferred usage for dotlessi and dotlessj in fraktur, blackboard bold an script alphabets. diff --git a/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf b/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf Binary files differindex 17b8941e3cd..dba87a46577 100644 --- a/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf +++ b/Master/texmf-dist/doc/fonts/newtx/newtxdoc.pdf diff --git a/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex b/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex index 98e7e083a87..a16318beb06 100644 --- a/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex +++ b/Master/texmf-dist/doc/fonts/newtx/newtxdoc.tex @@ -1,11 +1,10 @@ -% !TEX TS-program = pdflatexmk +% !TEX TS-program = xelatex \def\fsc{11pt} \documentclass[\fsc]{article} \usepackage[margin=1in]{geometry} \usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent -\pdfmapfile{=newtx.map} -\pdfcompresslevel=0 -\pdfgentounicode=1 +%\pdfcompresslevel=0 +%\pdfgentounicode=1 %\input glyphtounicode.tex %\usepackage{pdfx} % v 1.6.4 or higher %\InputIfFileExists{glyphtounicode-cmr.tex}{}{} @@ -14,10 +13,24 @@ \usepackage{url} \usepackage{trace} \usepackage{fonttable} -%SetFonts -% newtxtext text and newtxmath -\usepackage{amsmath} % must load before amsthm -\usepackage{amsthm} +\usepackage[debugshow]{tracefnt} +\usepackage{xcolor} +\usepackage{array,booktabs} +% some ad-hoc symbol fonts +\font\fAMSa=msam10 at \fsc +\font\fAMSb=msbm10 at \fsc + +%\pdfmapfile{=newtx.map} +\usepackage[T1]{fontenc} % Active encoding for use in math text +\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math +\usepackage[type1,sfdefault,scale=1]{sourcesanspro}% used by \mathsf, optional +\usepackage[scaled=.98,varqu,varl]{zi4} +\usepackage[no-math,nohelv,nott,amsthm,largesc,theoremfont,trueslanted,scosf]{newtx}% Use newtxmath, not a unicode math package +%\setsansfont{sourcecodepro}[scale=MatchLowerCase] +\makeatletter +\@ifundefined{ver@amsthm.sty}{\typeout{amsthm NO}}{\typeout{amsthm YES}} +\makeatother +%theorem settings \newtheoremstyle{oldplain} {\topsep} % ABOVESPACE {\topsep} % BELOWSPACE @@ -30,35 +43,30 @@ \theoremstyle{oldplain} \newtheorem{oldthm}{Theorem}[section] \theoremstyle{plain} -\newtheorem{thm}{Theorem}[section] -%\pdfmapfile{=newtx.map} -\usepackage[osf,p,largesc,theoremfont]{newtxtext} -\usepackage[T1]{fontenc} -\usepackage[varqu,varl]{zi4} -%\traceon -\usepackage{newtxmath} % default choice of \mathbb -%\traceoff -%\useosf +\newtheorem{thm}{Theorem}[section] +% ed theorem settings \DeclareMathSymbol{\bbZ}{\mathord}{lettersA}{218} -\usepackage{bm} -%SetFonts -\makeatletter \DeclareMathSymbol{\Sumop}{\mathop}{largesymbols}{"50} -\makeatother -% some ad-hoc symbol fonts -\font\fAMSa=msam10 at \fsc -\font\fAMSb=msbm10 at \fsc - -\usepackage{array,booktabs} -\usepackage{hyperref} +\usepackage{bm} +%\usepackage{hyperref} +\ifntxotf + \setmonofont{inconsolata}[Scale=MatchLowercase] +\fi \title{New TX font package} \author{Michael Sharpe} \date{\today} % Activate to display a given date or no date \begin{document} \maketitle -%\fonttable{ntxbmia} - +%\char"2044{\addfontfeatures{RawFeature=+ss20;+dnom}\color{red}\char"2044} +%1\addfontfeatures{VerticalPosition=Inferior}23 +%{\itshape italic:;} +%\textcircled{M}\textcircled{12}\textfrac[2]{37}{78} +%\font\inf=ntxinf-Regular-t1 at \fsc +%1{\infigures 1} +%x\textsf{x}X\textsf{X} +% +%\end{document} \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. @@ -74,7 +82,91 @@ Another important change took place in version 1.65, where {\tt theoremfont} wa \item \verb|\pagestyle{headings}| now functions as intended with slanted rather than upright figures in the headers. \end{itemize} -This math package works, after possibly replacing its math Roman and Greek letters, with fonts other than Times that are intermediate in weight between Computer Modern and Times. The free font Linux Libertine is one particular target---it is of nearly the same x-height as Computer Modern, but, not being a \emph{modern} font, does not have a high contrast ratio, and so appears denser than Computer Modern but not as much so as Times. It is meant as a replacement for Times, but differs from it in many characteristics, more similar to MinionPro than Times, and provides a better range of variants than Times---three weights (regular, semi-bold and bold) rather than just two, and has expert features in all weights: old-style figures, more extensive and more interesting ligatures, and small caps. In my opinion, material typeset in Linux Libertine looks better than the corresponding material typeset in Times. This seems especially true on the screen. As of version 1.0, the package also offers support for MinionPro as a math font, but with limitations described in detail below. More recently, an option to provide math support for the \textsf{garamondx} text font package was added. Version 1.55 adds support for the {SticksToo} text fonts, a reworking of the {\tt STIX2} text fonts. +Version 1.7 adds the ability to process {\tt.tex} documents with all current LaTeX engines, adding {\tt fontspec} based macros as replacements for macros and options formerly defined for {\tt pdflatex} processing as needed for unicode latex processing. There are some new macros and options that work only under unicode LaTeX. The {\tt newtxtext} package is modified very substantially to work for all latex engines. Also introduced in 1.7 is {\tt newtx.sty}, which to some extent reduces the (human) memory requirements for loading {\tt newtxtext} and {\tt newtxmath} in a way that works with all LaTeX engines. With {\tt newtx}, the simplest invocation could be just +\begin{verbatim} +\documentclass{article} +\usepackage{newtx} +\begin{document} +\end{verbatim} +which would work under all LaTeX engines: +\begin{itemize} +\item +Under {\tt pdflatex}, the effect is the same as +\begin{verbatim} +\usepackage{newtxtext, newtxmath} +\end{verbatim} +\item Under unicode LaTeX, this calls +\begin{verbatim} +% specify newtxtext with tabular lining figures for math operators +\renewcommand{\rmdefault}{ntxtlf} % for math use only +\usepackage{newtxmath} +\usepackage[no-math]{newtxtext}% pass no-math option to fontspec +\end{verbatim} +and the effect is to run unicode latex on the {\tt TeXGyreTermesX} font family for text and use {\tt newtxmath} as the math font in {\tt type1} mode. +\end{itemize} +The {\tt newtx} package has only one option: {\tt otfmath} changes the call above to +\begin{verbatim} +\usepackage{newtxtext} +\RequirePackage{fontspec} +\usepackage{unicode-math} %loads amsmath +\end{verbatim} +which expects a subsequent +\begin{verbatim} +\setmathfont{}[] +\end{verbatim} +line to set up a unicode math font as the partner to text from {\tt TeXGyreTermesX}. + +You may specify any option to {\tt newtxtext} or {\tt newtxmath} as an option to {\tt newtx}: it will simply pass them along to those packages for processing. + +A more realistic preamble would follow the general pattern: +\begin{verbatim} +% !TEX TS-program = xelatex +\documentclass[11pt,<amsmath options to pass>]{article} +<General packages, babel (optional) and those necessary for pdflatex> +<Pdflatex encoding info, sf and tt fonts needed 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 +% a new 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 +%\usepackage{polyglossia} +%\setdefaultlanguage[variant=american]{english} +%\setotherlanguages{french,russian} +%\usepackage[]{hyperref} % optional +\end{verbatim} +For example: +\begin{verbatim} +% !TEX TS-program = xelatex +\documentclass[11pt,leqno]{article} +\usepackage[margin=1in]{geometry} +\usepackage[parfill]{parskip} +\usepackage{graphicx} +\usepackage{url} +\usepackage{xcolor} +\usepackage{array,booktabs} +\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 +%\setmonofont and \setmonofont could be set here if necessary +% polyglossia, if used, must be loaded after fontspec +\usepackage{polyglossia} +\setdefaultlanguage[variant=american]{english} +\setotherlanguages{french,russian} +\usepackage[]{hyperref} +\end{verbatim} +Version 1.7 of {\tt newtxtext} is a major reworking of the previous versions, functioning with all current \LaTeX\ engines, loading {\tt fontspec} if necessary. The {\tt newtx} package passes the options you specify to {\tt newtxmath} and {\tt newtxtext} and the loads the three lines +\begin{verbatim} +\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold TermesX for math +\usepackage{newtxmath} % options will be as passed from newtx +\usepackage{newtxtext} % options will be as passed from newtx +\end{verbatim} +If you process with XeLaTeX or LuaLaTeX, {\tt fontspec} will be loaded by {\tt newtxtext} unless instructed not to by one of the options {\tt type1}, {\tt nofontspec} to {\tt newtx}. (The macro \verb|\ifntxotf| is defined and set in {\tt newtxtext}: it is set to {\tt true} in case the engine is a unicode engine, and neither of the options {\tt type1, nofontspec} was selected.) Other possible options are described in detail later in this documentation. + +It is not necessary to use {\tt newtx} in version 1.7 and higher. The original loading via {\tt newtxtext} and {\tt newtxmath} should still work. + +The math package {\tt newtxmath} works, after possibly replacing its math Roman and Greek letters, with fonts other than Times that are intermediate in weight between Computer Modern and Times. The free font Linux Libertine is one particular target---it is of nearly the same x-height as Computer Modern, but, not being a \emph{modern} font, does not have a high contrast ratio, and so appears denser than Computer Modern but not as much so as Times. It is meant as a replacement for Times, but differs from it in many characteristics, more similar to MinionPro than Times, and provides a better range of variants than Times---three weights (regular, semi-bold and bold) rather than just two, and has expert features in all weights: old-style figures, more extensive and more interesting ligatures, and small caps. In my opinion, material typeset in Linux Libertine looks better than the corresponding material typeset in Times. This seems especially true on the screen. As of version 1.0, the package also offers support for MinionPro as a math font, but with limitations described in detail below. More recently, an option to provide math support for the \textsf{garamondx} text font package was added. Version 1.55 adds support for the {SticksToo} text fonts, a reworking of the {\tt STIX2} text fonts. The {\tt newtx} package differs from {\tt txfonts} in the following ways: \begin{itemize} @@ -90,7 +182,8 @@ the new package is split into separate text and math packages that do not need t \item \verb|\coloneq| and \verb|\eqcolon| now point to the correct glyphs; \item The problem with the {\tt ogonek} accent and tabular environments (bad definition of \verb|\k|) is fixed: (the definition of \verb|\k| is removed as of version 1.628, being no longer of use); \item The default encoding for \textsf{newtxtext} is now T$1$, but support is offered also for OT$1$ and LY$1$. As some add-on packages are available only in T$1$, that seems the best current choice. -\item Sans serif is by default taken from TeXGyreHeros, and by default at 90\% of the scale factor (set by {\tt scaled}, default value {\tt1}). The option {\tt helvratio=.98} will change that to 98\%. +\item Sans serif is by default taken from TeXGyreHeros, and by default at 90\% of the scale factor (set by {\tt scaled}, default value {\tt1}). The option {\tt helvratio=.98} will change that to 98\%. (Option {\tt nohelv} prevents this, leaving {\tt cmss} as the default sans font.) +\item Typewriter text is by default taken from {\tt ntxtt}. Option {\tt nott} prevents this, leaving {\tt cmtt} as the default typewriter font. \item \verb|\varkappa| $\varkappa$ has been moved from {\tt AMSb} to {\tt lettersA}, and is now accompanied by an upright form \verb|\upvarkappa| $\upvarkappa$ which behaves as it should when using the {\tt frenchmath} option. \end{itemize} \section{Text mode options} @@ -114,17 +207,20 @@ The option \texttt{osf} instructs the text fonts to use old-style figures \oldst \verb|\useosf| after loading {\tt newtxmath}. This is no longer required. (New in version $1.65$.) Slanted text is now provided as part of the {\tt newtxtext} package, but requires that you specify the new option {\tt trueslanted}. Without this option, \verb|\textsl| will continue to behave as in earlier versions, outputting italic text with upright punctuation. -If you use the {\tt babel} package, you should load it before {\tt newtxtext}---for example: + +\section{Usage with {\tt babel}} +If you use the {\tt babel} package, you should load it before {\tt newtxtext}---for example, using {\tt pdflatex}: \begin{verbatim} \usepackage[<babel options>]{babel} -\usepackage[osf]{newtxtext} +\usepackage[osf]{newtxtext} % or newtx \end{verbatim} More generally, the pattern of the preamble should be: \begin{verbatim} <encoding options> [optional] \usepackage{substitutefont} % so you can change babel's fonts [optional] \usepackage[<babel options>]{babel} -\usepackage[p,osf]{newtxtext}% osf in text, lining figures in math +\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} @@ -137,7 +233,7 @@ As an example of a {\tt theoremstyle} definition, \newtheoremstyle{plain} {0pt} % ABOVESPACE, extra space above {0pt} % BELOWSPACE, extra space below -{\slshape} % BODYFONT, italic with upright figures and punctuation +{\slshape} (or {\thfamily})% BODYFONT, italic with upright figures and punctuation % Change previous line if using option trueslanted---\thfamily, not \slshape {} % INDENT (empty value is the same as 0pt) {\bfseries} % HEADFONT @@ -154,7 +250,7 @@ Here is a specific example following this pattern, but without {\tt theoremfont} \usepackage[greek.polutoniko,english]{babel} \usepackage[largesc,osf]{newtxtext} % \usepackage[varqu,varl]{zi4}% inconsolata -\usepackage{cabin}% sans serif +\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 @@ -162,11 +258,23 @@ Here is a specific example following this pattern, but without {\tt theoremfont} 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 lower case letters, including \texttt{egrave}, so that traditional French expressions like \textlf{1}\textsu{i\`ere} may be typeset correctly. +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}\textsu{i\`ere} may be typeset correctly. -As of version 1.625, there are now denominator figures (aligned to the text baseline) which may be called either with \verb|{\infigures 12345}| {\infigures 12345} or \verb|\textinf{6789}| \textinf{6789}. (\verb|\textde| has the same effect as \verb|\textinf|.) Currently, these are available only in regular weight, upright shape. There is a new macro \verb|\textfrac| 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}. 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}. + +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{amsthm} +\usepackage{newtxmath} % plus other options +\end{verbatim} +but this may now be simplified to +\begin{verbatim} +\usepackage[amsthm]{newtxmath} % or newtx +% other options may be added +\end{verbatim} -Also, as of version 1.630, there is a custom \verb|\textcircled| macro that gives output very similar to the existing \verb|\textregistered| glyph. E.g., \verb|\textregistered\textcircled{S}\textcircled{2}| renders as \textregistered\textcircled{S}\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{2}| renders as \textregistered\textcircled{M}\textcircled{2}. 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}. @@ -194,6 +302,7 @@ fontdimen4 (interword shrink) .06em .1em \end{verbatim} That is, {\tt Termes} has the same normal spacing as {\tt txfonts} but its spacing is more flexible in terms of both stretch and shrink. More frequently than not, a paragraph built with {\tt Termes} will occupy more space than the same built with {\tt txfonts}. For this reason, the package offers some ways to change the spacing parameters. This may be important if you are trying to imitate the pagination of a document built using~{\tt txfonts}. +\textbf{Behavior under [pdf]LaTeX.}\\ Option {\tt tighter} sets the three fontdimen values to those of {\tt txfonts}. Option {\tt looser} sets the three fontdimen values to \verb|{.3em,.2em,.1em}| respectively. @@ -203,6 +312,187 @@ If you want full control, the options {\tt spacing, stretch, shrink} allow you t \usepackage[stretch=.15em,shrink=.095em]{newtxtext} \end{verbatim} +\textbf{Behavior under XeLaTeX and LuaLaTeX.}\\ +Fontspec offers the {\tt WordSpace=} option for individual control of the space, stretch and shrink, with the value being either an ordered triple like \verb|{1.1,1,.8}| or a single number like {\tt .9}, the latter having the same effect as the triple \verb|{.9,.9,.9}|. These three numbers act as multipliers of {\tt space}, {\tt stretch} and {\tt shrink}. The option that you can set is {\tt spcfactor=}, entering either a number or a triple---e.g., {\tt spcfactor=1.1} or \verb|{1.1,1,.8}|. Note however that {\tt tighter} and {\tt looser} will have an effect if {\tt spcfactor} is not set, amounting to \verb|{\spcfactor={1,.625,1}| and \verb|{\spcfactor={1.2,1,1}| respectively. + + +\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-math} to {\tt newtxtext}, it will pass that option 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}.) + +\textsc{Example I: TeXGyreTermesX Opentype + STIX (Opentype).} +\begin{verbatim} +% general setup packages +%\usepackage[greek.polutonico,english]{babel} % if using babel +% next line calls fontspec and loads TeXGyreTermesX otf +\usepackage[theoremfont,trueslanted,largesc,p,osf]{newtxtext} % or newtx +% set mono and sans opentype fonts +\usepackage{unicode-math} % can omit if using newtx instead of newtxtext +% can't load type1 math fonts after this point +\setmathfont{STIX} +%\usepackage{polyglossia} % must load after fontspec, if using polyglossia +% polyglossia setup commands +%\usepackage{hyperref} % if using +\end{verbatim} +\textsc{Notes:} +\begin{itemize} +\item +You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}. +\item Babel, if used, must be specified before {\tt newtxtext}, which loads {\tt fontspec}. +\item Polyglossia, if used, must be specified after loading {\tt newtxtext}. +\end{itemize} +%\textsc{Example II: newtxtext type1 + STIX (Opentype).} +%\begin{verbatim} +%%\usepackage[greek.polutonico,english]{babel} % if using babel +%% next line does not call fontspec, loads newtxtext type1 +%\usepackage[type1,theoremfont,trueslanted,largesc,p,osf]{newtxtext} +%\usepackage{fontspec} +%\usepackage{unicode-math}% can't load type1 math fonts after this +%\setmathfont{STIX} +%%\usepackage{polyglossia} % must load after fontspec, if using polyglossia +%% polyglossia setup commands +%\end{verbatim} +%\textsc{Notes:} +% +%\begin{itemize} +%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts. +%\item +%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}. +%\item Babel, if used, must be specified before {\tt newtxtext}. +%\item Polyglossia, if used, must be specified after loading {\tt fontspec}. +%\end{itemize} + +\textsc{Example II: TeXGyreTermesX Opentype + newtxmath (type1) + polyglossia + other Opentype.} +\begin{verbatim} +\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode +\usepackage[T1]{fontenc} % T1 is active encoding for use in math text +\usepackage[type1]{cabin}% used only by \mathsf, optional +\usepackage{amsmath} % must be loaded before amsthm if using amsthm +\usepackage{amsthm}% load before newtxmath +\usepackage[vvarbb]{newtxmath} +\usepackage[no-math,largesc]{newtxtext}% pass no-math option to fontspec +% Fontspec will be loaded so that Opentype text fonts may be loaded +\setmainfont{TeXGyreTermesX} +%\setmonofont{...}[] +%\setsansfont{...}[] +%\usepackage{polyglossia} % must load after fontspec +%\setdefaultlanguage[variant=american]{english} +%\setotherlanguages{french,russian} +%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal} +\end{verbatim} +With the new {\tt newtx.sty}, the above example may be written as: +\begin{verbatim} +\usepackage[T1]{fontenc} % T1 is active encoding for use in math text +\usepackage[type1]{cabin}% used only by \mathsf, optional +\usepackage[nohelv,amsthm,vvarbb,no-math,largesc]{newtx} +%\setmonofont{...}[] +%\setsansfont{...}[] +%\usepackage{polyglossia} % must load after fontspec +%\setdefaultlanguage[variant=american]{english} +%\setotherlanguages{french,russian} +%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal} +\end{verbatim} + +\textsc{Notes:} + +\begin{itemize} +\item The {\tt no-math} option to {\tt newtxtext} causes {\tt fontspec} to load with option {\tt no-math}, preventing the package from loading any unicode math font. This option is automatically set internally by {\tt newtxtext} if it detects that {\tt newtxmath} has already been loaded. +\item +You do not need to load {\tt amsmath}: it is loaded by {\tt newtxmath} However, if you wish to load {\tt amsthm}, load {\tt amsmath}, then {\tt amsthm} before {\tt newtxmath}. As of version 1.7. it is simpler to just make use of the option {\tt amsthm} to {\tt newtx} or to {\tt newtxmath}. +\item Babel, if used, must be specified before {\tt newtxtext}. +\item Polyglossia, if used, must be specified after loading {\tt newtxtext}. +\item The {\tt type1} option to {\tt cabin} is important, preventing it from loading {\tt fontspec}, which would lead to an {\tt option clash} error. The same is true for a number of similar packages, like, e.g., {\tt sourcesanspro}. +\end{itemize} + +%\textsc{Example IV: newtxtext type1 + newtxmath (type1) + polyglossia + other Opentype.} +%\begin{verbatim} +%\renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math mode +%\usepackage[T1]{fontenc} % T1 is active encoding for use in math text +%\usepackage[type1]{cabin}% used only by \mathsf, optional +%\usepackage{amsmath} % must be loaded before amsthm if using amsthm +%\usepackage{amsthm}% load before newtxmath +%\usepackage[vvarbb]{newtxmath} +%\usepackage[no-math]{newtxtext}% pass no-math option to fontspec +%% Fontspec will be loaded so that Opentype text fonts may be loaded +%\usepackage{polyglossia} % must load after fontspec +%\setdefaultlanguage[variant=american]{english} +%\setotherlanguages{french,russian} +%\newfontfamily{\cyrillicfont}[Scale=MatchLowercase]{cochineal} +%\end{verbatim} +%\textsc{Notes:} +%\begin{itemize} +%\item The {\tt type1} option to {\tt newtxtext} prevents the package loading {\tt fontspec} so you must load it before loading {\tt unicode-math} and any opentype fonts. +%\item +%You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}. +%\item Babel, if used, must be specified before {\tt newtxtext}. +%\item Polyglossia, if used, must be specified after loading {\tt fontspec}. +%\item The first seven lines of this example preamble could be taken as a basis for a preamble that will compile under all LaTeX engines. +%\end{itemize} +% + +%Be aware that some text packages (e.g., {\tt cabin}) may contain a line like +%\begin{verbatim} +%\RequirePackage{fontspec} +%\end{verbatim} +%which would prevent (``option clash'' error) a subsequent +%\begin{verbatim} +%\usepackage[no-math]{fontspec} +%\end{verbatim} +%unless suppressed by an appropriate option. E.g., +%\begin{verbatim} +%\usepackage[type1]{cabin} +%\end{verbatim} +%prevents the problem with the {\tt cabin} package. + +\textsc{Macros and Options Modified in Version 1.7:} +\begin{itemize} +\item +\verb|\textfrac| works more precisely under unicode tex because it is possible to adjust kerning between all characters. The effect should not be very noticeable, at least in regular style. +\item \verb|\textcircled| is much more capable in opentype LaTeX, using customized letters and figures that are precomposed to allow for custom shaping. The precomposed glyphs in opentype are +\begin{itemize} +\item +Upper and lower case letters in English alphabet: \textcircled{A}\dots\textcircled{z} +\item all single figures: \textcircled{0}\dots\textcircled{9} +\item all double figures from 10 to 20: \textcircled{10}\dots\textcircled{20} +\end{itemize} + +\item {\tt sups}: the package treats this differently in unicode LaTeX and pdflatex, with handling in the unicode case passed off to the {\tt realscripts} package where the footnote marker font is set to \verb|\normalfont|, meaning that superiors from the current (TeXGyreTermesX) text font are employed. +\item {\tt theoremfont}, {\tt thmtabular}, {\tt thmlining} all function in a manner similar to that in {\tt pdflatex}. +\item {\tt foresolidus, aftsolidus} are not used in unicode tex. +\item {\tt scosf} operates more effectively than in [pdf]latex---in the latter, it seems now very difficult to modify the definition of \verb|\scshape|, and this option works only for \verb|\textsc|. +\item {\tt oldSS} (opentype only) controls whether the new German capital sharp S is used or whether the old SS is retained. The former is the default but the option {\tt oldSS} forces the latter by setting {\tt StylisticSet=6}. The effects are summarized in the following tables. +\ifntxotf + +\begin{center} + \begin{tabular}{@{} lcl @{}} + \hline + Glyph name & glyph & macro\\ + \hline + {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}| or \verb|\SS|\\ + {\tt uni1E9E.ss06} & {\addfontfeature{StylisticSet=6}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=6}\symbol{"1E9E}}| \\ + {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\ + {\tt germandbls.sc.ss06} & {\addfontfeature{StylisticSet=6,RawFeature=+smcp}\ss} & \verb|{\addfontfeature{StylisticSet=6}\textsc{\ss}}| \\ + \hline + \end{tabular} +\end{center} +\fi % \ifntxotf + +\noindent Effect of choice of {\tt StylisticSet}: +\ifntxotf + +\begin{center} + \begin{tabular}{@{} ccccc @{}} + \hline + StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ + \hline + None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ + + =6 & {\addfontfeature{StylisticSet=6}\ss} & {\addfontfeature{StylisticSet=6}\SS} & {\addfontfeature{StylisticSet=6}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=6}\textsc{\ss}}\\ + \hline + \end{tabular} +\end{center} +\fi % \ifntxotf +\end{itemize} + \section{Math mode options} The package invoked by \begin{verbatim} @@ -289,9 +579,9 @@ requires {\tt amsmath}---there is no need to load it separately. \item Option {\tt frenchmath} sets the default style in math mode for rendering uppercase Roman and Greek letters to upright, and lowercase Greek letters to upright. (Introduced in v.\ 1.28.) \item The option {\tt cmbraces} instructs {\tt newtxmath} to ignore the brace collections from {\tt txfonts}, substituting a collection based on thickened versions of the Computer Modern braces, which I find much easier to distinguish from other delimiters. This works quite well in regular weight but looks a bit clunky in bold. The option {\tt bigdelims}, which superseded {\tt cmbraces}, is now not necessary---it is the default as of version 1.5. \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 is {\tt nosubscriptcorrection}.) +\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 operatornames to use accented characters, but losing Greek uppercase. +\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 operatornames to use accented characters, but possibly losing some calls for Greek uppercase. \item {\tt nosymbolsc} causes the package to not load the {\tt symbolsC} fonts, saving a math family. (This font contains mostly exotic symbols, along with some very useful, commonly used symbols like \verb|\coloneq| $\coloneq$, \verb|\eqcolon| $\eqcolon$, \verb|\notin| $\notin$, \verb|\notni| $\notni$, \verb|\neq| $\neq$, \verb|\nsubset| $\nsubset$ and \verb|\nsupset| $\nsupset$, but these have been moved (virtually) to {\tt lettersA} so they may continue to be used even if you use the option {\tt nosymbolsc}.) If this option is selected, then, as of version 1.53, new definitions are made for the missing negated symbols. The package {\tt centernot} is now required. \item {\tt amssymbols} (the default) and {\tt noamssymbols} determine whether the {\tt txfonts} versions of the \textsc{ams} symbols ({\tt AMSm}) are loaded---if so, they override previous settings in {\tt amsmath}. If you use the option {\tt noamssymbols}, then \verb|\mathbb{}| is set to mean the same as \verb|\varmathbb{}|. (One advantage of {\tt noamssymbols} is that you save two of your precious math families for other purposes, such as setting a couple of external math alphabets by means of the \textsf{mathalfa} package.) \textbf{Important note:} if you load an AMS class, like {\tt amsart}, then some trickery will be involved. The AMS classes have an option, {\tt noamsfonts} which currently (2017) does not work as advertised, but is fixed in \TeX Live 2018. It is supposed to prevent the loading of {\tt AMSa} and {\tt AMSb}, which waste two slots. The following workaround seems like a reasonable stopgap until then. \begin{verbatim} @@ -390,7 +680,7 @@ The following examples illustrate some general models, the most unintuitive bein %load text components other than libertine text to be used in math \usepackage[T1]{fontenc} \usepackage[scaled=.85]{beramono}% used only by \mathtt -\usepackage[type1]{cabin}% used only by \mathsf +\usepackage[type1]{cabin}% used only for \mathsf \usepackage{amsmath}% must be loaded before amsthm, if using \usepackage{amsthm}% must be loaded before newtxmath \usepackage[libertine]{newtxmath} @@ -403,7 +693,7 @@ The following examples illustrate some general models, the most unintuitive bein \usepackage{libertine} %\usepackage[osf,semibold]{libertine} for osf in text, semibold as bold \end{verbatim} -The next example is similar, but in math mode, numbers, basic symbols, operator names, \verb|\mathrm| and \verb|\mathbf| will render with {\tt fbb-LF}, though math italic and math Greek letters will be from {\tt libertine}. (Note that one specifies the encoding and redefines \verb|\rmdefault|. For reasons I don't yet understand, it may not work to load the font package---ie, don't substitute \verb|\usepackage{fbb}|, as that will mess up bold in the libertine text package.) +The next example is similar, but in math mode, numbers, basic symbols, operator names, \verb|\mathrm| and \verb|\mathbf| will render with {\tt fbb-LF}, though math italic and math Greek letters will be from {\tt libertine}. (Note that one specifies the encoding and redefines \verb|\rmdefault|. For reasons I don't yet understand, it may not work to load the font package---i.e., don't substitute \verb|\usepackage{fbb}|, as that will mess up bold in the libertine text package.) \textsc{Example 4:} \begin{verbatim} @@ -610,7 +900,7 @@ The third possibility is specified by the option {\tt vvarbb}, looking like $\v \item No matter which alphabet option you chose, you may use symbols from of of the variant alphabets by means of the macros \verb|\vmathbb|, \verb|\vvmathbb|: e.g., \verb|\vmathbb{N}| gives $\vmathbb{N}$ and \verb|\vvmathbb{C}| gives $\vvmathbb{C}$. Note that for consistency with earlier usage in {\tt newtxmath}, \verb|\varmathbb| is a synonym for \verb|\vmathbb|. \item In each of the two variant alphabets, there are digits taken from the STIX Blackboard Bold alphabets, as well as {\tt dotlessi} and {\tt dotlessj}. \item \textbf{Important note:} Under the option {\tt stix2}, there are still three blackboard fonts but the macro \verb|\vmathbb| now points to glyphs from {\tt DSSerif}, a serifed double-struck family that replaces the original variant that is still available under other options. With {\tt stix2}, the {\tt dotlessi} and {\tt dotlessj} glyphs from the {\tt DSSerif} font are provided.%available as \verb|$\imathbbs$| and \verb|$\jmathbbs$|, no matter which blackboard bold option you chose. -As of version $1.659$, the preferred names of $\imath$ and $\jmath$ from other alphabets have been changed so as to follow unicode naming conventions, though the old names will remain as alternatives. + As of version $1.659$, the preferred names of $\imath$ and $\jmath$ from other alphabets have been changed so as to follow unicode naming conventions, though the old names will remain as alternatives. \begin{center} \begin{tabular}{@{} lll @{}} \toprule @@ -944,6 +1234,8 @@ $\bullet$ \verb|$\vv*{AB}{x}$| renders as $\vv*{AB}{x}$. This provides better ho $\bullet$ You can also do \verb|$\vv*{AB}{\vv{CD}}$|, which renders as $\vv*{AB}{\vv{CD}}$.\\ $\bullet$ You can change the vertical space between the arrow and the accentee by means of the package option {\tt vecsep}, whose default value is {\tt .25ex}. +\subsection{A widebar accent to complement widehat and widetilde} +The \verb|\widebar| macro added to version 1.7 came to me via Murray Eisenberg. The original version by Hendrik Vogt was the subject of considerable discussion on {\tt stackexchange} a few years ago. It handles very cleverly issues of width, superscript placement and skew. For example: \verb|$\widebar{AB}^C$| gives $\widebar{AB}^C$ and \verb|$\widebar{AB^C}$| gives $\widebar{AB^C}$. \subsection{Miscellaneous Changes} \begin{itemize} \item @@ -953,7 +1245,7 @@ have been extended and all glyphs now have appropriate unicode mappings. The AMS fonts replacement, {\tt ntxsym} corrects the former misplacement of \verb|\kbbb|, \verb|\daleth|, \verb|\circledR| and \verb|\circledS|.) \end{itemize} %\newpage -\section{Changed Font Tables} +\section{Changed Math Font Tables} \subsection{letters} \fonttable{ntxmi} \newpage @@ -962,7 +1254,7 @@ The AMS fonts replacement, {\tt ntxsym} corrects the former misplacement of \ver \newpage \subsection{symbols} \fonttable{ntxsy} -\newpage +%\newpage \subsection{A sample newtx-subs.tex} You may either copy the entire block below, starting with the line \verb|\begin{...| and ending after the line beginning \verb|\end{| @@ -1005,4 +1297,4 @@ As {\tt ebgaramond} has an x-height considerably smaller than {\tt newtx}, some \usepackage{bm}% load after all math to give access to bold math \end{verbatim} -\end{document}
\ No newline at end of file +\end{document}
\ No newline at end of file |