17

$‎\leadsto‎$ cause

enter image description here

How one can write this from right to left?

  • 3
    What about \rotatebox{180}{$\leadsto$}? Needs the graphicx package – user31729 Aug 28 '17 at 11:24
  • 3
    \reflectbox{$\leadsto$}, for it appears at the same vertical position as $\leadsto$. – AlexG Aug 28 '17 at 11:37
  • @AlexG - Rotation and reflection will produce similar, but not exactly identical, outcomes. – Mico Aug 28 '17 at 11:51
  • The comparison between original and reversed is what counts ;) – AlexG Aug 28 '17 at 11:56
14

(Remark: Please be sure to check out Heiko's extended/improved solution as well.)

Here's a solution that builds on and refines Christian Hupfer's suggestion. The two new macros -- called \flowsfroma and \flowsfromb in the following code -- produce very similar, but not identical, left-pointing squigglies: The first macro performs a rotation of 180 degrees; the second performs a reflection around a centered vertical axis.

enter image description here

\documentclass{article}
\usepackage{amssymb}  % for "\leadsto" macro
\usepackage{graphicx} % for "\rotatebox" and "\reflectbox" macros
\newcommand\flowsfroma{\mathrel{\vcenter{\hbox{\rotatebox{180}{$\leadsto$}}}}}
\newcommand\flowsfromb{\mathrel{\reflectbox{$\leadsto$}}}

\begin{document}
$u \leadsto v$

$v \flowsfroma u$

$v \flowsfromb u$
\end{document}
  • 1
    \reflectbox{...} is shorter than \vcenter{\hbox{{% \rotatebox[origin=center]{180}{$\leadsto$}}}} – AlexG Aug 28 '17 at 11:39
  • @AlexG - Thanks. There's actually a slight difference. I'll update my answer to show both possibilities... :-) – Mico Aug 28 '17 at 11:46
  • 4
    The \rotatebox-based version puts it on a different vertical position than the original. So I would prefer/recommend the \reflectbox-based version. – AlexG Aug 28 '17 at 11:54
  • \rotatebox[]{...}{...}, \rotatebox[origin]{...}{...}, and \rotatebox[origin=c]{...}{...} are using the center of the box as origin, but \rotatebox[origin=center]{...}{...} is the same as \rotatebox[origin=tr]{...}{...} and differs from origin=c. – Heiko Oberdiek Aug 28 '17 at 16:45
  • 1
    @Mico The result of \vcenter{\rotatebox..} is vertically misplaced, because the symbol is higher than the baseline and is not vertically centered in its glyph bounding box. Therefore, the origin should be placed on the math axis and \vcenter is not needed. See my answer that provides an implementation. – Heiko Oberdiek Aug 28 '17 at 19:27
12

Your symbol looks similar to the one of stix package, hence you could use \leftsquigarrow:

\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{stix}
\begin{document}
\[
\leadsto \quad \leftsquigarrow
\]
\end{document}

enter image description here

Otherwise, look at The Comprehensive LATEX Symbol List.

8

Extended version to Mico's solution:

  • Math style is respected.
  • \mathsurround is set to zero (\m@th) to avoid additional horizontal space if \mathsurround is not zero.
  • \leadsto is a symbol, whose horizontal line segment (or the arrow) lies on the math axis. Therefore, the rotation origin is put on the math axis to avoid a vertical displacement of the symbol.

Full example:

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}

\makeatletter
\newcommand*{\flowsfroma}{%
  \mathrel{\mathpalette\math@point@reflection\leadsto}%
}
% Point reflection at point (width/2, math axis).
% Package graphicx is required.
\newcommand*{\math@point@reflection}[2]{%
  % #1: math style
  % #2: math symbol
  \begingroup
    % Height of box 0 is math axis
    \setbox0=\hbox{$#1\vcenter{}$}%
    \rotatebox[y=\ht0]{180}{$#1#2\m@th$}%
  \endgroup
}

\newcommand*{\flowsfromb}{%
  \mathrel{\mathpalette\math@reflect@box\leadsto}%
}
% Reflection at the y-axis.
% Package graphics is required.
\newcommand*{\math@reflect@box}[2]{%
  % #1: math style
  % #2: math symbol
  \reflectbox{$#1#2\m@th$}%
}
\makeatother

% Test part
\usepackage{xcolor}
\newcommand*{\TestAux}[2][\textstyle]{%
  \sbox0{$#1u#2v$}%
  \leavevmode
  \rlap{\textcolor{green!50!white}{%
    $#1\vcenter{\hrule height .05pt depth .05pt width\wd0}$%
  }}%
  \copy0 %
}
\newcommand*{\Test}[1]{%
  \TestAux[\textstyle]{#1} %
  \TestAux[\scriptstyle]{#1} %
  \TestAux[\scriptscriptstyle]{#1}\par
}

\begin{document}
\Test\leadsto
\Test\flowsfroma
\Test\flowsfromb
\end{document}

The thin light green lines mark the math axis.

Result

6

If you prefer the “old” symbol:

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

\DeclareFontFamily{U}{lasy}{}
\DeclareFontShape{U}{lasy}{m}{n}{
  <-5.5> lasy5
  <5.5-6.5> lasy6
  <6.5-7.5> lasy7
  <7.5-8.5> lasy8
  <8.5-9.5> lasy9
  <9.5-> lasy10
}{}
\DeclareRobustCommand{\Leadsto}{%
  \mathrel{\text{\usefont{U}{lasy}{m}{n}\symbol{"3B}}}%
}
\DeclareRobustCommand{\rLeadsto}{%
  \mathrel{\text{\reflectbox{\usefont{U}{lasy}{m}{n}\symbol{"3B}}}}%
}

\begin{document}

$A\Leadsto B\rLeadsto C$

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.