2
$\begingroup$

Problem: I can't write matrices and newlines with MathJax in $\LaTeX$ in the Tag Editor.

I've noticed on several SE pages that I can't write line breaks in MathJax. On some pages, an x is written instead of a \\. (see also Bug: Writing multi-line formulas does not work in the "learn more" editor)

E.G.

$$
\begin{align*}
r &= \left| z \right| = \sqrt{x^{2} + y^{2}}\\
\varphi &= \operatorname{arctan2}\left( y,\, x \right) = \arg\left( z \right)\\
x &= r \cdot \cos\left( \varphi \right)\\
y &= r \cdot \sin\left( \varphi \right)
\end{align*}
$$

looks like this:

enter image description here

Here on Math.SE just a line spacing is inserted. Of course you can simply start a new alignment for each line break, but that doesn't work for vectors, matrices, ..., which makes writing wikis for tags that only consist of them (e.g. ) quite difficult.

E.G.

$$
q' = \begin{bmatrix}
1 & x & y\\
0 & 1 & z\\
0 & 0 & 1\\
\end{bmatrix}
$$

looks like

enter image description here

(Note: This code works outside of the tag editor (for me))


You need to remove the dollar signs before and after. The matrix and align environments don't need dollar signs. – Paramanand Singh

Even when I write it like this it doesn't work:

enter image description here

Also, I actually always use align and it always works except in tag editor...


My Browser is Crome: Version $113.0.5672.127$ (Official Build) ($64$-Bit)

My divise is: A Laptop with:

Edition: Windows $140$ Pro

Version: $21$H$2$

Buiild: $19044.2965$

Power: Windows Feature Experience Pack $1000.19041.1000.0$

$\endgroup$
9
  • 2
    $\begingroup$ You need to remove the dollar signs before and after. The matrix and align environments don't need dollar signs. $\endgroup$
    – Paramanand Singh Mod
    Jun 5, 2023 at 3:18
  • 1
    $\begingroup$ By "tag editor" you mean editing tag-infos, right? Maybe the tags (tag-wikis) and/or (mathjax) would be suitable here. $\endgroup$ Jun 5, 2023 at 6:18
  • $\begingroup$ It seems that there are tag-infos containing things such as pmatrix or align. When I checked some of them, they seem to be displayed correctly - for example, matrix-equations or hausdorff-distance. $\endgroup$ Jun 5, 2023 at 6:19
  • $\begingroup$ Did you try to submit such an edit? It is possible that only the preview is faulty - I do not know whether the bug report here was actually corrected at some point: MathJax bug in tag wiki edit. $\endgroup$ Jun 5, 2023 at 6:22
  • $\begingroup$ @ParamanandSingh - Does that in fact fix it? I've learned that the dollar signs are unnecessary with begin/end, but I used both (for "align") for the longest time, and it worked. $\endgroup$
    – JonathanZ
    Jun 5, 2023 at 12:44
  • $\begingroup$ @MartinSleziak Yes. I mean editing tag-infos. I didn't try to submit this. $\endgroup$ Jun 5, 2023 at 14:40
  • $\begingroup$ @ParamanandSingh Thanks for the tip, but even when I write it like this it doesn't work: see here $\endgroup$ Jun 5, 2023 at 14:44
  • 2
    $\begingroup$ @KevinDietrich Do you have example of a text that you wanted to add to some specific tag wiki? Somebody with full editing rights might then try to edit that wiki to see what the final result looks like. (But as I said above, I suspect the issue is only with the preview.) $\endgroup$ Jun 5, 2023 at 14:45
  • $\begingroup$ Interestingly, when I try the same thing, the preview looks differently: i.stack.imgur.com/D0Rsb.png (I did not submit the edit, since I do not have the full text of the wiki for that tag.) $\endgroup$ Jun 5, 2023 at 14:57

0

You must log in to answer this question.

Browse other questions tagged .