pelican-plugins / render-math

Pelican plugin that renders mathematics via the MathJax JavaScript engine
Other
30 stars 7 forks source link

render-math do not work with pelican 4.8.0 #20

Closed hiyoucai closed 3 weeks ago

hiyoucai commented 2 years ago

I have installed and configured the relevant plugin according to your manual. as follows.

First step: install your plugin.

python -m pip install pelican-render-math

Second step: specify the pelicanconf.py configuration. as follows.

PLUGINS = ["pelican.plugins.render_math"]
MATH_JAX = {'color': 'blue'}

Third step: write the markdown mathematic formulate. as follows.

Title: x
Date: 2022-11-10 00:20
Modified: 2022-11-10 00:20
Category: x
Slug: x
Authors: x
Summary: x

<p>
formulate:$x^2$
The area of a circle is: `A_\text{c} = (\pi/4) d^2`.
</p>

Fourth step: compile and build the pelican project. as follow.

pelican content.

Finally, opening the browser. But I found that the math formulate was not change. It's still the same old thing like origin $x^2$.

It doesn't work. Who can tell me what to do? thanks.

Appendix:

python --version 
Python 3.9.7
python -m pip list                                                                                                                             
Package             Version
------------------- -----------
beautifulsoup4      4.11.1
blinker             1.5
commonmark          0.9.1
docutils            0.19
feedgenerator       2.0.0
importlib-metadata  4.12.0
Jinja2              3.1.2
Markdown            3.4.1
MarkupSafe          2.1.1
mathjax             0.1.2
pelican             4.8.0
pelican-render-math 1.0.3
pip                 22.2.2
Pygments            2.13.0
python-dateutil     2.8.2
pytz                2022.2.1
rich                12.5.1
setuptools          57.4.0
six                 1.16.0
smartypants         2.0.1
soupsieve           2.3.2.post1
typogrify           2.0.7
Unidecode           1.3.4
zipp                3.8.1
hiyoucai commented 2 years ago

duplicate issue. see other one.

hiyoucai commented 2 years ago

Sorry.ok now. Just remove the p tag.

kokkytos commented 1 year ago

Also for me it doesn't work on pelican 4.8.0

For example: In markdown I write: $e=mc^2$

In the output I get:

\(e=mc^2\)

justinmayer commented 1 year ago

I do not use this plugin, so I can only be of limited assistance. In some brief testing, I could get the following math content to be rendered as expected …

Title: x
Date: 2023-08-10 00:20
Category: x
Slug: x
Authors: x
Summary: x

formulate: $$x^2$$

The area of a circle is: $$A_\text{c} = (\pi/4) d^2$$

Einstein said: $$e=mc^2$$

but only if I did the following two things:

  1. Use double-dollar-signs, as shown above.
  2. Load the MathJAX Javascript file in the relevant theme template by following the instructions in the README: Enabling Additional Features

I don't know whether this indicates that something is awry and therefore should be fixed. If so, pull requests would be welcome.

kokkytos commented 1 year ago

I do not use this plugin, so I can only be of limited assistance. In some brief testing, I could get the following math content to be rendered as expected …

Title: x
Date: 2023-08-10 00:20
Category: x
Slug: x
Authors: x
Summary: x

formulate: $$x^2$$

The area of a circle is: $$A_\text{c} = (\pi/4) d^2$$

Einstein said: $$e=mc^2$$

but only if I did the following two things:

1. Use double-dollar-signs, as shown above.

2. Load the MathJAX Javascript file in the relevant theme template by following the instructions in the README: [Enabling Additional Features](https://github.com/pelican-plugins/render-math#enabling-additional-features)

I don't know whether this indicates that something is awry and therefore should be fixed. If so, pull requests would be welcome.

I also follow similar way. single dollar sign also works for in inline latex

justinmayer commented 3 weeks ago

Closing this issue. If there is an actual problem here, and someone can post a comment here with detailed steps regarding how to reproduce said problem, I would be happy to re-open the issue.