summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3doc.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx151
1 files changed, 85 insertions, 66 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index b6f98aa3664..983df56fab5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -57,11 +57,10 @@ and all files in that bundle must be distributed together.
%</driver>
%
%<*driver|class>
-\RequirePackage{expl3,calc}
+\RequirePackage{calc}
%</driver|class>
%
%<*driver>
-\ProvidesFile{l3doc.dtx}[2023/08/09 L3 Experimental documentation class]
\documentclass{l3doc}
\usepackage{framed}
\begin{document}
@@ -72,7 +71,7 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2023-08-09}{}
+\ProvidesExplClass{l3doc}{2023-12-11}{}
{L3 Experimental documentation class}
%</class>
% \fi
@@ -85,7 +84,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2023-12-08}
+% \date{Released 2023-12-11}
% \maketitle
% \tableofcontents
%
@@ -221,6 +220,56 @@ and all files in that bundle must be distributed together.
% Latin Modern fonts. To prevent this, use the class option
% |cm-default|.
%
+% \subsection{Class options}
+%
+% The class recognises a number of options, some of which are generally
+% useful and some of which are aimed squarely at use by the kernel team only.
+%
+% \DescribeOption{full}
+% \DescribeOption{onlydoc}
+% When the \texttt{full} option is set (the standard setting), both the
+% documentation and implementation parts of the source are typeset. If on the
+% other hand the \texttt{onlydoc} option is set, only the documentation part
+% is typeset.
+%
+% \DescribeOption{lm-default}
+% Selects whether the standard font set up is Latin Modern in the \texttt{T1}
+% encoding (the standard setting) or leaves the font setup unchanged.
+%
+% \DescribeOption{kernel}
+% Determines whether \pkg{l3doc} treats |\__kernel_| commands and
+% |\(c|g|l)__kernel_| variables as allowable in code. In general,
+% \emph{no} internal material from outside the current module is allowed.
+% However, for bootstrapping the \pkg{expl3} kernel, a small number of
+% cross-module functions are needed. To suppress the error message that
+% would otherwise arise, the class option \texttt{kernel} may be given.
+%
+% \DescribeOption{check}
+% When the \texttt{check} option is given, the class will record all commands
+% defined and documented in a \texttt{\meta{name}.cmds} file. This will show
+% which are both documented and defined, which are only documented and which
+% are only defined. (Here, \enquote{defined} means listed using a
+% \texttt{macro} or \texttt{variable} environment in the implementation part of
+% the source file).
+%
+% \DescribeOption{checktest}
+% When \texttt{checktest} is given as an option, the class will check that each
+% function entry in the implementation part of the source is marked using
+% \cs{UnitTest}.
+%
+% \DescribeOption{show-notes}
+% \DescribeOption{hide-notes}
+% These complementary options determine if the information given using the
+% \cs{NB} and \cs{NOTE} commands is printed.
+%
+% \DescribeOption{cs-break}
+% \DescribeOption{cs-break-nohyphen}
+% The commands \cs{cmd} and \cs{cs} allow hyphenation of control sequences
+% after (most) underscores. By default, a hyphen is used to mark the
+% hyphenation, but this can be changed with the \texttt{cs-break-nohyphen}
+% class option. To disable hyphenation of control sequences entirely, use
+% \texttt{cs-break = false}.
+%
% \subsection{Partitioning documentation and implementation}
%
% \pkg{doc} uses the \cs{OnlyDocumentation}/\cs{AlsoImplementation}
@@ -299,7 +348,8 @@ and all files in that bundle must be distributed together.
% These commands allow hyphenation of control sequences after (most) underscores.
% By default, a hyphen is used to mark the hyphenation, but this can be changed with
% the \texttt{cs-break-nohyphen} class option.
-% To disable hyphenation of control sequencies entirely, use \texttt{cs-break-off}.
+% To disable hyphenation of control sequences entirely, use
+% \texttt{cs-break = false}.
% \end{function}
%
%
@@ -1385,67 +1435,36 @@ and all files in that bundle must be distributed together.
% \subsection{Options and configuration}
%
% \begin{macrocode}
-\DeclareOption { a5paper } { \@latexerr { Option~not~supported } { } }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { full }
+\DeclareKeys [ l3doc / options ]
{
- \bool_gset_true:N \g_@@_typeset_documentation_bool
- \bool_gset_true:N \g_@@_typeset_implementation_bool
- }
-\DeclareOption { onlydoc }
- {
- \bool_gset_true:N \g_@@_typeset_documentation_bool
- \bool_gset_false:N \g_@@_typeset_implementation_bool
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { check }
- { \bool_gset_true:N \g_@@_checkfunc_bool }
-\DeclareOption { nocheck }
- { \bool_gset_false:N \g_@@_checkfunc_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { checktest }
- { \bool_gset_true:N \g_@@_checktest_bool }
-\DeclareOption { nochecktest }
- { \bool_gset_false:N \g_@@_checktest_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { kernel }
- { \bool_gset_true:N \g_@@_kernel_bool }
-\DeclareOption { stdmodule }
- { \bool_gset_false:N \g_@@_kernel_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { cm-default }
- { \bool_gset_false:N \g_@@_lmodern_bool }
-\DeclareOption { lm-default }
- { \bool_gset_true:N \g_@@_lmodern_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { cs-break-off }
- { \bool_gset_false:N \g_@@_cs_break_bool }
-\DeclareOption { cs-break-nohyphen }
- { \PassOptionsToPackage{nohyphen}{underscore} }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption { show-notes }
- { \bool_gset_true:N \g_@@_show_notes_bool }
-\DeclareOption { hide-notes }
- { \bool_gset_false:N \g_@@_show_notes_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } }
-\ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default }
+ a5paper .code:n = \@latexerr { Option~not~supported } { } ,
+ full .code:n =
+ {
+ \bool_gset_true:N \g_@@_typeset_documentation_bool
+ \bool_gset_true:N \g_@@_typeset_implementation_bool
+ } ,
+ onlydoc .code:n =
+ {
+ \bool_gset_true:N \g_@@_typeset_documentation_bool
+ \bool_gset_false:N \g_@@_typeset_implementation_bool
+ } ,
+ check .bool_gset:N = \g_@@_checkfunc_bool ,
+ checktest .bool_gset:N = \g_@@_checktest_bool ,
+ kernel .bool_gset:N = \g_@@_kernel_bool ,
+ stdmodule .bool_gset_inverse:N = \g_@@_kernel_bool ,
+ lm-default .bool_gset:N = \g_@@_lmodern_bool ,
+ cs-break .bool_gset_inverse:N = \g_@@_cs_break_bool ,
+ cs-break-nohyphen .code:n = \PassOptionsToPackage{nohyphen}{underscore} ,
+ show-notes .bool_gset:N = \g_@@_show_notes_bool,
+ hide-notes .bool_gset_inverse:N = \g_@@_show_notes_bool
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareUnknownKeyHandler [ l3doc / options ]
+ { \PassOptionsToClass { \CurrentOption } { article } }
+\SetKeys [ l3doc / options ]
+ { full , kernel , check = false , checktest = false , lm-default }
\PassOptionsToClass { a4paper } { article }
% \end{macrocode}
%
@@ -1467,7 +1486,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
%
% \begin{macrocode}
-\ProcessOptions
+\ProcessKeyOptions [ l3doc / options ]
% \end{macrocode}
%
%