LaTeX support has been moody and inferior for too long!

  • Unknown's avatar

    I have been writing math using WordPress’s LaTeX support for almost three years now. I was even featured last year on WordPress’s official blog [1] as an example of a neat blog that uses LaTeX.

    As much as I love WordPress (it’s the only blogging platform that has decent built-in support for LaTeX), it’s time to fix the bugs!

    WordPress’s bugs and awful “features” with LaTeX are well known by math bloggers. Luca Tevisan even got fed up enough with it to write a tool that converts LaTeX documents into HTML suitable for copying and pasting into the WordPress editor [2]. This is what the famous Terry Tao uses for his blog. I don’t use it, and I often punch myself for not doing so. But my decisions aside, this makes it extremely clear that the WordPress editor is so broken that people would rather type their articles offline! WordPress has said it values its plethora of scientific bloggers, so now it’s time to show it by revamping the editor to make LaTeX less of a hassle.

    Here are the main problems I regularly encounter, whether writing or reading math on WordPress.

    1. Buggy support for aligned equations. In particular, the & symbol, which is used in TeX to set the alignment point, is often converted to & by the WordPress editor, which appears to fail WordPress’s TeX compiler.
    2. Formulas that inexplicably don’t compile. I will have something as simple as $latex 100 = 2 cdot 50$ that will not compile, and I will literally type the same equation next to it. That new equation will compile fine, but the old one will not. This error happens spontaneously, even after the original equation correctly compiles and is viewed in Preview (and not modified at all). It seems that the editor is doing some weird broken form of cacheing behind the scenes that is aggravating to work around.
    3. Copying and pasting LaTeX formulas into the Text tab of the editor seems to sometimes produce working TeX and other times an error. I have not yet figured out how to distinguish between the two outcomes based on my behavior. Even worse is when you try to copy and paste in the Visual tab, and all kinds of random <span> tags pop up in the Text tab (rendering a non-compiling formula or one full of garbage).
    4. The default LaTeX color is not black. So to make it easier to read I would have to put &fg=000000 at the end of every single LaTeX tag.
    5. Many themes have a default border around every image, which makes inline LaTeX impossible to read.

    One overarching issue here is that the yellow error box for a failed formula prints no error message. I see no good reason for this if you’re careful to only print the relevant part of the LaTeX error message. Give us some hint about where to hunt down the LaTeX errors!

    Another theme is that switching back and forth between the Text and Visual tabs is really dangerous. But I am forced to do this to paste code snippets and remove spontaneously appearing span tags.

    One alternative is to run WordPress with MathJAX, which has identical syntax to LaTeX, and produces even equally beautifully typeset math. Indeed, MathJAX is the leading internet standard for math typesetting these days, so it’s about time WordPress got on board. Indeed, the current image-based typesetting required me to buy the CSS upgrade just to fix the poorly-chosen default offset that exists for almost every theme out there. [3]

    Finally, regardless of the solution chosen, there should be a place in the Dashboard settings that lets you control the LaTeX on your blog. Whether it’s fixing broken alignment for images or choosing your own text color, users deserve some way to differentiate LaTeX from other elements of the page.

    I hope you consider my suggestions seriously, and continue to make WordPress the best place for math bloggers on the internet.

    [1]: http://en.blog.wordpress.com/2013/08/30/latex-and-math-blogs/
    [2]: http://lucatrevisan.wordpress.com/latex-to-wordpress/
    [3]: https://en.forums.wordpress.com/topic/bug-report-twenty-eleven-latex-vertical-alignment?replies=3#post-1215691

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    And it appears the backticks don’t stop html character codes from translating. Let me try using

    In particular, the ampersand symbol &, which is used in TeX to set the alignment point, is often converted to & by the WordPress editor, which appears to fail WordPress’s TeX compiler.

  • Unknown's avatar

    I’ll tag this thread for a Staff response. Please subscribe to the thread so you are notified when they respond and please be patient while waiting.

  • Unknown's avatar

    The code tags also don’t appear to work. *sigh*. The ampersand is turned into the HTML character code: & amp ; (without spaces).

  • Unknown's avatar

    Another idea: have a button in the visual editor that opens a special place to type/paste pure latex (without having to type the dollar signs), and it will try to compile/preview the formula before inserting the code into the actual document (and, say, cache the generated image, if you’re keeping it the way it is now).

    That way you can use whatever practices you want, and you can handle the conversion from pure tex to your internal wordpress representation.

    Just another idea.

  • Unknown's avatar

    Thanks for the detailed feedback. Our developers have been discussing the state of the LaTeX software and the possibility of moving to MathJAX or another solution that incorporates javascript. I don’t have an ETA for this change, but I did want you to know that our developers appreciate the information and are considering your feedback within the broader discussion.

  • Unknown's avatar

    Thank you! It’s good to know the developers are listening.

  • Unknown's avatar

    You’re very welcome!

  • Unknown's avatar

    I am also looking for a blogging platform with LaTeX support and agree with Jeremy’s assessment. I’ve had a lot of trouble. I’ve been very happy using WordPress for other purposes.

    The themes “Annotatum Base” and “Annotatum Sans” appear to have improved LaTeX support by adding to the WordPress visual editor. But I haven’t switched to them because they don’t support static pages.

  • Unknown's avatar

    Thanks @greenspun. I don’t have an ETA for when we will resolve the LaTeX issue or switch to another service, as this is a complex issue. Our developers are definitely looking into it, so I appreciate your feedback as well.

  • The topic ‘LaTeX support has been moody and inferior for too long!’ is closed to new replies.