jfbercher / jupyter_latex_envs

(Some) LaTeX environments for Jupyter
Other
112 stars 27 forks source link

Consider suppressing equation auto-numbering in tables #43

Closed NF1198 closed 5 years ago

NF1198 commented 5 years ago

Equation numbering produces different output in interactive mode vs. PDF output via LaTeX when equations are embedded in tables.

For example, upon defining the following markdown with table:

\begin{equation}
y=mx + b
\end{equation}
| Col1 | Col2 | Col3 |
| --- | --- | --- |
| $$y=mx+b$$ | $$\sigma$$ | $$\alpha$$ |

In interactive mode, four auto-numbered equations will be produced. However, in PDF (LaTex) output, only one auto-numbered equation will be produced.

The equation autonumbering plugin handles things differently: $$-$$ inline equation aren't auto-numbered where-as \begin{}\end{} tagged equations are auto-numbered.

Several possible ways to handle this:

NF1198 commented 5 years ago

I found an easy solution to this: Just escape equations with single dollar signs: $..$

jfbercher commented 5 years ago

Too fast! I was gonna to suggest that, and point out that \$\$ is a old TeX structure that is now deprecated in LaTeX.

Another point is that though \$\$ . \$\$ is usually interpreted by LaTeX compilers as a displayed and numbered equation, pandoc (which essentially produces the ipynb --> TeX conversion) translates it as an inline \( . \) structure.