How to render latex in markdown?
See original GitHub issueDescription
I would like to render latex from the markdowns that gets pulled into gridsome
Steps to reproduce
I have been looking for plugins / components to use to be able to use latex expressions in blog posts.
this markdown
### Naive approach to guess until we get a good fit
guessing the beta parameters linear equation
$ y = m \times \mathbf{x} + b
Expected result
The latex should be rendered as html
Actual result
Environment
Libs:
- @gridsome/cli version: v0.1.1
Browser:
-
Chrome (desktop)
-
Node version: 10
-
Platform: Mac
Related issues: https://github.com/gridsome/gridsome-starter-blog/issues/22 https://github.com/gridsome/gridsome/issues/238
Solution in vuepress: https://github.com/vuejs/vuepress/issues/113
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Markdown and LaTeX introduction - Ashkan Mirzaee
We can use LaTeX to write mathematical equations in Markdown. To write inline LaTeX formula use a single $ before and after the...
Read more >How to use LaTeX in Markdown - Fabrizio Musacchio
Many Markdown processors are capable to interpret LaTeX's math mode commands in order to display a broad variaty of mathematical expressions.
Read more >How can I mix LaTeX in with Markdown? [closed]
Save this answer. Show activity on this post. And the Latex is rendered in pieces using tex-mode's preview-latex.
Read more >Render mathematical expressions in Markdown
You can now use LaTeX style syntax to render math expressions within Markdown inline (using $ delimiters) or in blocks (using $$ delimiters) ......
Read more >Markdown and LaTeX - Juan Shishido
Directly insert mathematical expressions using LaTeX's syntax into your document. Then, use pandoc to render the formatted text and output a PDF.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello, I’m not affiliated with Gridsome so I can’t give an answer with any certainty or authority, but I have a solution for you. As @hjvedvik already suggested, some packages in your project likely need updating. I think if you’re on an old
@gridsome/transformer-remark
you are likely on older versions of other packages too (including gridsome itself). Here is a set of packages which I’ve confirmed to work:from
packages.json
from
gridsome.config.js
from the template, e.g.
BlogPost.vue
from the markdown blog post
I hope this helps - will be interested to hear how it goes
I have implemented latex using gridsome-remark-katex at my site You can have a look.