Need help? Check out our Support site, then

## LaTeX rendering of sum macro is ugly, awful and brain dead.

1. It seems LaTeX support in WordPress.com just went from bad to worse (I'm guessing there was a recent upgrade to the .com site that related to LaTeX?) By bad I mean the continued use in 2013 of .png files to display math equations, when browsers all contain LaTeX rendering engines, and worse, that you don't expand the sum macro correctly. The summation parameters should be above and below the sigma bars, not at their ends. I can swear that when I wrote and published a recent post containing two such equations they rendered correctly, but as of today, they don't. Please see:

Why don't you scrap that JetPack LaTeX strategy that renders .png and switch to MathJax? That one decision would greatly improve the appearance of LaTeX equations and solve a whole range of typesetting alignment and size problems. My .org sandbox in MAMP that uses MathJax, not JetPack, renders LaTeX expressions beautifully, but if your going to continue to render .png image files, then at least do it right and make them more readable. It's 2013 guys, so it's time to step up and make a better design. You can easily query the server to discover the user's browser and make a decision whether that particular browser contains a LaTeX rendering engine. Send a .png only if they don't. Most will, since most users keep their browsers fairly current. The need for .png LaTeX files is mostly history.

So, am I right, that you guys tweaked the LaTeX rendering engine in .com so that sum is now ugly and awful? I can send screen shots of both my .com and .org instances and the LaTeX code I use but that url I included contains both. When do you intend to fix this? I hear a .org thomasdocheri.com calling me.

Regards,
Thomas

The blog I need help with is thomasdocheri.com.

2. Okay, thanks for the conspicuous lack of help. I figured it out for myself, but you guys did change your LaTeX .png server.

If you want the summation index and summation range with the parameters below and above the sigma bars you must now write:

\sum\limits_{i=0}^{n}

If you wanted them at the ends of the bars, not incorrect but definitely atypical, you would write:

\sum\nolimits_{i=0}^{n}

unless someone thought he knew better what you really wanted.

Heretofore the default was \limits but you did not have to express it explicitly. I believe you changed the amsmath package default to nosumlimits in your .png server. It would have been nice to tell us what you are up to. I discovered it by revisiting a post I believed was rendered in my preferred math style, only to discover, not to my liking, it was changed.

Ever hear of the principle of least astonishment?

Thomas

3. Hello there,
Presumably you are nattering at Staff however this is a peer support forum. I guess you didn't know that or how to contact Staff directly so here's the link http://en.support.wordpress.com/contact/

4. Obviously I did not know there are two forums, one for staff and one for ordinary users. I guess my peers don't know much about LaTeX or someone might have answered. Shouldn't Staff (note the uppercase) be monitoring this one to see what issues are causing pain or annoyance? I guess nattering is worse sin than changing the behavior without telling anyone? I am a premium member so I think that gives me the right to natter.

5. There are no premium users here. There are only those who like myself have purchased upgrades for our blogs. As we have purchased upgrades we can file private support tickets. I guessed you didn't know that and that's why I posted the link above.

6. A premium user is anyone that purchased an upgrade. Are we going to have a semantic war or are we going to discuss LaTeX? That was what my original question was all about... LaTeX rendering of math equations. Yes, you're right, I did not know buying an upgrade gave me the right to file a private support ticket. It gets more elitist all the time. WordPress is supposed to be open source. Did you know there is an open source philosophy? That means things are transparent, not private after a \$ upgrade.

7. Hello There,

Thanks for the feedback, we are always working to improve our product. I'll pass your suggestions along to our development team. You may also want to suggest your idea to our Ideas Forum.

The WordPress software is open source. The difference between public and private support applies to WordPress.com as a service, not the WordPress software in general.

I hope this helps and let me know if you have any other questions.

8. Wow, Staff,

So, someone on staff actually reads these threads. From the rebuke I caught from timethief I thought I must have committed some horrible crime posting to this forum. I drilled into everything I could find looking for a heads up re recent changes you guys may have made to your LaTeX support and when I found zilch, I posted. And yes, I did make a suggestion, that you scrap WP LaTeX in Jetpack and switch to Mathjax-LaTeX. Man, that change is so obvious it almost goes without saying.

But that isn't what this post was about. Neither timethief nor you answered my question. I wanted to know whether you changed the default configuration of your LaTeX .png service without an announcement. I don't like to discover such changes by seeing my equations changed after a post. So, I'm wondering what other LaTeX issues are going to surprise me and the lady I'm helping develop math course ware using WordPress? If you changed the default configuration, a simple message warning .com bloggers to inspect any posts and pages using LaTeX would have been in order. So, as a service that uses open source but seems not to appreciate the spirit of open source, as a service that touts its customer service, you should have notified us. I think I just decided to encourage my math teaching friend to stick with the .org version.

BTW: Eric Raymond's The Cathedral & The Bazaar is the bible on what makes the open source world go around. Of course, since it was first published in 1999, you and the rest of staff may be too young to have read it.

I'm not motivated to go through all this again in another forum. Once is more than enough.

9. Hello docheri,

I wanted to let you know that I am personally looking into why we are currently not using MathJax and will get back to you as soon as possible. Thank you again for your feedback and patiences.

10. Hey bdukes,

It's great to have an internal advocate. The devs are more likely to listen to you than me. Let me give you some ammo.

Please read this and note the comment from mathjax, one of the Mathjax dev team. You could probably get the Mathjax team to do most of the work and it's mostly done since there is a Mathjax Latex plugin for WP.org.

Mathjax team wants to port Mathjax to Jetpack

If devs do commit to switching to Mathjax, ask them not to forget LaTeX macros. Macros are very important to LaTeX users and it should be relatively easy to add them to the existing Mathjax config page in WP.org. The settings page should permit the end user to define an optional array of LaTeX macros to be stored in MySQL. Here is how I configure my Mathjax when I write HTML:

<p>

<head>
<title>LateX examples</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {
inlineMath: [['$','$'], ['\$','\$']],
processEnvironments: true
}
});
MathJax.Hub.Config({TeX: {
Macros: {
fi:    "{f\\,\\!_i}",        <!-- static f sub i, spread: \fi -->
SS:    ["{#1\\:\\!_#2}",2],  <!-- 2-parms, variable and subscript, spread: \SS{f}{i} -->
SUBx:  ["{\\:\\!_#1}",1],    <!-- Spread variable and its subscript: \SUBx{i} -->
EXPx:  ["{\\;\\!^#1}",1],    <!-- Spread variable and its exponent: \EXPx{2} -->

Ss:    ["{#1\\,\\!_#2}",2],  <!--Same as SS, less spread: \Ss{f}{i} -->
subx:  ["{\\,\\!_#1}",1]     <!--Same as SUBx, less spread: \subx{i} -->
}
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

</p>

Notice the six macros. LaTeX and TeX typesetting are awesome but they can occasionally use some help. Macros turn LaTeX markup into a programming language. Several of mine accept passed arguments. Most of this is HTML boiler plate except the parameters that select the output symbol package and of course, the macros. These few variables, including the macros' array, if defined, can be called with bloginfo().

Now just so you know and can tell the devs (they probably know this but I'll say in anyway), even if you guys don't explicitly support user-written macros in WP config, the savvy LaTeX writer can place the following <div> at the very top of his post or page. It is the alternative TeX way to define macros, in this case, the same as those I listed above. Once defined, they are available anywhere thereafter in the page, including comments and replies. This is what makes WP.org with Mathjax such a superb platform for math course-ware.

<p>

<div style="display:none">
</div>
</p>

Also, I wouldn't completely abandon the PNG generation approach. I'd make a call into the server for the user browser info and send PNG if the browser does not support its own LaTeX rendering engine. Man, if you did all this WP would own the LaTeX math course-ware space. LaTeX is the only way to get portable math typesetting and Mathjax is the superior implementation. The user's responsibility would then be trivial; installing the STIX fonts but even these are nice to have but not absolutely required. A math instructor can advice her students to do this at the start of classes. Man how I wish this technology had been available when I was an undergrad minoring in math.

Good luck with the devs.
Thomas

11. Hello Thomas,

I just heard back for our developers, I think you will be happy with the results. Our developers have confirmed that WordPress.com will be switching to MathJax at some point. However, I'm not able to provide you with an ETA or more details at the moment.

Thank you so much for your input, it's passionate users like you that make WordPress great :)