diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3doc.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 7fd9385704c..d913db3a652 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -20,7 +20,7 @@ %% %% File: l3doc.dtx Copyright (C) 1990-2018 The LaTeX3 project \RequirePackage{expl3,xparse,calc} -\ProvidesExplClass{l3doc}{2018/03/05}{} +\ProvidesExplClass{l3doc}{2018-04-30}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -148,11 +148,6 @@ { oo } { TF , T , F } \cs_new_protected:Npn \__codedoc_replace_at_at:N #1 { - \bool_if:NT \l__codedoc_in_implementation_bool - { - \bool_if:NT \l__codedoc_detect_internals_bool - { \__codedoc_detect_internals:N #1 } - } \tl_if_empty:NF \g__codedoc_module_name_tl { \exp_args:NNo \__codedoc_replace_at_at_aux:Nn @@ -169,9 +164,14 @@ \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 } \tl_replace_all:Nnn #1 { \token_to_str:N a a } { @ @ } } +\cs_new_protected:Npn \__codedoc_detect_internals:N #1 + { + \bool_if:NT \l__codedoc_detect_internals_bool + { \__codedoc_detect_internals_aux:N #1 } + } \group_begin: \char_set_catcode_active:N \^^M - \cs_new_protected:Npn \__codedoc_detect_internals:N #1 + \cs_new_protected:Npn \__codedoc_detect_internals_aux:N #1 { \tl_set_eq:NN \l__codedoc_detect_internals_tl #1 \tl_replace_all:Non \l__codedoc_detect_internals_tl { \token_to_str:N _ } { _ } @@ -274,22 +274,23 @@ } \cs_new:Npx \__codedoc_key_get_base_TF:nN #1#2 { - \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} \scan_stop: } - \tl_if_in:NnTF #2 { \tl_to_str:n { F } \scan_stop: } + \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} } + \tl_if_in:NoF #2 { \tl_to_str:n {:} } + { \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z } + { \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {T} z } { - \tl_if_in:NnF #2 { \tl_to_str:n { TF } \scan_stop: } - { - \tl_replace_once:Nnn #2 - { \tl_to_str:n { F } \scan_stop: } - { \tl_to_str:n { TF } \scan_stop: } - } + \tl_put_right:Nn #2 { \tl_to_str:n {F} } + \exp_not:N \prg_break: } + \tl_if_in:onT { #2 z } { \tl_to_str:n {F} z } { - \tl_replace_once:Nnn #2 - { \tl_to_str:n { T } \scan_stop: } - { \tl_to_str:n { TF } \scan_stop: } + \tl_put_right:Nn #2 { z } + \tl_replace_once:Nnn #2 { \tl_to_str:n {F} z } { \tl_to_str:n {TF} } + \exp_not:N \prg_break: } - \tl_remove_once:Nn #2 { \scan_stop: } + \exp_not:N \prg_break_point: } \cs_new:Npn \__codedoc_base_form_aux:nnN #1#2#3 { @@ -539,6 +540,7 @@ \providecommand*\upTeX{up\kern-.2em\hologo{TeX}} \providecommand*\epTeX{$\varepsilon$-\pTeX} \providecommand*\eupTeX{$\varepsilon$-\upTeX} +\providecommand*\ConTeXt{\hologo{ConTeXt}} \DeclareDocumentCommand \cmd { O{} m } { \__codedoc_cmd:no {#1} { \token_to_str:N #2 } } \DeclareDocumentCommand \cs { O{} m } @@ -795,6 +797,7 @@ \tl_remove_all:Nx \l__codedoc_tmpa_tl { \tl_to_str:n { ^ ^ A } } \tl_remove_all:Nx \l__codedoc_tmpa_tl { \iow_char:N \^^I } \tl_remove_all:Nx \l__codedoc_tmpa_tl { \iow_char:N \^^M } + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \exp_args:NNx \seq_set_from_clist:Nn #2 { \tl_to_str:N \l__codedoc_tmpa_tl } @@ -1855,6 +1858,7 @@ { \__codedoc_xmacro_code:w #1 \q_stop } { \tl_set:Nn \l__codedoc_tmpa_tl {#1} + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \tl_use:N \l__codedoc_tmpa_tl } @@ -1862,12 +1866,14 @@ \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > #3 \q_stop { \tl_set:Nn \l__codedoc_tmpa_tl {#1} + \__codedoc_detect_internals:N \l__codedoc_tmpa_tl \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \tl_gset:Nn \g__codedoc_module_name_tl {#2} \tl_put_right:Nn \l__codedoc_tmpa_tl { < @ @ = #2 > } \tl_set:Nn \l__codedoc_tmpb_tl {#3} + \__codedoc_detect_internals:N \l__codedoc_tmpb_tl \__codedoc_replace_at_at:N \l__codedoc_tmpb_tl \tl_put_right:No \l__codedoc_tmpa_tl { \l__codedoc_tmpb_tl } |