diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3doc.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 66 |
1 files changed, 41 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index ecf9682900c..522760bb24c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -6,7 +6,7 @@ %% %% l3doc.dtx (with options: `class') %% -%% Copyright (C) 1990-2017 The LaTeX3 Project +%% Copyright (C) 1990-2018 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,9 +18,9 @@ %% This file is part of the "l3kernel bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: l3doc.dtx Copyright (C) 1990-2017 The LaTeX3 project +%% File: l3doc.dtx Copyright (C) 1990-2018 The LaTeX3 project \RequirePackage{expl3,xparse,calc} -\ProvidesExplClass{l3doc}{2017/12/16}{} +\ProvidesExplClass{l3doc}{2018/02/21}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -110,7 +110,7 @@ \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { o } \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { o } \cs_generate_variant:Nn \tl_if_head_eq_meaning:nNF { V } -\cs_generate_variant:Nn \tl_if_in:nnTF { no } +\cs_generate_variant:Nn \tl_if_in:nnTF { no , oo } \cs_generate_variant:Nn \tl_if_in:NnTF { No } \cs_generate_variant:Nn \tl_if_in:NnT { No } \cs_generate_variant:Nn \tl_if_in:NnF { No } @@ -136,6 +136,16 @@ \tl_set:Nx #1 { \exp_after:wN \__codedoc_tmp:w #1 #2 \q_stop } } \cs_generate_variant:Nn \__codedoc_trim_right:Nn { No } +\prg_new_protected_conditional:Npnn \__codedoc_str_if_begin:nn #1#2 { TF , T , F } + { + \tl_if_in:ooTF + { \exp_after:wN \scan_stop: \tl_to_str:n {#1} } + { \exp_after:wN \scan_stop: \tl_to_str:n {#2} } + { \prg_return_true: } + { \prg_return_false: } + } +\prg_generate_conditional_variant:Nnn \__codedoc_str_if_begin:nn + { oo } { TF , T , F } \cs_new_protected:Npn \__codedoc_replace_at_at:N #1 { \bool_if:NT \l__codedoc_in_implementation_bool @@ -172,32 +182,38 @@ \__codedoc_trim_right:No \l__codedoc_detect_internals_tl \c_catcode_active_space_tl \__codedoc_trim_right:Nn \l__codedoc_detect_internals_tl ^^M - \tl_set_eq:NN \l__codedoc_detect_internals_cs_tl \l__codedoc_detect_internals_tl - \__codedoc_trim_right:Nn \l__codedoc_detect_internals_tl _ - \__codedoc_trim_right:Nn \l__codedoc_detect_internals_tl : - \__codedoc_trim_right:No \l__codedoc_detect_internals_tl { \token_to_str:N : } - \tl_if_empty:NF \l__codedoc_detect_internals_tl + \__codedoc_if_detect_internals_ok:NF \l__codedoc_detect_internals_tl { - \str_if_eq:NNF \l__codedoc_detect_internals_tl \g__codedoc_module_name_tl - { - \bool_lazy_and:nnF - { \g__codedoc_kernel_bool } - { - \str_if_eq_x_p:nn - { \tl_to_str:N \l__codedoc_detect_internals_tl } - { kernel } - } - { - \msg_warning:nnxxx { l3doc } { foreign-internal } - { \tl_to_str:N \l__codedoc_detect_internals_cs_tl } - { \tl_to_str:N \l__codedoc_detect_internals_tl } - { \tl_to_str:N \g__codedoc_module_name_tl } - } - } + \tl_set_eq:NN \l__codedoc_detect_internals_cs_tl \l__codedoc_detect_internals_tl + \__codedoc_trim_right:Nn \l__codedoc_detect_internals_tl _ + \__codedoc_trim_right:Nn \l__codedoc_detect_internals_tl : + \__codedoc_trim_right:No \l__codedoc_detect_internals_tl { \token_to_str:N : } + \msg_warning:nnxxx { l3doc } { foreign-internal } + { \tl_to_str:N \l__codedoc_detect_internals_cs_tl } + { \tl_to_str:N \l__codedoc_detect_internals_tl } + { \tl_to_str:N \g__codedoc_module_name_tl } } } } \group_end: +\prg_new_protected_conditional:Npnn \__codedoc_if_detect_internals_ok:N #1 { F } + { + \__codedoc_str_if_begin:ooTF {#1} { \g__codedoc_module_name_tl _ } + { \prg_return_true: } + { + \__codedoc_str_if_begin:ooTF {#1} { \g__codedoc_module_name_tl : } + { \prg_return_true: } + { + \bool_if:NTF \g__codedoc_kernel_bool + { + \__codedoc_str_if_begin:ooTF {#1} { kernel _ } + { \prg_return_true: } + { \prg_return_false: } + } + { \prg_return_false: } + } + } + } \cs_new:Npn \__codedoc_signature_base_form:n #1 { \__codedoc_signature_base_form_aux:n #1 \q_stop } \cs_new:Npn \__codedoc_signature_base_form_aux:n #1 |