Debian Codegraph @

texmf-dist/source/latex-dev/latex-lab/latex-lab-new-or-2.dtx

raw
1 % \iffalse meta-comment
2 %
3 %% File: latex-lab-new-or-2.dtx
4 % Copyright (C) 2022-2026 The LaTeX Project
5 %
6 % It may be distributed and/or modified under the conditions of the
7 % LaTeX Project Public License (LPPL), either version 1.3c of this
8 % license or (at your option) any later version. The latest version
9 % of this license is in the file
10 %
11 % https://www.latex-project.org/lppl.txt
12 %
13 %
14 % The latex-lab bundle is developed in the LaTeX2e GitHub.
15 % Issues may be reported at
16 %
17 % https://github.com/latex3/latex2e/issues
18 %
19 \def\ltlabneworIIdate{2026-01-16}
20 \def\ltlabneworIIversion{0.86d}
21
22 %<*driver>
23 \DocumentMetadata{tagging=on,pdfstandard=ua-2}
24 \documentclass[kernel]{l3in2edoc}
25
26 \EnableCrossrefs
27 \CodelineIndex
28 \begin{document}
29 \DocInput{latex-lab-new-or-2.dtx}
30 \end{document}
31 %</driver>
32 %
33 % \fi
34 %
35 %
36 % \title{The \texttt{latex-lab-testphase-new-or-2} code}
37 % \author{Frank Mittelbach, \LaTeX{} Project}
38 % % \date{v\ltlabneworIIversion\ \ltlabneworIIdate}
39 % \maketitle
40 %
41 % \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
42 % \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
43 % \providecommand\pkg[1]{\texttt{#1}}
44 %
45 %
46 % \begin{abstract}
47 % This code implements changes to the output routine intended to be
48 % moved in the \LaTeX{} kernel at some point in the future.
49 % \end{abstract}
50 %
51 %
52 %
53 %
54 % \section{Introduction}
55 %
56 %
57 %
58 %
59 % \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
60 %
61 %
62 % \section{The Implementation}
63 %
64 % \begin{macrocode}
65 %<*package>
66 % \end{macrocode}
67 %
68 % \subsection{File declaration}
69 % \begin{macrocode}
70 \ProvidesPackage{latex-lab-testphase-new-or-2}
71 [\ltlabneworIIdate\space v\ltlabneworIIversion\space
72 Changes to the output routine]
73 % \end{macrocode}
74 %
75 % \subsection{\cs{@makecol} reimplementation}
76 %
77 % \begin{plugdecl}{footnote-floats}
78 % If \cs{DocumentMetadata} is used we use \plug{footnotes-floats}
79 % as the default. In 2e compatibility mode this should be changed to
80 % \plug{footnotes-floats-legacy}.
81 % \begin{macrocode}
82 \AssignSocketPlug {build/column/outputbox}{footnotes-floats}
83 % \end{macrocode}
84 % \end{plugdecl}
85 %
86 %
87 %
88 % \begin{macro}[no-user-doc]{\@makecol@handlesplitfootnotes}
89 % \begin{macro}[no-user-doc]{\@makecol@splitfootnotemessagehook}
90 % This is only an early draft and doesn't do much.
91 % Contains incomplete preparation for tagging commented out.
92 % \fmi{Interfaces and code will change in the future}
93 % \begin{macrocode}
94 \def\@makecol@handlesplitfootnotes {%
95 % \ifx\splitfootnote@continuation\@empty \else
96 % \setbox\footins\vbox{\splitfootnote@continuation\unvbox\footins}%
97 % \global\let\splitfootnote@continuation\@empty
98 % \fi
99 \ifnum\insertpenalties>\z@
100 \@makecol@splitfootnotemessagehook
101 % \setbox\footins\vbox{\unvbox\footins --- END at split}%
102 % \gdef\splitfootnote@continuation {--- START after split}%
103 \fi
104 }
105 %\def\splitfootnote@continuation{}
106 % \end{macrocode}
107 % This could issue warning if split footnotes are encountered.
108 % \begin{macrocode}
109 \let \@makecol@splitfootnotemessagehook \@empty
110 % \end{macrocode}
111 % \end{macro}
112 % \end{macro}
113 %
114 %
115 %
116 %
117 %
118 %
119 % \subsection{\cs{@outputpage} reimplementation}
120 %
121 % We still have to deal with various plug setting for tagging:
122 % This needs documentation and moving.
123 %
124 % \begin{plugdecl}{default}
125 % \begin{macrocode}
126 \ExplSyntaxOn
127 % \end{macrocode}
128 % \fmi{where should these plug declarations go? tagpdf?}
129 % \begin{macrocode}
130 \NewTaggingSocketPlug{build/page/header}{default}
131 {
132 \__tag_hook_kernel_before_head:
133 #2
134 \__tag_hook_kernel_after_head:
135 }
136 % \end{macrocode}
137 %
138 % \begin{macrocode}
139 \AssignTaggingSocketPlug{build/page/header}{default}
140 % \end{macrocode}
141 %
142 % \end{plugdecl}
143 %
144 % \begin{plugdecl}{default}
145 % \begin{macrocode}
146 \NewTaggingSocketPlug{build/page/footer}{default}
147 {
148 \__tag_hook_kernel_before_foot:
149 #2
150 \__tag_hook_kernel_after_foot:
151 }
152 % \end{macrocode}
153 %
154 % \begin{macrocode}
155 \AssignTaggingSocketPlug{build/page/footer}{default}
156 % \end{macrocode}
157 %
158 % \end{plugdecl}
159 %
160 % \begin{plugdecl}{default}
161 % \begin{macrocode}
162 \NewTaggingSocketPlug{build/column/outputbox}{default}
163 {
164 \__tag_check_typeout_v:n { ====>~In~\token_to_str:N \@makecol
165 \c_space_tl\the\c@page }
166 \tag_mc_add_missing_to_stream:Nn \@outputbox {main}
167 }
168 % \end{macrocode}
169 % % \end{plugdecl}
170 % \begin{plugdecl}{default}
171 % \begin{macrocode}
172 \NewTaggingSocketPlug{build/column/footins}{default}
173 { \tag_mc_add_missing_to_stream:Nn \footins {footnote} }
174 % \end{macrocode}
175 % The two sockets do nothing (default \plug{noop}) if we
176 % are in lua mode. If not they get the \plug{default} assigned
177 % \begin{macrocode}
178 \sys_if_engine_luatex:F
179 {
180 \AssignTaggingSocketPlug{build/column/outputbox}{default}
181 \AssignTaggingSocketPlug{build/column/footins}{default}
182 }
183 \ExplSyntaxOff
184 % \end{macrocode}
185 % \end{plugdecl}
186 %
187 %
188 %
189 %
190 %
191 % \section {Replacement for the \pkg{footmisc} package}
192 %
193 % The replacement for \pkg{footmisc}. If the new code is used, we must replace
194 % the package if it is loaded by the user:
195 % \begin{macrocode}
196 \declare@file@substitution{footmisc.sty}{latex-lab-footmisc.ltx}
197 % \end{macrocode}
198 % This can be removed the moment the remaining hooks and sockets
199 % have been integrated into footmisc, which will probably not
200 % happen before the 2025/11 release.
201 %
202 %
203 %
204 % \section {Temp stuff that is related but should go to the kernel}
205 %
206 % This is the code from \texttt{latex-lab-footnotes.dtx}.
207 % \begin{macrocode}
208 \input{latex-lab-footnotes.ltx}
209 % \end{macrocode}
210 %
211 %
212 % \begin{macrocode}
213 %</package>
214 % \end{macrocode}
215 %
216 % \Finale
217 %