getpelican / pelican-plugins

Collection of plugins for the Pelican static site generator
Other
1.39k stars 846 forks source link

liquid_tags.notebook breaks render_math's equation numbering #604

Closed ronanpaixao closed 6 years ago

ronanpaixao commented 9 years ago

When enabling the liquid_tags.notebook plugin, it breaks MathJax's configuration after enabling render_math. This breaks, for example, equation alignment and numbering, possibly due to the injected config: displayAlign: 'left' and lost equationNumbers: { autoNumber: 'AMS' }.

If the liquid_tags.notebook plugin is enabled, it injects a JS_INCLUDE (from notebook.py) header and previous configuration is lost. Badly configured, MathJax doesn't apply the numbering and the reference gets broken too.

Example when plugin is disabled:

capture_working

Example when it is enabled:

capture_nonworking

Test case file:

Title: MathJax label test
Date: 2015-11-04 23:56
Author: Ronan Paixão
Tags: pelican, plugins

This equation has a label reference:

$$\begin{equation}i(t)=\frac{e(t)-K_m\omega(t)}{R} \label{eq_current}\end{equation}$$

The reference may be pulled like this: $\ref{eq_current}$

Reference for MathJax equation references:

https://www.tuhh.de/MathJax/test/sample-eqrefs.html

flothesof commented 8 years ago

Hi @ronanpaixao, I've just come across your issue after tinkering myself with liquid_tags.notebook, I have some comments on what you wrote:

image

What do you think?

Best regards, Florian

justinmayer commented 6 years ago

Closing due to inactivity. Please feel free to comment here if you feel the issue should be re-opened.