[Tex/LaTex] Short equals sign

fontssymbols

I don't know much about font encodings in LaTeX, and I'm not running Xe(La)TeX. Does anyone know where I could find a shorter (as in: not as wide) equals sign? I use it in text, not in math, and it would be nice if it were as long as the hyphen symbol. I generally just use the standard Computer Modern fonts, but if the answer is to switch fonts or move to XeLaTex, I'd consider doing so.

Best Answer

graphicx allows for resizing things through \resizebox{<width>}{<height>}{<stuff>}. Here's what you could do:

enter image description here

\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:

enter image description here

\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}
Related Question