Add out-of-the-box LaTeX in Markdown support to Hugo #10888
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
from this thread in the forum a solution emerged to bring proper support for LaTeX in Markdown to Hugo.
Disclaimer: credits for this feature go to @jbirnick, who added support for this originally in his fork. I just opened this PR because the thread was about to go stale and this seems to be a feature that many people in the community would appreciate (including me).
The advantage of this approach over existing solutions is:
For more details, including previous solutions, I'd recommend to take a look at the original forum thread.
How to enable
Put the following in your
config.toml
:Then include the Katex client side stylesheets. Please refer to the official installation guides from Katex.
Testing
Tested manually locally and verified that
Katex = true
renders Katex in the HTML code. Disabling it leads to previous behaviour.