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'm looking for a good implication symbol. I understood I was supposed to use \to, but it's longer than \land and \lor and it kinda bugs me. Is it possible to type an arrow of the exact same length?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Looking at the "Comprehensive LaTeX Symbols List" (texdoc symbols will give it to you, or go to google), I see at least two possibilities: the stmaryrd package provides \shortarrow, and the MnSymbol package redefines \rightarrow to be shorter. The second one, in particular, provides a ton of new math symbols, no doubt overwriting everything already in existence, so you may want to be wary.

share|improve this answer
    
Well, I'm using MnSymbol anyway (I have to use a different symbol which the package provides), yet the arrow still isn't short enough... Bummer. Thanks for the help! –  Logician Dec 25 '11 at 1:26
    
@Logician: there is another answer on this topic: tex.stackexchange.com/a/14388/575. To say the least, it is intimidating, but describes the analogous process of importing one symbol from mathabx. In this way, you can get \shortarrow without using stmaryrd entirely. –  Ryan Reich Dec 25 '11 at 1:39
    
@Logician: actually, the second answer (tex.stackexchange.com/a/14406/575, by egreg) is fairly comprehensible to me and, I think, requires changing only the last line of code. One (you or I) will have to look through the source for stmaryrd to figure out what particular character code the \shortarrow symbol has in that font. –  Ryan Reich Dec 25 '11 at 1:46
    
I'll have a look. Thanks! –  Logician Dec 25 '11 at 2:10
add comment

there is a "short" double up-arrow in the cm extension font that can be rotated for this purpose:

\documentclass{article}
\usepackage{graphicx}
\newcommand{\implyarrow}{%
  \mathrel{\raisebox{1.3ex}{\rotatebox[origin=c]{90}{\mathhexbox37F}}}}
\begin{document}
$a \implyarrow b \Rightarrow c$\\
$a \land b$
\end{document}

yielding

example of short up-arrow rotated to point to the right

share|improve this answer
1  
It's possible for the symbol to have the correct size in scriptstyle and scriptscriptstyle by adding a \text around the boxes: \newcommand{\implyarrow}{\mathrel{\text{\raisebox{1.3ex}{\rotatebox[origin=c]{9‌​0}{\mathhexbox37F}}}}} –  Philippe Goutet Jan 13 '12 at 22:10
    
@Philippe -- great observation. i thought that would probably be the case, but didn't have time to test it. –  barbara beeton Jan 13 '12 at 22:22
add comment

I think what you are looking for is \implies. This is longer than the width of the standard to, but you can use \scalebox from the graphicx package to re-size this to be the same width:

enter image description here

Alternatively, you can also scale the \to to be the width of the \land:

enter image description here

Note:

  • To make the \ScaledImplies have the same size and spacing as the \to, I scaled \Longrightarrow (which is what the \implies symbol from the amsmath package is based on with some additional spacing).

Further Enhancements:

  • I used the pgf package for the math calculations. There is most likely a way to do the same computation without this package so this code could be optimized to not require the pgf package.

Code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{pgf}

\makeatletter
\newdimen\@widthOfTo%
\newdimen\@widthOfLand%
\newdimen\@widthOfImplies%
\settowidth{\@widthOfTo}{$\to$}%
\settowidth{\@widthOfLand}{$\land$}%
\settowidth{\@widthOfImplies}{$\Longrightarrow$}%
\pgfmathsetmacro{\@scaleFactorImplies}{\@widthOfTo/\@widthOfImplies}%
\pgfmathsetmacro{\@scaleFactorTo}{\@widthOfLand/\@widthOfTo}%
\newcommand*{\ScaledImplies}{\mathrel{\raisebox{0.3ex}{\scalebox{\@scaleFactorImplies}{\ensuremath{\Longrightarrow}}}}}%
\newcommand*{\ScaledTo}{\mathbin{\raisebox{0.3ex}{\scalebox{\@scaleFactorTo}{\ensuremath{\to}}}}}%
\makeatother

\begin{document}
  $a \to b$\par
  $a \ScaledImplies b$\par
  $a \implies b$\par

  \bigskip
  $a \land b$\par
  $a \ScaledTo b$\par
  $a \to b$\par
\end{document}
share|improve this answer
    
I'm afraid I must insist on the thinner version ... Thank you anyway! –  Logician Dec 25 '11 at 2:11
    
@Logician: Updated to provide a scaling of the \to to be the same width as the \land. –  Peter Grill Dec 25 '11 at 2:26
add comment

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.