summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/markdown/markdown.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/markdown/markdown.sty')
-rw-r--r--Master/texmf-dist/tex/latex/markdown/markdown.sty81
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