diff options
author | Karl Berry <karl@freefriends.org> | 2024-06-10 21:00:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-06-10 21:00:12 +0000 |
commit | 72a17d918a21a85672f8c59c2bf5162fbeeae216 (patch) | |
tree | e7d7a006671292f6a299be6c181f7c37201cd160 /Master | |
parent | ab8375ed291cedb97639c12d406be06225a92657 (diff) |
unicodefonttable (7jun24)
git-svn-id: svn://tug.org/texlive/trunk@71477 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/changes.txt | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB2024.cls (renamed from Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB.cls) | 1027 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf | bin | 930902 -> 939865 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf | bin | 763241 -> 765261 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf | bin | 674199 -> 674199 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty | 11 |
9 files changed, 640 insertions, 461 deletions
diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt b/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt index 3a8e048f319..ba49c7bd2fb 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt +++ b/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt @@ -1,3 +1,11 @@ +2024-06-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * unicodefonttable.dtx: + provide updated class file for documentation + + (subsection{User interface commands}): + Temp fix for problem with lttagging.dtx + 2023-05-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org> * unicodefonttable.dtx (subsection{Handling block titles}): diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB.cls b/Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB2024.cls index 50a8a9a9d90..0c5a3f20c5b 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB.cls +++ b/Master/texmf-dist/doc/latex/unicodefonttable/l3doc-TUB2024.cls @@ -1,11 +1,12 @@ %% -%% This is file `l3doc-TUB.cls' +%% This is file `l3doc.cls', +%% generated with the docstrip utility. %% %% The original source files were: %% -%% l3doc.dtx (with options: `class') + several manual changes! +%% l3doc.dtx (with options: `class') %% -%% Copyright (C) 1990-2018 The LaTeX3 Project +%% Copyright (C) 1990-2024 The LaTeX Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -14,8 +15,9 @@ %% %% https://www.latex-project.org/lppl.txt %% -%% File: l3doc.dtx Copyright (C) 1990-2018 The LaTeX3 project -%% +%% This file is part of the "l3kernel bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% This is really a temporary file intended for a single article @@ -30,10 +32,10 @@ %% was meant for (which so far is 2) you are on your own :-) %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\RequirePackage{expl3,xparse,calc} -\ProvidesExplClass{l3doc-TUB}{2021/03/02}{} - {L3 Experimental documentation class (special version for TUGboat with fixes)} +%% File: l3doc.dtx +\RequirePackage{calc} +\ProvidesExplClass{l3doc-TUB2024}{2024-05-08}{} + {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq \seq_new:N \g_doc_macros_seq @@ -54,8 +56,9 @@ \prop_new:N \g__codedoc_missing_tests_prop \seq_new:N \g__codedoc_not_tested_seq \seq_new:N \g__codedoc_testfiles_seq -\bool_new:N \l__codedoc_macro_internal_set_bool +\bool_new:N \l__codedoc_macro_deprecated_bool \bool_new:N \l__codedoc_macro_internal_bool +\bool_new:N \l__codedoc_macro_nodoc_bool \bool_new:N \l__codedoc_macro_TF_bool \bool_new:N \l__codedoc_macro_pTF_bool \bool_new:N \l__codedoc_macro_noTF_bool @@ -69,6 +72,9 @@ \bool_new:N \g__codedoc_checkfunc_bool \bool_new:N \g__codedoc_checktest_bool \bool_new:N \g__codedoc_kernel_bool +\bool_new:N \g__codedoc_cs_break_bool +\bool_new:N \g__codedoc_show_notes_bool +\bool_gset_true:N \g__codedoc_cs_break_bool \tl_new:N \l__codedoc_tmpa_tl \tl_new:N \l__codedoc_tmpb_tl \int_new:N \l__codedoc_tmpa_int @@ -78,12 +84,10 @@ \bool_new:N \l__codedoc_names_verb_bool \seq_new:N \l__codedoc_names_seq \seq_new:N \g__codedoc_nested_names_seq -\tl_const:Nx \c__codedoc_backslash_tl { \iow_char:N \\ } -\exp_last_unbraced:NNo - \cs_new_eq:NN \c__codedoc_backslash_token { \c__codedoc_backslash_tl } \tl_new:N \l__codedoc_index_macro_tl \tl_new:N \l__codedoc_index_key_tl \tl_new:N \l__codedoc_index_module_tl +\tl_new:N \l__codedoc_macro_do_not_index_tl \bool_new:N \l__codedoc_index_internal_bool \tl_new:N \g__codedoc_module_name_tl \tl_const:Nn \c__codedoc_iow_rule_tl @@ -113,39 +117,20 @@ \cs_new_eq:NN \__codedoc_tmpa:w ? \cs_new_eq:NN \__codedoc_tmpb:w ? \cs_generate_variant:Nn \seq_set_split:Nnn { NoV } -\cs_generate_variant:Nn \seq_gput_right:Nn { Nf } -\cs_generate_variant:Nn \str_case:nn { fn } -\cs_generate_variant:Nn \tl_count:n { f } -\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno } -\cs_generate_variant:Nn \tl_if_empty:nTF { f } -\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { o } -\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 , 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 } -\cs_generate_variant:Nn \tl_remove_all:Nn { Nx } -\cs_generate_variant:Nn \tl_replace_all:Nnn { Nx , Nnx, No , Nno } -\cs_generate_variant:Nn \tl_replace_once:Nnn { Noo } -\cs_generate_variant:Nn \tl_to_str:n { f , o } -\cs_generate_variant:Nn \prop_get:NnNTF { Nx } -\cs_generate_variant:Nn \prop_put:Nnn { Nx } -\cs_generate_variant:Nn \prop_gput:Nnn { NVx } +\cs_generate_variant:Nn \tl_to_str:n { f } \prg_new_protected_conditional:Npnn \__codedoc_if_almost_str:n #1 { TF , T , F } { \int_compare:nNnTF { \tl_count:n {#1} } - < { \tl_count:f { \tl_to_str:f {#1} } } + < { \tl_count:e { \tl_to_str:f {#1} } } { \prg_return_false: } { \prg_return_true: } } -\cs_generate_variant:Nn \__codedoc_if_almost_str:nT { V } +\prg_generate_conditional_variant:Nnn \__codedoc_if_almost_str:n { V } { T } \cs_new_protected:Npn \__codedoc_trim_right:Nn #1#2 { \cs_set:Npn \__codedoc_tmp:w ##1 #2 ##2 \q_stop { \exp_not:n {##1} } - \tl_set:Nx #1 { \exp_after:wN \__codedoc_tmp:w #1 #2 \q_stop } + \__kernel_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 } @@ -160,18 +145,13 @@ { 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 #1 \g__codedoc_module_name_tl } } -\cs_new_protected:Npx \__codedoc_replace_at_at_aux:Nn #1#2 +\cs_new_protected:Npe \__codedoc_replace_at_at_aux:Nn #1#2 { \tl_replace_all:Nnn #1 { \token_to_str:N @ } { @ } \tl_replace_all:Nnn #1 { \token_to_str:N _ } { _ } @@ -181,12 +161,17 @@ \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 _ } { _ } + \tl_replace_all:NVn \l__codedoc_detect_internals_tl \c_underscore_str { _ } \seq_set_split:NnV \l__codedoc_tmpa_seq { _ _ } \l__codedoc_detect_internals_tl \seq_pop_left:NN \l__codedoc_tmpa_seq \l__codedoc_detect_internals_tl \seq_map_variable:NNn \l__codedoc_tmpa_seq \l__codedoc_detect_internals_tl @@ -200,7 +185,7 @@ \__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-TUB } { foreign-internal } + \msg_warning:nneee { 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 } @@ -237,6 +222,7 @@ { n } { n } { o } { n } { f } { n } + { e } { n } { x } { n } { V } { n } { v } { n } @@ -279,29 +265,30 @@ \__codedoc_if_almost_str:nTF {#1} { \__codedoc_key_get_base_TF:nN {#1} \l__codedoc_tmpa_tl - \tl_set:Nx #2 + \__kernel_tl_set:Nx #2 { \__codedoc_split_function_do:on \l__codedoc_tmpa_tl { \__codedoc_base_form_aux:nnN } } } { \tl_set:Nn #2 {#1} } } -\cs_new:Npx \__codedoc_key_get_base_TF:nN #1#2 +\cs_new:Npe \__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: } + \__kernel_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 { @@ -309,7 +296,9 @@ \bool_if:NT #3 { \token_to_str:N : - \str_if_eq:nnTF { #1 ~ } { \exp_args } + \bool_lazy_or:nnTF + { \str_if_eq_p:nn { #1 ~ } { \exp_args } } + { \str_if_eq_p:nn { #1 ~ } { \exp_last_unbraced } } { \exp_not:n {#2} } { \__codedoc_signature_base_form:n {#2} } } @@ -326,7 +315,7 @@ \tl_if_head_eq_charcode:nNTF {#4} : { #2 {#1} } { - \use:x + \use:e { \exp_not:n {#3} { \__codedoc_base_form_aux:nnN {#4} {#5} #6 } @@ -373,7 +362,7 @@ } \cs_new:Npn \__codedoc_gprop_name:n #1 { g__codedoc ~ \tl_to_str:n {#1} } \cs_new:Npn \__codedoc_lseq_name:n #1 { l__codedoc ~ \tl_to_str:n {#1} } -\msg_new:nnnn { l3doc-TUB } { no-signature-TF } +\msg_new:nnnn { l3doc } { no-signature-TF } { Function/macro~'#1'~cannot~be~turned~into~a~conditional. } { A~function~or~macro~environment~with~option~pTF,~TF~or~noTF~ @@ -381,58 +370,56 @@ ':'~hence~it~is~not~clear~where~to~add~'_p'~or~'TF'.~ Please~follow~expl3~naming~conventions. } -\msg_new:nnn { l3doc-TUB } { deprecated-function } - { The~deprecated~function(s)~'#1'~should~have~been~removed~on~#2. } -\msg_new:nnn { l3doc-TUB } { date-format } +\msg_new:nnn { l3doc } { date-format } { The~date~'#1'~should~be~given~in~YYYY-MM-DD~format. } -\msg_new:nnn { l3doc-TUB } { syntax-nested-function } +\msg_new:nnn { l3doc } { future-date } + { The~added/updated~date~'#2'~of~'#1'~is~in~the~future. } +\msg_new:nnn { l3doc } { syntax-nested-function } { The~'syntax'~environment~should~be~used~in~the~ innermost~'function'~environment. } -\msg_new:nnn { l3doc-TUB } { multiple-syntax } +\msg_new:nnn { l3doc } { multiple-syntax } { The~'syntax'~environment~should~only~be~used~once~in~ a~'function'~environment. } -\msg_new:nnn { l3doc-TUB } { deprecated-option } +\msg_new:nnn { l3doc } { deprecated-option } { The~option~'#1'~has~been~deprecated~for~'#2'. } -\msg_new:nnn { l3doc-TUB } { foreign-internal } +\msg_new:nnn { l3doc } { foreign-internal } { A~control~sequence~of~the~form~'...__#1'~was~used.~ It~should~only~be~used~in~the~module~'#2' \tl_if_empty:nF {#3} { ,~not~in~'#3' } . } -\DeclareOption { a5paper } { \@latexerr { Option~not~supported } { } } -\DeclareOption { full } - { - \bool_gset_true:N \g__codedoc_typeset_documentation_bool - \bool_gset_true:N \g__codedoc_typeset_implementation_bool - } -\DeclareOption { onlydoc } - { - \bool_gset_true:N \g__codedoc_typeset_documentation_bool - \bool_gset_false:N \g__codedoc_typeset_implementation_bool - } -\DeclareOption { check } - { \bool_gset_true:N \g__codedoc_checkfunc_bool } -\DeclareOption { nocheck } - { \bool_gset_false:N \g__codedoc_checkfunc_bool } -\DeclareOption { checktest } - { \bool_gset_true:N \g__codedoc_checktest_bool } -\DeclareOption { nochecktest } - { \bool_gset_false:N \g__codedoc_checktest_bool } -\DeclareOption { kernel } - { \bool_gset_true:N \g__codedoc_kernel_bool } -\DeclareOption { stdmodule } - { \bool_gset_false:N \g__codedoc_kernel_bool } -\DeclareOption { cm-default } - { \bool_gset_false:N \g__codedoc_lmodern_bool } -\DeclareOption { lm-default } - { \bool_gset_true:N \g__codedoc_lmodern_bool } -\DeclareOption* { \PassOptionsToClass { \CurrentOption } { ltugboat } } -\ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } -%%FMi \PassOptionsToClass { a4paper } { article } +\DeclareKeys [ l3doc / options ] + { + a5paper .code:n = \@latexerr { Option~not~supported } { } , + full .code:n = + { + \bool_gset_true:N \g__codedoc_typeset_documentation_bool + \bool_gset_true:N \g__codedoc_typeset_implementation_bool + } , + onlydoc .code:n = + { + \bool_gset_true:N \g__codedoc_typeset_documentation_bool + \bool_gset_false:N \g__codedoc_typeset_implementation_bool + } , + check .bool_gset:N = \g__codedoc_checkfunc_bool , + checktest .bool_gset:N = \g__codedoc_checktest_bool , + kernel .bool_gset:N = \g__codedoc_kernel_bool , + stdmodule .bool_gset_inverse:N = \g__codedoc_kernel_bool , + lm-default .bool_gset:N = \g__codedoc_lmodern_bool , + cs-break .bool_gset_inverse:N = \g__codedoc_cs_break_bool , + cs-break-nohyphen .code:n = \PassOptionsToPackage{nohyphen}{underscore} , + show-notes .bool_gset:N = \g__codedoc_show_notes_bool, + hide-notes .bool_gset_inverse:N = \g__codedoc_show_notes_bool + } +\DeclareUnknownKeyHandler [ l3doc / options ] + { \PassOptionsToClass { \CurrentOption } { ltugboad } } +\SetKeys [ l3doc / options ] + { full , check = false , checktest = false , lm-default } +%\PassOptionsToClass { a4paper } { article } \msg_new:nnn { l3doc-TUB } { input-cfg } { Local~config~file~l3doc-TUB.cfg~loaded. } \file_if_exist:nT { l3doc-TUB.cfg } @@ -443,28 +430,11 @@ { \msg_info:nn { l3doc-TUB } { input-cfg } } } } -\ProcessOptions +\ProcessKeyOptions [ l3doc / options ] \LoadClass[final]{ltugboat} \RequirePackage{doc} - -\newcommand\bibname{References} % otherwise \bibname is undefined at \Finale -\TBtocsectionspace=0pt plus 1pt - -\IndexPrologue - {\section*{Index} - \markboth{Index}{Index} - \addcontentsline{toc}{section}{Index} - \noindent - Underlined numbers point to the definition, - italicized numbers denote the pages where the - corresponding entry is described, - all others indicate the places where it is used.} -%\EnableCrossrefs -%\CodelineIndex - \RequirePackage { - microtype, array, alphalph, amsmath, @@ -477,9 +447,9 @@ pifont, textcomp, trace, - underscore, csquotes, fancyvrb, + underscore, verbatim } \raggedbottom @@ -492,12 +462,10 @@ \DeclareFontShape{T1}{lmtt}{m}{it}{<->ec-lmtto10}{} \group_end: } - \RequirePackage{hypdoc} - %%FMi: \hypersetup{allcolors=black} - + \cs_gset:Npn \MakePrivateLetters { \char_set_catcode_letter:N \@ @@ -514,8 +482,8 @@ \cs_gset_eq:NN \endverbatim \endVerbatim \cs_set_protected:Npn \ifnot@excluded { - \exp_args:Nxx \expanded@notin - { \c__codedoc_backslash_tl \tl_to_str:N \macro@namepart , } + \exp_args:Nee \expanded@notin + { \c_backslash_str \tl_to_str:N \macro@namepart , } { \exp_args:NV \tl_to_str:n \index@excludelist } } \cs_new:Npn \pdfstringnewline { : ~ } @@ -532,19 +500,19 @@ { \__codedoc_oldlist:nn {#1} { #2 \dim_zero:N \listparindent } } \setlength \parindent { 2em } \setlength \itemindent { 0pt } -\setlength \parskip { 1pt plus 3pt minus 0pt } +\setlength \parskip { 0pt plus 3pt minus 0pt } \tl_gset:Nn \partname {File} \@addtoreset{section}{part} \cs_gset:Npn \l@section #1#2 { \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty - \addvspace{\TBtocsectionspace}% + \addvspace{1.0em \@plus\p@} \setlength\@tempdima{2.5em} % was 1.5em \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth - \leavevmode \TBtocsectionfont + \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par @@ -557,6 +525,7 @@ { \MakeShortVerb \" \MakeShortVerb \| +%FMi \onecolumn \SelfDocumenting } @@ -575,18 +544,19 @@ \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 } - { \__codedoc_cmd:no {#1} { \c__codedoc_backslash_tl #2 } } + { \__codedoc_cmd:no {#1} { \c_backslash_str #2 } } \DeclareDocumentCommand \tn { O{} m } { \__codedoc_cmd:no { module = TeX , replace = false , #1 } - { \c__codedoc_backslash_tl #2 } + { \c_backslash_str #2 } } \DeclareDocumentCommand \meta { m } - { \__codedoc_meta:n {#1} } + { \texttt{ \__codedoc_meta:n {#1} } } \DeclareExpandableDocumentCommand { \__codedoc_pdfstring_cmd:w } { o m } { \token_to_str:N #2 } \DeclareExpandableDocumentCommand @@ -595,16 +565,17 @@ { < \tl_to_str:n {#1} > } \pdfstringdefDisableCommands { - \cs_set_eq:NN \cmd \__codedoc_pdfstring_cmd:w - \cs_set_eq:NN \cs \__codedoc_pdfstring_cs:w - \cs_set_eq:NN \tn \__codedoc_pdfstring_cs:w - \cs_set_eq:NN \meta \__codedoc_pdfstring_meta:w + \cs_set_eq:NN \cmd \__codedoc_pdfstring_cmd:w + \cs_set_eq:NN \cs \__codedoc_pdfstring_cs:w + \cs_set_eq:NN \tn \__codedoc_pdfstring_cs:w + \cs_set_eq:NN \meta \__codedoc_pdfstring_meta:w + \cs_set_eq:NN \__codedoc_meta:n \__codedoc_pdfstring_meta:w } \newcommand\Arg[1] - { \texttt{\char`\{} \meta{#1} \texttt{\char`\}} } + { \texttt{\char`\{} \__codedoc_meta:n {#1} \texttt{\char`\}} } \providecommand\marg[1]{ \Arg{#1} } -\providecommand\oarg[1]{ \texttt[ \meta{#1} \texttt] } -\providecommand\parg[1]{ \texttt( \meta{#1} \texttt) } +\providecommand\oarg[1]{ \texttt[ \__codedoc_meta:n {#1} \texttt] } +\providecommand\parg[1]{ \texttt( \__codedoc_meta:n {#1} \texttt) } \DeclareRobustCommand \file {\nolinkurl} \DeclareRobustCommand \env {\texttt} \DeclareRobustCommand \pkg {\textsf} @@ -679,28 +650,31 @@ \NewDocumentCommand { \CodedocExplainEXP } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{expstar}{}}% + \write \@auxout { \def \string \Codedoc@expstar { } } \__codedoc_typeset_exp:\ indicates~fully~expandable~functions,~which~ - can~be~used~within~an~\texttt{x}-type~argument~(in~plain~ - \TeX{}~terms,~inside~an~\cs{edef}),~as~well~as~within~an~ - \texttt{f}-type~argument. + can~be~used~within~an~\texttt{e}-type~argument~(inside~an~\tn{expanded}),~ + \texttt{x}-type~argument~(in~plain~\TeX{}~terms,~inside~an~\tn{edef}),~ + as~well~as~within~an~\texttt{f}-type~argument. } \NewDocumentCommand { \CodedocExplainREXP } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{rexpstar}{}}% + \write \@auxout { \def \string \Codedoc@rexpstar { } } \__codedoc_typeset_rexp:\ indicates~ restricted~expandable~functions,~which~can~be~used~within~an~ - \texttt{x}-type~argument~but~cannot~be~fully~expanded~within~an~ - \texttt{f}-type~argument. + \texttt{x}-type~argument~or~an~\texttt{e}-type~argument,~ + but~cannot~be~fully~expanded~within~an~\texttt{f}-type~argument. } \NewDocumentCommand { \CodedocExplainTF } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{explTF}{}}% + \write \@auxout { \def \string \Codedoc@explTF { } } \__codedoc_typeset_TF:\ indicates~conditional~(\texttt{if})~functions~ whose~variants~with~\texttt{T},~\texttt{F}~and~\texttt{TF}~ argument~specifiers~expect~different~ \enquote{true}/\enquote{false}~branches. } -\keys_define:nn { l3doc-TUB/cmd } +\keys_define:nn { l3doc/cmd } { index .tl_set:N = \l__codedoc_cmd_index_tl , module .tl_set:N = \l__codedoc_cmd_module_tl , @@ -713,48 +687,56 @@ \bool_set_true:N \l__codedoc_cmd_replace_bool \tl_set:Nn \l__codedoc_cmd_index_tl { \q_no_value } \tl_set:Nn \l__codedoc_cmd_module_tl { \q_no_value } - \keys_set:nn { l3doc-TUB/cmd } {#1} + \keys_set:nn { l3doc/cmd } {#1} \tl_set:Nn \l__codedoc_cmd_tl {#2} \bool_if:NT \l__codedoc_cmd_replace_bool { \tl_set_rescan:Nnn \l__codedoc_tmpb_tl { } { _ } - \tl_replace_all:Non \l__codedoc_cmd_tl \l__codedoc_tmpb_tl { _ } + \tl_replace_all:NVn \l__codedoc_cmd_tl \l__codedoc_tmpb_tl { _ } \__codedoc_replace_at_at:N \l__codedoc_cmd_tl - \tl_replace_all:Nno \l__codedoc_cmd_tl { _ } \l__codedoc_tmpb_tl + \tl_replace_all:NnV \l__codedoc_cmd_tl { _ } \l__codedoc_tmpb_tl } \mode_if_math:T { \mbox } - { - \verbatim@font - \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl - { - \tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl } - \tl_replace_all:Non \l__codedoc_cmd_tl - { \token_to_str:N _ } { \_ } - } - \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp } - \l__codedoc_cmd_tl - \@ - } - \bool_if:NF \l__codedoc_cmd_noindex_bool { - \quark_if_no_value:NF \l__codedoc_cmd_index_tl + \bool_if:NT \l__codedoc_allow_indexing_bool { \__codedoc_target: } + \verbatim@font + \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl { - \tl_set:Nx \l__codedoc_cmd_tl - { \c_backslash_str \exp_not:o { \l__codedoc_cmd_index_tl } } + \__kernel_tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl } + \bool_if:NT \g__codedoc_cs_break_bool + { + \regex_replace_all:nnN + { ([^\\\_]\_*) \_ ([^\_]) } + { \1 \c{BreakableUnderscore} \2 } + \l__codedoc_cmd_tl + } } - - \exp_args:No \__codedoc_key_get:n { \l__codedoc_cmd_tl } - \quark_if_no_value:NF \l__codedoc_cmd_module_tl + \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp } + \l__codedoc_cmd_tl + \@ + } + \bool_if:NT \l__codedoc_allow_indexing_bool + { + \bool_if:NF \l__codedoc_cmd_noindex_bool { - \tl_set:Nx \l__codedoc_index_module_tl - { \tl_to_str:N \l__codedoc_cmd_module_tl } + \quark_if_no_value:NF \l__codedoc_cmd_index_tl + { + \__kernel_tl_set:Nx \l__codedoc_cmd_tl + { \c_backslash_str \exp_not:o { \l__codedoc_cmd_index_tl } } + } + \exp_args:No \__codedoc_key_get:n { \l__codedoc_cmd_tl } + \quark_if_no_value:NF \l__codedoc_cmd_module_tl + { + \__kernel_tl_set:Nx \l__codedoc_index_module_tl + { \tl_to_str:N \l__codedoc_cmd_module_tl } + } + \__codedoc_special_index_module:ooonN + { \l__codedoc_index_key_tl } + { \l__codedoc_index_macro_tl } + { \l__codedoc_index_module_tl } + { usage } + \l__codedoc_index_internal_bool } - \__codedoc_special_index_module:ooonN - { \l__codedoc_index_key_tl } - { \l__codedoc_index_macro_tl } - { \l__codedoc_index_module_tl } - { usage } - \l__codedoc_index_internal_bool } } \cs_generate_variant:Nn \__codedoc_cmd:nn { no } @@ -766,7 +748,7 @@ { \tl_set_rescan:Nnn \l__codedoc_tmpb_tl { \char_set_catcode:nn { `_ } {##1} } { _ } - \tl_replace_all:Non \l__codedoc_tmpa_tl \l__codedoc_tmpb_tl + \tl_replace_all:NVn \l__codedoc_tmpa_tl \l__codedoc_tmpb_tl { \__codedoc_ensuremath_sb:n } } \exp_args:NV \__codedoc_meta_original:n \l__codedoc_tmpa_tl @@ -789,18 +771,28 @@ \ensuremath \rangle } \cs_new_protected:Npn \__codedoc_typeset_exp: - { \hyperlink{expstar} {$\star$} } + { + \cs_if_exist:NTF \Codedoc@expstar + { \hyperlink { expstar } } + { \mbox } + {$\star$} + } \cs_new_protected:Npn \__codedoc_typeset_rexp: - { \hyperlink{rexpstar} {\ding{73}} } % hollow star + { + \cs_if_exist:NTF \Codedoc@rexpstar + { \hyperlink { rexpstar } } + { \mbox } + { \ding { 73 } } % hollow star + } \cs_new_protected:Npn \__codedoc_typeset_TF: { - \hyperlink{explTF} + \cs_if_exist:NTF \Codedoc@explTF + { \hyperlink { explTF } } + { \mbox } { - \color{black} \itshape TF \makebox[0pt][r] { - \color{red} \underline { \phantom{\itshape TF} \kern-0.1em } } } @@ -811,28 +803,31 @@ } \cs_new_protected:Npn \__codedoc_get_hyper_target:nN #1#2 { - \tl_set:Nx #2 { \tl_to_str:n {#1} } - \tl_replace_all:Nxn #2 { \iow_char:N \_ } { / } - \tl_remove_all:Nx #2 { \iow_char:N \\ } + \__kernel_tl_set:Nx #2 { \tl_to_str:n {#1} } + \tl_replace_all:NVn #2 \c_underscore_str { / } + \tl_remove_all:NV #2 \c_backslash_str \tl_put_left:Nn #2 { doc/function// } } -\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { o , x } +\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { o , e } \cs_new_protected:Npn \__codedoc_names_get_seq:nN #1#2 { - \tl_set:Nx \l__codedoc_tmpa_tl { \tl_to_str:n {#1} } + \__kernel_tl_set:Nx \l__codedoc_tmpa_tl { \tl_to_str:n {#1} } \bool_if:NTF \l__codedoc_names_verb_bool { \seq_clear:N #2 \seq_put_right:NV #2 \l__codedoc_tmpa_tl } { - \tl_remove_all:Nx \l__codedoc_tmpa_tl - { \iow_char:N \^^M \iow_char:N \% } - \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 } + \tl_remove_all:Ne \l__codedoc_tmpa_tl + { \iow_char:N \^^M \c_percent_str } + \tl_remove_all:Ne \l__codedoc_tmpa_tl + { \token_to_str:N \obeyedline \c_space_tl \c_percent_str } + \tl_remove_all:Ne \l__codedoc_tmpa_tl { \tl_to_str:n { ^ ^ A } } + \tl_remove_all:Ne \l__codedoc_tmpa_tl { \iow_char:N \^^I } + \tl_remove_all:Ne \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 + \exp_args:NNe \seq_set_from_clist:Nn #2 { \tl_to_str:N \l__codedoc_tmpa_tl } } } @@ -856,14 +851,14 @@ \tl_if_head_eq_charcode:nNTF {#2} : { \__codedoc_names_parse_aux:nnn {#4} {#4} { \scan_stop: } } { - \exp_args:Nx \__codedoc_names_parse_aux:nnn + \exp_args:Ne \__codedoc_names_parse_aux:nnn { \__codedoc_base_form_aux:nnN {#1} {#2} #3 } {#1} {#2} } } { \bool_if:NT \l__codedoc_macro_TF_bool - { \msg_error:nnx { l3doc-TUB } { no-signature-TF } {#4} } + { \msg_error:nne { l3doc } { no-signature-TF } {#4} } \__codedoc_names_parse_aux:nnn {#4} {#4} { \scan_stop: } } } @@ -888,18 +883,18 @@ { \seq_pop:NN #1 \l__codedoc_tmpa_tl \tl_gset_eq:NN \g__codedoc_base_name_tl \l__codedoc_tmpa_tl - \tl_greplace_all:Nno \g__codedoc_base_name_tl - { ~ } { \c_catcode_other_space_tl } + \tl_greplace_all:NnV \g__codedoc_base_name_tl + { ~ } \c_catcode_other_space_tl \seq_get:NN #1 \l__codedoc_tmpa_tl - \str_if_eq:eeTF { \l__codedoc_tmpa_tl } { \scan_stop: } + \str_if_eq:VnTF \l__codedoc_tmpa_tl { \scan_stop: } { \seq_gclear:N \g__codedoc_variants_seq - \__codedoc_names_typeset_auxii:x { \g__codedoc_base_name_tl } + \__codedoc_names_typeset_auxii:e { \g__codedoc_base_name_tl } } { \seq_gset_eq:NN \g__codedoc_variants_seq #1 \seq_gpop:NN \g__codedoc_variants_seq \l__codedoc_tmpb_tl - \__codedoc_names_typeset_auxii:x + \__codedoc_names_typeset_auxii:e { \g__codedoc_base_name_tl : \l__codedoc_tmpb_tl } } } @@ -907,7 +902,7 @@ { \bool_if:NT \l__codedoc_macro_pTF_bool { - \__codedoc_names_typeset_block:xN + \__codedoc_names_typeset_block:eN { \__codedoc_predicate_from_base:n {#1} } \c_false_bool } @@ -915,23 +910,20 @@ { \__codedoc_names_typeset_block:nN {#1} \c_false_bool } \__codedoc_names_typeset_block:nN {#1} \l__codedoc_macro_TF_bool } -\cs_generate_variant:Nn \__codedoc_names_typeset_auxii:n { x } +\cs_generate_variant:Nn \__codedoc_names_typeset_auxii:n { e } \cs_new_protected:Npn \__codedoc_names_typeset_block:nN { \int_compare:nNnTF \l__codedoc_nested_macro_int = 0 { \__codedoc_typeset_function_block:nN } { \__codedoc_macro_typeset_block:nN } } -\cs_generate_variant:Nn \__codedoc_names_typeset_block:nN { x } +\cs_generate_variant:Nn \__codedoc_names_typeset_block:nN { e } \prg_new_conditional:Npnn \__codedoc_if_macro_internal:n #1 { p , T , F , TF } { - \bool_if:NTF \l__codedoc_macro_internal_set_bool - { - \bool_if:NTF \l__codedoc_macro_internal_bool - { \prg_return_true: } { \prg_return_false: } - } + \bool_if:NTF \l__codedoc_macro_internal_bool + { \prg_return_true: } { - \tl_if_empty:fTF + \tl_if_empty:eTF { \exp_after:wN \__codedoc_if_macro_internal_aux:w \tl_to_str:n { #1 ~ __ } @@ -949,18 +941,18 @@ \seq_set_eq:NN \l__codedoc_tmpa_seq ##1 \seq_pop:NN \l__codedoc_tmpa_seq \l__codedoc_tmpa_tl \seq_get:NN \l__codedoc_tmpa_seq \l__codedoc_tmpb_tl - \exp_args:NNx + \exp_args:NNe \group_end: #1 { \l__codedoc_tmpa_tl - \str_if_eq:eeF { \l__codedoc_tmpb_tl } { \scan_stop: } + \str_if_eq:VnF \l__codedoc_tmpb_tl { \scan_stop: } { : \l__codedoc_tmpb_tl } \bool_if:NT \l__codedoc_macro_TF_bool { TF } } } } -\keys_define:nn { l3doc-TUB/function } +\keys_define:nn { l3doc/function } { TF .value_forbidden:n = true , TF .code:n = @@ -993,9 +985,10 @@ \bool_set_true:N \l__codedoc_macro_noTF_bool \bool_set_true:N \l__codedoc_macro_TF_bool } , - added .code:n = { \__codedoc_date_set:Nn \l__codedoc_date_added_tl {#1} }, - updated .code:n = { \__codedoc_date_set:Nn \l__codedoc_date_updated_tl {#1} } , - deprecated .code:n = { \__codedoc_deprecated_on:n {#1} } , + added .code:n = { \__codedoc_date_set_past:Nn \l__codedoc_date_added_tl {#1} }, + updated .code:n = { \__codedoc_date_set_past:Nn \l__codedoc_date_updated_tl {#1} } , + deprecated .bool_set:N = \l__codedoc_macro_deprecated_bool , + no-user-doc .bool_set:N = \l__codedoc_macro_nodoc_bool , tested .code:n = { } , label .code:n = { @@ -1012,29 +1005,27 @@ \regex_replace_once:nnNF { \A(\d\d\d\d)[-/](\d\d?)[-/](\d\d?)\Z } { \1-\2-\3 } #1 { - \msg_error:nnn { l3doc-TUB } { date-format } {#2} + \msg_error:nnn { l3doc } { date-format } {#2} \tl_set:Nn #1 { 1970-01-01 } } } -\cs_new_protected:Npn \__codedoc_deprecated_on:n #1 +\cs_new_protected:Npn \__codedoc_date_set_past:Nn #1#2 { - \__codedoc_date_set:Nn \l__codedoc_tmpa_tl {#1} + \__codedoc_date_set:Nn #1 {#2} \exp_args:No \__codedoc_date_compare:nNnT - { \l__codedoc_tmpa_tl } < { \tex_year:D - \tex_month:D - \tex_day:D } + {#1} > { \c_sys_year_int - \c_sys_month_int - \c_sys_day_int } { - \msg_error:nnxx { l3doc-TUB } { deprecated-function } + \msg_error:nnee { l3doc } { future-date } { \tl_to_str:N \l__codedoc_macro_argument_tl } - { \l__codedoc_tmpa_tl } + {#1} } - \bool_set_true:N \l__codedoc_macro_internal_bool - \bool_set_true:N \l__codedoc_macro_internal_set_bool } \cs_new_protected:Npn \__codedoc_function:nnw #1#2 { \__codedoc_function_typeset_start: \__codedoc_function_init: \tl_set:Nn \l__codedoc_macro_argument_tl {#2} - \keys_set:nn { l3doc-TUB/function } {#1} + \keys_set:nn { l3doc/function } {#1} \__codedoc_names_get_seq:nN {#2} \l__codedoc_names_seq \__codedoc_names_parse: \__codedoc_function_typeset: @@ -1054,12 +1045,13 @@ \cs_new_protected:Npn \__codedoc_function_typeset_stop: { \par + \dim_set:Nn \prevdepth { \box_dp:N \l__codedoc_descr_coffin } \allowbreak } \cs_new_protected:Npn \__codedoc_function_init: { \box_if_empty:NF \g__codedoc_syntax_box - { \msg_error:nn { l3doc-TUB } { syntax-nested-function } } + { \msg_error:nn { l3doc } { syntax-nested-function } } \coffin_clear:N \l__codedoc_descr_coffin \box_gclear:N \g__codedoc_syntax_box \coffin_clear:N \l__codedoc_syntax_coffin @@ -1143,8 +1135,7 @@ \cs_new_protected:Npn \__codedoc_typeset_functions: { \small\ttfamily - \HD@savedestfalse - \HD@target + \__codedoc_target: \Hy@MakeCurrentHref { HD. \int_use:N \c@HD@hypercount } \begin{tabular} [t] { @{} l @{} >{\hspace{\tabcolsep}} r @{} } \toprule @@ -1157,9 +1148,9 @@ } \cs_new_protected:Npn \__codedoc_typeset_function_block:nN #1#2 { - \__codedoc_function_index:x + \__codedoc_function_index:e { #1 \bool_if:NT #2 { \tl_to_str:n {TF} } } - \__codedoc_function_label:xN {#1} #2 + \__codedoc_function_label:eN {#1} #2 #1 \bool_if:NT #2 { \__codedoc_typeset_TF: } \__codedoc_typeset_expandability: @@ -1167,13 +1158,13 @@ { \__codedoc_typeset_variant_list:nN {#1} #2 } \\ } -\cs_generate_variant:Nn \__codedoc_typeset_function_block:nN { x } +\cs_generate_variant:Nn \__codedoc_typeset_function_block:nN { e } \cs_new_protected:Npn \__codedoc_function_index:n #1 { \seq_gput_right:Nn \g_doc_functions_seq {#1} \__codedoc_special_index:nn {#1} { usage } } -\cs_generate_variant:Nn \__codedoc_function_index:n { x } +\cs_generate_variant:Nn \__codedoc_function_index:n { e } \cs_new_protected:Npn \__codedoc_typeset_expandability: { & @@ -1186,13 +1177,30 @@ \__codedoc_typeset_aux:n { \__codedoc_get_function_name:n {#1} } : \int_compare:nTF { \seq_count:N \g__codedoc_variants_seq == 1 } - { \seq_use:Nn \g__codedoc_variants_seq { } } { + \seq_use:Nn \g__codedoc_variants_seq { } + \bool_if:NT #2 { \__codedoc_typeset_TF: } + } + { + \hbox_set:Nn \l_tmpa_box + { \seq_use:Nn \g__codedoc_variants_seq { \textrm| \nolinebreak[2] } } \textrm( - \seq_use:Nn \g__codedoc_variants_seq { \textrm| } - \textrm) + \dim_compare:nNnTF { \box_wd:N \l_tmpa_box } > { .4\columnwidth } + { + \parbox[t]{.4\columnwidth} + { + \raggedright + \hbox_unpack_drop:N \l_tmpa_box + \textrm) + \bool_if:NT #2 { \__codedoc_typeset_TF: } + } + } + { + \hbox_unpack_drop:N \l_tmpa_box + \textrm) + \bool_if:NT #2 { \__codedoc_typeset_TF: } + } } - \bool_if:NT #2 { \__codedoc_typeset_TF: } \__codedoc_typeset_expandability: } \cs_new_protected:Npn \__codedoc_function_extra_labels: @@ -1211,7 +1219,7 @@ { \bool_if:NF \l__codedoc_no_label_bool { - \__codedoc_get_hyper_target:xN + \__codedoc_get_hyper_target:eN { \exp_not:n {#1} \bool_if:NT #2 { \tl_to_str:n {TF} } @@ -1220,7 +1228,7 @@ \exp_args:No \label { \l__codedoc_tmpa_tl } } } -\cs_generate_variant:Nn \__codedoc_function_label:nN { x } +\cs_generate_variant:Nn \__codedoc_function_label:nN { e } \cs_new:Npn \__codedoc_typeset_dates: { \bool_lazy_and:nnF @@ -1243,7 +1251,7 @@ \cs_new_protected:Npn \__codedoc_syntax:w { \box_if_empty:NF \g__codedoc_syntax_box - { \msg_error:nn { l3doc-TUB } { multiple-syntax } } + { \msg_error:nn { l3doc } { multiple-syntax } } \dim_set:Nn \l__codedoc_syntax_dim { \textwidth @@ -1274,26 +1282,22 @@ \end{quote} } } -\keys_define:nn { l3doc-TUB/macro } +\keys_define:nn { l3doc/macro } { aux .value_forbidden:n = true , aux .code:n = { - \msg_warning:nnnn { l3doc-TUB } { deprecated-option } + \msg_warning:nnnn { l3doc } { deprecated-option } { aux } { function/macro } } , + deprecated .bool_set:N = \l__codedoc_macro_deprecated_bool , internal .value_forbidden:n = true , internal .code:n = - { - \bool_set_true:N \l__codedoc_macro_internal_bool - \bool_set_true:N \l__codedoc_macro_internal_set_bool - } , + { \bool_set_true:N \l__codedoc_macro_internal_bool } , int .value_forbidden:n = true , int .code:n = - { - \bool_set_true:N \l__codedoc_macro_internal_bool - \bool_set_true:N \l__codedoc_macro_internal_set_bool - } , + { \bool_set_true:N \l__codedoc_macro_internal_bool } , + no-user-doc .bool_set:N = \l__codedoc_macro_nodoc_bool , var .value_forbidden:n = true , var .code:n = { \bool_set_true:N \l__codedoc_macro_var_bool } , @@ -1332,18 +1336,21 @@ } , added .code:n = {} , % TODO updated .code:n = {} , % TODO - deprecated .code:n = { \__codedoc_deprecated_on:n {#1} } , verb .bool_set:N = \l__codedoc_names_verb_bool , module .tl_set:N = \l__codedoc_override_module_tl , documented-as .tl_set:N = \l__codedoc_macro_documented_tl , + do-not-index .value_required:n = true , + do-not-index .tl_set:N = \l__codedoc_macro_do_not_index_tl , + % do-not-index .default:n = \q_no_value , } \cs_new_protected:Npn \__codedoc_macro:nnw #1#2 { \__codedoc_macro_init: \tl_set:Nn \l__codedoc_macro_argument_tl {#2} - \keys_set:nn { l3doc-TUB/macro } {#1} + \keys_set:nn { l3doc/macro } {#1} \__codedoc_names_get_seq:nN {#2} \l__codedoc_names_seq \__codedoc_names_parse: + \__codedoc_macro_exclude_index: \__codedoc_macro_save_names: \__codedoc_names_typeset: \__codedoc_macro_dump: @@ -1352,8 +1359,8 @@ \cs_new_protected:Npn \__codedoc_macro_init: { \int_incr:N \l__codedoc_nested_macro_int + \bool_set_false:N \l__codedoc_macro_deprecated_bool \bool_set_false:N \l__codedoc_macro_internal_bool - \bool_set_false:N \l__codedoc_macro_internal_set_bool \bool_set_false:N \l__codedoc_macro_TF_bool \bool_set_false:N \l__codedoc_macro_pTF_bool \bool_set_false:N \l__codedoc_macro_noTF_bool @@ -1371,8 +1378,7 @@ \hbox:n { \strut - \int_compare:nNnT \l__codedoc_macro_int = 0 - { \HD@target } + \int_compare:nNnT \l__codedoc_macro_int = 0 { \__codedoc_target: } } \vskip \int_eval:n { \l__codedoc_macro_int - 1 } \baselineskip } @@ -1386,12 +1392,31 @@ \tl_if_empty:NTF \l__codedoc_macro_documented_tl { \__codedoc_names_block_base_map:N \__codedoc_macro_save_names_aux:n } { - \seq_gput_right:Nf \g__codedoc_nested_names_seq - { \exp_after:wN \token_to_str:N \l__codedoc_macro_documented_tl } + \seq_gput_right:Ne \g__codedoc_nested_names_seq + { + \exp_after:wN \__codedoc_macro_save_names_aux:w + \l__codedoc_macro_documented_tl \q__codedoc_stop + } } } +\cs_new:Npn \__codedoc_macro_save_names_aux:w #1#2 \q__codedoc_stop + { \token_to_str:N #1 \tl_to_str:n {#2} } \cs_new_protected:Npn \__codedoc_macro_save_names_aux:n #1 { \seq_gput_right:Nn \g__codedoc_nested_names_seq {#1} } +\cs_new_protected:Npn \__codedoc_macro_exclude_index: + { + \tl_if_empty:NF \l__codedoc_macro_do_not_index_tl + { + \tl_set_rescan:NnV \l__codedoc_macro_do_not_index_tl + { \MakePrivateLetters \catcode`\\12 } + \l__codedoc_macro_do_not_index_tl + \exp_args:NNV \seq_set_from_clist:Nn + \l__codedoc_tmpa_seq \l__codedoc_macro_do_not_index_tl + \__kernel_tl_set:Nx \l__codedoc_macro_do_not_index_tl + { \seq_use:Nn \l__codedoc_tmpa_seq { , } } + \exp_args:NV \DoNotIndex \l__codedoc_macro_do_not_index_tl + } + } \cs_new_protected:Npn \__codedoc_macro_dump: { \topsep\MacroTopsep @@ -1415,23 +1440,22 @@ \__codedoc_macro_single:nNN {#1} \c_true_bool #2 \seq_if_empty:NF \g__codedoc_variants_seq { - \__codedoc_macro_typeset_variant_list:xN + \__codedoc_macro_typeset_variant_list:eN { \__codedoc_get_function_name:n {#1} } #2 } } -\cs_generate_variant:Nn \__codedoc_macro_typeset_block:nN { x } \cs_new_protected:Npn \__codedoc_macro_typeset_variant_list:nN #1#2 { \seq_map_inline:Nn \g__codedoc_variants_seq { \__codedoc_macro_single:nNN { #1 : ##1 } \c_false_bool #2 } } -\cs_generate_variant:Nn \__codedoc_macro_typeset_variant_list:nN { x } +\cs_generate_variant:Nn \__codedoc_macro_typeset_variant_list:nN { e } \cs_new_protected:Npn \__codedoc_macro_single:nNN #1#2#3 { \tl_set:Nn \saved@macroname {#1} \__codedoc_macro_typeset_one:nN {#1} #3 \bool_if:NT #3 { \DoNotIndex {#1} } - \exp_args:Nx \__codedoc_macro_index:nN + \exp_args:Ne \__codedoc_macro_index:nN { #1 \bool_if:NT #3 { \tl_to_str:n { TF } } } #2 } @@ -1440,7 +1464,12 @@ \DoNotIndex {#1} \bool_if:NT #2 { - \__codedoc_if_macro_internal:nF {#1} + \bool_lazy_any:nF + { + { \__codedoc_if_macro_internal_p:n {#1} } + { \l__codedoc_macro_deprecated_bool } + { \l__codedoc_macro_nodoc_bool } + } { \seq_gput_right:Nn \g_doc_macros_seq {#1} } \hbox_set:Nw \l__codedoc_macro_index_box \hbox_unpack_drop:N \l__codedoc_macro_index_box @@ -1456,14 +1485,16 @@ \vbox_set:Nn \l__codedoc_macro_box { \vbox_unpack_drop:N \l__codedoc_macro_box - \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2 \ } } + \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2 + \MacroFont \ + } } } \int_incr:N \l__codedoc_macro_int } \cs_new_protected:Npn \__codedoc_print_macroname:nN #1#2 { \strut - \__codedoc_get_hyper_target:xN + \__codedoc_get_hyper_target:eN { \exp_not:n {#1} \bool_if:NT #2 { \tl_to_str:n {TF} } @@ -1476,20 +1507,18 @@ \int_compare:nTF { \str_count:n {#1} <= 28 } { \MacroFont } { \MacroLongFont } \tl_set:Nn \l__codedoc_tmpa_tl {#1} - \tl_replace_all:Nno \l__codedoc_tmpa_tl - { ~ } { \c_catcode_other_space_tl } - \__codedoc_macroname_prefix:o \l__codedoc_tmpa_tl - \__codedoc_macroname_suffix:N #2 + \tl_replace_all:NnV \l__codedoc_tmpa_tl + { ~ } \c_catcode_other_space_tl + \__codedoc_print_macroname_aux:on + \l__codedoc_tmpa_tl { \bool_if:NT #2 { \__codedoc_typeset_TF: } } } } -\cs_new_protected:Npn \__codedoc_macroname_prefix:n #1 +\cs_new_protected:Npn \__codedoc_print_macroname_aux:nn #1#2 { \__codedoc_if_macro_internal:nTF {#1} - { \__codedoc_typeset_aux:n {#1} } {#1} + { \__codedoc_typeset_aux:n { #1 #2 } } { #1 #2 } } -\cs_generate_variant:Nn \__codedoc_macroname_prefix:n { o } -\cs_new_protected:Npn \__codedoc_macroname_suffix:N #1 - { \bool_if:NTF #1 { \__codedoc_typeset_TF: } { } } +\cs_generate_variant:Nn \__codedoc_print_macroname_aux:nn { o } \providecommand \MacroLongFont { \fontfamily{lmtt}\fontseries{lc}\small @@ -1533,10 +1562,10 @@ { \__codedoc_test_missing:n {#1} } \cs_new_protected:Npn \__codedoc_test_missing:n #1 { - \__codedoc_test_missing_aux:Nxn + \__codedoc_test_missing_aux:Nen \g__codedoc_missing_tests_prop { \seq_use:Nn \l__codedoc_names_seq { , } } - { { \g_file_curr_name_str \iow_char:N \ (#1) } } + { { \g_file_curr_name_str \c_space_tl (#1) } } } \cs_new_protected:Npn \__codedoc_test_missing_aux:Nnn #1#2#3 { @@ -1545,7 +1574,7 @@ { \tl_set:Nn \l__codedoc_tmpa_tl {#3} } \prop_put:Nno #1 {#2} \l__codedoc_tmpa_tl } -\cs_generate_variant:Nn \__codedoc_test_missing_aux:Nnn { Nx } +\cs_generate_variant:Nn \__codedoc_test_missing_aux:Nnn { Ne } \cs_new_protected:Npn \__codedoc_macro_end: { \endtrivlist @@ -1556,21 +1585,21 @@ \cs_new_protected:Npn \__codedoc_macro_end_check_tested: { \bool_lazy_all:nT - { - { \g__codedoc_checktest_bool } - { ! \l__codedoc_macro_var_bool } - { ! \l__codedoc_macro_tested_bool } - } - { - \seq_set_filter:NNn \l__codedoc_tmpa_seq \l__codedoc_names_seq - { ! \__codedoc_if_macro_internal_p:n {##1} } - \seq_gput_right:Nx \g__codedoc_not_tested_seq - { - \seq_use:Nn \l__codedoc_tmpa_seq { , } - \bool_if:NTF \l__codedoc_macro_pTF_bool {~(pTF)} - { \bool_if:NT \l__codedoc_macro_TF_bool {~(TF)} } - } - } + { + { \g__codedoc_checktest_bool } + { ! \l__codedoc_macro_var_bool } + { ! \l__codedoc_macro_tested_bool } + } + { + \seq_set_filter:NNn \l__codedoc_tmpa_seq \l__codedoc_names_seq + { ! \__codedoc_if_macro_internal_p:n {##1} } + \seq_gput_right:Ne \g__codedoc_not_tested_seq + { + \seq_use:Nn \l__codedoc_tmpa_seq { , } + \bool_if:NTF \l__codedoc_macro_pTF_bool {~(pTF)} + { \bool_if:NT \l__codedoc_macro_TF_bool {~(TF)} } + } + } } \cs_new_protected:Npn \__codedoc_macro_end_style:n #1 { @@ -1580,16 +1609,16 @@ \cs_new_protected:Npn \__codedoc_macro_end_wrap_item:n #1 { \tl_set:Nn \l__codedoc_tmpa_tl {#1} - \tl_replace_all:Non \l__codedoc_tmpa_tl - { \token_to_str:N _ } { \_ } + \tl_replace_all:NVn \l__codedoc_tmpa_tl + \c_underscore_str { \_ } \texttt { \l__codedoc_tmpa_tl } } \cs_new_protected:Npn \__codedoc_print_end_definition: { \seq_set_map:NNn \l__codedoc_tmpa_seq \g__codedoc_nested_names_seq - { \exp_not:n { \__codedoc_macro_end_wrap_item:n {##1} } } - End~ definition~ for~ + { \__codedoc_macro_end_wrap_item:n {##1} } + End~ of~ definition~ for~ \int_compare:nTF { \seq_count:N \l__codedoc_tmpa_seq <= 3 } { \seq_use:Nnnn \l__codedoc_tmpa_seq @@ -1603,7 +1632,14 @@ { \seq_gset_filter:NNn \g__codedoc_nested_names_seq \g__codedoc_nested_names_seq - { ! \__codedoc_if_macro_internal_p:n {##1} } + { + ! \bool_lazy_any_p:n + { + { \__codedoc_if_macro_internal_p:n {##1} } + { \l__codedoc_macro_deprecated_bool } + { \l__codedoc_macro_nodoc_bool } + } + } \seq_if_empty:NF \g__codedoc_nested_names_seq { \int_set:Nn \l__codedoc_tmpa_int @@ -1612,55 +1648,14 @@ \bool_if:NTF \l__codedoc_macro_var_bool {variable} {function} \int_compare:nNnTF \l__codedoc_tmpa_int = 1 {~is~} {s~are~} documented~on~page~ - \__codedoc_get_hyper_target:xN + \__codedoc_get_hyper_target:eN { \seq_item:Nn \g__codedoc_nested_names_seq { 1 } } \l__codedoc_tmpa_tl - \exp_args:Nx \pageref { \l__codedoc_tmpa_tl } . + \exp_args:Ne \pageref { \l__codedoc_tmpa_tl } . } \seq_gclear:N \g__codedoc_nested_names_seq } -\newcommand*{\DescribeOption} - { - \leavevmode - \@bsphack - \begingroup - \MakePrivateLetters - \Describe@Option - } -\newcommand*{\Describe@Option}[1] - { - \endgroup - \marginpar{ - \raggedleft - \PrintDescribeEnv{#1} - } - \SpecialOptionIndex{#1} - \@esphack - \ignorespaces - } -\newcommand*{\SpecialOptionIndex}[1] - { - \@bsphack - \begingroup - \HD@target - \let\HDorg@encapchar\encapchar - \edef\encapchar usage - { - \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage} - } - \index - { - #1\actualchar{\protect\ttfamily#1}~(option) - \encapchar usage - } - \index - { - options:\levelchar#1\actualchar{\protect\ttfamily#1} - \encapchar usage - } - \endgroup - \@esphack - } +\NewDocElement[idxtype = option, idxgroup = options]{Option}{optionenv} \font \manual = manfnt \scan_stop: \cs_gset:Npn \dbend { {\manual\char127} } \newenvironment {danger} @@ -1682,6 +1677,56 @@ }{ \par\end{trivlist} } +\bool_if:NTF \g__codedoc_show_notes_bool + { + \NewDocumentCommand\NB{mm} + { + (\emph{Note}\footnote{\ttfamily [#1]:~\detokenize{#2}}) + } + } + { + \NewDocumentCommand\NB{mm}{} + } +\bool_if:NTF \g__codedoc_show_notes_bool + { + \NewDocumentEnvironment{NOTE}{m} + { + \par\noindent (\emph{Note}~[\texttt{#1}]:\par + \verbatim + } + { + \endverbatim + \par\noindent \emph{Note~end})\par + } + } + { + \NewDocumentEnvironment{NOTE}{m}{\comment}{\endcomment} + } +\providecommand\Hy@footnote@currentHref{} +\prop_new:N\g__codedoc_fnmark_prop +\cs_new_protected:Npn \__codedoc_fn_store: + { + \prop_gput:Nee\g__codedoc_fnmark_prop + {fn\int_use:N\c@footnote}{{\Hy@footnote@currentHref}{\int_use:N\c@footnote}} + } +\cs_new_protected:Npn \__codedoc_fn_restore:n #1 + { + \prop_get:NnN \g__codedoc_fnmark_prop {fn#1}\l__codedoc_tmpa_tl + \tl_gset:Ne\Hy@footnote@currentHref + {\exp_last_unbraced:NV\use_i:nn \l__codedoc_tmpa_tl } + \setcounter{footnote}{\exp_last_unbraced:NV\use_ii:nn \l__codedoc_tmpa_tl} + } + +\cs_generate_variant:Nn \hook_gput_next_code:nn {ne} +\cs_new_protected:Npn \__codedoc_fn_footnote:nn #1 #2 + { + \footnotemark + \__codedoc_fn_store: + \hook_gput_next_code:ne {env/#1/after} + {\exp_not:N\__codedoc_fn_restore:n{\int_use:N\c@footnote}{\exp_not:n{\footnotetext{#2}}}}} + +\AddToHook{env/function/begin}{\def\footnote{\__codedoc_fn_footnote:nn{function}}} +\AddToHook{env/variable/begin}{\def\footnote{\__codedoc_fn_footnote:nn{variable}}} \newenvironment{TemplateInterfaceDescription}[1] { \subsection{The~object~type~`#1'} @@ -1750,6 +1795,8 @@ } { #1 \endinput } } +\cs_if_exist:NT \MaybeStop + { \RenewCommandCopy \MaybeStop \StopEventually } \DeclareDocumentCommand \Finale { } { \tl_use:N \g__codedoc_finale_tl } \tl_new:N \g__codedoc_finale_tl @@ -1770,6 +1817,18 @@ } \DeclareDocumentCommand \DocInputAgain { } { \clist_map_function:NN \g_docinput_clist \__codedoc_input:n } +\msg_new:nnn { l3doc } { missing-endgroup } + { + \str_if_eq:VnTF \@currenvir { document } + { + There~are~\int_use:N \tex_currentgrouplevel:D + \c_space_tl unclosed~groups~in~#1. + } + { + The~\@currenvir \c_space_tl environment~on~line~\@currenvline + \c_space_tl doesn't~have~a~matching~\iow_char:N\\end{\@currenvir}. + } + } \NewDocumentCommand \DocInclude { m } { \relax\clearpage @@ -1779,7 +1838,14 @@ { \cs_set:Npn \currentfile{#1.dtx} } \int_compare:nNnTF \@auxout = \@partaux { \@latexerr{\string\include\space cannot~be~nested}\@eha } - { \@docinclude #1 } + { \@docinclude {#1} } + % check missing \endgroup, e.g., missing "\end{macro}" in time + \int_compare:nNnF { \tex_currentgrouplevel:D } = { 0 } + { + \int_compare:nNnT { \tex_interactionmode:D } = { 0 } + { \int_gset:Nn \tex_interactionmode:D { 1 } } + \msg_fatal:nne { l3doc } { missing-endgroup } { \currentfile } + } } \cs_gset:Npn \@docinclude #1 { @@ -1788,10 +1854,12 @@ \@tempswatrue \if@partsw \@tempswafalse - \cs_set:Npx \@tempb{#1} - \@for\@tempa:=\@partlist\do + \cs_set:Npe \@tempb {#1} + \clist_map_inline:Nn \@partlist { - \ifx\@tempa\@tempb\@tempswatrue\fi + \if_meaning:w \@tempa \@tempb + \@tempswatrue + \fi: } \fi \if@tempswa @@ -1807,8 +1875,8 @@ \part{\currentfile} { \cs_set_eq:NN \ttfamily\relax - \cs_gset:Npx \filekey - { \filekey, \thepart = { \ttfamily \currentfile } } + \cs_gset:Npe \filekey + { \filekey,~ \thepart = { \ttfamily \currentfile } } } \DocInput{\currentfile} \cs_set_eq:NN \PrintIndex \@ltxdoc@PrintIndex @@ -1823,15 +1891,37 @@ \fi \cs_set_eq:NN \@auxout \@mainaux } -\cs_gset:Npn \codeline@wrindex #1 +\cs_gset_protected:Npn \@wrindex #1 + { + \protected@write \@indexfile {} + { \string \indexentry {#1} { MMMMI - \thepage } } + \endgroup \@esphack + } +\cs_gset_protected:Npn \codeline@wrindex #1 { \immediate\write\@indexfile { \string\indexentry{#1} - { \filesep \int_use:N \c@CodelineNo } + { MMMMV - \filesep \int_use:N \c@CodelineNo } } } \tl_gclear:N \filesep +\cs_new_protected:Npn \__codedoc_index_page_hc:nn #1#2 + { + \protected@write \@indexfile {} + { + \string \indexentry { #1 \encapchar hdpindex{#2} } + { MMMMI - \thepage } + } + } +\cs_new_protected:Npn \__codedoc_index_codeline_hc:nn #1#2 + { + \immediate\write\@indexfile + { + \string \indexentry { #1 \encapchar hdclindex{\the\c@HD@hypercount}{#2} } + { MMMMV - \filesep \int_use:N \c@CodelineNo - MMMD - \the\c@HD@hypercount - M } + } + } \cs_gset:Npn \docincludeaux { \tl_set:Nn \thepart { \alphalph { part } } @@ -1887,65 +1977,70 @@ \char_set_catcode_active:N \> \cs_new_protected:Npn \__codedoc_xmacro_code:n #1 { + \tl_clear:N \l__codedoc_tmpa_tl \tl_if_in:nnTF {#1} { < @ @ = } - { \__codedoc_xmacro_code:w #1 \q_stop } + { \__codedoc_xmacro_code:w #1 < @ @ = \q_recursion_tail > \q_recursion_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 } } - \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > #3 \q_stop + \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > { - \tl_set:Nn \l__codedoc_tmpa_tl {#1} - \__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} + % Add code before <@@=...> + \tl_set:Nn \l__codedoc_tmpb_tl {#1} + \__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 } - - \tl_use:N \l__codedoc_tmpa_tl + \tl_put_right:NV \l__codedoc_tmpa_tl \l__codedoc_tmpb_tl + % Check for \q_recursion_tail + \quark_if_recursion_tail_stop_do:nn {#2} + { \tl_use:N \l__codedoc_tmpa_tl } + % Change module name and add <@@=#2> to typeset output + \tl_gset:Nn \g__codedoc_module_name_tl {#2} + \tl_put_right:Nn \l__codedoc_tmpa_tl { < \text { \verbatim@font @ @ = #2 } > } + % Loop + \__codedoc_xmacro_code:w } \group_end: \iow_new:N \g__codedoc_func_iow \tl_new:N \l__codedoc_doc_def_tl \tl_new:N \l__codedoc_doc_undef_tl \tl_new:N \l__codedoc_undoc_def_tl +\tl_const:Nn \c__codedoc_iow_separator_tl { ---- } +\tl_const:Nn \c__codedoc_iow_midrule_tl { -- } \cs_new_protected:Npn \__codedoc_show_functions_defined: { \bool_lazy_and:nnT { \g__codedoc_typeset_implementation_bool } { \g__codedoc_checkfunc_bool } { - \iow_term:x { \c__codedoc_iow_separator_tl \iow_newline: } + \iow_term:e { \c__codedoc_iow_separator_tl \iow_newline: } \iow_open:Nn \g__codedoc_func_iow { \c_sys_jobname_str .cmds } \tl_clear:N \l__codedoc_doc_def_tl \tl_clear:N \l__codedoc_doc_undef_tl \tl_clear:N \l__codedoc_undoc_def_tl + \seq_gremove_duplicates:N \g_doc_functions_seq + \seq_gremove_duplicates:N \g_doc_macros_seq \seq_map_inline:Nn \g_doc_functions_seq { \seq_if_in:NnTF \g_doc_macros_seq {##1} { - \tl_put_right:Nx \l__codedoc_doc_def_tl - { ##1 \iow_newline: } - \iow_now:Nn \g__codedoc_func_iow { > ~ ##1 } + \tl_put_right:Ne \l__codedoc_doc_def_tl + { \iow_newline: > ~ ##1 } } { - \tl_put_right:Nx \l__codedoc_doc_undef_tl - { ##1 \iow_newline: } - \iow_now:Nn \g__codedoc_func_iow { ! ~ ##1 } + \tl_put_right:Ne \l__codedoc_doc_undef_tl + { \iow_newline: ! ~ ##1 } } } \seq_map_inline:Nn \g_doc_macros_seq { \seq_if_in:NnF \g_doc_functions_seq {##1} { - \tl_put_right:Nx \l__codedoc_undoc_def_tl - { ##1 \iow_newline: } - \iow_now:Nn \g__codedoc_func_iow { ? ~ ##1 } + \tl_put_right:Ne \l__codedoc_undoc_def_tl + { \iow_newline: ? ~ ##1 } } } \__codedoc_functions_typeout:nN @@ -1962,7 +2057,7 @@ \l__codedoc_undoc_def_tl \iow_close:N \g__codedoc_func_iow - \iow_term:x { \c__codedoc_iow_separator_tl } + \iow_term:e { \c__codedoc_iow_separator_tl } } } \AtEndDocument { \__codedoc_show_functions_defined: } @@ -1970,11 +2065,11 @@ { \tl_if_empty:NF #2 { - \typeout + \iow_now:Ne \g__codedoc_func_iow { \c__codedoc_iow_midrule_tl \iow_newline: #1 \iow_newline: - \c__codedoc_iow_midrule_tl \iow_newline: + \c__codedoc_iow_midrule_tl #2 } \tl_clear:N #2 @@ -1998,7 +2093,7 @@ \iow_newline: \space\space\space\space\space\space * ~ ##1 } - \tl_put_right:Nx \l__codedoc_tmpa_tl + \tl_put_right:Ne \l__codedoc_tmpa_tl { \iow_newline: \iow_newline: The~ following~ macro(s)~ have~ incomplete~ tests: @@ -2016,7 +2111,7 @@ \iow_newline: \space\space\space\space ##1 } - \tl_put_right:Nx \l__codedoc_tmpa_tl + \tl_put_right:Ne \l__codedoc_tmpa_tl { \iow_newline: \iow_newline: @@ -2028,22 +2123,48 @@ } \tl_if_empty:NF \l__codedoc_tmpa_tl { - \int_set:Nn \l__codedoc_tmpa_int { \etex_interactionmode:D } + \int_set:Nn \l__codedoc_tmpa_int { \tex_interactionmode:D } \errorstopmode - \ClassError { l3doc-TUB } { \l__codedoc_tmpa_tl } { } - \int_set:Nn \etex_interactionmode:D { \l__codedoc_tmpa_int } + \ClassError { l3doc } { \l__codedoc_tmpa_tl } { } + \int_gset:Nn \tex_interactionmode:D { \l__codedoc_tmpa_int } } } } \AtEndDocument { \__codedoc_show_not_tested: } +\cs_new_protected:Npn \__codedoc_target: + { + \mode_leave_vertical: + \group_begin: + \HD@savedestfalse \HD@target + \group_end: + } +\cs_set_nopar:Npe \theCodelineNo + { + \group_begin: + \exp_not:N \HD@savedestfalse + \exp_not:o \theCodelineNo + \group_end: + } +\bool_new:N \l__codedoc_allow_indexing_bool +\bool_set_true:N \l__codedoc_allow_indexing_bool +\use:e + { + \exp_not:n { \cs_set_nopar:Npn \@starttoc #1 } + { + \group_begin: + \bool_set_false:N \l__codedoc_allow_indexing_bool + \exp_not:o { \@starttoc {#1} } + \group_end: + } + } \g@addto@macro \theindex { \MakePrivateLetters } \cs_gset:Npn \verbatimchar {&} \setcounter { IndexColumns } { 2 } \IndexPrologue { - \section*{Index} + \part*{Index} \markboth{Index}{Index} - \addcontentsline{toc}{section}{Index} + \addcontentsline{toc}{part}{Index} The~italic~numbers~denote~the~pages~where~the~ corresponding~entry~is~described,~ numbers~underlined~point~to~the~definition,~ @@ -2055,17 +2176,17 @@ \__codedoc_special_index:nn {#1} { } \@esphack } -\msg_new:nnn { l3doc-TUB } { print-index-howto } +\msg_new:nnn { l3doc } { print-index-howto } { Generate~the~index~by~executing\\ \iow_indent:n { makeindex~-s~gind.ist~-o~\c_sys_jobname_str.ind~\c_sys_jobname_str.idx } } \tl_gput_right:Nn \PrintIndex - { \AtEndDocument { \msg_info:nn { l3doc-TUB } { print-index-howto } } } + { \AtEndDocument { \msg_info:nn { l3doc } { print-index-howto } } } \cs_gset_protected:Npn \it@is@a #1 { - \use:x + \use:e { \__codedoc_special_index_module:nnnnN {#1} @@ -2092,13 +2213,13 @@ \tl_new:N \l__codedoc_index_escaped_key_tl \cs_new_protected:Npn \__codedoc_special_index_module:nnnnN #1#2#3#4#5 { - \use:x + \use:e { \exp_not:n { \__codedoc_special_index_aux:nnnnnn {#1} {#2} } \tl_if_empty:nTF {#3} { { } { } { } } { - \str_if_eq:eeTF {#3} { TeX } + \str_if_eq:nnTF {#3} { TeX } { { TeX~and~LaTeX2e } { \string\TeX{}~and~\string\LaTeXe{} } @@ -2119,14 +2240,14 @@ \__codedoc_quote_special_char:N \l__codedoc_index_escaped_key_tl \__codedoc_special_index_set:Nn \l__codedoc_index_escaped_macro_tl {#2} \str_if_eq:onTF { \@currenvir } { macrocode } - { \codeline@wrindex } + { \__codedoc_index_codeline_hc:nn } { \str_case:nnF {#6} { - { main } { \codeline@wrindex } - { usage } { \index } + { main } { \__codedoc_index_codeline_hc:nn } + { usage } { \__codedoc_index_page_hc:nn } } - { \HD@target \index } + { \__codedoc_target: \__codedoc_index_page_hc:nn } } { \tl_if_empty:nF { #3 #4 #5 } @@ -2137,31 +2258,64 @@ \token_to_str:N \verbatim@font \c_space_tl \l__codedoc_index_escaped_macro_tl } - \encapchar - hdclindex{\the\c@HD@hypercount}{#6} } + {#6} } +\group_begin: +\char_set_active_eq:NN - \scan_stop: +\tl_const:Ne \c__codedoc_active_minus_tl { \char_generate:nn { `- } { 13 } } +\group_end: +\cs_new_eq:NN \__codedoc_old_hdpindex:nn \hdpindex +\cs_new_eq:NN \__codedoc_old_hdclindex:nnn \hdclindex +\cs_gset_protected:Npn \hdpindex #1 + { \__codedoc_hdindex:nn { \__codedoc_old_hdpindex:nn {#1} } } +\cs_gset_protected:Npn \hdclindex #1#2 + { \__codedoc_hdindex:nn { \__codedoc_old_hdclindex:nnn {#1} {#2} } } +\cs_new_protected:Npn \__codedoc_hdindex:nn #1#2 + { + \tl_set:Nn \l__codedoc_tmpa_tl {#2} + \tl_replace_all:Nen \l__codedoc_tmpa_tl + { \exp_not:V \c__codedoc_active_minus_tl \exp_not:V \c__codedoc_active_minus_tl } + { -- } + \seq_set_split:NnV \l__codedoc_tmpa_seq { -- } \l__codedoc_tmpa_tl + \seq_set_map:NNn \l__codedoc_tmpa_seq \l__codedoc_tmpa_seq + { \__codedoc_hdindex_aux:nn {#1} {##1} } + \seq_use:Nn \l__codedoc_tmpa_seq { -- } + } +\cs_new_protected:Npn \__codedoc_hdindex_aux:nn #1#2 + { + \tl_set:Nn \l__codedoc_tmpa_tl {#2} + \tl_replace_all:Nnn \l__codedoc_tmpa_tl { MMMM } { \use_none:nn } + \tl_if_in:NnT \l__codedoc_tmpa_tl { MMMD } + { + \tl_replace_all:Nen \l__codedoc_tmpa_tl + { \exp_not:V \c__codedoc_active_minus_tl MMMD } { - MMMD } + \tl_replace_all:Nnn \l__codedoc_tmpa_tl { - MMMD } { \__codedoc_hdindex_aux:w } + } + \use:e { \exp_not:n {#1} { \exp_not:V \l__codedoc_tmpa_tl } } + } +\cs_new_protected:Npn \__codedoc_hdindex_aux:w #1 M { } \cs_new_protected:Npn \__codedoc_special_index_set:Nn #1#2 { - \tl_set:Nx #1 { \tl_to_str:n {#2} } + \__kernel_tl_set:Nx #1 { \tl_to_str:n {#2} } \__codedoc_if_almost_str:nTF {#2} { - \tl_replace_all:Non #1 { \tl_to_str:n { __ } } + \tl_replace_all:Nen #1 { \tl_to_str:n { __ } } { \verbatimchar \token_to_str:N \_ \token_to_str:N \_ \token_to_str:N \verb * \verbatimchar } - \exp_args:Nx \tl_map_inline:nn + \exp_args:Ne \tl_map_inline:nn { \tl_to_str:N \verbatimchar \token_to_str:N _ } { \tl_replace_all:Nnn #1 {##1} { - \verbatimchar \c__codedoc_backslash_tl ##1 + \verbatimchar \c_backslash_str ##1 \token_to_str:N \verb * \verbatimchar } } - \tl_set:Nx #1 + \__kernel_tl_set:Nx #1 { \token_to_str:N \verb * \verbatimchar #1 \verbatimchar @@ -2169,63 +2323,63 @@ } { \tl_set:Nn #1 {#2} - \tl_replace_all:Non #1 - { \c__codedoc_backslash_tl } + \tl_replace_all:NVn #1 + \c_backslash_str { \token_to_str:N \bslash \c_space_tl } } \__codedoc_quote_special_char:N #1 } \cs_new_protected:Npn \__codedoc_quote_special_char:N #1 { - \tl_map_inline:nn { \quotechar \actualchar \encapchar \levelchar } + \tl_map_inline:nn { \quotechar \actualchar \encapchar \levelchar \bslash } { - \tl_replace_all:Nxn #1 + \tl_replace_all:Nen #1 { \tl_to_str:N ##1 } { \quotechar \tl_to_str:N ##1 } } } -\cs_new_protected:Npn \__codedoc_key_get:n #1 +\cs_new_protected:Npe \__codedoc_key_get:n #1 { - \__codedoc_key_get_base:nN {#1} \l__codedoc_index_macro_tl - \tl_set:Nx \l__codedoc_index_key_tl - { \tl_to_str:N \l__codedoc_index_macro_tl } - \tl_clear:N \l__codedoc_index_module_tl - \tl_if_in:NoTF \l__codedoc_index_key_tl { \tl_to_str:n { __ } } - { \bool_set_true:N \l__codedoc_index_internal_bool } - { \bool_set_false:N \l__codedoc_index_internal_bool } - \tl_if_head_eq_charcode:oNT - { \l__codedoc_index_key_tl } \c__codedoc_backslash_token - { \__codedoc_key_pop: } - \tl_if_in:NoTF \l__codedoc_index_key_tl { \token_to_str:N : } - { \__codedoc_key_func: } + \exp_not:N \__codedoc_key_get_base:nN {#1} \exp_not:N \l__codedoc_index_macro_tl + \__kernel_tl_set:Nx \exp_not:N \l__codedoc_index_key_tl + { \exp_not:N \tl_to_str:N \exp_not:N \l__codedoc_index_macro_tl } + \tl_clear:N \exp_not:N \l__codedoc_index_module_tl + \tl_if_in:NnTF \exp_not:N \l__codedoc_index_key_tl { \tl_to_str:n { __ } } + { \bool_set_true:N \exp_not:N \l__codedoc_index_internal_bool } + { \bool_set_false:N \exp_not:N \l__codedoc_index_internal_bool } + \exp_not:N \tl_if_head_eq_charcode:VNT + \exp_not:N \l__codedoc_index_key_tl \c_backslash_str + { \exp_not:N \__codedoc_key_pop: } + \tl_if_in:NnTF \exp_not:N \l__codedoc_index_key_tl { \token_to_str:N : } + { \exp_not:N \__codedoc_key_func: } { - \tl_if_in:NoTF \l__codedoc_index_key_tl { \token_to_str:N _ } - { \__codedoc_key_var: } + \tl_if_in:NnTF \exp_not:N \l__codedoc_index_key_tl { \token_to_str:N _ } + { \exp_not:N \__codedoc_key_var: } { - \tl_if_in:NoT \l__codedoc_index_key_tl { \token_to_str:N @ } - { \tl_set:Nn \l__codedoc_index_module_tl { TeX } } + \tl_if_in:NnT \exp_not:N \l__codedoc_index_key_tl { \token_to_str:N @ } + { \tl_set:Nn \exp_not:N \l__codedoc_index_module_tl { TeX } } } } } \cs_new_protected:Npn \__codedoc_key_pop: { - \tl_set:Nx \l__codedoc_index_key_tl + \__kernel_tl_set:Nx \l__codedoc_index_key_tl { \tl_tail:N \l__codedoc_index_key_tl } } \cs_new_protected:Npn \__codedoc_key_trim_module:n #1 { \cs_set:Npn \__codedoc_tmpa:w ##1 #1 ##2 \q_stop { \exp_not:n {##1} } - \tl_set:Nx \l__codedoc_index_module_tl + \__kernel_tl_set:Nx \l__codedoc_index_module_tl { \exp_after:wN \__codedoc_tmpa:w \l__codedoc_index_module_tl #1 \q_stop } } \cs_new_protected:Npn \__codedoc_key_drop_underscores: { - \tl_if_head_eq_charcode:oNT { \l__codedoc_index_key_tl } _ + \tl_if_head_eq_charcode:VNT \l__codedoc_index_key_tl _ { \__codedoc_key_pop: \__codedoc_key_drop_underscores: } } \cs_new_protected:Npn \__codedoc_key_func: { - \tl_if_head_eq_charcode:oNT { \l__codedoc_index_key_tl } . + \tl_if_head_eq_charcode:VNT \l__codedoc_index_key_tl . { \__codedoc_key_pop: } \__codedoc_key_drop_underscores: \tl_set_eq:NN \l__codedoc_index_module_tl \l__codedoc_index_key_tl @@ -2234,13 +2388,13 @@ } \cs_new_protected:Npn \__codedoc_key_var: { - \exp_args:Nx \tl_if_head_eq_charcode:nNTF + \exp_args:Ne \tl_if_head_eq_charcode:nNTF { \exp_args:No \str_tail:n \l__codedoc_index_key_tl } _ { - \str_case:fn { \str_head:N \l__codedoc_index_key_tl } + \str_case:en { \str_head:N \l__codedoc_index_key_tl } { { q } { \tl_set:Nn \l__codedoc_index_module_tl { quark } } - { s } { \tl_set:Nn \l__codedoc_index_module_tl { quark } } + { s } { \tl_set:Nn \l__codedoc_index_module_tl { scan } } } \__codedoc_key_pop: \__codedoc_key_pop: @@ -2249,15 +2403,14 @@ { \seq_set_split:NoV \l__codedoc_tmpa_seq { \token_to_str:N _ } \l__codedoc_index_key_tl - \tl_set:Nx \l__codedoc_index_module_tl + \seq_get_left:NN \l__codedoc_tmpa_seq \l__codedoc_index_module_tl + \clist_if_in:NoT \g__codedoc_non_modules_clist \l__codedoc_index_module_tl { - \int_case:nnF { \seq_count:N \l__codedoc_tmpa_seq } + \seq_get_right:NN \l__codedoc_tmpa_seq \l__codedoc_index_module_tl + \clist_if_in:NoT \g__codedoc_non_modules_clist \l__codedoc_index_module_tl { - { 0 } { } - { 1 } { int } - { 2 } { \seq_item:Nn \l__codedoc_tmpa_seq { 2 } } + \tl_clear:N \l__codedoc_index_module_tl } - { \seq_item:Nn \l__codedoc_tmpa_seq { 1 } } } } } @@ -2266,6 +2419,22 @@ \exp_args:No \__codedoc_key_trim_module:n { \token_to_str:N _ } } } +\clist_new:N \g__codedoc_non_modules_clist +\clist_gset:Ne \g__codedoc_non_modules_clist + { + \tl_to_str:n + { + + alignment, ampersand, atsign, backslash, catcode, circumflex, + code, colon, document, dollar, e, empty, false, hash, inf, + initex, job, left, log, math, mark, max, minus, nan, nil, no, + novalue, other, parameter, percent, pi, recursion, right, space, + stop, term, tilde, tmpa, tmpb, true, underscore, zero, one, two, + three, four, five, six, seven, eight, nine, ten, eleven, twelve, + thirteen, fourteen, fifteen, sixteen, thirty, hundred + + } + } \GlossaryPrologue { \part*{Change~History} @@ -2273,14 +2442,14 @@ \markboth{Change~History}{Change~History} \addcontentsline{toc}{part}{Change~History} } -\msg_new:nnn { l3doc-TUB } { print-changes-howto } +\msg_new:nnn { l3doc } { print-changes-howto } { Generate~the~change~list~by~executing\\ \iow_indent:n { makeindex~-s~gglo.ist~-o~\c_sys_jobname_str.gls~\c_sys_jobname_str.glo } } \tl_gput_right:Nn \PrintChanges - { \AtEndDocument { \msg_info:nn { l3doc-TUB } { print-changes-howto } } } + { \AtEndDocument { \msg_info:nn { l3doc } { print-changes-howto } } } \bool_if:NTF \g__codedoc_typeset_implementation_bool { \RecordChanges @@ -2295,12 +2464,12 @@ } %%FMi - + \def\maketitle{\@ifstar {\@articletitlefalse\@r@maketitle}% {\@articletitletrue\@r@maketitle}% } - + %% %% -%% End of file `l3doc-TUB.cls'. +%% End of file `l3doc.cls'. diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf Binary files differindex 481c4e5c6ed..75743c49a88 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf +++ b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf Binary files differindex 1410dcedcbf..cba2aa8ab91 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf +++ b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf Binary files differindex 9cdb8133b1a..bc27d7ef129 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf +++ b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf diff --git a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex index ffa179f975d..a48262114c4 100644 --- a/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex +++ b/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex @@ -35,8 +35,8 @@ %%%%% \iffalse meta-comment %% File: unicodefonttable.dtx (C) Copyright 2019-2024 Frank Mittelbach -\def\unicodefonttabledate {2024/03/01} -\def\unicodefonttableversion{1.0h} +\def\unicodefonttabledate {2024/06/06} +\def\unicodefonttableversion{1.0i} %!TEX program = lualatex diff --git a/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx b/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx index 30f419801cb..4c04b15350e 100644 --- a/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx +++ b/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx @@ -17,12 +17,12 @@ % for those people who are interested or want to report an issue. % -\def\unicodefonttabledate {2024/03/01} -\def\unicodefonttableversion{1.0h} +\def\unicodefonttabledate {2024/06/06} +\def\unicodefonttableversion{1.0i} %<*driver> -\documentclass{l3doc-TUB} +\documentclass{l3doc-TUB2024} % some fixes local to this documentation @@ -238,10 +238,7 @@ % In the lists below the default settings are indicated by an % underline. % -% \begin{variable}{ -% header, noheader, -% title-format, title-format-cont, -% } +% \begin{variable}{header,noheader,title-format,title-format-cont} % The first set of keys is concerned with the overall look and % feel of the generated table. % \begin{description} @@ -267,11 +264,7 @@ % \end{variable} % % -% \begin{variable}{ -% display-block, -% hex-digits, hex-digits-font,hex-digits-row-format, -% color, -% } +% \begin{variable}{display-block,hex-digits, hex-digits-font,hex-digits-row-format,color} % These keys handle the inner parts of the table. % % \begin{description} @@ -343,10 +336,7 @@ % \end{variable} % % -% \begin{variable}{ -% statistics, nostatistics, -% statistics-font,statistics-format, -% } +% \begin{variable}{statistics, nostatistics,statistics-font,statistics-format} % The next set of keys allows altering the statistics that are produced. % \begin{description} % @@ -371,10 +361,7 @@ % % % -% \begin{variable}{ -% glyph-width, -% missing-glyph, missing-glyph-font, missing-glyph-color, -% } +% \begin{variable}{glyph-width,missing-glyph, missing-glyph-font, missing-glyph-color} % Another set of keys deals with customization on the glyph level. % \begin{description} % \item[\key{glyph-width}] @@ -409,9 +396,7 @@ % \end{variable} % % -% \begin{variable}{ -% compare-with,compare-color, compare-bgcolor,statistics-compare-format -% } +% \begin{variable}{compare-with,compare-color, compare-bgcolor,statistics-compare-format} % % You can make comparisons between two fonts, which is useful, for % example when dealing with incomplete math fonts and you need to @@ -453,9 +438,7 @@ % \end{variable} % % -% \begin{variable}{ -% range-start, range-end, -% } +% \begin{variable}{range-start, range-end} % Finally there are two keys for restricting the display range. % \begin{description} % \item[\key{range-start}, \key{range-end}] @@ -757,6 +740,18 @@ {\unicodefonttableversion} {Producing font tables for Unicode and other fonts} % \end{macrocode} +% +% This is a tmp fix for code in \texttt{lttabbing.dtx} until that +% is corrected there (probably 2024/11). +% \begin{macrocode} +\cs_set:Npn \tbl_crcr:n #1 { + \int_compare:nNnT \g__tbl_col_int > 0 + { + \tbl_count_missing_cells:n {#1} + } + \crcr + } +% \end{macrocode} % % \newcommand\hex[1]{$\langle\textit{hex}_{#1}\rangle$} % diff --git a/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex b/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex index 1aaecae5553..d23f6f4043c 100644 --- a/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex +++ b/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex @@ -35,8 +35,8 @@ %%%%% \iffalse meta-comment %% File: unicodefonttable.dtx (C) Copyright 2019-2024 Frank Mittelbach -\def\unicodefonttabledate {2024/03/01} -\def\unicodefonttableversion{1.0h} +\def\unicodefonttabledate {2024/06/06} +\def\unicodefonttableversion{1.0i} \documentclass{article} diff --git a/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty b/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty index b32e0f2bd81..c121cc8dd76 100644 --- a/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty +++ b/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty @@ -35,8 +35,8 @@ %%%%% \iffalse meta-comment %% File: unicodefonttable.dtx (C) Copyright 2019-2024 Frank Mittelbach -\def\unicodefonttabledate {2024/03/01} -\def\unicodefonttableversion{1.0h} +\def\unicodefonttabledate {2024/06/06} +\def\unicodefonttableversion{1.0i} \RequirePackage{xcolor} @@ -46,6 +46,13 @@ {\unicodefonttabledate} {\unicodefonttableversion} {Producing font tables for Unicode and other fonts} +\cs_set:Npn \tbl_crcr:n #1 { + \int_compare:nNnT \g__tbl_col_int > 0 + { + \tbl_count_missing_cells:n {#1} + } + \crcr + } \NewDocumentCommand \fonttablesetup { m } { \keys_set:nn {__fmuft} {#1} \ignorespaces } |