Comments (22)
Add it, end of the your markdown (.md
) file to generate PDF with latex
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" }); </script>in template.html, can export correct html ,but not pdf
from vscode-markdown-pdf.
Yeah this is fixed by editing /Users/<username>/.vscode/extensions/yzane.markdown-pdf-1.4.1/template/template.html
.
Just add these 2 lines at the bottom of the file, and it should be able to export to pdf.
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" });</script>
from vscode-markdown-pdf.
Markdown+Math (https://github.com/goessner/mdmath) uses KaTex (https://khan.github.io/KaTeX/) to format markdown with latex to html5. Would be nice to have this in markdown-pdf as an optional pre-processing step before node-html-pdf (https://github.com/marcbachmann/node-html-pdf).
from vscode-markdown-pdf.
I just insert $\sum_{i=0}^{n}i^2$
,after the show of the plugin "Markdown All in One", it revievs good.
But this plugin can not print it, it just print "$\sum_{i=0}^{n}i^2$"
from vscode-markdown-pdf.
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" }); </script>in template.html, can export correct html ,but not pdf
Cannot print \{
and \}
in Katex.
The formula of Katex in Markdown
$$
E_{CFG} = \{ \langle G \rangle | G \text{ is a CFG and } L(G) = \emptyset \}
$$
Preview of VSCode
Result of PDF
As we can see, \{
and \}
disappear.
from vscode-markdown-pdf.
Yeah this is fixed by editing
/Users/<username>/.vscode/extensions/yzane.markdown-pdf-1.4.1/template/template.html
.Just add these 2 lines at the bottom of the file, and it should be able to export to pdf.
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" });</script>
I can only get the inline formula converted correctly by doing this, the display formulas using '$$ $$' are still converted incorrectly.
from vscode-markdown-pdf.
How can I use Latex-format showed in pdf via markdown-pdf?
If I can't get pdf with Latex-format, that means I need to download another export prog, which means markdown-pdf is not useful enough.
from vscode-markdown-pdf.
Any updates? Still the same problem with V1.2
from vscode-markdown-pdf.
I have the same problem: some '$$ ...... $$' are still converted incorrectly. CANNOT convert '\' to newline
from vscode-markdown-pdf.
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" }); </script>in template.html, can export correct html ,but not pdf
I have found a problem. Some of the equation symbols are not recognized when exporting to either html or PDF, e.g.
from vscode-markdown-pdf.
guys, have you ever tried this solution on matrix? they still seem not printed correctly
$$R_y(\theta)=\begin{bmatrix}cos\theta&0&sin\theta
0&1&0
-sin\theta&0&cos\theta
\end{bmatrix}$$
and it previews as
and it printed as
Try \\
at the end of each row instead of \
. It might work
from vscode-markdown-pdf.
guys, have you ever tried this solution on matrix? they still seem not printed correctly
$$R_y(\theta)=\begin{bmatrix}cos\theta&0&sin\theta
0&1&0
-sin\theta&0&cos\theta
\end{bmatrix}$$
and it previews as
and it printed as
I have the same problem. Seems like the extension dosen't support multi-line formula?
Hi, I used //// at the end of each row instead of //. it works in the output of PDF.
from vscode-markdown-pdf.
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" }); </script>in template.html, can export correct html ,but not pdf
That worked for me.
from vscode-markdown-pdf.
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" }); </script>in template.html, can export correct html ,but not pdf
Cannot print
\{
and\}
in Katex.The formula of Katex in Markdown
$$ E_{CFG} = \{ \langle G \rangle | G \text{ is a CFG and } L(G) = \emptyset \} $$
Preview of VSCode
Result of PDF
As we can see,
\{
and\}
disappear.
This also solved by adding '\' one more time
I don't know how to solve VSCode Preview but it works in PDF
MD code (1)
$$
D^2_N = \left\\{\begin{array}{c}
D^2_{N-1} + 2D_{N-1} + 1 = 10\\\\
or\\\\
D^2_{N-1} - 2D_{N-1} + 1 = 20\\
\end{array}\right.
\tag{6.7}
$$
Previous of VSCode (1)
Result of PDF (1)
MD code (2)
$$
E_{CFG} = \\{ \langle G \rangle | G \text{ is a CFG and } L(G) = \emptyset \\}
$$
Previous of VSCode (2)
Result of PDF (2)
from vscode-markdown-pdf.
+1 for KaTeX support.
I also use the extension vscode-markdown that supports KaTeX, so it'd be nice to implement it into vscode-markdown-pdf, especially since the only export option vscode-markdown has is to html.
Update: It looks like this was implemented in #36 but there are conflicts preventing it from being merged.
from vscode-markdown-pdf.
This is developed for github md files, it also works with markdown-pdf :
(1) type in you formula here: link, without $$ signs, coy the output in the markdown file
(2) You get something like this:
I know this is a makeshift solution but it does the job.
from vscode-markdown-pdf.
guys, have you ever tried this solution on matrix? they still seem not printed correctly
$$R_y(\theta)=\begin{bmatrix}cos\theta&0&sin\theta\
0&1&0\
-sin\theta&0&cos\theta\
\end{bmatrix}$$
and it previews as
and it printed as
from vscode-markdown-pdf.
guys, have you ever tried this solution on matrix? they still seem not printed correctly
$$R_y(\theta)=\begin{bmatrix}cos\theta&0&sin\theta
0&1&0
-sin\theta&0&cos\theta
\end{bmatrix}$$
and it previews as
and it printed as
I have the same problem. Seems like the extension dosen't support multi-line formula?
from vscode-markdown-pdf.
I have a similer problem
$$D^2_N = \left\{\begin{array}{c}
D^2_{N-1} + 2D_{N-1} + 1\\
or\\
D^2_{N-1} - 2D_{N-1} + 1
\end{array}\right. \tag{6.7}$$
from vscode-markdown-pdf.
Awesome!
from vscode-markdown-pdf.
guys, have you ever tried this solution on matrix? they still seem not printed correctly
$$R_y(\theta)=\begin{bmatrix}cos\theta&0&sin\theta
0&1&0
-sin\theta&0&cos\theta
\end{bmatrix}$$
and it previews as
and it printed as
I have the same problem. Seems like the extension dosen't support multi-line formula?
Hi, I used //// at the end of each row instead of //. it works in the output of PDF.
$$ R_y(\theta)= \begin{bmatrix} cos\theta&0&sin\theta\ 0&1&0\ -sin\theta&0&cos\theta \end{bmatrix} $$
Thanks !!
It worked well for me !!
from vscode-markdown-pdf.
I've already managed to export PDF with latex formula(I added the javascript code to the html document and thank god it worked), but only by default conversion mode. When I tried to implement another style, say Turing Style(a document which codes this format and was downloaded on Typora webpage), I can only get a PDF document IN STYLE but Latex lines unrecognized.
How can I fix this?
from vscode-markdown-pdf.
Related Issues (20)
- Sorry, this is my wrong submission, please delete or ignore it!
- Style sheet for `markdown-pdf` about inline code HOT 1
- the `:has()` selector doesn't affect the pdf
- Glyph from a TTF not rendered in PDF
- Page numbers not showing up HOT 1
- High Fan Speed when attempt export to HTML or PDF - Unable to export from Markdown
- CSS float seems to be ignored HOT 1
- Layout Issues with div Tags in Markdown when Outputting to PDF
- Kate auto renderer for HTML exports needs update
- What am I missing? It doesn't convert math formula embedded at all. HOT 3
- Empty Page Number
- PDF output does not utilize CSS stylization.
- Enable GitHub Discussion.
- What is the installed location of Chromium, and how can it be deleted? HOT 1
- how to add a underline under the img of the page header HOT 1
- text-underline-offset is not valid
- PDF text selection and search is not working HOT 2
- Add support for markdown note format HOT 1
- Add support for Mermaid invisible links
- The new keywords from metadata to be added to the header/footer template.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-markdown-pdf.