# \tag mathjax spills to the right of main text body

I've known about this bug for a while. Weird that it still hasn't been fixed. If the \tag mathjax is not intended to be used, then why is it included as a valid command? I can't say.

Here it is: $$i \hbar \frac{\partial \Psi} {\partial t} = - \frac{\hbar^2}{2m}\nabla^2 \Psi + V(\mathbf x) \tag{This is an example of a tagged equation}$$

# Screenshots

### Desktop

Here the tag is cut off:

### Android "Stack Exchange" Application

I can scroll horizontally to view the whole thing:

### Mobile Website

I can scroll horizontally to the view the whole thing. Note that this is by the far the worst, with the entire equation off to the side of the screen.

• I've only used tags as labels for numbering equations. I don't know if they are designed to handle extended sentences. – robjohn Oct 19 '16 at 3:18
• @robjohn - I use them from time to time in this manner in $\LaTeX$ documents at least without issue. – Myridium Oct 19 '16 at 3:36
• I honestly don't understand what kind of a display would you expect to see with a bloated tag like that? Wouldn't a suitable aligned environment be better for this purpose in TeX also? – Jyrki Lahtonen Oct 19 '16 at 9:32
• @JyrkiLahtonen - At the least, I would expect the equation and tag to be centered. – Myridium Oct 19 '16 at 9:43
• Maybe not centered, but with the tag aligned to the right as I think it does with a short tag. I don't see any reason why it should break with a longer tag. Is there an alternative way to annotate equations easily? – Myridium Oct 19 '16 at 9:51
• I don't know why you expect MathJax to replicate faithfully everything that can be done in $\rm\LaTeX$. It's a handicapped system that is fundamentally built as a collection of hacks and workarounds. True, it works very well, but it's not a complete substitute for a fully formed web-math engine (sorry, I just read Peter Krautzberger's blog...), so it shouldn't surprise you that MathJax is literally rough around the edges, and using a long text as a tag will break something in the design. – Asaf Karagila Oct 19 '16 at 12:15
• Just put some space before the text and then write your text inside \text? Like so: $$1+1=2 \quad \text{(annotation)}$$ I don't really see why you'd want to use \tag for this as it's not a "tag" in any sense (i.e. some name for the equation that you can use to refer to it). – Najib Idrissi Oct 19 '16 at 12:51
• Or you can use an align environment, as Jyrki suggests: \begin{align} 1+1 & = 2 & \text{(fundamental theorem of arithmetic)} \\ 2 & = 1+1 & \text{(fundamental theorem of citemhtira)} \\ \implies 2 & = 2 & \text{(QED)} \end{align} – Najib Idrissi Oct 19 '16 at 12:59
• @NajibIdrissi - Thanks, that's useful. I don't understand why that right-aligns the text when the "&" character is on the left of the text. – Myridium Oct 19 '16 at 17:03
• It's for when you want to do something like this: \begin{align} 1+1 & = 2 & x & = w + t \\ 3 + 5 & = 18 & skdfjdsfk & = dfklsjdfklsjlksdfj \end{align} i.e. align multiple equations. – Najib Idrissi Oct 19 '16 at 17:33
• @NajibIdrissi - I think I see it now, thank you! – Myridium Oct 19 '16 at 17:35
• While I agree that \tag is probably not used correctly, I can see use cases for automatic line-breaks within equation labels; I've opened github.com/mathjax/MathJax/issues/1647. – Peter Krautzberger Oct 24 '16 at 8:00

• I wasn't aware that there was semantic convention with $\LaTeX$... I have always used whatever gives the desired visual output, basically. Are these conventions set up specifically for people with vision impairment? Where can I find more information on this? – Myridium Oct 25 '16 at 9:45