Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "sloped" arrow labels #206

Open
hseg opened this issue Jan 22, 2024 · 1 comment
Open

Allow "sloped" arrow labels #206

hseg opened this issue Jan 22, 2024 · 1 comment
Labels
diagrams lacklustre diagram features or options feature-request new feature

Comments

@hseg
Copy link

hseg commented Jan 22, 2024

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

@varkor varkor added feature-request new feature diagrams lacklustre diagram features or options labels Jan 23, 2024
@user202729
Copy link

user202729 commented May 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagrams lacklustre diagram features or options feature-request new feature
Projects
None yet
Development

No branches or pull requests

3 participants