diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/markdown/markdown.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/markdown/markdown.tex | 134 |
1 files changed, 92 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/generic/markdown/markdown.tex b/Master/texmf-dist/tex/generic/markdown/markdown.tex index 6616a6ec98f..14950fd64fa 100644 --- a/Master/texmf-dist/tex/generic/markdown/markdown.tex +++ b/Master/texmf-dist/tex/generic/markdown/markdown.tex @@ -6,7 +6,7 @@ %% %% markdown.dtx (with options: `tex') %% -%% Copyright (C) 2016-2024 Vít Starý Novotný +%% Copyright (C) 2016-2024 Vít Starý Novotný, Andrej Genčur %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -329,6 +329,14 @@ { boolean } { true } \__markdown_add_lua_option:nnn + { unicodeNormalization } + { boolean } + { true } +\__markdown_add_lua_option:nnn + { unicodeNormalizationForm } + { string } + { nfc } +\__markdown_add_lua_option:nnn { cacheDir } { path } { \markdownOptionOutputDir / _markdown_\jobname } @@ -572,8 +580,8 @@ { boolean } { true } \ExplSyntaxOff -\def\markdownLastModified{2024-04-29}% -\def\markdownVersion{3.5.0-0-gfd01a252}% +\def\markdownLastModified{2024-07-14}% +\def\markdownVersion{3.6.2-0-g6c30af7e}% \let\markdownBegin\relax \let\markdownEnd\relax \let\markinline\relax @@ -656,38 +664,10 @@ { inputTempFileName } { path } { \jobname.markdown.in } -\cs_generate_variant:Nn - \__markdown_add_plain_tex_option:nnn - { nnV } -\ExplSyntaxOff -\input lt3luabridge.tex -\ExplSyntaxOn -\bool_if:nTF - { - \cs_if_exist_p:N - \luabridge_tl_set:Nn && - ( - \int_compare_p:nNn - { \g_luabridge_method_int } - = - { \c_luabridge_method_directlua_int } || - \sys_if_shell_unrestricted_p: - ) - } - { - \luabridge_tl_set:Nn - \l_tmpa_tl - { print(os.getenv("TEXMF_OUTPUT_DIRECTORY") or ".") } - } - { - \tl_set:Nn - \l_tmpa_tl - { . } - } -\__markdown_add_plain_tex_option:nnV +\__markdown_add_plain_tex_option:nnn { outputDir } { path } - \l_tmpa_tl + { . } \__markdown_add_plain_tex_option:nnn { plain } { boolean } @@ -732,18 +712,60 @@ \cs_new:Nn \__markdown_define_option_command:n { - \__markdown_option_tl_to_csname:nN + \str_if_eq:nnTF { #1 } - \l_tmpa_tl - \cs_if_exist:cF - { \l_tmpa_tl } + { outputDir } + { \__markdown_define_option_command_output_dir: } { - \__markdown_get_default_option_value:nN - { #1 } - \l_tmpa_tl - \__markdown_set_option_value:nV + \__markdown_option_tl_to_csname:nN { #1 } \l_tmpa_tl + \cs_if_exist:cF + { \l_tmpa_tl } + { + \__markdown_get_default_option_value:nN + { #1 } + \l_tmpa_tl + \__markdown_set_option_value:nV + { #1 } + \l_tmpa_tl + } + } + } +\ExplSyntaxOff +\input lt3luabridge.tex +\ExplSyntaxOn +\cs_new:Nn + \__markdown_define_option_command_output_dir: + { + \cs_if_free:NT + \markdownOptionOutputDir + { + \bool_if:nTF + { + \cs_if_exist_p:N + \luabridge_tl_set:Nn && + ( + \int_compare_p:nNn + { \g_luabridge_method_int } + = + { \c_luabridge_method_directlua_int } || + \sys_if_shell_unrestricted_p: + ) + } + { + \luabridge_tl_set:Nn + \l_tmpa_tl + { print(os.getenv("TEXMF_OUTPUT_DIRECTORY") or ".") } + \tl_gset:NV + \markdownOptionOutputDir + \l_tmpa_tl + } + { + \tl_gset:Nn + \markdownOptionOutputDir + { . } + } } } \cs_new:Nn @@ -3311,6 +3333,9 @@ } } } + \str_gset:NV + \g_luabridge_output_dirname_str + \markdownOptionOutputDir \luabridge_now:e { #1 } } @@ -3403,12 +3428,37 @@ { markinline-peek-failure } { Use~of~\iow_char:N \\ markinline~doesn't~match~its~definition } { The~macro~should~be~followed~by~inline~markdown~text~in~curly~braces } +\cs_new:Npn + \markdownInput + #1 + { + \file_get_full_name:nNTF + { #1 } + \l_tmpa_tl + { + \exp_args:NV + \markdownInputRaw + \l_tmpa_tl + } + { + \msg_error:nnnV + { markdown } + { markdown-file-does-not-exist } + { #1 } + } + } +\msg_new:nnn + { markdown } + { markdown-file-does-not-exist } + { + Markdown~file~#1~does~not~exist + } \ExplSyntaxOff \begingroup \catcode`|=0% \catcode`\\=12% \catcode`|&=6% - |gdef|markdownInput#1{% + |gdef|markdownInputRaw#1{% |begingroup |catcode`|%=12 |catcode`|#=12 |