Menu ▾ ▴

#111 Make auto and sloped work together

Next Release
closed-fixed
nobody
None
5
2019-01-01
2018-02-20
Torbjorn
No

This comes from https://tex.stackexchange.com/questions/415863/how-to-convince-edge-labels-to-be-above-below-edge-when-they-are-slanted


An example:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{quotes}
\begin{document}
\begin{tikzpicture}[auto]
  \draw (0,0) to ["AA"] + (0,2);
  \draw (1,0) to ["BB" sloped]   + (0,2);
\end{tikzpicture}
\end{document}

Due to the auto option, the AA node is placed nicely next to the line, as the anchor is set to east (I guess). But this doesn't work well when sloped is in effect, as the node is rotated, so BB is placed on top of the line (see attached screenshot).

Would it be possible to implement some sort of check, so that if auto is active, the anchor is set to (for this particular case) south instead of east when sloped is used?

1 Attachments

Discussion

  • Stefan Pinnow

    Stefan Pinnow - 2018-12-31
    • status: open --> closed-fixed
     
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-31

    Thank you for the suggestion and providing a link for a patch which is incorporated now.

     
  • Henri Menke

    Henri Menke - 2019-01-01

    No, it is not the patch which is incorporated but my own solution.