-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Line breaks break LaTeX #14564
Comments
I found my problem, but it seems to highlight an actual issue with Gutenberg 🤔 I can get For example,
works fine, but
does not work because of the line break. I think line breaks should be allowed. They worked before with the old editor. Any chance that can be fixed? 🙏 |
Thanks for the issue. I think Latex is not a Gutenberg issue as it's WP.com feature or Jetpack. Might be better to open an issue in the Jetpack repository https://github.com/Automattic/jetpack/issues |
Hi @EricForgy , @youknowriad is correct that ultimately, the LaTeX feature is provided by either WordPress.com or Jetpack, and isn't directly a core Gutenberg issue. I noticed that the difference between the new and old editors is that Gutenberg will use an HTML linebreak As a workaround, you can also consider using the Preformatted block. In my testing, this supports multi-line LaTeX expressions formatted as you've demonstrated in your last comment. Edit: On further testing, I see that even in the Preformatted block, Enter will insert the HTML linebreak. But if you choose to "Edit as HTML" from the block toolbar More Options menu, you can insert normal line breaks and they will be respected. I'm curious whether the behavior of the Preformatted block shouldn't be changed to treat Enter as simply inserting a normal newline, rather than an HTML |
Hi @youknowriad and @aduth , Thank you for your comments. I think I understand what you are saying, but I do still think this is a Gutenberg issue because it is Gutenberg that is treating the line breaks incorrectly for multiline LaTeX equation, whereas the old editor handled them properly. The Preformatted block workaround would be fine if it were documented in the LaTeX support section and if it handled Any chance to keep this issue open? Edit: I just noticed the Preformatted block puts a thick grey border around the equations (theme "Nucleare"), which is not really ok. For now, I am sticking to just keeping all my equations as a long single line, but that is suboptimal 🤔 On the positive side, I recently switched from an ancient theme I had for close to 10 years and "Nucleare" renders math quite beautifully, so overall I am still very happy. I do hope this issue gets resolved though 🙏 |
@EricForgy One of the objectives of Gutenberg was to start moving away from WordPress' On a related note, I did some further investigation about the use of |
In addition to #13799, we could also save the preformatted value with normal line breaks (by replacing |
@EricForgy Did this ever work in the new editor? I'm not sure #13799 introduced this at all. |
Hi @ellatrix 👋 I'm not sure about anything 😅 It's been a while since I last wrote an article and the old editor was stll available back then. This is the first time for me to use the new editor with LaTeX and experiencing some pains. Maybe it never worked? If this is really a Jetpack problem, I can try to bug them, but if it could be fixed here, that would be great 🙏 |
Hi,
I am not a professional blogger, but I like to write an occasional article on mathematical research and I rely heavily on the LaTeX support described here:
https://en.support.wordpress.com/latex/
How can I get this to work with the new editor? 🙏
My old articles still display LaTeX fine, but I haven't figured out how to write a new article.
Thank you
PS:
Where are the support channels? 🙏Found them 👍Edit: Oh. I realize
works fine,
but I used to use
$latex
\displaystyle
E = mc^2$
I guess it is just "\displaystyle" that no longer works. How do I get "\displaystyle" to work or is there another way?
The text was updated successfully, but these errors were encountered: