[Tex/LaTex] Problem producing pounds symbol (£) in math mode

fontsmath-modesymbols

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 find

\re@DeclareMathSymbol{\mathsterling}{\mathord}{operators}{163}

The 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

  1. Preferred: upgrade your TeX system and always load newpxmath along with newpxtext.

  2. Temporary: load newpxmath and add manually to your preamble the current definition of \mathsterling, that is,

    \renewcommand{\mathsterling}{\mbox{\textsterling}}
    

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

\usepackage{amsmath}
\renewcommand{\mathsterling}{\text{\normalfont\itshape\textsterling}}

Full example

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{newpxtext,newpxmath}

\renewcommand{\mathsterling}{\text{\normalfont\itshape\textsterling}}

\begin{document}

$\pounds_{\pounds}$

\end{document}

enter image description here

The output is the same using an older TeX distribution (I tested it with TL 2012, 2013 and 2014).