-
Notifications
You must be signed in to change notification settings - Fork 46
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
dot2tex "eats" escaped backslashes from labels in raw mode #106
Comments
I am trying to understand the code behind this to debug it, especially the parse_drawstring and the do_drawstring functions, but i am a bit lost and not understanding everything. I'd like to submit a fix for this but any educated guess on where to look and/or what to investigate would help me here |
I'm sorry, but I have not touched this project for years and I must admit that I hardly remember how the code works. If you find a fix I'll be happy to merge it in. |
Just ran into this as well. The issue only happens for edge labels, node labels are properly inserted raw. :edit: seems to happen in math mode as well. There's a fundamental issue with latex inside of edge labels. |
Did some investigation and I've found the cause of both problems (eating backslashes and duplicate labels).
I'm not making a PR yet because I'm not sure what the best approach is here. For now, my fork simply removes the bit about taking what's stored in the |
With the input dot file:
compiled with
dot2tex --texmode raw --format tikz test.dot
the tikz draw command for the label is
\draw (176.04bp,62.625bp) node {Test raw latex output textit{italic text}};
while the expected result according to the documentation is
I've tried to escape 1, 2, 3, 4 times the backslash but it still produce result without any backslalshes.
Surprisingly, when adding
--tikzedgenodes
option, the backslashes are escaped correctly.The text was updated successfully, but these errors were encountered: