Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am teaching a probability course involving lots of gambling and hence, since I'm in the UK, I would like to use £ in some formulae. I use utf8x input enconding, T1 font encoding and the eulervm maths fonts. Nevertheless, £ inside math-mode comes out like a dollar sign.

Here's a minimum working example:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[small]{eulervm}

\begin{document}

A gambler wins $£1$ with probability $p$ and loses $£1$ with probability $1-p$.

\end{document}

Commenting out the line which calls the eulervm package works, but I really like the eulervm fonts, so any help would be immensely appreciated.

share|improve this question
    
In the meantime I'm putting the £ outside math-mode, so it's not as if this is critical, but I would like to know the answer. –  José Figueroa-O'Farrill Mar 11 '12 at 22:31
add comment

1 Answer

up vote 5 down vote accepted

I would recommend using utf8 instead of utf8x and of leaving £ outside of math mode, to which it doesn't belong.

If you want to use it in math mode you have to teach how to LaTeX

Method A (utf8 option):

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\DeclareUnicodeCharacter{00A3}{\text{\textsterling}}

Method B (utf8x option):

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\makeatletter
\uc@dclc{163}{default}{\text{\textsterling}}
\makeatother
share|improve this answer
    
Thanks. I am undecided about leaving the £ outside of math mode. I tend to agree that they detract from the maths, yet at the same the currency is a system of units and just as in physics formulae, the units are often part of the equation. –  José Figueroa-O'Farrill Mar 11 '12 at 22:48
    
One question: why do you recommend utf8 instead of utf8x? I must admit I forgot why I made that choice when I thought about that problem. –  José Figueroa-O'Farrill Mar 11 '12 at 22:49
    
utf8x is not maintained and it's incompatible with some packages, notably biblatex. –  egreg Mar 11 '12 at 22:52
    
Ah, I didn't know -- thanks! –  José Figueroa-O'Farrill Mar 11 '12 at 23:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.