I'm having trouble getting a pounds symbol to appear in math-mode contexts in my document. The problem seems to be the use of the newpxtext package. MWE:
\documentclass{article}
\usepackage{newpxtext}
\usepackage[T1]{fontenc}
\begin{document}
$\pounds$
\end{document}
When I typeset the above, I just get a blank instead of the pounds symbol. Any advice on how to make it display?
Best Answer
When
\pounds
is found in math mode, LaTeX executes\mathsterling
, otherwise it does\textsterling
.If we look at
newpxtext.sty
in a TeX Live 2014 distribution, we findThe package is version 1.232, released 2015/04/07. This line is commented out in the current version 1.293 released 2015/08/07.
With your code compiled on a system using version 1.232 or earlier, the code points to the character in slot 163 of Computer Modern Roman (
cmr10
), because this is the font used for operators; but the font has nothing beyond slot 127.It's even worse if you also load
newpxmath
, because you'll findč
instead of the sterling symbol, because the normal text font in T1 encoding is used and in slot 163 one finds č.The line was a remnant of
pxfonts.sty
, because the text font selected by this package indeed had a sterling symbol in that slot.Solutions
Preferred: upgrade your TeX system and always load
newpxmath
along withnewpxtext
.Temporary: load
newpxmath
and add manually to your preamble the current definition of\mathsterling
, that is,To be honest, I don't find this new definition particularly appealing, because the symbol would not scale in subscripts/superscripts.
If you need an italic sterling in math mode, scaling in subscripts/superscripts, whatever is your TeX distribution, add
Full example
The output is the same using an older TeX distribution (I tested it with TL 2012, 2013 and 2014).