[latex3-commits] [l3svn] r6655 - Refactoring l3doc: moving around sections
noreply at latex-project.org
noreply at latex-project.org
Sun Aug 14 19:05:25 CEST 2016
Author: bruno
Date: 2016-08-14 19:05:25 +0200 (Sun, 14 Aug 2016)
New Revision: 6655
Modified:
trunk/l3kernel/l3doc.dtx
Log:
Refactoring l3doc: moving around sections
This will avoid incomprehensible diffs later for next commits
Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx 2016-08-14 16:54:06 UTC (rev 6654)
+++ trunk/l3kernel/l3doc.dtx 2016-08-14 17:05:25 UTC (rev 6655)
@@ -565,231 +565,6 @@
%<@@=codedoc>
% \end{macrocode}
%
-% \subsection{Variants and helpers}
-%
-% \begin{macro}[aux]{\@@_tmpa:w, \@@_tmpb:w}
-% Auxiliary macros for temporary use.
-% \begin{macrocode}
-\cs_new_eq:NN \@@_tmpa:w ?
-\cs_new_eq:NN \@@_tmpb:w ?
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \tl_count:f,
-% \tl_greplace_all:Nxn,
-% \tl_greplace_all:Nno,
-% \tl_if_head_eq_charcode:oNTF,
-% \tl_if_head_eq_charcode:oNT,
-% \tl_if_head_eq_charcode:oNF,
-% \tl_if_head_eq_meaning:VNF,
-% \tl_if_in:NoTF,
-% \tl_if_in:NoT,
-% \tl_if_in:NoF,
-% \tl_remove_all:Nx,
-% \tl_replace_all:Nxn,
-% \tl_replace_all:Nnx,
-% \tl_replace_all:Non,
-% \tl_replace_all:Nno,
-% \tl_replace_once:Noo,
-% \prop_get:NxNTF,
-% \prop_put:Nxn,
-% \prop_gput:NVx,
-% }
-% A few missing variants.
-% \begin{macrocode}
-\cs_generate_variant:Nn \tl_count:n { f }
-\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno }
-\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 }
-\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 \prop_get:NnNTF { Nx }
-\cs_generate_variant:Nn \prop_put:Nnn { Nx }
-\cs_generate_variant:Nn \prop_gput:Nnn { NVx }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_replace_at_at:N}
-% \begin{macro}[aux]{\@@_replace_at_at_aux:Nn}
-% The goal is to replace |@@| by the current module name. If there is
-% no \meta{module~name}, do nothing. Otherwise, sanitize the catcodes
-% of |@| and~|_| and replace both |_@@| and |@@| by
-% |__|\meta{module~name}. The result contains |_| with category
-% code letter because this is what the |macrocode| environment
-% expects. Other use cases can apply \cs{tl_to_str:n} if needed.
-% Note that we include spaces between the
-% |@| in the code below, since it is also processed through the same
-% replacement rules.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_replace_at_at:N #1
- {
- \tl_if_empty:NF \g_@@_module_name_tl
- {
- \exp_args:NNo \@@_replace_at_at_aux:Nn
- #1 \g_@@_module_name_tl
- }
- }
-\cs_new_protected:Npn \@@_replace_at_at_aux:Nn #1#2
- {
- \tl_replace_all:Non #1 { \token_to_str:N @ } { @ }
- \tl_replace_all:Non #1 { \token_to_str:N _ } { _ }
- \tl_replace_all:Nnn #1 { _ @ @ } { _ _ #2 }
- \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[aux]{\@@_verb_get_seq:nN}
-% The argument~|#1| (argument of a |function| or |macro| environment)
-% has catcodes $10$ (space), $12$ (other) and $13$ (active). Sanitize
-% catcodes. If the |verb| option was used, output a one-item
-% sequence. Otherwise, remove any \enquote{\%} character at the
-% beginning of a line. Remove tabs and newlines. Finally, convert
-% |_@@| and |@@| to |__|\meta{module name} (if it is non-empty). At
-% this point, \cs{l_@@_tmpa_tl} contains a comma-delimited list of
-% names, where |@| and~|_| have category code letter. Turn it to a
-% string, parse it as a comma-delimited list (in particular this
-% removes spaces), and output a sequence of function/macro names.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_verb_get_seq:nN #1#2
- {
- \tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:n {#1} }
- \bool_if:NTF \l_@@_verb_name_bool
- {
- \seq_clear:N #2
- \seq_put_right:NV #2 \l_@@_tmpa_tl
- }
- {
- \tl_remove_all:Nx \l_@@_tmpa_tl
- { \iow_char:N \^^M \iow_char:N \% }
- \tl_remove_all:Nx \l_@@_tmpa_tl { \tl_to_str:n { ^ ^ A } }
- \tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^I }
- \tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^M }
- \@@_replace_at_at:N \l_@@_tmpa_tl
- \exp_args:NNx \seq_set_from_clist:Nn #2
- { \tl_to_str:N \l_@@_tmpa_tl }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[aux,rEXP]
-% {\@@_signature_base_form:n, \@@_signature_base_form_aux:n}
-% Expands to the \enquote{base form} of the signature. For instance,
-% given |noxcfvV| it would obtain |nnnNnnn|, or given |ow| it would
-% obtain |nw|. The loop stops at the first token that is not
-% recognized.
-% \begin{macrocode}
-\cs_new:Npn \@@_signature_base_form:n #1
- { \@@_signature_base_form_aux:n #1 \c_empty_tl }
-\cs_new:Npn \@@_signature_base_form_aux:n #1
- {
- \str_case:nnTF {#1}
- {
- { N } { N }
- { c } { N }
- { n } { n }
- { o } { n }
- { f } { n }
- { x } { n }
- { V } { n }
- { v } { n }
- }
- { \@@_signature_base_form_aux:n }
- {#1}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[aux]{\@@_predicate_from_base:N, \@@_predicate_from_base:n}
-% \begin{macro}[aux]{\@@_predicate_from_base_aux:w, \@@_predicate_from_base_auxii:w}
-% Get predicate from a function's base name. The code is not broken
-% by functions with no signature. The |n|-type version can be used
-% for keys and other non-control sequences. The output is a string.
-% \begin{macrocode}
-\cs_new:Npn \@@_predicate_from_base:N #1
- {
- \__cs_get_function_name:N #1 _p:
- \__cs_get_function_signature:N #1
- }
-\cs_set_protected:Npn \@@_tmpa:w #1
- {
- \cs_new:Npn \@@_predicate_from_base:n ##1
- {
- \exp_after:wN \@@_predicate_from_base_aux:w
- \tl_to_str:n {##1} \q_mark #1 \q_stop
- }
- \cs_new:Npn \@@_predicate_from_base_aux:w ##1 #1
- { \@@_predicate_from_base_auxii:w ##1 _p: }
- }
-\exp_args:No \@@_tmpa:w { \token_to_str:N : }
-\cs_new:Npn \@@_predicate_from_base_auxii:w #1 \q_mark #2 \q_stop
- { \tl_to_str:n {#1} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[aux]
-% {
-% \@@_clist_prop_put_right:Nnn, \@@_clist_prop_put_right:Nxn,
-% \@@_clist_prop_put_right:Nnf
-% }
-% We sometimes want to collect multiple entries according to some key.
-% This is done by having property lists whose values are themselves
-% comma-lists: in short \enquote{clist_prop}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_clist_prop_put_right:Nnn #1#2#3
- {
- \prop_get:NnNTF #1 {#2} \l_@@_tmpa_tl
- { \tl_put_right:Nn \l_@@_tmpa_tl { , #3 } }
- { \tl_set:Nn \l_@@_tmpa_tl {#3} }
- \prop_put:Nno #1 {#2} \l_@@_tmpa_tl
- }
-\cs_generate_variant:Nn \@@_clist_prop_put_right:Nnn { Nx , Nnf }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\CodedocUseCs}
-% To implement commands which can be used in bookmarks and moving
-% arguments, it appears necessary to have an analogue of \cs{use:c}
-% using only user-level category codes, or to make all auxiliaries
-% user-level.
-% \begin{macrocode}
-\cs_new_protected:Npn \CodedocUseCs #1 { \use:c { \tl_to_str:n {#1} } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\CodedocUnexpandedTokens}
-% \begin{macro}[aux,verb]{\CodedocUnexpandedTokens }
-% \begin{macro}[aux]{\@@_exp_not:n}
-% Function used as \cs{CodedocUnexpandedTokens} \meta{junk}
-% \Arg{argument}. The braces are necessary, and \meta{junk}, ignored,
-% must not contain braces. When used in a typesetting context, the
-% function calls an auxiliary (whose name has a trailing space) which
-% leaves the \meta{argument} in the input stream. When used in an
-% \texttt{x}-expansion context instead, the auxiliary does not expand,
-% and \cs{@@_exp_not:n} \Arg{argument} expands to itself. If this is
-% written into a file and read back, the result has the original form
-% \cs{CodedocUnexpandedTokens} \meta{junk} \Arg{argument}.
-% \begin{macrocode}
-\cs_new:Npn \CodedocUnexpandedTokens #1 #
- { \use:c { CodedocUnexpandedTokens ~ } \@@_exp_not:n }
-\cs_new_protected:cpn { CodedocUnexpandedTokens ~ } #1#2 {#2}
-\cs_new:Npn \@@_exp_not:n #1 { \exp_not:n { \@@_exp_not:n {#1} } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Variables}
%
% \begin{variable}{\g_docinput_clist}
@@ -1076,6 +851,231 @@
% \int_new:N \c at CodelineNo
% \end{macrocode}
%
+% \subsection{Variants and helpers}
+%
+% \begin{macro}[aux]{\@@_tmpa:w, \@@_tmpb:w}
+% Auxiliary macros for temporary use.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_tmpa:w ?
+\cs_new_eq:NN \@@_tmpb:w ?
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}
+% {
+% \tl_count:f,
+% \tl_greplace_all:Nxn,
+% \tl_greplace_all:Nno,
+% \tl_if_head_eq_charcode:oNTF,
+% \tl_if_head_eq_charcode:oNT,
+% \tl_if_head_eq_charcode:oNF,
+% \tl_if_head_eq_meaning:VNF,
+% \tl_if_in:NoTF,
+% \tl_if_in:NoT,
+% \tl_if_in:NoF,
+% \tl_remove_all:Nx,
+% \tl_replace_all:Nxn,
+% \tl_replace_all:Nnx,
+% \tl_replace_all:Non,
+% \tl_replace_all:Nno,
+% \tl_replace_once:Noo,
+% \prop_get:NxNTF,
+% \prop_put:Nxn,
+% \prop_gput:NVx,
+% }
+% A few missing variants.
+% \begin{macrocode}
+\cs_generate_variant:Nn \tl_count:n { f }
+\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno }
+\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 }
+\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 \prop_get:NnNTF { Nx }
+\cs_generate_variant:Nn \prop_put:Nnn { Nx }
+\cs_generate_variant:Nn \prop_gput:Nnn { NVx }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\@@_replace_at_at:N}
+% \begin{macro}[aux]{\@@_replace_at_at_aux:Nn}
+% The goal is to replace |@@| by the current module name. If there is
+% no \meta{module~name}, do nothing. Otherwise, sanitize the catcodes
+% of |@| and~|_| and replace both |_@@| and |@@| by
+% |__|\meta{module~name}. The result contains |_| with category
+% code letter because this is what the |macrocode| environment
+% expects. Other use cases can apply \cs{tl_to_str:n} if needed.
+% Note that we include spaces between the
+% |@| in the code below, since it is also processed through the same
+% replacement rules.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_replace_at_at:N #1
+ {
+ \tl_if_empty:NF \g_@@_module_name_tl
+ {
+ \exp_args:NNo \@@_replace_at_at_aux:Nn
+ #1 \g_@@_module_name_tl
+ }
+ }
+\cs_new_protected:Npn \@@_replace_at_at_aux:Nn #1#2
+ {
+ \tl_replace_all:Non #1 { \token_to_str:N @ } { @ }
+ \tl_replace_all:Non #1 { \token_to_str:N _ } { _ }
+ \tl_replace_all:Nnn #1 { _ @ @ } { _ _ #2 }
+ \tl_replace_all:Nnn #1 { @ @ } { _ _ #2 }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[aux]{\@@_verb_get_seq:nN}
+% The argument~|#1| (argument of a |function| or |macro| environment)
+% has catcodes $10$ (space), $12$ (other) and $13$ (active). Sanitize
+% catcodes. If the |verb| option was used, output a one-item
+% sequence. Otherwise, remove any \enquote{\%} character at the
+% beginning of a line. Remove tabs and newlines. Finally, convert
+% |_@@| and |@@| to |__|\meta{module name} (if it is non-empty). At
+% this point, \cs{l_@@_tmpa_tl} contains a comma-delimited list of
+% names, where |@| and~|_| have category code letter. Turn it to a
+% string, parse it as a comma-delimited list (in particular this
+% removes spaces), and output a sequence of function/macro names.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_verb_get_seq:nN #1#2
+ {
+ \tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:n {#1} }
+ \bool_if:NTF \l_@@_verb_name_bool
+ {
+ \seq_clear:N #2
+ \seq_put_right:NV #2 \l_@@_tmpa_tl
+ }
+ {
+ \tl_remove_all:Nx \l_@@_tmpa_tl
+ { \iow_char:N \^^M \iow_char:N \% }
+ \tl_remove_all:Nx \l_@@_tmpa_tl { \tl_to_str:n { ^ ^ A } }
+ \tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^I }
+ \tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^M }
+ \@@_replace_at_at:N \l_@@_tmpa_tl
+ \exp_args:NNx \seq_set_from_clist:Nn #2
+ { \tl_to_str:N \l_@@_tmpa_tl }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux,rEXP]
+% {\@@_signature_base_form:n, \@@_signature_base_form_aux:n}
+% Expands to the \enquote{base form} of the signature. For instance,
+% given |noxcfvV| it would obtain |nnnNnnn|, or given |ow| it would
+% obtain |nw|. The loop stops at the first token that is not
+% recognized.
+% \begin{macrocode}
+\cs_new:Npn \@@_signature_base_form:n #1
+ { \@@_signature_base_form_aux:n #1 \c_empty_tl }
+\cs_new:Npn \@@_signature_base_form_aux:n #1
+ {
+ \str_case:nnTF {#1}
+ {
+ { N } { N }
+ { c } { N }
+ { n } { n }
+ { o } { n }
+ { f } { n }
+ { x } { n }
+ { V } { n }
+ { v } { n }
+ }
+ { \@@_signature_base_form_aux:n }
+ {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux]{\@@_predicate_from_base:N, \@@_predicate_from_base:n}
+% \begin{macro}[aux]{\@@_predicate_from_base_aux:w, \@@_predicate_from_base_auxii:w}
+% Get predicate from a function's base name. The code is not broken
+% by functions with no signature. The |n|-type version can be used
+% for keys and other non-control sequences. The output is a string.
+% \begin{macrocode}
+\cs_new:Npn \@@_predicate_from_base:N #1
+ {
+ \__cs_get_function_name:N #1 _p:
+ \__cs_get_function_signature:N #1
+ }
+\cs_set_protected:Npn \@@_tmpa:w #1
+ {
+ \cs_new:Npn \@@_predicate_from_base:n ##1
+ {
+ \exp_after:wN \@@_predicate_from_base_aux:w
+ \tl_to_str:n {##1} \q_mark #1 \q_stop
+ }
+ \cs_new:Npn \@@_predicate_from_base_aux:w ##1 #1
+ { \@@_predicate_from_base_auxii:w ##1 _p: }
+ }
+\exp_args:No \@@_tmpa:w { \token_to_str:N : }
+\cs_new:Npn \@@_predicate_from_base_auxii:w #1 \q_mark #2 \q_stop
+ { \tl_to_str:n {#1} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[aux]
+% {
+% \@@_clist_prop_put_right:Nnn, \@@_clist_prop_put_right:Nxn,
+% \@@_clist_prop_put_right:Nnf
+% }
+% We sometimes want to collect multiple entries according to some key.
+% This is done by having property lists whose values are themselves
+% comma-lists: in short \enquote{clist_prop}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_clist_prop_put_right:Nnn #1#2#3
+ {
+ \prop_get:NnNTF #1 {#2} \l_@@_tmpa_tl
+ { \tl_put_right:Nn \l_@@_tmpa_tl { , #3 } }
+ { \tl_set:Nn \l_@@_tmpa_tl {#3} }
+ \prop_put:Nno #1 {#2} \l_@@_tmpa_tl
+ }
+\cs_generate_variant:Nn \@@_clist_prop_put_right:Nnn { Nx , Nnf }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\CodedocUseCs}
+% To implement commands which can be used in bookmarks and moving
+% arguments, it appears necessary to have an analogue of \cs{use:c}
+% using only user-level category codes, or to make all auxiliaries
+% user-level.
+% \begin{macrocode}
+\cs_new_protected:Npn \CodedocUseCs #1 { \use:c { \tl_to_str:n {#1} } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\CodedocUnexpandedTokens}
+% \begin{macro}[aux,verb]{\CodedocUnexpandedTokens }
+% \begin{macro}[aux]{\@@_exp_not:n}
+% Function used as \cs{CodedocUnexpandedTokens} \meta{junk}
+% \Arg{argument}. The braces are necessary, and \meta{junk}, ignored,
+% must not contain braces. When used in a typesetting context, the
+% function calls an auxiliary (whose name has a trailing space) which
+% leaves the \meta{argument} in the input stream. When used in an
+% \texttt{x}-expansion context instead, the auxiliary does not expand,
+% and \cs{@@_exp_not:n} \Arg{argument} expands to itself. If this is
+% written into a file and read back, the result has the original form
+% \cs{CodedocUnexpandedTokens} \meta{junk} \Arg{argument}.
+% \begin{macrocode}
+\cs_new:Npn \CodedocUnexpandedTokens #1 #
+ { \use:c { CodedocUnexpandedTokens ~ } \@@_exp_not:n }
+\cs_new_protected:cpn { CodedocUnexpandedTokens ~ } #1#2 {#2}
+\cs_new:Npn \@@_exp_not:n #1 { \exp_not:n { \@@_exp_not:n {#1} } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Options and configuration}
%
% \begin{macrocode}
@@ -1637,6 +1637,51 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{Common between \env{macro} and \env{function}}
+%
+% \begin{macro}{\@@_typeset_TF:, \@@_typeset_aux:n}
+% Used by \cs{@@_macro_single:n} and in the \env{function} environment
+% to typeset conditionals and auxiliary functions.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_typeset_TF:
+ {
+ \hyperlink{explTF}
+ {
+ \color{black}
+ \itshape TF
+ \makebox[0pt][r]
+ {
+ \color{red}
+ \underline { \phantom{\itshape TF} \kern-0.1em }
+ }
+ }
+ }
+\cs_new_protected:Npn \@@_typeset_aux:n #1
+ {
+ { \color[gray]{0.7} #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_hyper_target:nN}
+% Create a \pkg{hyperref} anchor from a macro name~|#1| and stores it
+% in the token list variable~|#2|. For instance, |\prg_replicate:nn|
+% gives |doc/function//prg/replicate:nn|.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_get_hyper_target:nN #1#2
+ {
+ \tl_set:Nx #2
+ {
+ \tl_to_str:n {#1}
+ \bool_if:NT \l_@@_macro_TF_bool { \tl_to_str:n {TF} }
+ }
+ \tl_replace_all:Nxn #2 { \iow_char:N \_ } { / }
+ \tl_remove_all:Nx #2 { \iow_char:N \\ }
+ \tl_put_left:Nn #2 { doc/function// }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{The \env{function} environment}
%
% \begin{macrocode}
@@ -2596,51 +2641,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Common between \env{macro} and \env{function}}
-%
-% \begin{macro}{\@@_typeset_TF:, \@@_typeset_aux:n}
-% Used by \cs{@@_macro_single:n} and in the \env{function} environment
-% to typeset conditionals and auxiliary functions.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_typeset_TF:
- {
- \hyperlink{explTF}
- {
- \color{black}
- \itshape TF
- \makebox[0pt][r]
- {
- \color{red}
- \underline { \phantom{\itshape TF} \kern-0.1em }
- }
- }
- }
-\cs_new_protected:Npn \@@_typeset_aux:n #1
- {
- { \color[gray]{0.7} #1 }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_get_hyper_target:nN}
-% Create a \pkg{hyperref} anchor from a macro name~|#1| and stores it
-% in the token list variable~|#2|. For instance, |\prg_replicate:nn|
-% gives |doc/function//prg/replicate:nn|.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_hyper_target:nN #1#2
- {
- \tl_set:Nx #2
- {
- \tl_to_str:n {#1}
- \bool_if:NT \l_@@_macro_TF_bool { \tl_to_str:n {TF} }
- }
- \tl_replace_all:Nxn #2 { \iow_char:N \_ } { / }
- \tl_remove_all:Nx #2 { \iow_char:N \\ }
- \tl_put_left:Nn #2 { doc/function// }
- }
-% \end{macrocode}
-% \end{macro}
-%
% \subsubsection{Misc}
%
% \begin{macro}{\DescribeOption}
More information about the latex3-commits
mailing list