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 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.

share|improve this question
    
If there is not an existing symbol you can use \scalebox or \resizebox from the graphicx package. –  Peter Grill May 26 '12 at 2:23
    
Related Question: Is there a wider equal sign?. –  Peter Grill May 26 '12 at 4:03

3 Answers 3

up vote 15 down vote accepted

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}
share|improve this answer
    
Thank you! I like this answer because I can define the width of the equals as a multiple of the width of the hyphen. Looks great. –  Natalie May 26 '12 at 15:20

You can define your symbol using two rules:

\documentclass{article}

\newcommand\textequal{%
 \rule[.4ex]{4pt}{0.4pt}\llap{\rule[.7ex]{4pt}{0.4pt}}}

\begin{document}

text~\textequal~text

\end{document}

enter image description here

share|improve this answer

If You have access to Unicode fonts you could also try U+FE66 (﹦) SMALL EQUALS SIGN compare (=|﹦) (In the fonts used by my browser in this web site SMALL EQUALS looks bigger than EQUALS, but mathematical typography isn't the strongest point about stackexchange:-)

share|improve this answer

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.