1
$\begingroup$

I tried to answer a question and in the edit mode MathJax shows the equations properly, but when I click on "save" some equations are not rendered (?) at all, and I see only the MathJax code.

If I click on edit again, everything seems to be OK, but in normal viewing mode it is screwed up on my Brave or Edge browsers. I tried to edit again, start a new answer, etc., but I still had the same problem. What is wrong with my equations?

$\endgroup$
1

1 Answer 1

6
$\begingroup$

This seems to be caused by the use of \label{}. Here is your first equation, with and without that command:

$$ h(t)\nabla \times \tilde {\mathbf H} = \mathbf J +\epsilon_0 \dot {e}(t) \tilde {\mathbf E} \tag{1}\label{1}$$

$$ h(t)\nabla \times \tilde {\mathbf H} = \mathbf J +\epsilon_0 \dot {e}(t) \tilde {\mathbf E} \tag{1}$$

Both look identical during editing, but the first is sometimes (but inconsistently) mangled in the output.

I'm unaware of how \label{} works in MathJax, and whether it is truly supported. But do you really need it? Why not use just \tag{}s, and hard-code any references in the text? (i.e. use $(1)$ instead of $\eqref{1}$.)

$\endgroup$
5
  • $\begingroup$ Why? I am not even a rank amateur in mathjax; I have seen used \label, \eqref, etc. successfully, and I have tried to do the same. Until now have had no problem. From here on, I will just do what you have told me above. The down side of dropping \label and \eqref is that I lose the live link. Thank you. $\endgroup$
    – hyportnex
    Commented Jun 6, 2023 at 14:03
  • $\begingroup$ I'm not sure. See physics.meta.stackexchange.com/q/5396 for a post by a MathJax developer, though -- it provides alternative code to hyperlink references, but it makes it sound like \eqref{} should work. I don't know why it's not working here. $\endgroup$ Commented Jun 6, 2023 at 14:06
  • $\begingroup$ Just fixed my post and being a practical man it is good enough for me from here on that your suggestion worked immediately. Thank you. $\endgroup$
    – hyportnex
    Commented Jun 6, 2023 at 14:12
  • $\begingroup$ Thank you for introducing me to \tag{}. I wasn't aware of this command. $\endgroup$ Commented Jun 6, 2023 at 17:32
  • 1
    $\begingroup$ @LoganJ.Fisher On my Linux+Firefox system I can right click over Mathjax and it gives me the option to display the Mathjax itself. It's a useful way to pick up new tricks when you see an expression that interests you. $\endgroup$ Commented Jun 7, 2023 at 23:22

You must log in to answer this question.

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