summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3doc.cls')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3doc.cls79
1 files changed, 33 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
index 0dc4351b3e7..7a4d0868b29 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
@@ -6,51 +6,25 @@
%%
%% l3doc.dtx (with options: `class')
%%
-%% EXPERIMENTAL CODE
+%% Copyright (C) 1990-2016 The LaTeX3 Project
%%
-%% Do not distribute this file without also distributing the
-%% source files specified above.
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
%%
-%% Do not distribute a modified version of this file.
-%%
-%% File: l3doc.dtx Copyright (C) 1990-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
%% http://www.latex-project.org/lppl.txt
-%%
+%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%%
+%% File: l3doc.dtx Copyright (C) 1990-2016 The LaTeX3 project
\let \filenameOld \ExplFileName
\let \filedateOld \ExplFileDate
\let \fileversionOld \ExplFileVersion
\let \filedescriptionOld \ExplFileDescription
\RequirePackage{expl3,xparse,calc}
-\GetIdInfo$Id: l3doc.dtx 6701 2016-09-08 13:56:52Z qinglee $
+\GetIdInfo$Id: l3doc.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Experimental documentation class}
\ProvidesExplClass
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -1927,8 +1901,8 @@
\use:x
{
\__codedoc_special_index_module:nnnnN
- { \quotechar #1 }
- { \quotechar \bslash \quotechar #1 }
+ {#1}
+ { \bslash #1 }
{ }
{ }
\c_false_bool
@@ -1948,6 +1922,7 @@
}
\cs_generate_variant:Nn \__codedoc_special_index:nn { o }
\tl_new:N \l__codedoc_index_escaped_macro_tl
+\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
@@ -1973,6 +1948,8 @@
\cs_generate_variant:Nn \__codedoc_special_index_module:nnnnN { ooo }
\cs_new_protected:Npn \__codedoc_special_index_aux:nnnnnn #1#2#3#4#5#6
{
+ \tl_set:Nn \l__codedoc_index_escaped_key_tl {#1}
+ \__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 }
@@ -1987,7 +1964,7 @@
{
\tl_if_empty:nF { #3 #4 #5 }
{ #3 #5 \actualchar #4 #5 \levelchar }
- #1
+ \l__codedoc_index_escaped_key_tl
\actualchar
{
\token_to_str:N \verbatim@font \c_space_tl
@@ -2002,23 +1979,24 @@
\tl_set:Nx #1 { \tl_to_str:n {#2} }
\__codedoc_if_almost_str:nTF {#2}
{
+ \tl_replace_all:Non #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
{ \tl_to_str:N \verbatimchar \token_to_str:N _ }
{
\tl_replace_all:Nnn #1 {##1}
{
\verbatimchar \c__codedoc_backslash_tl ##1
- \token_to_str:N \verb \quotechar * \verbatimchar
+ \token_to_str:N \verb * \verbatimchar
}
}
- \tl_map_inline:nn { \actualchar \encapchar \levelchar }
- {
- \tl_replace_all:Nxn #1
- { \tl_to_str:N ##1 } { \quotechar \tl_to_str:N ##1 }
- }
\tl_set:Nx #1
{
- \token_to_str:N \verb \quotechar * \verbatimchar
+ \token_to_str:N \verb * \verbatimchar
#1 \verbatimchar
}
}
@@ -2028,6 +2006,15 @@
{ \c__codedoc_backslash_tl }
{ \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_replace_all:Nxn #1
+ { \tl_to_str:N ##1 } { \quotechar \tl_to_str:N ##1 }
+ }
}
\cs_new_protected:Npn \__codedoc_key_get:n #1
{
@@ -2057,7 +2044,7 @@
\tl_set:Nx \l__codedoc_index_key_tl
{ \tl_tail:N \l__codedoc_index_key_tl }
}
-\cs_set:Npn \__codedoc_key_trim_module:n #1
+\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} }