[latex3-commits] [l3svn] r6673 - l3doc: add "index" key for \cs
noreply at latex-project.org
noreply at latex-project.org
Thu Aug 18 15:21:29 CEST 2016
Author: bruno
Date: 2016-08-18 15:21:28 +0200 (Thu, 18 Aug 2016)
New Revision: 6673
Modified:
trunk/l3kernel/l3doc.dtx
Log:
l3doc: add "index" key for \cs
This is useful for cases such as \cs[index=pdfstrcmp]{(pdf)strcmp}.
Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx 2016-08-18 13:15:46 UTC (rev 6672)
+++ trunk/l3kernel/l3doc.dtx 2016-08-18 13:21:28 UTC (rev 6673)
@@ -297,6 +297,8 @@
% The \meta{options} are a key--value list which can contain the
% following keys:
% \begin{itemize}
+% \item |index=|\meta{name}: the \meta{csname} will be indexed as if
+% one had written \cs{cs}\Arg{name}.
% \item |no-index|: the \meta{csname} will not be indexed.
% \item |module=|\meta{module}: the \meta{csname} will be indexed in
% the list of commands from the \meta{module}; the \meta{module}
@@ -800,6 +802,7 @@
% \begin{variable}[int]
% {
% \l_@@_cmd_tl,
+% \l_@@_cmd_index_tl,
% \l_@@_cmd_module_tl,
% \l_@@_cmd_noindex_bool,
% \l_@@_cmd_replace_bool,
@@ -808,6 +811,7 @@
% \cs{tn}.
% \begin{macrocode}
\tl_new:N \l_@@_cmd_tl
+\tl_new:N \l_@@_cmd_index_tl
\tl_new:N \l_@@_cmd_module_tl
\bool_new:N \l_@@_cmd_noindex_bool
\bool_new:N \l_@@_cmd_replace_bool
@@ -1664,6 +1668,7 @@
% \begin{macrocode}
\keys_define:nn { l3doc/cmd }
{
+ index .tl_set:N = \l_@@_cmd_index_tl ,
module .tl_set:N = \l_@@_cmd_module_tl ,
no-index .bool_set:N = \l_@@_cmd_noindex_bool ,
replace .bool_set:N = \l_@@_cmd_replace_bool ,
@@ -1701,6 +1706,7 @@
{
\bool_set_false:N \l_@@_cmd_noindex_bool
\bool_set_true:N \l_@@_cmd_replace_bool
+ \tl_set:Nn \l_@@_cmd_index_tl { \q_no_value }
\tl_set:Nn \l_@@_cmd_module_tl { \q_no_value }
\keys_set:nn { l3doc/cmd } {#1}
\tl_set:No \l_@@_cmd_tl { \token_to_str:N #2 }
@@ -1725,6 +1731,8 @@
}
\bool_if:NF \l_@@_cmd_noindex_bool
{
+ \quark_if_no_value:NF \l_@@_cmd_index_tl
+ { \tl_set_eq:NN \l_@@_cmd_tl \l_@@_cmd_index_tl }
\exp_args:No \@@_key_get:n { \l_@@_cmd_tl }
\quark_if_no_value:NF \l_@@_cmd_module_tl
{
More information about the latex3-commits
mailing list