Development:
-
Add a built-in theme
witiko/diagrams@v2
for drawing different types of diagrams. (#448, #514, #531, #542, matrix.org, a9cadc4, 578e64d, 22efe7f, a3c2d93, originally suggested by @anubane)Here is an example LaTeX document using the new theme:
\documentclass{article} \usepackage[import=witiko/diagrams@v2, relativeReferences]{markdown} \begin{document} \begin{markdown} ``` dot {caption="An example directed graph" width=12cm #dot} digraph tree { margin = 0; rankdir = "LR"; latex -> pmml; latex -> cmml; pmml -> slt; cmml -> opt; cmml -> prefix; cmml -> infix; pmml -> mterms [style=dashed]; cmml -> mterms; latex [label = "LaTeX"]; pmml [label = "Presentation MathML"]; cmml [label = "Content MathML"]; slt [label = "Symbol Layout Tree"]; opt [label = "Operator Tree"]; prefix [label = "Prefix"]; infix [label = "Infix"]; mterms [label = "M-Terms"]; } ``` ``` mermaid {caption="An example mindmap" width=9cm #mermaid} mindmap root )base-idea( sub<br/>idea 1 ((?)) sub<br/>idea 2 ((?)) sub<br/>idea 3 ((?)) sub<br/>idea 4 ((?)) ``` ``` plantuml {caption="An example UML sequence diagram" width=7cm #plantuml} @startuml ' Define participants (actors) participant "Client" as C participant "Server" as S participant "Database" as DB ' Diagram title title Simple Request-Response Flow ' Messages C -> S: Send Request note over S: Process request alt Request is valid S -> DB: Query Data DB -> S: Return Data S -> C: Respond with Data else Request is invalid S -> C: Return Error end @enduml ``` See the diagrams in figures <#dot>, <#mermaid>, and <#plantuml>. \end{markdown} \end{document}
You may use the expl3 prop
\g_markdown_diagrams_infostrings_prop
to register other types of diagrams. -
Add option
jekyllDataKeyValue
for routing YAML metadata to expl3 key–values. (#77, #517, matrix.org, #539, matrix.org, f57a8c4, originally suggested by @TeXhackse)While the primary intended users of this new option are package authors, writers can also use this feature to configure various (La)TeX packages from YAML:
\documentclass{article} \usepackage{chemformula, lua-widow-control, phonenumbers} \usepackage[raw_attribute, tex_math_dollars]{markdown} \begin{document} \begin{markdown}[jekyll_data, jekyll_data_key_value] --- chemformula: decimal-marker: $\cdot$ lua-widow-control: draft: true showcolours: true phonenumbers: area-code: place area-code-sep: space country: UK --- Phone number: `\phonenumber{02079460345}`{=tex} Chemical reaction: `\ch{A + B -> 3.14159}`{=tex} \end{markdown} \end{document}
This won't work for every package but many packages use expl3 key–values internally for their configuration. If you are curious if your favorite package does, look for
\keys_define
in its source code.For more examples, see #517.
Fixes:
Distribution:
- Alias the command
markdown-cli
asmarkdown2tex
. (#545, #546, tex-live@tug.org)
Docker:
- Produce Docker image
witiko/markdown:latest-minimal
with a minimum installation of the Markdown package for TeX based on the Docker imagetexlive/texlive:latest-minimal
. (61a3aa2)