4

When using \underleftarrow on an equation sloped on an edge, the arrow does not look straight. Here is an example:

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}

\begin{document}
  \begin{tikzpicture}
    \node (a) at (0,0)  {a};
    \node (b) at (2, 8) {b};
    \draw (a) to node[above,sloped]
    {\(\underleftarrow{xxxxxxxxxxxxxxxxxxxxxxxxxxx}\)} (b);
  \end{tikzpicture}
\end{document}

Screenshot:

screenshot

How can I fix it?

  • 6
    When I zoom into a pdf that was generated from your source, they become straighter and straighter. I suspect this is just caused by aliasing. You sometimes also see it with compound mathematical delimiters: on the screen you can see the joins but when you print them you can't. – user10274 Feb 22 '17 at 4:22
  • 3
    You should be aware that \underleftarrow is produced by connecting a number of dashes; when rotation is involved, these small parts can appear as forming a jagged line, but this is due to the PDF viewer trying to snap to the raster (remember the screen has a much lower resolution than a printer). – egreg Feb 22 '17 at 9:48
4

If you want to solve this problem once and for all, it is not hard to switch to TikZ's own arrows

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}
  \begin{tikzpicture}
    \node (a) at (0,0)  {a};
    \node (b) at (2, 8) {b};
    \draw (a) to node(c)[above=10,sloped]{$xxxxxxxxxxxxxxxxxxxxxxxxxxx$}(b);
    \draw[->](c.south east)--(c.south west);
  \end{tikzpicture}
\end{document}

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.