2
$\begingroup$

See end of this bug report for the true cause of the problem. It is the Editor that corrupts the initial post, but does not seem to affect subsequent edits. There are a few bug reports about the Editor and MathJax interacting incorrectly, this is a different one.


Initial draft:

On the Operations Research site our MathJax FAQ renders newcommand defined \$\xrightarrow\$ (→) incorrectly compared to other sites with MathJax enabled.

Notice "Example 1" does not render correctly but "Example 2" is correct.


Update:

This is what caused the MathJax to be displayed incorrectly, it's not a "MathJax error" but instead an "Editor error".

Copy pasting MathJax from another site and subsequently editing the first draft caused the editor to go inside the MathJax delimiters and alter numbers within the square brackets.

The editor should not go within \$$ or \$ delimiter pairs and alter numbers within square brackets when editing other sections of the post to add or remove links (which causes subsequent numbers within square brackets to be incremented, that must not occur within delimiters).

$\endgroup$
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it can no longer be reproduced. $\endgroup$ – double-beep May 31 at 14:25
  • $\begingroup$ @double-beep Vote as you wish but your comment is incorrect, this was what occurred only a few hours ago. $\endgroup$ – Rob May 31 at 14:32
3
$\begingroup$

It is not missing a module. Actually, the $\LaTeX$ code in markdown is not the same as that used in the MathJax! It is a typographic error.


Below is the code in markdown. $\checkmark$

$$ 
\newcommand{\ra}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} 
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} 
% 
\begin{array}{llllllllllll} 0 & \ra{f_1} & A & \ra{f_2} & B & \ra{f_3} & C & \ra{f_4} & D & \ra{f_5} & 0 \\ 
\da{g_1} & & \da{g_2} & & \da{g_3} & & \da{g_4} & & \da{g_5} & & \da{g_6} \\ 
0 & \ra{h_1} & 0 & \ra{h_2} & E & \ra{h_3} & F & \ra{h_4} & 0 & \ra{h_5} & 0 \\ 
\end{array} 
$$

which generates $$ \newcommand{\ra}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} % \begin{array}{llllllllllll} 0 & \ra{f_1} & A & \ra{f_2} & B & \ra{f_3} & C & \ra{f_4} & D & \ra{f_5} & 0 \\ \da{g_1} & & \da{g_2} & & \da{g_3} & & \da{g_4} & & \da{g_5} & & \da{g_6} \\ 0 & \ra{h_1} & 0 & \ra{h_2} & E & \ra{h_3} & F & \ra{h_4} & 0 & \ra{h_5} & 0 \\ \end{array} $$ Clearly, this works.


On the other hand, compare this to $\Large\times$

$$
\newcommand{\ra}[4]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} 
\newcommand{\da}[4]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} 
% 
\begin{array}{llllllllllll} 0 & \ra{f_1} & A & \ra{f_2} & B & \ra{f_3} & C & \ra{f_4} & D & \ra{f_5} & 0 \\ 
\da{g_1} & & \da{g_2} & & \da{g_3} & & \da{g_4} & & \da{g_5} & & \da{g_6} \\ 
0 & \ra{h_1} & 0 & \ra{h_2} & E & \ra{h_3} & F & \ra{h_4} & 0 & \ra{h_5} & 0 \\ 
\end{array}
$$

The error lies in the sections {\ra}[4] and {\da}[4] where it should be {\ra}[1] and {\da}[1] respectively.

As you can see, the error can be replicated here. $$ \newcommand{\ra}[4]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\da}[4]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} % \begin{array}{llllllllllll} 0 & \ra{f_1} & A & \ra{f_2} & B & \ra{f_3} & C & \ra{f_4} & D & \ra{f_5} & 0 \\ \da{g_1} & & \da{g_2} & & \da{g_3} & & \da{g_4} & & \da{g_5} & & \da{g_6} \\ 0 & \ra{h_1} & 0 & \ra{h_2} & E & \ra{h_3} & F & \ra{h_4} & 0 & \ra{h_5} & 0 \\ \end{array} $$

$\endgroup$
  • $\begingroup$ Ours was copied from QC's, they are identical and should render the same. It would be kind of you to edit our FAQ page when you get a chance if you are certain that there is no bug. $\endgroup$ – Rob May 31 at 6:37
  • 1
    $\begingroup$ @Rob See this comment I left. I can't edit non-tag-wiki meta posts. Btw, I am certain there is no bug as it works when I replace 4 with 1. $\endgroup$ – TheSimpliFire May 31 at 6:38
  • 1
    $\begingroup$ I found the actual cause of the bug, it's not MathJax nor so much what was written but instead that the editor updated markup within delimiters. Thanks for your helpful answer which lead me to what actually happened. $\endgroup$ – Rob May 31 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .