-
Notifications
You must be signed in to change notification settings - Fork 10
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
\newline support #11
Comments
I also frequently have the same need of line breaks. |
I think this feature is related to the line break( http://r.789695.n4.nabble.com/newline-in-plotmath-expressions-td795815.html we know directly using https://stackoverflow.com/questions/29112697/adding-a-newline-in-a-substitute-expression |
Here is a workaround to get Use
And then paste everything enclosed in
If there were an option for Is there a way to return |
I have used a workaround of using |
also would like to see TeX support new lines and have the option to return text instead of an expression here's a workaround using glue and plotmath
but what if I wanted 3 or more lines of code? - yuck... I see there is an output argument in TeX, but it currently doesn't seem to do anything
|
A somewhat easier/straightforward variation on @kmiddleton 's workaround is to use |
Thank you! This work around works for me, is there a good workaround if I need 2 linebreaks (three lines)? |
I'm glad it was helpful. I've never had to use 3 lines, but perhaps it is possible to string together oversets? |
Try |
In addition to that, if you need to do more than two lines (or one of the lines contains a "tall" command, e.g. plot(TeX(r"(\overset{\normalsize{First line: $\int_a^b x dx$}}{\overset{\normalsize{Second line: $\prod_{i=1}^\infty A_i$}}{\normalsize{Third line: x}}$})")) A future version of latex2exp will do this automatically when it detects line breaks, but for now, it should work fine. |
I wish some things were simpler. Here's a function that splits an arbitrary number of lines, including 1.
Needless to say, Hopefully the actual solution our fearless leaders introduce will respect hjust while it adds lines... |
|
Thanks for the great package it has helped me immensely. One thing I quite haven’t figured out is how to add a \newline or \n in a plot. I frequently have long facet labels and/or legend labels that need both line breaks and superscripting. I noticed in issue #8 and #10 it is suggested to use \n to break the line but this does not appear to actually work as suggested.
The text was updated successfully, but these errors were encountered: