I want to use arrows to talk about edges in graphs. For example I write $\to \to$ to represent two adjacent directed edges.

An undirected edge followed by a directed edge would be represented by something like $- \to$, but this looks bad, because the line $-$ is shorter than $\to$.

How do you make $-$ longer? Line drawing commands like rule or \tikz\draw do not look right, because they make a rectangle with sharp corners unlike the rounded corners of \to. (or perhaps making $\to$ shorter is the better way?)


Here's a solution:




     \[ \begin{array}{l}
     A - B \\A \rightarrow B \\
     A \mathdash B\\
     \end{array} \]%


enter image description here

|improve this answer|||||
  • Not perfect. How do you prevent the line breaking algorithm from splitting this symbol into two symbols when the box is too small? \parbox{1em}{$\mathdash$} – BeniBela Jun 8 '18 at 22:16

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.