jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Overflow of equation using `{math}` but not $$ $$

Open mscharling opened this issue 2 years ago • 2 comments

Describe the bug

Context In my current work I have been using $$ ... \tag{}\label{} $$ in order to refer an equation through $\eqref{}$. However, this produces the text with math-looking layout. So, I switched to {math} in order to use {eq} when refering but now, it seems that the tag from {math} produces overflow inside the equation:

image

Expectation I expect overflow not to occur. Using $$ ... \tag{}\label{} $$ produces no overflow:

image

But, as you can see, this method makes the tag math-looking.

Question Is there a way to make sure no overflow occurs using {math}? Or, is it possible to refer to an equation using $$ ... \tag{}\label{} $$ in some other way which does not make the reference-text math-looking (like $\eqref{}$ does)?

Reproduce the bug

  1. Make a markdown-file.
  2. Write some equation inside {math} and add :label: something

List your environment

No response

mscharling avatar May 07 '22 11:05 mscharling

Or, is it possible to refer to an equation using $$ ... \tag{}\label{} $$ in some other way which does not make the reference-text math-looking (like $\eqref{}$ does)?

@mscharling have you tried using the eq label syntax that is available for $$ which doesn't use latex labels and tags.

$$
<math>
$$ (label)

which can be references as a standard label to the math equation using:

{eq}`label`

https://jupyterbook.org/en/stable/content/math.html#numbering-equations

mmcky avatar May 09 '22 04:05 mmcky

@mmcky Yeah, I tried that already. Same problem as when using {math} :/

mscharling avatar May 09 '22 11:05 mscharling