quiver icon indicating copy to clipboard operation
quiver copied to clipboard

Allow "sloped" arrow labels

Open hseg opened this issue 1 year ago • 1 comments

Especially for long vertical/diagonal arrow labels, it's often clearer than forcing horizontality (after all, the paper can be rotated -- the relative positions of arrows and labels after rendering can't). Cf https://tex.stackexchange.com/a/418250 for examples of the results. An example of a diagram I needed to typeset this way -- the following double limit

hseg avatar Jan 22 '24 23:01 hseg

Technically you can get around it by using "LaTeX injection" (like SQL injection for programs that does not sanitize user input properly)

Put the label as }",sloped,"{f_{(d',e')\to(d,e)}

Then the generated LaTeX code will be \arrow["{}",sloped,"{f_{(d',e')\to(d,e)}}"{description}, from=2-2, to=3-3]

The problems with this approach is obvious. Seriously though, it may be useful to have functionality to allow injecting user-defined LaTeX code for various purposes.

There is also https://github.com/KaTeX/KaTeX/issues/681 for manually rotate the labels. Not sure how feasible it is.

user202729 avatar May 03 '24 06:05 user202729