fastai / fastpages

An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
https://fastpages.fast.ai/
Apache License 2.0
3.53k stars 756 forks source link

Latex not rendering despite setting use_math to true #282

Closed ssundar6087 closed 4 years ago

ssundar6087 commented 4 years ago

Required Prerequisites for filing a bug

You must follow ALL the steps in the troubleshooting guide. Not doing so may result in automatic closure of the issue.

Required information

  1. Steps to reproduce the problem Set use_math: true in _config.yml, type out a latex equation in a jupyter notebook. While the notebook preview shows the correct formatting of the math equation, the same thing isn't reflected in the blog post where the code itself is displayed instead.

  2. A link to the notebook or markdown file where the error is occurring Link to the jupyter notebook (renders correctly) : https://github.com/ssundar6087/vision-and-words/blob/master/_notebooks/2020-05-01-DCGAN-CIFAR10.ipynb

Link to the blog post (does not render): https://ssundar6087.github.io/vision-and-words/python/computer%20vision/deep%20learning/gans/pytorch/2020/05/01/DCGAN-CIFAR10.html

  1. If the error is happening in GitHub Actions, a link to the specific error along with how you are able to reproduce this error. You must provide this in addition to the link to the notebook or markdown file.
  2. A screenshot / dump of relevant logs or error messages you are receiving from your local development environment. Instructions of running a local development server is provided in the development guide.

Screenshot of config file: Screen Shot 2020-05-02 at 6 01 51 PM

Screenshot of blog post where Latex hasn't rendered: Screen Shot 2020-05-02 at 6 01 33 PM

github-actions[bot] commented 4 years ago

Thank you for opening an issue. If this issue is related to a bug, please follow the steps and provide the information outlined in the Troubleshooting Guide. Failure to follow these instructions may result in automatic closing of this issue.

prrao87 commented 4 years ago

Hi @hamelsmu, I was literally about to create the same issue - I thought I'd just piggyback off of this one instead. Just as mentioned by OP, I've enabled use_math: true in my repo, and it's just not updating the MathJax equations from my notebook.

image

It's still displaying the text between the dollar signs as is. I double-checked that my version of fastpages is up-to-date and freshly auto-updated it earlier today (version 2.1.25, which is the same version as the current one on fastpages master). Is there a JavaScript file that's missing or something else that's different in my repo? I've been scratching my head on this one because clearly a lot of people before us have got this working.

hamelsmu commented 4 years ago

This was fixed by https://github.com/fastai/fastpages/pull/283

You must upgrade to get the fix.

ssundar6087 commented 4 years ago

Thanks @hamelsmu . Upgrading fixed the issue 👍