diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-01 19:49:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-01 19:49:44 +0000 |
commit | 90ce0701efdeb477c5832baea015d4c20b99d3ee (patch) | |
tree | 18315e142e806f8c634358c2750a56ba9514da8a /Master/texmf-dist/tex/latex/markdown | |
parent | 0103a9d41473d542650463023e5ac4d4eb18c5ff (diff) |
markdown (1oct22)
git-svn-id: svn://tug.org/texlive/trunk@64570 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 | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty index 19898298d26..1a2a989fe82 100644 --- a/Master/texmf-dist/tex/latex/markdown/markdown.sty +++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty @@ -104,13 +104,21 @@ \cs_new:Nn \__markdown_set_latex_theme:n { - \str_if_in:NnF + \str_if_in:nnF { #1 } { / } { \markdownError - { Won't load theme with unqualified name #1 } - { Theme names must contain at least one forward slash } + { Won't~load~theme~with~unqualified~name~#1 } + { Theme~names~must~contain~at~least~one~forward~slash } + } + \str_if_in:nnT + { #1 } + { _ } + { + \markdownError + { Won't~load~theme~with~an~underscore~in~its~name~#1 } + { Theme~names~must~not~contain~underscores~in~their~names } } \tl_set:Nn \markdownLaTeXThemePackageName { #1 } \str_replace_all:Nnn @@ -196,6 +204,73 @@ #2 .default:n = { true }, } } + \str_if_eq:VVT + \l_tmpa_tl + \c__markdown_option_type_clist_tl + { + \tl_set:Nn + \l_tmpa_tl + { #2 } + \tl_reverse:N + \l_tmpa_tl + \str_if_eq:enF + { + \tl_head:V + \l_tmpa_tl + } + { s } + { + \msg_error:nnn + { __markdown } + { malformed-name-for-clist-option } + { #2 } + } + \tl_set:Nx + \l_tmpa_tl + { + \tl_tail:V + \l_tmpa_tl + } + \tl_reverse:N + \l_tmpa_tl + \tl_put_right:Nn + \l_tmpa_tl + { + .code:n = { + \__markdown_get_option_value:nN + { #2 } + \l_tmpa_tl + \clist_set:NV + \l_tmpa_clist + { \l_tmpa_tl, { ##1 } } + \__markdown_set_option_value:nV + { #2 } + \l_tmpa_clist + } + } + \keys_define:nV + { markdown/latex-options } + \l_tmpa_tl + } + } +\cs_generate_variant:Nn + \clist_set:Nn + { NV } +\cs_generate_variant:Nn + \keys_define:nn + { nV } +\cs_generate_variant:Nn + \__markdown_set_option_value:nn + { nV } +\prg_generate_conditional_variant:Nnn + \str_if_eq:nn + { en } + { F } +\msg_new:nnn + { __markdown } + { malformed-name-for-clist-option } + { + Clist~option~name~#1~does~not~end~with~-s. } \__markdown_latex_define_option_commands_and_keyvals: \ExplSyntaxOff |