Debian Codegraph @

texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty

raw
1 %%
2 %% This is file `latex-lab-testphase-minipage.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% latex-lab-minipage.dtx (with options: `package')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright 2021-2025 LaTeX Project
12 %%
13 %% This file was generated from file(s) of the `LaTeX-lab Bundle'.
14 %% ------------------------------------------------------------------------------------
15 %%
16 %% It may be distributed and/or modified under the
17 %% conditions of the LaTeX Project Public License, either version 1.3c
18 %% of this license or (at your option) any later version.
19 %% The latest version of this license is in
20 %% http://www.latex-project.org/lppl.txt
21 %% and version 1.3c or later is part of all distributions of LaTeX
22 %% version 2008 or later.
23 %%
24 %% This file may only be distributed together with a copy of the LaTeX
25 %% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
26 %% without such generated files.
27 %%
28 %% The newest sources can be found below
29 %%
30 %% https://github.com/latex3/latex2e/required/latex-lab
31 %%
32 %% where one can also log issues in case there are any.
33 %%
34 %%
35 %% File: latex-lab-minipage.dtx
36 %%
37 \def\ltlabminipagedate{2025-05-10}
38 \def\ltlabminipageversion{0.81g}
39 \ProvidesExplPackage {latex-lab-testphase-minipage}
40 {\ltlabminipagedate} {\ltlabminipageversion}
41 {Code related to the tagging of minipages and parboxes}
42 \RequirePackage{latex-lab-testphase-new-or-1}
43 \RequirePackage{latex-lab-testphase-new-or-2}
44
45 \def\@kernel@init@minipage{}
46 \def\@kernel@init@parbox{}
47 \NewTaggingSocket{minipage/before}{0}
48 \NewTaggingSocket{minipage/after} {0}
49 \NewTaggingSocket{parbox/before} {0}
50 \NewTaggingSocket{parbox/after}{0}
51 \def\@iiiminipage#1#2[#3]#4{%
52 \@kernel@init@minipage
53 \leavevmode
54 \@pboxswfalse
55 \setlength\@tempdima{#4}%
56 \def\@mpargs{{#1}{#2}[#3]{#4}}%
57 \UseTaggingSocket{minipage/before}% new
58 \setbox\@tempboxa\vbox\bgroup
59 \color@begingroup
60 \hsize\@tempdima
61 \textwidth\hsize \columnwidth\hsize
62 \@parboxrestore
63 \UseTaggingSocket{para/restore}
64 \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
65 \socket_assign_plug:nn{fntext/process}{mp}%
66 \let\@listdepth\@mplistdepth \@mplistdepth\z@
67 \@minipagerestore
68 \@setminipage}
69 \def\endminipage{%
70 \par
71 \unskip
72 \ifvoid\@mpfootins\else
73 \vskip\skip\@mpfootins
74 \normalcolor
75 \footnoterule
76 \unvbox\@mpfootins
77 \fi
78 \@minipagefalse %% added 24 May 89
79 \color@endgroup
80 \egroup
81 \tag_suspend:n{minipage}
82 \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}%
83 \tag_resume:n{minipage}
84 \UseTaggingSocket{minipage/after} %new end ...
85 }
86 \long\def\@iiiparbox#1#2[#3]#4#5{%
87 \@kernel@init@parbox
88 \leavevmode
89 \@pboxswfalse
90 \setlength\@tempdima{#4}%
91 \UseTaggingSocket{parbox/before}
92 \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore
93 \UseTaggingSocket{para/restore}
94 #5\@@par}%
95 \ifx\relax#2\else
96 \setlength\@tempdimb{#2}%
97 \edef\@parboxto{to\the\@tempdimb}%
98 \fi
99 \if#1b\vbox
100 \else\if #1t\vtop
101 \else\ifmmode\vcenter
102 \else\@pboxswtrue $\vcenter
103 \fi\fi\fi
104 \@parboxto{\let\hss\vss\let\unhbox\unvbox
105 \csname bm@#3\endcsname}%
106 \if@pboxsw \m@th$\fi
107 \@end@tempboxa%
108 \UseTaggingSocket{parbox/after}
109 }
110 \tl_new:N \l__ltboxes_tag_tl
111 \tl_set:Nn \l__ltboxes_tag_tl {Div}
112 \NewTaggingSocketPlug{minipage/before}{tag/dflt}
113 {
114 \tag_mc_end_push:
115 \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
116 \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
117 }
118 \NewTaggingSocketPlug{minipage/after}{tag/dflt}
119 {
120 \tag_struct_end:
121 \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
122 \tag_mc_begin_pop:n{}
123 }
124
125 \NewTaggingSocketPlug{parbox/before}{tag/dflt}
126 {
127 \tag_mc_end_push:
128 \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
129 \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
130 }
131
132 \NewTaggingSocketPlug{parbox/after}{tag/dflt}
133 {
134 \tag_struct_end:
135 \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
136 \tag_mc_begin_pop:n{}
137 }
138 \AssignTaggingSocketPlug{minipage/before}{tag/dflt}
139 \AssignTaggingSocketPlug{minipage/after} {tag/dflt}
140 \AssignTaggingSocketPlug{parbox/before} {tag/dflt}
141 \AssignTaggingSocketPlug{parbox/after} {tag/dflt}
142
143 \endinput
144 %%
145 %% End of file `latex-lab-testphase-minipage.sty'.