The unicode symbol € does work, if you use a modern font that contains that symbol. :-)
The best practice is to use right symbol for right font. For Computer Modern fonts, eurosym
is OK, or textcomp
(using fonts provided by CM-super). See this FAQ for more packages:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=euro
I suggest Latin Modern fonts (using lmodern
together with textcomp
package), which is similar to Computer Modern. So you can use:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern,textcomp}
\begin{document}
€100
\end{document}
There are still some other font packages with euro symbol. If you use such font themes, use the euro symbol provided by the font package. For example, libertine
, fourier
and mathdesign
package. Thus you can also use:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{libertine} % or \usepackage{fourier} or \usepackage[utopia]{mathdesign}
\begin{document}
€100 % or \texteuro100
\end{document}
Using XeLaTeX, most modern OpenType/TrueType fonts have euro symbols, including default Latin Modern fonts. You can use them directly:
% xelatex
\documentclass{article}
\usepackage{fontspec}% Latin Modern by default
% or \setmainfont{Whatever you want}
\begin{document}
€100
\end{document}
graphicx
allows for resizing things through \resizebox{<width>}{<height>}{<stuff>}
. Here's what you could do:
\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\makeatletter
\newcommand{\shorteq}{%
\settowidth{\@tempdima}{-}% Width of hyphen
\resizebox{\@tempdima}{\height}{=}%
}
\makeatother
\begin{document}
Here is a~-~hyphen, here is a~\shorteq~sign.\par
Here is a~-~hyphen, here is a~=~sign.
\end{document}
The above MWE provides \shorteq
that squishes a =
into the width of -
of the prevailing font.
textcomp
also provides \textdblhyphen
which is similar, but different:
\documentclass{article}
\usepackage{textcomp}% http://ctan.org/pkg/textcomp
\begin{document}
Here is a~-~hyphen, here is a~\textdblhyphen~sign.\par
Here is a~-~hyphen, here is a~=~sign.
\end{document}
Best Answer
Similar questions
It is, my apologies, very difficult to get a symbol from
MnSymbol
. In the old questions,Discard symbols from package (
MnSymbol
)The standard \cup vs. the mathabx \cup (
mathabx
)Importing a Single Symbol From a Different Font (
mathabx
)some similar technique is used to get a symbol from a package — In fact we just redefine the symbol like the font package do.
About MnSymbol
However, in
MnSymbol
we must define a more things than other packages, as Ulrike Fischer do in her answer. I'll provide another very similar example from another site:Before reading the explanations below, you'd better have a look at
fntguide
document.Assuming you want
\rightlsquigarrow
fromMnSymbol
, you must check the source codeMnSymbol.sty
, then we haveIt's awful! We still do not know which the symbol is. In fact
\Decl@Mn@Char
is just\DeclareMathSymbol
which increase the character number automatically.\rightlsquigarrow
is the 160th symbol, thus char code is 160. Or you can usefonttable
package to find the code of the glyph. That's to say,\rightlsquigarrow
is\mathrel
here means that the symbol is a math binary relation symbol. Other symbols may be\mathord
(odinary symbol),\mathop
(operator),\mathbin
(binary operation),\mathopen
(open delimiter),\mathclose
(close delimiter), etc. You can readfntguide
for more details of these commands.But before that, you must define
MnSyA
math family first. Then copy this fromMnSymbol.sty
:For most math font packages, that's enough. But for
MnSymbol
, the font familyMnSymbolA
is also defined inMnSymbol.sty
, we must copy it to the documents.Now, if we don't know
\rightlsquigarrow
is actually the 160th symbol, we can use a small test file to check the glyph table:After all of this, you know exactly what
\rightlsquigarrow
is, and you can use it as this: