Debian Codegraph @

texmf-dist/source/latex/ltx-talk/ltx-talk-mode.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: ltx-talk-mode.dtx Copyright (C) 2025,2026 Joseph Wright
4 %
5 % It may be distributed and/or modified under the conditions of the
6 % LaTeX Project Public License (LPPL), either version 1.3c of this
7 % license or (at your option) any later version. The latest version
8 % of this license is in the file
9 %
10 % https://www.latex-project.org/lppl.txt
11 %
12 % This file is part of the "ltx-talk bundle" (The Work in LPPL)
13 % and all files in that bundle must be distributed together.
14 %
15 % The released version of this bundle is available from CTAN.
16 %
17 % -----------------------------------------------------------------------
18 %
19 % The development version of the bundle can be found at
20 %
21 % https://github.com/josephwright/ltx-talk
22 %
23 % for those people who are interested.
24 %
25 % -----------------------------------------------------------------------
26 %
27 %<*driver>
28 \documentclass{l3doc}
29 % Additional commands needed in this source
30 \NewDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
31 \begin{document}
32 \DocInput{\jobname.dtx}
33 \end{document}
34 %</driver>
35 % \fi
36 %
37 % ^^A As we are dealing with a class, this has to be done manually
38 % \def\filedate{2026-04-30}
39 % \def\fileversion{v0.5.0}
40 %
41 % \title{^^A
42 % \pkg{ltx-talk-mode} -- Modes^^A
43 % \thanks{This file describes \fileversion,
44 % last revised \filedate.}^^A
45 % }
46 %
47 % \author{^^A
48 % Joseph Wright^^A
49 % \thanks{^^A
50 % E-mail: \email{[email protected]}^^A
51 % }^^A
52 % }
53 %
54 % \date{Released \filedate}
55 %
56 % \maketitle
57 %
58 % \begin{documentation}
59 %
60 % \end{documentation}
61 %
62 % \begin{implementation}
63 %
64 % \section{\pkg{ltx-talk-mode} implementation}
65 %
66 % Start the \pkg{DocStrip} guards.
67 % \begin{macrocode}
68 %<*class>
69 % \end{macrocode}
70 %
71 % Identify the internal prefix.
72 % \begin{macrocode}
73 %<@@=talk>
74 % \end{macrocode}
75 %
76 % \begin{macro}{\@@_mode:nT}
77 % A simplified version of \cs{mode}: only deal with the argument form,
78 % only check the entire overlay spec as a string.
79 % \begin{macrocode}
80 \prg_new_protected_conditional:Npnn \@@_mode:n #1 { T }
81 {
82 \bool_lazy_or:nnTF
83 { \str_if_eq_p:nn {#1} { all } }
84 { \str_if_eq_p:Vn \l_@@_mode_str {#1} }
85 \prg_return_true:
86 \prg_return_false:
87 }
88 % \end{macrocode}
89 % \end{macro}
90 %
91 % \begin{macro}{\mode}
92 % \begin{macrocode}
93 \NewDocumentCommand \mode { D <> { all } +m }
94 { \@@_mode:nT {#1} {#2} }
95 % \end{macrocode}
96 % \end{macro}
97 %
98 % \begin{macrocode}
99 %</class>
100 % \end{macrocode}
101 %
102 % \end{implementation}
103 %
104 % \PrintIndex