-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include a markdown style mermaid diagram inside a LaTeX source #448
Comments
Hi and thanks for using the Markdown package. In order to add support for mermaid diagrams, you would need to run a command such as See also the implementation of the theme |
@anubane After PR #542, you will be able to include Mermaid diagrams in your LaTeX documents like this: \documentclass{article}
\usepackage[theme=witiko/diagrams@v2]{markdown}
\begin{document}
\begin{markdown}
# This is a mindmap diagram
I use mindmap diagrams for aiding thought building.
In mermaid, I would write it like this:
``` mermaid {width=10cm}
mindmap
root )base-idea(
sub<br/>idea 1
((?))
sub<br/>idea 2
((?))
sub<br/>idea 3
((?))
sub<br/>idea 4
((?))
```
\end{markdown}
\end{document} To use this, you would need to have nodejs and npx installed, since the Markdown package uses the following command under the hood:
|
I love to write in LaTeX for creating publish-quality documents. However, for quick note taking and diagramming, I prefer markdown due the the ease of use.
The problem that I face is how to include the diagrams I have made in markdown into my LaTeX source? To give a concrete example, consider the following two file:
As of now, I am using
latexmk
command to compile my.tex
file, and it is simply showing the mermaid code as, well, code.How can I have the mermaid diagram render inside the LaTeX generated
pdf
?The text was updated successfully, but these errors were encountered: