diff options
Diffstat (limited to 'Master/texmf-dist/doc/fonts/newpx')
-rw-r--r-- | Master/texmf-dist/doc/fonts/newpx/README | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/fonts/newpx/newpxdoc.pdf | bin | 792241 -> 226781 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex | 416 |
3 files changed, 368 insertions, 57 deletions
diff --git a/Master/texmf-dist/doc/fonts/newpx/README b/Master/texmf-dist/doc/fonts/newpx/README index 5caca348b2b..83756266545 100644 --- a/Master/texmf-dist/doc/fonts/newpx/README +++ b/Master/texmf-dist/doc/fonts/newpx/README @@ -1,10 +1,17 @@ This package, based initially on pxfonts, provides many fixes and enhancements to that package, splitting it in two parts---newpxtext and newpxmath---which may be run independently of one another. It provides scaling, improved metrics, and other options. For proper operation, the packages require that the packages newtxmath, pxfonts and TeXGyrePagella be installed and their map files enabled. The text package now relies on an extension of the TeXGyrePagella Type1 fonts that is provided with this package. The accompanying MANIFEST-newpx.txt provides details of the extension as requested by GUST-FONT-LICENSE.txt -Current version: 1.427 2021-10-15 +Current version: 1.5 2021-12-04 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.5 +1. Rewrote newpxtext.sty to work in all flavors of LaTeX and to implement the new macros and options. +2. Added real larger small caps, renaming the original small caps glyphs to be petite caps. +3. Reworked the \textfrac macro. +4. Complete revision of the documentation. +5. Added German capital sharp S and related glyphs, plus StylisticSet ss06 to map these to the old SS form. + Changes in version 1.427 Corrected a problem with rendering of larger small caps, caused by not making some definitions global in the relevant fd files. diff --git a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.pdf b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.pdf Binary files differindex 91d73b5f026..43c321d28c1 100644 --- a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.pdf +++ b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.pdf diff --git a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex index c9cd0c84724..5df5dbf6e3e 100644 --- a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex +++ b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex @@ -1,14 +1,15 @@ -% !TEX TS-program = pdflatexmk +% !TEX TS-program = xelatex \documentclass[11pt]{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 -\input glyphtounicode.tex -%\usepackage{pdfx} % v 1.6.4 or higher -\InputIfFileExists{glyphtounicode-cmr.tex}{}{} -\InputIfFileExists{glyphtounicode-ntx.tex}{}{} +%\pdfmapfile{=newtx.map} +%\pdfcompresslevel=0 +%\pdfgentounicode=1 +%\input glyphtounicode.tex +%%\usepackage{pdfx} % v 1.6.4 or higher +%\InputIfFileExists{glyphtounicode-cmr.tex}{}{} +%\InputIfFileExists{glyphtounicode-ntx.tex}{}{} +\usepackage{xcolor} \usepackage{fonttable} \usepackage{amsmath} % must be loaded before amsthm \usepackage{amsthm} @@ -31,75 +32,158 @@ % newpx text and math \linespread{1.05} %\usepackage[largesc,theoremfont]{newpxtext} -\usepackage[theoremfont,trueslanted,largesc]{newpxtext} -\usepackage[scaled=1.05]{nimbusmononarrow} +\usepackage{trace} + +\usepackage[theoremfont,trueslanted,scosf]{newpxtext2} +\makeatletter +%\ifzpl@lining\show\foo\else\show\barf\fi +\ifzpl@otf + %\setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase] + \setmonofont{inconsolata}[Scale=MatchLowercase] +\else + \usepackage[T1]{fontenc} + \usepackage[scaled=.98]{zi4} + \pdfmapfile{=newpx.map} +\fi +\makeatother + %\usepackage[scaled=1.05,zerostyle=a]{newtxtt} \usepackage{textcomp} \usepackage{newpxmath} \usepackage{bm} -\useosf +%\useosf +%\useproportional +%\ifzpl@lining\show\foo\else\show\barf\fi %SetFonts \usepackage{upquote} -\font\pcf=zpl-Regular-osf-sc-t1 at 10.95pt \makeatletter -\DeclareMathSymbol{\Sumop}{\mathop}{largesymbols}{"50} + \ifzpl@otf + \def\pcf{\addfontfeatures{Letters=PetiteCaps}} + \else + \font\pcf=zpl-Regular-osf-sc-t1 at 10.95pt + \font\scf=zpl-Regular-osf-scl-t1 at 10.95pt + \fi \makeatother -\usepackage{booktabs}\title{New PX font package} +\DeclareMathSymbol{\Sumop}{\mathop}{largesymbols}{"50} +\usepackage{booktabs} +\title{New PX font package} \author{Michael Sharpe} \date{\today} % Activate to display a given date or no date - +\usepackage{scalefnt} +%\pagestyle{empty} \begin{document} +%\show\scshape +%1\textsc{23Xx}\\ +% +%\makeatletter +%{\fontfamily{zpl\zpl@figurealign OsF} +% \fontshape\scdefault\selectfont 23Xx} +%\makeatother +%\fonttable{zpl-Regular-osf-scl-t1} +%%\expandafter\show\csname textlf \endcsname \maketitle +%\textcircled{R}\symbol{"00AE}{\color{red}\rule[135pt]{-3em}{.05ex}}\ +%\bfseries +%\slshape +%\show\scshape +%\expandafter\show\csname scshape \endcsname +%\let\scshape\undefined +%\newfontfamily\scshape[Letters=SmallCaps,Scale=1.078]{TeXGyrePagellaX} +%2{\lfstyle2}\textlf{2}\texttlf{2}{\tlfstyle2}\textsu{2}\textde{2}\textinf{2} +%\traceon +%\textfrac[2]{7}{8} +%\traceoff +%\end{document} +%\fonttable{zpl-Regular-osf-scl-t1} +%Test\textsc{Text}{\scf Text}{\pcf Text} +% +% +%X\textsu{ABCX1234} +%{\sustyle 2}\textfractionsolidus{\destyle 5} +% +%\textfrac12 \textfrac23 \textfrac34 \textfrac45 \textfrac56 \textfrac67 \textfrac78 \textfrac89 \textfrac90 \textfrac01 %{\vrule width.04pt\char"2044\vrule width.04pt} +%%\setbox0\hbox{\zplLF\char"2044}\showthe\wd0 +%%\setbox1\hbox{\char"2044\addfontfeatures{RawFeature=+ss20;+dnom}\color{red}\char"2044}\showthe\wd1 +%\textcircled{M}\textcircled{2} + + +%\scalefont{5}{\vrule width.04pt\char"2044\vrule width.04pt}%\addfontfeatures{RawFeature=+ss20;+dnom}\color{red}\char"2044\vrule width.04pt{}4} +%\textsu{23} \textde{45} \textnu{78} \textinf{90} +%X{\sufigures 8Abc} +%\end{document} +%\show\slshape \section{Introduction} -This package is meant to be a replacement for Young Ryu's {\tt pxfonts}---a complete text and math package with roman text font provided by a Palatino clone, sans serif based on a \textsf{Helvetica} clone, typewriter faces, plus math symbol fonts whose math italic letters are from a Palatino Italic clone. As with the related {\tt txfonts} (though not as severe) the math metrics in {\tt pxfonts} are overly tight. +This package is meant to be a replacement for Young Ryu's {\tt pxfonts}---a complete text and math package with roman text font provided by a Palatino clone, sans serif based on a \textsf{Helvetica} clone, typewriter faces, plus math symbol fonts whose math italic letters are from a Palatino Italic clone. As with the related {\tt txfonts} (though not as severe) the math metrics in {\tt pxfonts} seem overly tight. -The goal of this new project is use his glyphs along with a few additions and with completely reworked metrics which are generally looser, but not as loose as Computer Modern math. The following small examples (double normal size) provide some idea of the extent of the changes. +\textsc{Changes as of version 1.5}\\ + {\tt newpxtext.sty} contains code that mostly works for both {\tt pdflatex} as well as {\tt XeLateX} and {\tt LuaLaTeX}, though there are some new features that work only with the last two. The precise differences will be spelled out below. Unless explicitly noted, macros and package options will function similarly for all LaTeX engines. +%The goal of this new project is use his glyphs along with a few additions and with completely reworked metrics which are generally looser, but not as loose as Computer Modern math. The following small examples (double normal size) provide some idea of the extent of the changes. -\begin{minipage}{3.1in} -\begin{center} -\includegraphics[scale=2]{pxfontseg-crop}\\ -Math rendered with pxfonts -\end{center} -\end{minipage} -\begin{minipage}{3.1in} -\begin{center} -\includegraphics[scale=2]{newpxeg-crop}\\ -Math rendered with newpxmath -\end{center} - -\end{minipage} +%\begin{minipage}{3.1in} +%\begin{center} +%\includegraphics[scale=2]{pxfontseg-crop}\\ +%Math rendered with pxfonts +%\end{center} +%\end{minipage} +%\begin{minipage}{3.1in} +%\begin{center} +%\includegraphics[scale=2]{newpxeg-crop}\\ +%Math rendered with newpxmath +%\end{center} +% +%\end{minipage} -This new package differs from {\tt pxfonts} in the following ways: +This {\tt newpx} package differs from {\tt pxfonts} in the following ways: \begin{itemize} \item -the new package is split into separate text and math packages that do not need to be used in conjunction; -\item both text and math packages offer options not present in the original package, described below;\item wide accent glyphs have been corrected (they should have zero depth) so that they no longer collide with the underlying glyph; +{\tt newpx} is split into separate text and math packages that do not need to be used in conjunction; +\item both text and math packages offer options not present in the original package, described below; +\item wide accent glyphs have been corrected (they should have zero depth) so that they no longer collide with the underlying glyph; \item the summation and product symbols in {\tt pxfonts} seemed overly heavy at display size, and have been replaced by others of more suitable weights; \item for those who do not like the integral in \textsf{pxfonts}, an emboldened version of the Computer Modern integral is made available, matching the weight of the \textsf{pxfonts} symbols; \item an upright partial derivative symbol has been added, named \verb|\uppartial|---$\uppartial$; -\item there is now an option to get braces more pleasing to older eyes; +\item +braces and other delimiters are now larger and, I believe, more pleasing to older eyes; \item macros have been added to bring the calls to Greek symbols more into conformity with \textsc{psnfss} and Mathtime Pro~2; \item an upright Greek \verb|\upvarkappa|, $\upvarkappa$, has been added as well as a matching italic version $\varkappa$; \item problems using \textsc{ams} macro packages before \textsf{pxfonts} are settled; \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; \item The default encoding for \textsf{newpxtext} 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 The font collection used for rendering text is based on TeXGyrePagella with a number of additions, denoted by TeXGyrePagellaX. The superior figures in this addition are set by default to render footnote markers. (It is also possible customize footnote markers by redefining \verb|\thefootnote| after loading {\tt newpxtext.sty}.) Small caps are available in all weights and styles, and are offered in two sizes. The default small caps supplied by TeXGyrePagella are really \textsc{Petite Caps}, having xheights approximately the same x-heights (sometimes smaller) as lowercase letters. Option \texttt{largesc} increases the size of small caps by nearly 8\%, approximating the size of Adobe Palatino Small Caps. IMO, this is a better match in terms of weight and size. For a side by side comparison: {\pcf Petite Caps}, \textsc{Small Caps}. +\item The font collection used for rendering text is based on TeXGyrePagella with a number of additions, denoted by TeXGyrePagellaX. The superior figures in this addition are set by default to render footnote markers. (It is also possible customize footnote markers by redefining \verb|\thefootnote| after loading {\tt newpxtext.sty}.) \item Sans serif is by default taken from TeXGyreHeros, a Helvetica clone, and by default at 94\% of the scale factor (set by {\tt scaled}, default value {\tt1}). The option {\tt helvratio=.98} will change that to 98\%. As of newpx version 1.415, there is an option {\tt nohelv} that prevents this loading. \item New math accents such as \verb|\widearc| have been introduced in tandem with the {\tt newtx} package, where they are documented. \end{itemize} \section{Text mode options and macros} +\textsc{Important changes as of version 1.5} +\begin{itemize} +\item + Small caps are available in all weights and styles, and are offered in two sizes. The default small caps supplied by TeXGyrePagella are really \textsc{Petite Caps}, having xheights approximately the same x-heights (sometimes smaller) as lowercase letters. Option \texttt{largesc} increases the size of small caps by 5.33\%, approximating the size of Linotype Palatino Small Caps. IMO, this is a better match in terms of weight and size. For a side by side comparison: {\pcf Petite Caps}, \textsc{Small Caps}. The two sizes of small caps are now implemented in the Opentype fonts as Petite Caps and Small Caps ({\tt pcap} and {\tt smcp}). The option {\tt largesc} changes the default rendering of \verb|\scshape| and \verb|\textsc| to Small Caps instead of the default Petite Caps. + +\item The last versions were missing the switches \verb|\tlfstyle|, \verb|\lfstyle|, \verb|\tosfstyle| and \verb|\osfstyle| as well as their command forms \verb|\texttlf|, \verb|\textlf|, \verb|\texttosf| and \verb|\textosf|, which allowed you to get any figure alignment and style, no matter what the default figure style. For example, though we the main text is proportional oldstyle, \verb|{\texttlf{123}| gives the tabular lining form \texttlf{123}, as does \verb|{\tlfstyle123}|. + +\item There are also the commands \verb|\oldstylenums|, \verb|\liningnums|, \verb|\tabularnums| and \verb|\proportionalnums|, which change only the alignment and the style. + +\item Two additional figure styles have been added---denominators and subscripts (inferiors), each the same size as superiors, with denominators having the same baseline as text and subscripts below the text baseline. These may be specified respectively by the text switches \verb|\defigures| (\textsc{aka} \verb|\destyle|) and \verb|\infigures| (\textsc{aka} \verb|\instyle|) or the corresponding macros \verb|\textde| and \verb|\textinf|. For example, \verb|{\defigures 123}| gives {\defigures 123}, as would \verb|\textde{123}|, and \verb|{\infigures 123}| gives {\infigures 123}, as would \verb|\textinf{123}|. + +\item There is a new version of \verb|\textfrac| that provides better kerning around the division solidus than the default command. The integer part may be specified as an optional argument. E.g., \verb|\textfrac{7}{8}| gives \textfrac{7}{8}, while \verb|\textfrac[2]{31}{32}| gives \textfrac[2]{31}{32}. + +\item There is a new \verb|\textcircled| which works with both letters and numbers.\\ + E.g., \verb|\textcircled{X}\textcircled{2}| gives \textcircled{X}\textcircled{2}. +\item A new option {\tt slashedzero} is provided for XeLaTeX and LaLaTeX only. It replaces the zero in lining style only to a zero with a reverse slash. +\end{itemize} + \textsc{Important changes as of version 1.42}\\ Option {\tt theoremfont} was reimplemented using a new font family, {\tt npxth} instead of abusing \verb|\textsl|. By default, users of {\tt theoremfont} will see no change in its functionality, including the use of the macro \verb|\textsl| to output italics with upright punctuation. A new option, {\tt trueslanted}, to {\tt newpxtext} has the following effects: \begin{itemize} \item \verb|\textsl| now outputs slanted text rather than italics with upright punctuation text, but not affecting the usage of the {\tt theoremfont} option to {\tt newpxtext}. \item the former behavior of \verb|\textsl| is now available through the new macro \verb|\textth|, \textsc{aka} \verb|\textthit|. -\item \verb|\pagestyle{headings}| now functions as intended with slanted rather than upright figures in the headers. +\item \verb|\pagestyle{headings}| now functions as originally intended with slanted rather than upright figures in the headers. \end{itemize} The text mode environment invoked by @@ -117,18 +201,18 @@ to load the roman and typewriter text fonts at 95\% of normal size, and the sans load roman and typewriter text fonts at 95\% of normal size, and the sans serif (\textsf{Helvetica} clone) at scale $0.95*0.96$. The option \texttt{osf} instructs the text fonts to use old-style figures \oldstylenums{1234567890} rather than the default lining figures $1234567890$. As of version $1.23$, {\tt newpxtext} loads initially with lining figures so the math package uses lining figures in math mode. The option {\tt osf} switches to old-style figures in text at the very end of the preamble, forcing the use of oldstyle figures in text, but not math. In previous versions, it was necessary to run -\verb|\useosf| after loading math. This is no longer required, but does no harm. See the discussion in section 4 for further details. +\verb|\useosf| after loading math. This is no longer required, but does no harm. See the discussion in section 4 for further details. A similar macro \verb|\useproportional| makes proportional figures the default outside math mode. As of version 1.415, the new option {\tt nohelv} prevents the loading of the default Helvetica clone as the sans serif text font. If you use this option, you should load your preferred sans serif font, otherwise you will be left with the Computer Modern default, most likely in a metafont version if not using OT1 encoding. -As described above, option {\tt largesc} increases the size of small caps by about 8\%. +As described above, option {\tt largesc} increases the size of small caps by 5.33\% so that the height matches that of the small caps in Linotype Palatino. 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---Palatino (clone) superior figures instead of spindly ordinary Palatino lining figures reduced to about 70\%. (Footnote markers in minipages use the default lowercase 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 newpxtext}. The {\tt theoremfont} option changes the default font used for the {\tt plain} theorem style of {\tt amsthm}, keeping italic text but substituting upright figures and punctuation. For example, with this option, you get theorem statements like this: \begin{thm} -This is Theorem Italic: text numbers are upright---12345; punctuation is in many cases upright (also, parens, braces \{\} and brackets []). What about question marks and exclamations? Also upright! [These fit better with math mode punctuation and figures, like: for all $x\in[0,1]$, let $f(x)\coloneq \exp(\alpha x)$]. +This is Theorem Italic: text numbers are upright---12345; punctuation is in many cases upright (also, parens (), braces \{\} and brackets []). What about question marks and exclamations? Also upright! [These fit better with math mode punctuation and figures, like: for all $x\in[0,1]$, let $f(x)\coloneq \exp(\alpha x)$]. \end{thm} Compare this to traditional {\tt plain} theorem style of the same text: \begin{oldthm} @@ -141,7 +225,7 @@ Superior letters and figures may be called with either \verb|{\sustyle ...}| or The next two sections describe options to {\tt newpxtext} of more specialized nature. -\section{Spacing issues} +\section{Spacing issues}%\footnote{The options described in this section are different under XeLaTeX and LuaLaTeX.} This new version of {\tt newpxtext} has spacing that is a little different, in its default state, from that of the old {\tt newpxtext}. In small part this is due to the finer kerning of TeXGyre Pagella, but mostly because the three parameters that govern inter-word spacing are not the same. \begin{verbatim} pxfonts Pagella @@ -151,6 +235,7 @@ fontdimen4 (interword shrink) .08333em .1em \end{verbatim} That is, {\tt Pagella} has the same normal spacing as {\tt pxfonts} but its spacing is more flexible in terms of both stretch and shrink. More frequently than not, a paragraph built with {\tt Pagella} will occupy more space than the same built with {\tt pxfonts}. 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 pxfonts}. +\textbf{Behavior under [pdf]LaTeX.}\\ Option {\tt tighter} sets the three fontdimen values to those of {\tt pxfonts}, except with a little more shrink. This should make it unlikely that text will occupy more space than it would have using~{\tt pxfonts}. Option {\tt looser} sets the three fontdimen values to \verb|{.3em,.2em,.1em}| respectively. @@ -159,11 +244,12 @@ If you want full control, the options {\tt spacing, stretch, shrink} allow you t \begin{verbatim} \usepackage[stretch=.15em,shrink=.095em]{newpxtext} \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 {\tt babel}} -You should normally load {\tt babel} before loading {\tt newpxtext} in order for {\tt babel} to function as expected. A similar macro \verb|\useproportional| makes proportional figures the default outside math mode. For example: +You should normally load {\tt babel} before loading {\tt newpxtext} in order for {\tt babel} to function as expected. For example, using {\tt pdflatex}: \begin{verbatim} \usepackage[greek.polutonico,english]{babel} % the next line makes text figures proportional, oldstyle, while math uses lining figures @@ -171,7 +257,7 @@ You should normally load {\tt babel} before loading {\tt newpxtext} in order for \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[varqu,varl]{inconsolata} -\usepackage{amsmath} % must be loaded before amsthm +\usepackage{amsmath} % must be loaded before amsthm, if using amsthm \usepackage{amsthm} % must be loaded before newpxmath \usepackage[vvarbb]{newpxmath} % option vvarbb gives you stix blackboard bold @@ -179,7 +265,98 @@ You should normally load {\tt babel} before loading {\tt newpxtext} in order for \end{verbatim} \section{Usage with Lua\LaTeX\ and Xe\LaTeX} -As far as I can tell, \textsf{newpxmath} 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}. Be aware that some text packages (e.g., {\tt cabin}) may contain a line like +As far as I can tell, \textsf{newpxmath} 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 newpxtext} 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 newpxtext}, 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 math font.) + +\textsc{Example I: TeXGyrePagellaX Opentype + Asana-Math (Opentype).} +\begin{verbatim} +%\usepackage[greek.polutonico,english]{babel} % if using babel +% next line calls fontspec and loads TeXGyrePagellaX otf +\usepackage[theoremfont,trueslanted,largesc,p,osf]{newpxtext} +% set mono and sans opentype fonts +%\usepackage{polyglossia} % must load after fontspec, if using polyglossia +% polyglossia setup commands +\usepackage{unicode-math}% can't load type1 math fonts after this +\setmathfont{Asana-Math} +\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 newpxtext}, which loads {\tt fontspec}. +\item Polyglossia, if used, must be specified after loading {\tt newpxtext}. +\end{itemize} +\textsc{Example II: newpxtext type1 + Asana-Math (Opentype).} +\begin{verbatim} +%\usepackage[greek.polutonico,english]{babel} % if using babel +% next line does not call fontspec, loads newpxtext type1 +\usepackage[type1,theoremfont,trueslanted,largesc,p,osf]{newpxtext} +\usepackage{fontspec} +%\usepackage{polyglossia} % must load after fontspec, if using polyglossia +% polyglossia setup commands +\usepackage{unicode-math}% can't load type1 math fonts after this +\setmathfont{Asana-Math} +\end{verbatim} +\textsc{Notes:} +\begin{itemize} +\item The {\tt type1} option to {\tt newpxtext} 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 newpxtext}. +\item Polyglossia, if used, must be specified after loading {\tt fontspec}. +\end{itemize} + +\textsc{Example III: TeXGyrePagellaX Opentype + newpxmath (type1) + polyglossia + other Opentype.} +\begin{verbatim} +\renewcommand{\rmdefault}{zplTLF}% Roman and Bold Pagella 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 newpxmath +\usepackage[vvarbb]{newpxmath} +\usepackage[no-math]{newpxtext}% 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 no-math} option to {\tt newpxtext} causes {\tt fontspec} to load with option {\tt no-math}, preventing the package from loading any unicode math font. +\item +You do not need to load {\tt amsmath}: it is loaded by {\tt newpxmath} However, if you wish to load {\tt amsthm}, load {\tt amsmath}, then {\tt amsthm} before {\tt newpxmath}. +\item Babel, if used, must be specified before {\tt newpxtext}. +\item Polyglossia, if used, must be specified after loading {\tt newpxtext}. +\item The {\tt type} option to {\tt cabin} is important, preventing it from loading {\tt fontspec}, which would lead to an {\tt option clash} error. +\end{itemize} + +\textsc{Example IV: newpxtext type1 + newpxmath (type1) + polyglossia + other Opentype.} +\begin{verbatim} +\renewcommand{\rmdefault}{zplTLF}% Roman and Bold Pagella 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 newpxmath +\usepackage[vvarbb]{newpxmath} +\usepackage[no-math]{newpxtext}% 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 newpxtext} 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 newpxtext}. +\item Polyglossia, if used, must be specified after loading {\tt fontspec}. +\end{itemize} + +%\textsc{Example V: newpxtext tfm + Asana-Math.} + +Be aware that some text packages (e.g., {\tt cabin}) may contain a line like \begin{verbatim} \RequirePackage{fontspec} \end{verbatim} @@ -193,25 +370,153 @@ unless suppressed by an appropriate option. E.g., \end{verbatim} prevents the problem with the {\tt cabin} package. -While the math font options must be specified before {\tt fontspec}, be aware of a potential trap. Using \verb|\usepackage{newpxtext}| before \verb|\usepackage{newpxmath}| results in {\tt newpxtext}'s font-loading options being run after all other packages in the preamble, so instead of \verb|\usepackage{newpxtext}|, use the following: +\iffalse + Consider three scenarios for using some part of {\tt newpx} with one of XeLaTeX, LuaLaTeX. +\subsection{Use {\tt newpxtext} and {\tt newpxmath} with {\tt fontspec} for other text fonts} +\begin{verbatim} +%load LaTeX text components before math +\usepackage[T1]{fontenc} % affects only \mathrm, \mathbf etc +\usepackage{newpxtext} +\usepackage[scaled=.85]{beramono}% used only by \mathtt, optional +\usepackage[type1]{cabin}% used only by \mathsf, optional +\usepackage{amsmath} % must be loaded before amsthm, if using amsthm +\usepackage{amsthm}% load before newpxmath +\usepackage[vvarbb]{newpxmath} +\usepackage[scr=rsfso]{mathalpha} % optional +\usepackage{bm}% load after all math to give access to bold math, optional +%Now load the otf text fonts using fontspec---won't affect math +\usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX +\setmainfont{TeXGyrePagellaX} % this reads in TeXGyrePagellaX.fontspec +\end{verbatim} + +While the math font options must be specified before {\tt fontspec}, be aware of a potential trap. Using \verb|\usepackage{newpxtext}| before \verb|\usepackage{newpxmath}| results in {\tt newpxtext}'s font-loading options being run after all other packages in the preamble, so instead of \verb|\usepackage{newpxtext}|, do the following: \textsc{Example:} \begin{verbatim} %load LaTeX text components before math \usepackage[T1]{fontenc} % affects only \mathrm, \mathbf etc -\renewcommand{\rmdefault}{zpltlf}% Roman font for use in math mode +\renewcommand{\rmdefault}{zplTLF}% Roman font for use in math mode \usepackage[scaled=.85]{beramono}% used only by \mathtt, optional \usepackage[type1]{cabin}% used only by \mathsf, optional \usepackage{amsmath} % must be loaded before amsthm \usepackage{amsthm}% load before newpxmath \usepackage[vvarbb]{newpxmath} -\usepackage[scr=rsfso]{mathalfa}, optional +\usepackage[scr=rsfso]{mathalpha} % optional \usepackage{bm}% load after all math to give access to bold math, optional %Now load the otf text fonts using fontspec---won't affect math \usepackage[no-math]{fontspec} % process with XeLaTeX or LuaLaTeX \setmainfont{TeXGyrePagellaX} % this reads in TeXGyrePagellaX.fontspec \end{verbatim} +\textsc{Example preamble using polyglossia:} + +\begin{verbatim} +\renewcommand{\rmdefault}{zplTLF}% Roman and Bold for use in 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 +\usepackage{amsthm}% load before newpxmath +\usepackage[vvarbb]{newpxmath} +\usepackage[no-math]{newpxtext}% 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} +\fi + +Previous to version 1.5, the preceding pages of this document were processed using {\tt pdflatex}, which was the only engine supported by {\tt newpxtext.sty}. As of version $1.5$, XeLaTeX and LuaLaTeX are also supported and the entire document is now processes by XeLaTeX. All {\tt newpxtext} options and macros formerly limited to {\tt pdflatex} have been modified and now work essentially the same under both unicode engines, though the output may not always be precisely the same as with {\tt pdflatex}. There are some macros and options available under unicode engines that go beyond what can be done under {\tt pdflatex}. + +\textsc{Modified Macros and Options:} +\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 {\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 (TeXGyrePagellaX) text font are employed. +\item {\tt theoremfont}, {\tt thmtabular}, {\tt thmlining} all function in a manner similar to that in {\tt pdflatex}. +\item {\tt swashQ} operates as before. +\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|. +%you have the choice of font to render footnote markers. The differences are as follows. +%\begin{itemize} +%\item +%{\bfseries Unicode latex:} +%\begin{itemize} +%\item +%if you include the option {\tt sups} to {\tt cochineal} and there is no {\tt fnmarkerfont=} option set, then footnote markers are taken from the Cochineal-Roman superiors. +%\item if there is a {\tt fnmarkerfont=} option set, then, whether or not there iss a {\tt sups} option set, then, if available, footnote markers will be taken from the superiors in the font family that {\tt fnmarkerfont=} is set to. (When trying a font family, try this in your preamble: +%\begin{verbatim} +%\newfontfamily\mysu{EBGaramond}{\addfontfeatures{RawFeature=+sups}} +%\end{verbatim} +%and then, in the body of your document, try typesetting +%\begin{verbatim} +%X{\mysu 123}X +%\end{verbatim} + +%\end{itemize} +%\item +%{\bfseries pdflatex:} +%\end{itemize}• +%if you do not include the {\tt fnmarkerfont=} option but you do include {\tt sups}, then footnote markers are taken from {\tt Cochineal-Roman-sups}. There is a new option, {\tt fnmarkerfont} that you can use to specify the font to use for footnote markers. It is ignored when using {\tt pdflatex}. +\item \verb|\textcircled| works the same as under {\tt pdflatex}.%\textcircled{X}\textcircled{2} +\end{itemize} +\textsc{New Macros and Options:} +\begin{itemize} +%\item +%An alternate version of Q, +%\Qswash\space (\verb|\Qswash|) and their small cap versions is available using option {\tt altQ}, which sets {\tt StylisticSet=3}. The alternate versions are {\addfontfeatures{RawFeature=+ss03}Q}, {\addfontfeatures{Style=Swash,RawFeature=+ss03}Q}. +%\item +%An alternate version of J is available in italic shapes only using option {\tt altJ}, which sets {\tt StylisticSet=2}. The alternate version of \textit{J} is {\itshape {\addfontfeatures{RawFeature=+ss02}\textit{J}}}. +%%.\textit{J} {\textbf{Bold}} \textsc{SmallCap} +\item {\tt oldSS} 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. +\makeatletter +\ifzpl@otf +\makeatother + +\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 % \ifzpl@otf +\end{itemize} +%{\bfseries +%\begin{center} +% \begin{tabular}{@{} lcl @{}} +% \hline +% Glyph name & glyph & macro\\ +% \hline +% {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ +% {\tt uni1E9E.alt} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ +% {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ +% \hline +% \end{tabular} +%\end{center} +%} + \noindent Effect of choice of {\tt StylisticSet}: +\makeatletter +\ifzpl@otf +\makeatother + +\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 % \ifzpl@otf \section{Math mode options} The package invoked by @@ -252,8 +557,8 @@ Don't use these unless you know what you're doing. \begin{itemize} \item{\tt varg} causes the math italic letter $g$ to be replaced by $\varg$; \item{\tt cmintegrals} instructs \textsf{newpxmath} to load a thicker version of the Computer Modern integral in place of the \textsf{newpxmath} default---the pxfonts integral (identical to the integral in the Wolfram fonts), which is not to everyone's taste---a consequence is that none of the special forms of \textsf{pxfonts} integrals are available; \textbf{As of version 1.3, this option does nothing, as the new default is slanted integrals.} -\item The option {\tt cmbraces} instructs {\tt newpxmath} to ignore the brace collections from {\tt pxfonts}, 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. -\item [NEW] The new option {\tt bigdelims} offers delimiters which are a bit larger than the standard delimiters and the normal and {\tt big} sizes, with more distinction between the two than in the standard package. With {\tt bigdelims}, the option {\tt cmbraces} is ignored. +\item The former option {\tt cmbraces} instructed {\tt newpxmath} to ignore the brace collections from {\tt pxfonts}, substituting a collection based on thickened versions of the Computer Modern braces, which I found much easier to distinguish from other delimiters. This worked quite well in regular weight but looked a bit clunky in bold. It no longer has any effect. +\item The once new option {\tt bigdelims} offered delimiters which were a bit larger than the standard delimiters and the normal and {\tt big} sizes, with more distinction between the two than in the standard package. With {\tt bigdelims}, the option {\tt cmbraces} was ignored. Now, {\tt bigdelims} is the default, and the option has no effect. \end{itemize} \item the combination \begin{verbatim} @@ -277,8 +582,8 @@ causes no error, unlike the same combination with {\tt pxfonts}, but does nothin \documentclass[leqno]{article} \usepackage[osf,theoremfont]{newpxtext} % T1, lining figures in math, osf in text \usepackage{textcomp} % required for special glyphs -\usepackage[varg,bigdelims]{newpxmath} -\usepackage[scr=rsfso]{mathalfa}% \mathscr is fancier than \mathcal +\usepackage[varg]{newpxmath} % single story g +\usepackage[scr=rsfso]{mathalpha}% \mathscr is fancier than \mathcal \usepackage{bm} % load after all math to give access to bold math %\useosf %no longer needed unless using babel \linespread{1.05}% Give Palatino more leading (space between lines) @@ -379,7 +684,7 @@ As mentioned briefly above, the package now has a new blackboard bold alphabet b \item the default, called by \verb|\mathbb| is quite ugly and indistinct, but does cooperate with the bolding macros \verb|\bm| and \verb|\boldsymbol|; \item the original variant form called with the macro \verb|\varmathbb| is better, but the macro conflicts with \verb|\bm|. (In fact, the bold version is identical to the regular version, but it is still not right that it conflicts with them.) The problem stems from the part of the definition of \verb|\varmathbb| which allows you to insert an argument with more than one character, like \verb|\varmathbb{ABC}|. The solution is to make a new macro that takes a single argument, like \verb|\vmathbb{A}|, which cooperates with \verb|\bm|. -\item the third, new, alphabet is borrowed from the STIX fonts---it is sharp and quite clear, geometric in design. The only slight problem is that it lacks a full bold version, with only the letters C, D, H, N, P, Q, R, Z, d, e, i and j available. The macro \verb|\vvmathbb| provided to access this alphabet allows only a single character for its argument. The new option {\tt vvarbb} effectively makes \verb|\mathbb| mean the same as \verb|\vvmathbb|. +\item the third, new, alphabet is borrowed from the STIX fonts---it is sharp and quite clear, geometric in design. The macro \verb|\vvmathbb| provided to access this alphabet allows only a single character for its argument. The new option {\tt vvarbb} effectively makes \verb|\mathbb| mean the same as \verb|\vvmathbb|. (The reason for including these in the \textsf{newpx} package rather than calling them from the \textsf{mathalfa} package is that \textsf{newpx} leaves very little space for new math symbol fonts and math alphabets, and this way requires no additional such resources. \end{itemize} One interesting feature of the new alphabet is that it contains blackboard bold numbers, of which $0$ and $1$ will likely be the most useful, perhaps as operator names. I find $\vvmathbb{1}$=\verb|$\vvmathbb{1}$| useful in specifying an indicator, AKA characteristic function. Here are some examples: @@ -416,7 +721,7 @@ A final goal was to make better use of the remaining space in some of the math f The following changes were made to both {\tt newtx} and {\tt newpx}. \subsection{Archivability} -Some of the individual font files from which the math fonts are built turned out to have some fairly minor structural issues. These have all been corrected. The more major issue was the lack of unicode mapping for all characters in the fonts. For the symbol and math extension fonts, this issue was largely solved by Ross Moore's {\tt glyphtounicode} files that are now accessible as part of TeXLive and MiKTeX. The main problem was the math alphabets like math italic, bold math italic, upright Greek and slanted Greek, all of which have now been assigned their own unicode points. For all of these, I constructed new fonts using unicode names for the glyphs, then made \textsf{fontinst} scripts that renamed those unicode values to the original simple names as used in the encoding files so that I could use my old encoding and adjustment files. This exercise has now been carried out for {\tt newtxmath}, {\tt newpxmath}, {\tt newtxmath/libertine} and {\tt newtxmath/xcharter.} Each of these can now be considered to have an ``enhanced'' status that allows them to share all the new assets described below. The other packages which may be specified as an option to {\tt newtxmath} (e.g., {\tt cochineal, baskervillef}) must be considered for the moment to be ``unenhanced'' and able to share only some of the new assets. In particular, only the enhanced items can generate archivable pdf. +Some of the individual font files from which the math fonts are built turned out to have some fairly minor structural issues. These have all been corrected. The more major issue was the lack of unicode mapping for all characters in the fonts. For the symbol and math extension fonts, this issue was largely solved by Ross Moore's {\tt glyphtounicode} files that are now accessible as part of TeXLive and MiKTeX. The main problem was the math alphabets like math italic, bold math italic, upright Greek and slanted Greek, all of which have now been assigned their own unicode points. For all of these, I constructed new fonts using unicode names for the glyphs, then made \textsf{fontinst} scripts that renamed those unicode values to the original simple names as used in the encoding files so that I could use my old encoding and adjustment files. This exercise has now been carried out for {\tt newtxmath}, {\tt newpxmath}, {\tt newtxmath/libertine} and {\tt newtxmath/xcharter.} Each of these can now be considered to have an ``enhanced'' status that allows them to share all the new assets described below. The other packages which may be specified as an option to {\tt newtxmath} (e.g., {\tt baskervaldx}) must be considered for the moment to be ``unenhanced'' and able to share only some of the new assets. In particular, only the enhanced items can generate archivable pdf. Also modified were the {\tt sups} fonts in {newpxtext}, where the main issue was unicode mapping. Superior number and some superior letters do have assigned unicode values, but in may cases a more creative approach was needed, and provided once again by Ross Moore. I rebuilt the superior font files using those unicode names, solving that particular problem. @@ -521,6 +826,5 @@ and pasting it into the top of your document before the \verb|\documentclass...| {\rho}{-1.5} {\mu}{-1} \end{filecontents*} - \end{verbatim} -\end{document}
\ No newline at end of file +\end{document} |