Skip to content

3.13.0

Latest

Choose a tag to compare

@Witiko Witiko released this 02 Jan 17:43
· 23 commits to main since this release
dd212d5

Fixes:

Development:

  • Add \mmdcCommand macro for configuring the command used to render Mermaid diagrams. (suggested by @TheManchineel in #613, added by @Witiko in #614)

    For example, you can use different icon packs as follows:

    \documentclass{article}
    \def\mmdcCommand{mmdc --iconPacks '@iconify-json/logos'}
    \usepackage[import=witiko/diagrams@v2]{markdown}
    \begin{document}
    \begin{markdown}
    
    ``` mermaid
    architecture-beta
        group api(logos:aws-lambda)[API]
    
        service db(logos:aws-aurora)[Database] in api
        service disk1(logos:aws-glacier)[Storage] in api
        service disk2(logos:aws-s3)[Storage] in api
        service server(logos:aws-ec2)[Server] in api
    
        db:L -- R:server
        disk1:T -- B:server
        disk2:T -- B:db
    ```
    
    \end{markdown}
    \end{document}
    Image
  • Add a new Lua option htmlOverLinks that causes HTML tags to be recognized as tags rather than hyperlinks when the Lua option relativeReferences has been enabled. (discussed with @u-fischer in #597, added by @Witiko and @lostenderman in #607)

    The option htmlOverLinks is an experimental option: Whenever the option experimental is enabled and htmlOverLinks is unspecified, it will also be enabled. Like other experimental options, htmlOverLinks will be enabled by default in the next major release of the Markdown package and soft-deprecated.

  • Add a new Lua option blankBeforeHtmlBlock that causes the parser to require a blank line between a paragraph and the following CommonMark HTML block. (discussed with @u-fischer in #598, added by @Witiko and @lostenderman in #608)

    Enabling this option breaks CommonMark compliance but makes it easier to write raw HTML such as inline HTML comments without producing HTML blocks by accident.

  • In theme witiko/diagrams, add parameter format for GraphViz diagrams. (reported by @Witiko in #611, fixed by @Witiko in #612)

    Here is an example LaTeX document using the new parameter:

    \documentclass{article}
    \usepackage[import=witiko/diagrams@v2, relativeReferences]{markdown}
    \begin{document}
    \begin{markdown}
    ``` dot {caption="An example directed graph" format=svg 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"];
    }
    ```
    
    See the diagram in Figure <#dot>.
    \end{markdown}
    \end{document}

    This can be used to circumvent missing support for PDF output in some distributions of GraphViz, notably Debian Forky, which the texlive/texlive Docker images are currently based on.

Defaults:

Continuous integration: