eurosym seems to not be working
There is no reason why in general one should write $\euro$
for getting the Euro € symbol. Just \euro
in text mode works.
It might be a problem in case you need to use the symbol in math mode. The package doesn't cope with this case and effectively $\euro$
simply produces e.
A workaround is to modify the standard definition:
\usepackage{eurosym}
\usepackage{amstext} % for \text
\DeclareRobustCommand{\officialeuro}{%
\ifmmode\expandafter\text\fi
{\fontencoding{U}\fontfamily{eurosym}\selectfont e}}
Complete example:
\documentclass{article}
\usepackage{eurosym}
\usepackage{amstext} % for \text
\DeclareRobustCommand{\officialeuro}{%
\ifmmode\expandafter\text\fi
{\fontencoding{U}\fontfamily{eurosym}\selectfont e}}
\begin{document}
\euro{} in text mode
$\euro$ in math mode
\end{document}
A completely different problem that is not addressed by the package and by your question is how to make the Euro symbol searchable in the PDF file.
This can be obtained by defining a proper mapping of the character in the font.
\documentclass{article}
\usepackage{ifpdf,eurosym,amstext}
\DeclareRobustCommand{\officialeuro}{%
\ifmmode\expandafter\text\fi
{\fontencoding{U}\fontfamily{eurosym}\selectfont{}e}}
\makeatletter
\ifpdf\ifdefined\pdffontattr
\immediate\pdfobj stream {
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (Euro)
/Supplement 0
>> def
/CMapName /TeX-Euro-0 def
/CMapType 2 def
1 begincodespacerange
<00> <FF>
endcodespacerange
1 beginbfchar
<65> <20AC>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
}
{\edef\@tempa#1#2{%
\noexpand\fontseries{#1}\noexpand\fontshape{#2}\noexpand\selectfont
\pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}}
\fontencoding{U}\fontfamily{eurosym}%
\@tempa{m}{n}\@tempa{m}{sl}\@tempa{m}{ol}
\@tempa{bx}{n}\@tempa{bx}{sl}
}
\fi\fi
\makeatother
\begin{document}
\euro{} in text mode
$\euro$ in math mode
\end{document}
The image is taken from my PDF viewer and shows that both appearances of € are properly recognized. Here is the first line copied from the PDF file and simply pasted:
€ in text mode
A little less work than @egreg's solution: just use \text
when in math mode:
\documentclass{article}
\usepackage{eurosym}
\usepackage{amsmath}
\begin{document}
Here's \euro{} in text.
Now in math, inline $\text{\euro}$ and displayed:
\begin{equation*}
\text{\euro}5 + \text{\euro}5 = \text{\euro}10.
\end{equation*}
\end{document}
Edit: define a new macro to save a little typing:
\newcommand{\meuro}{\text{\euro}}
...
\begin{equation*}
\meuro 5 + \meuro 5 = \meuro 10.
\end{equation*}
If you use the eurosym
package along with its command \euro
you'll get the Euro symbol.
Try running this:
\documentclass{article}
\usepackage{eurosym}
\begin{document}
\noindent Sample with eurosym: \euro \\
Sample with e: $e$
\end{document}
And you'll get this output:
As you can see, there is a big difference between $e$
and \euro
.
Writing $\euro$
does not produce the euro sign, but rather just and 'e'.