tomduck / pandoc-theoremnos

A pandoc filter for numbering theorems and theorem references.
GNU General Public License v3.0
9 stars 5 forks source link

Use Latex mathematical mode inside theorem name results in error. #4

Open gijswijs opened 3 years ago

gijswijs commented 3 years ago

This is my markdown:

[$\epsilon$]{#dfn:def}
: Epsilon is a letter of the Greek alphabet

This is the error I get

Error producing PDF.
! Missing $ inserted.
<inserted text>
                $
l.123 \begin{dfn}[\epsilon]

How can I access mathematical mode inside the theorem name?

jschlatow commented 3 years ago

@gijswijs Thanks for reporting this issue. For the latex-output, we used the stringify function from pandocfilters on the theorem title. This removed all formatting. I added a fix for this on my fork of pandoc-theoremnos (see reference above). Note, that this fix depends on PR #3.

gijswijs commented 3 years ago

@jschlatow Thanks! Until the PR gets merged, I used the work-around of reinstalling the filter directly from your repo like so:

pip uninstall pandoc-theoremnos
pip install git+https://github.com/jschlatow/pandoc-theoremnos.git@nextrelease --user

Maybe upgrade would have worked as well (not sure):

pip install git+https://github.com/jschlatow/pandoc-theoremnos.git@nextrelease --user --upgrade

I can confirm mathematical mode inside a theorem now works: image