I'm trying to set up my preferred mix of fonts from mathptmx
and newtxmath
. This would require using the largsymbols
font from newtxmath
, since I like its integrals better than those from mathptmx
. However, this one font just won't load. Here is a simple snippet illustrating the problem:
\documentclass[a4paper]{report}
\DeclareSymbolFont{largesymbols}{OMX}{ntxex}{m}{n}
\begin{document}
$\forall\exists<>\leq\geq\int\subseteq\supseteq$
\[\int abcdefghijklmnopqrstuvwxyz+-=\alpha\]
\end{document}
Result with pdfTeX
:
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./newtxtest2.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
(./newtxtest2.aux)
LaTeX Font Warning: Font shape `OMX/ntxex/m/n' undefined
(Font) using `OMX/cmex/m/n' instead on input line 5.
[1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./newtxtest2.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb
></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></
usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on newtxtest2.pdf (1 page, 37359 bytes).
SyncTeX written on newtxtest2.synctex.gz.
Transcript written on newtxtest2.log.
Same goes for XeLaTeX
. Now, in a more complicated situation with a package of mine, I got an error. In this case, I get a warning, and the wrong shape for the integral: I get the Computer Modern one, the default one, if I read that cmex
correctly. Indeed, adding
\SetSymbolFont{largesymbols}{bold}{OMX}{ntxex}{b}{n}
\DeclareFontSubstitution{OMX}{ntxex}{m}{n}
produces, with XeLaTeX
:
This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./newtxtest2.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
(./newtxtest2.aux)
No file OMXntxex.fd.
./newtxtest2.tex:6: LaTeX Error: This NFSS system isn't set up properly.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{document}
Yet the code is copied literally from the package, so what is going on here? Why is that .fd
not found? I know where it is, but TeX
seems not to, and if I put it where TeX
can find it, it starts doing strange things and calling metafont
and ending up with no .tfm
:
[…]
kpathsea: Running mktextfm bickham-r
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input bickham-r
This is METAFONT, Version 2.7182818 (TeX Live 2014) (preloaded base=mf)
kpathsea: Running mktexmf bickham-r
! I can't find file `bickham-r'.
<*> ...jfour; mag:=1; nonstopmode; input bickham-r
Please type another input file name
! Emergency stop.
Why is this coming about? How do I get the desired shape for the integral symbol without loading newtxmath
directly?
Best Answer
Provided you don't need scaling, at a minimum you need something like this:
However, if you only want to use a couple of symbols from the font, this is not a good way to do it (because everything which uses
largesymbols
will now use thenewtxmath
fonts) and it won't work properly anyway (becauseLMX
is not equivalent toOMX
).So it is better to create a new symbol font and use that just to redefine the symbols you want (as egreg's answer does).
You might, however, also want to use the integral symbols for maths extension A from
newtxmath
. In that case, you need to set up an additional font, but this configuration can be taken straight fromnewtxmath.sty
since it already defines an additional symbol font.Putting this together: