Closed dsoto closed 9 years ago
It looks like @peterwittek has a commit that may address this.
My solution is messy, which is why I did not send a pull request. To address this problem, I did two things:
body = parser.body
with body = parser.body.replace('\[', '$$').replace('\]','$$').replace('\(', '$').replace('\)','$')
My solution was to use the _nb_header.html which was generated with the markdown ipython notebook plugin which is currently not working. I renamed it to nb_header.html
and add this code to pelicanconf.py:
if not os.path.exists('nb_header.html'):
import warnings
warnings.warn("nb_header.html not found. "
"Rerun make html to finalize build.")
else:
EXTRA_HEADER = open('nb_header.html').read().decode('utf-8')
Hi all, I fixed the missing mathjax javascript in master. Thanks @peterwittek for the fix!
Here is an example: http://danielfrg.com/drafts/ipython-notebook-test.html
I'm having a problem getting latex to render using pelican-ipynb. It looks like the mathjax macro isn't getting inserted into the output html file. When I run nbconvert on the notebook outside of pelican, the mathjax macro is included and the latex renders. I noticed the command line nbconvert uses the "full" template while the ipynb.nb file uses "basic" when it configures the HTMLExporter.
Here is where I'm very puzzled: when I change the ipynb.py code to use template_file="full" in line 204, I still get the same behavior where the mathjax template is not included.
I'm not familiar enough with the Pelican machinery to guess if some other processing might strip it out...