I want to use the Euro symbol (from the eurosym package) in the subscript of a formula, but the symbol isn't as small as expected (contrary to the dollar-symbol).
The code for the formula is the following.
Code: Select all
$E_{\$/\euro}$
Code: Select all
$E_{\$/\euro}$
NEW: TikZ book now 40% off at Amazon.com for a short time.
$\euro$
will simply output an "e", and to get the "€" symbol in math mode requires some extra effort. The problem is most like in that code, which I presume doesn't cope correctly with the smaller font size in subscript. However, since you didn't provide an MWE we cannot help you with your specific code.Code: Select all
\documentclass[10pt,mathserif]{beamer}
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage[gen]{eurosym}
\begin{document}
\begin{frame}{}
$E_{\$/\euro}$
\end{frame}
\end{document}
\text
command to escape to text mode with the correct fontsize. This can be done each time you come across an euro symbol, or by creating a new command that does it automatically. As an extra bonus you don't need the gen option and thus get the official symbol, instead of a capital C with two bars. Below some example code that replicates the \euro
and \EUR{}
commands for math mode, simply called \meuro
and \MEUR{}
, respectively.Code: Select all
\documentclass[10pt,mathserif]{beamer} %% mathserif is obsolete!!
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage{eurosym}
\newcommand{\meuro}{\text{\euro}}
\makeatletter
% Definition taken from eurosym.sty, provides \EUR equivalent for math mode
\newcommand\MEUR[1]{\if@EURleft\text{\euro}\,\fi#1\if@EURleft\else\,\text{\euro}\fi}
\makeatother
\begin{document}
\begin{frame}{}
$E_{\$/\meuro} = \MEUR{2000}$
\end{frame}
\end{document}
\texteuro
. With the right encoding you can also use € directly:Code: Select all
\documentclass[10pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern,textcomp}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{frame}{}
\texteuro\ $E_{\$/\text{\texteuro}}$
€ $E_{\$/\text{€}}$
\end{frame}
\end{document}
No advantage, just a personal preference.hugovdberg wrote:What is the advantage of the textcomp euro symbol over the eurosym (which claims to provide the official symbol)? It seems to me your solution is exactly the same as mine, except for the package used to get the euro symbol in the first place.
Just use unicode for every file and all is fine (well almost). On a more serious note: europeans like me who need to use letters like ä, ö, ü and ß on a regular basis have to take care about input encoding anyway, especially when working together with other people - why not set up all files with unicode in the first place? (Especially when unicode is needed for LualaTeX and XeLaTeX, anyway...)hugovdberg wrote:Also I'm not a big fan of trusting on the right encoding
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{
adieresis={ä},
germandbls={ß},
Euro={€}
}
\usepackage{lmodern,textcomp}
\begin{document}
€ ä ß
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.