summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty
blob: 3b35a7beb388973a3c0093b8e0d50d78a9a3a6df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
%%
%% This is file `latex-lab-testphase-minipage.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latex-lab-minipage.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright 2021-2023 LaTeX Project
%% 
%% This file was generated from file(s) of the  `LaTeX-lab Bundle'.
%% ------------------------------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
%% without such generated files.
%% 
%% The newest sources can be found below
%% 
%%    https://github.com/latex3/latex2e/required/latex-lab
%% 
%% where one can also log issues in case there are any.
%% 
%% 
%% File: latex-lab-minipage.dtx
%%
\def\ltlabminipagedate{2023-10-30}
\def\ltlabminipageversion{0.81c}
\ProvidesExplPackage {latex-lab-testphase-minipage}
  {\ltlabminipagedate} {\ltlabminipageversion}
  {Code related to the tagging of minipages and parboxes}
\RequirePackage{latex-lab-testphase-new-or-1}
\RequirePackage{latex-lab-testphase-new-or-2}

\def\@kernel@init@minipage{}
\def\@kernel@init@parbox{}
\socket_new:nn {tagsupport/minipage/before}{0}
\socket_new:nn {tagsupport/minipage/after} {0}
\socket_new:nn {tagsupport/parbox/before}  {0}
\socket_new:nn {tagsupport/parbox/after}{0}
\def\@iiiminipage#1#2[#3]#4{%
  \@kernel@init@minipage
  \leavevmode
  \@pboxswfalse
  \setlength\@tempdima{#4}%
  \def\@mpargs{{#1}{#2}[#3]{#4}}%
  \socket_use:n{tagsupport/minipage/before}% new
  \setbox\@tempboxa\vbox\bgroup
    \color@begingroup
      \hsize\@tempdima
      \textwidth\hsize \columnwidth\hsize
      \@parboxrestore
      \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
      \socket_assign_plug:nn{fntext/process}{mp}%
      \let\@listdepth\@mplistdepth \@mplistdepth\z@
      \@minipagerestore
      \@setminipage}
\def\endminipage{%
    \par
    \unskip
    \ifvoid\@mpfootins\else
      \vskip\skip\@mpfootins
      \normalcolor
      \footnoterule
      \unvbox\@mpfootins
    \fi
    \@minipagefalse   %% added 24 May 89
  \color@endgroup
  \egroup
  \tag_stop:n{minipage}
  \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}%
  \tag_start:n{minipage}
  \socket_use:n{tagsupport/minipage/after} %new end ...
  }
\long\def\@iiiparbox#1#2[#3]#4#5{%
  \@kernel@init@parbox
  \leavevmode
  \@pboxswfalse
  \setlength\@tempdima{#4}%
  \socket_use:n{tagsupport/parbox/before}
  \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
    \ifx\relax#2\else
      \setlength\@tempdimb{#2}%
      \edef\@parboxto{to\the\@tempdimb}%
    \fi
    \if#1b\vbox
    \else\if #1t\vtop
    \else\ifmmode\vcenter
    \else\@pboxswtrue $\vcenter
    \fi\fi\fi
    \@parboxto{\let\hss\vss\let\unhbox\unvbox
       \csname bm@#3\endcsname}%
    \if@pboxsw \m@th$\fi
  \@end@tempboxa%
  \socket_use:n{tagsupport/parbox/after}
  }
\tl_new:N  \l__ltboxes_tag_tl
\tl_set:Nn \l__ltboxes_tag_tl {Div}
\socket_new_plug:nnn{tagsupport/minipage/before}{tag/dflt}
  {
    \tag_mc_end_push:\tag_struct_end:
    \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
  }
\socket_new_plug:nnn{tagsupport/minipage/after}{tag/dflt}
  {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}

\socket_new_plug:nnn{tagsupport/parbox/before}{tag/dflt}
  {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}}

\socket_new_plug:nnn{tagsupport/parbox/after}{tag/dflt}
  {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
\socket_assign_plug:nn{tagsupport/minipage/before}{tag/dflt}
\socket_assign_plug:nn{tagsupport/minipage/after} {tag/dflt}
\socket_assign_plug:nn{tagsupport/parbox/before}  {tag/dflt}
\socket_assign_plug:nn{tagsupport/parbox/after}   {tag/dflt}

\endinput
%%
%% End of file `latex-lab-testphase-minipage.sty'.