You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matplotlib2tikz does not correctly escape special or accented characters in plots. Specifically, including characters such as the percent sign (%) in labels or captions causes a Extra }, or forgotten \endgroup. \end{tikzpicture} error; on the other hand, including accented characters such as á, é, and the like causes an inpuntenc error Package inputenc Error: Unicode char ícu (U+E5)(inputenc) not set up for use with LaTeX. \end{axis}
This is a duplicate of #50, which as the time I marked as WONTFIX. The reason why I think it's difficult to avoid such errors is that LaTeX is quite complex when it comes to character transformations. One would need to write an equally complex piece of code that transforms UTF8 characters into LaTeX code, which is a humongous task, and most likely outside the scope of this project.
Eventually, the user has to make sure the characters come out right, so your plot title would have to be, e.g., 'what a nice bracket \{ \"o'.
Three advantages of this approach:
Less code.
Responsibilities are very clear.
The user has complete control; nothing will mess with the strings.
matplotlib2tikz does not correctly escape special or accented characters in plots. Specifically, including characters such as the percent sign (%) in labels or captions causes a
Extra }, or forgotten \endgroup. \end{tikzpicture}
error; on the other hand, including accented characters such as á, é, and the like causes an inpuntenc errorPackage inputenc Error: Unicode char ícu (U+E5)(inputenc) not set up for use with LaTeX. \end{axis}
(Not-so Minimal) Working Example:
Python code:
Generated output (note the labels and legends):
Expected (and working!) output:
The text was updated successfully, but these errors were encountered: