diff options
author | Karl Berry <karl@freefriends.org> | 2024-04-30 20:02:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-04-30 20:02:14 +0000 |
commit | ca30fcf4913c32febbfb97abd72219b3e69501e4 (patch) | |
tree | 9ddee84f9374f5462ee9b54a3713d062db6885e8 /Master/texmf-dist/tex/latex/markdown | |
parent | b3669c79c87b055df515bf320be2a78fb0baf956 (diff) |
markdown (30apr24)
git-svn-id: svn://tug.org/texlive/trunk@71137 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/markdown')
-rw-r--r-- | Master/texmf-dist/tex/latex/markdown/markdown.sty | 20 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty | 83 |
2 files changed, 83 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty index 5bafe4bfb11..e0e1f2f3748 100644 --- a/Master/texmf-dist/tex/latex/markdown/markdown.sty +++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty @@ -82,6 +82,26 @@ \def\markdownVersionSpace{ }% \ProvidesPackage{markdown}[\markdownLastModified\markdownVersionSpace v% \markdownVersion\markdownVersionSpace markdown renderer]% +\ExplSyntaxOn +\cs_gset_eq:NN + \markinlinePlainTeX + \markinline +\cs_gset:Npn + \markinline + { + \peek_regex_replace_once:nn + { ( \[ (.*?) \] ) ? } + { + \c { group_begin: } + \c { __markdown_setup:n } + \cB { \2 \cE } + \c { tl_put_right:Nn } + \c { g__markdown_after_markinline_tl } + \cB { \c { group_end: } \cE } + \c { markinlinePlainTeX } + } + } +\ExplSyntaxOff \let\markdownInputPlainTeX\markdownInput \renewcommand\markdownInput[2][]{% \begingroup diff --git a/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty b/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty index 99de31845a7..b0b772b2832 100644 --- a/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty +++ b/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty @@ -311,29 +311,72 @@ tickedBox = {$\boxtimes$}, halfTickedBox = {$\boxdot$}}} \ExplSyntaxOn -\seq_new:N \l__markdown_header_identifiers_seq -\markdownSetup{ - rendererPrototypes = { - headerAttributeContextBegin = { - \seq_clear:N \l__markdown_header_identifiers_seq - \markdownSetup - { - renderers = { - attributeIdentifier = { - \seq_put_right:Nn - \l__markdown_header_identifiers_seq - { ##1 } +\seq_new:N + \l__markdown_header_identifiers_seq +\markdownSetup + { + rendererPrototypes = { + headerAttributeContextBegin = { + \markdownSetup + { + rendererPrototypes = { + attributeIdentifier = { + \seq_put_right:Nn + \l__markdown_header_identifiers_seq + { ##1 } + }, }, - }, - } + } + }, + headerAttributeContextEnd = { + \seq_map_inline:Nn + \l__markdown_header_identifiers_seq + { \label { ##1 } } + \seq_clear:N + \l__markdown_header_identifiers_seq + }, }, - headerAttributeContextEnd = { - \seq_map_inline:Nn - \l__markdown_header_identifiers_seq - { \label { ##1 } } + } +\bool_new:N + \l__markdown_header_unnumbered_bool +\markdownSetup + { + rendererPrototypes = { + headerAttributeContextBegin += { + \markdownSetup + { + rendererPrototypes = { + attributeClassName = { + \bool_if:nT + { + \str_if_eq_p:nn + { ##1 } + { unnumbered } && + ! \l__markdown_header_unnumbered_bool + } + { + \group_begin: + \bool_set_true:N + \l__markdown_header_unnumbered_bool + \c@secnumdepth = 0 + \markdownSetup + { + rendererPrototypes = { + sectionBegin = { + \group_begin: + }, + sectionEnd = { + \group_end: + }, + }, + } + } + }, + }, + } + }, }, - }, -} + } \ExplSyntaxOff \markdownSetup{rendererPrototypes={ superscript = {\textsuperscript{#1}}, |