summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex')
-rw-r--r--Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex32
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex
index c92719fcbf2..1401d609365 100644
--- a/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex
+++ b/Master/texmf-dist/doc/fonts/newpx/newpxdoc.tex
@@ -151,6 +151,38 @@ You should normally load {\tt babel} before loading {\tt newpxtext} in order for
\linespread{1.05}
\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 (eg, {\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. Eg,
+\begin{verbatim}
+\usepackage[type1]{cabin}
+\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:
+\textsc{Example:}
+\begin{verbatim}
+%load LaTeX text components before math math
+\usepackage[T1]{fontenc}
+\renewcommand{\rmdefault}{zpltlf}% Roman font for use in math mode
+\usepackage[scaled=.85]{beramono}% used only by \mathtt
+\usepackage[type1]{cabin}% used only by \mathsf
+\usepackage{amsthm}% load before newtxmath
+\usepackage[cmintegrals,bigdelims,vvarbb]{newpxmath}
+\usepackage[scr=rsfso]{mathalfa}
+\usepackage{bm}% load after all math to give access to bold math
+%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}
+
\section{Math mode options}
The package invoked by