Skip to content

3.9.0

Compare
Choose a tag to compare
@Witiko Witiko released this 21 Nov 22:31
· 60 commits to main since this release
4f1abe2

Development:

  • Convert built-in LaTeX themes witiko/dot and witiko/graphicx/http into plain TeX themes. (#514, #522, #529)

    This allows these themes to be used in formats such as plain TeX and ConTeXt as well.

Refactoring:

  • Remove dependencies on ifthen, gobble, and catchfile. (#514, #522, #529)

  • Store small built-in LaTeX themes witiko/dot, witiko/graphicx/http, and witiko/tilde in expl3 props in files markdown.tex and markdown.sty. (#514, #522, #529)

    This simplifies the distribution and installation of these themes, which were previously located in individual .tex and .sty files.

    The built-in plain TeX, LaTeX, and ConTeXt themes witiko/markdown/defaults are still distributed in individual files. This is because inlining these themes in files markdown.tex, markdown.sty, and t-markdown.tex would make it more difficult for users to copy and modify these themes without delaying updates to the Markdown package itself. Furthermore, these themes are large and storing/executing them from an expl3 prop would make it more difficult to determine the line numbers when errors occur.

Fixes:

  • Protect renderers and renderer prototypes. (#465, #506)

    After this change, default renderers and renderer prototypes as well as renderers and renderers and prototypes defined using the keys renderers and rendererPrototypes of the command \markdownSetup are protected, which is usually preferable for typesetting.

    New keys unprotectedRenderers and unprotectedRendererPrototypes were also added to the command \markdownSetup. These keys define unprotected renderers and renderer prototypes, respectively, which are easier to expand and may be preferable for programming.

Defaults:

  • Define default LaTeX renderer prototypes for table identifiers. (#525, suggested by @machitgarha, #528)

    This establishes a reliable method for authors to reference tables within Markdown:

    \documentclass{article}
    \usepackage[
      pipe_tables,
      table_attributes,
      table_captions,
      relative_references,
    ]{markdown}
    \begin{document}
    \begin{markdown}
    
    | Right | *Left* |   Default   | Center |
    |------:|:-------|-------------|:------:|
    |   12  |   12   |      12     |    12  |
    |  123  |   123  |   **123**   |   123  |
    |    1  |     1  |       1     |     1  |
    
      : Demonstration of *pipe table* syntax with the caption spreading over
        multiple lines. {#identifier .class-name key=value}
    
    Demonstration of a *relative reference*: See Table <#identifier>.
    
    \end{markdown}
    \end{document}
  • Define default LaTeX renderer prototypes for bracketed spans. (discussed with @MacLotsen at TUG 2024 and with @TeXhackse at matrix.org, #528)

    This establishes a reliable method for authors to reference the last LaTeX counter that has been incremented in e.g. ordered lists.

    \documentclass{article}
    \usepackage[
      bracketed_spans,
      relative_references,
      start_number = false,
    ]{markdown}
    \begin{document}
    \begin{markdown}
    
    Demonstration of *bracketed spans* syntax:
    
     1. First item
     2. [Second item]{#second-item}
     3. Third item
    
    Demonstration of a *relative reference*: See item <#second-item>.
    
    \end{markdown}
    \end{document}
  • Use package LuaXML in default LaTeX renderer prototypes for content blocks, raw blocks, and inline raw spans. (#469, #532, co-authored by @michal-h21)

    This allows authors to render HTML fragments in their LaTeX documents:

    \documentclass{article}
    \usepackage[content_blocks, raw_attribute]{markdown}
    \begin{filecontents}[overwrite, nosearch, noheader]{example_input.html}
    <b>foo</b> <i>bar</i>
    \end{filecontents}
    \begin{document}
    \begin{markdown}
    
    Raw text span: `<b>foo</b> <i>bar</i>`{=html}
    
    Raw code block:
    
    ``` {=html}
    <b>foo</b> <i>bar</i>
    ```
    
    Content block:
    
     /example_input.html
    
    \end{markdown}
    \end{document}

Deprecation:

  • Remove support for TeX Live 2022. (da85e01, 8f2d25c)

    This change also removes the Lua module markdown-tinyyaml, which has been scheduled for removal ever since the Lua module tinyyaml was uploaded to CTAN in TeX Live 2023.