blob: 15c09589bf1dcc5a5bdc73d94bdb2a37119b480e (
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
|
%%
%% This is file `latex-lab-testphase-marginpar.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latex-lab-marginpar.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-marginpar.dtx
%%
\def\ltlabmarginpardate{2024-08-06}
\def\ltlabmarginparversion{0.85c}
\ProvidesExplPackage {latex-lab-testphase-marginpar} {\ltlabmarginpardate} {\ltlabmarginparversion}
{Changes related to the tagging of the margin notes}
\int_new:N \g__kernel_marginpar_int
\socket_new:nn {tagsupport/marginpar/begin}{0}
\socket_new:nn {tagsupport/marginpar/end}{0}
\cs_new_protected:Npn\__tag_get_marginpar_parent_aux:nn #1 #2
{
\str_if_eq:eeT{\use_ii:nn #1}{Part}{\seq_put_right:Nn\l__tag_tmpa_seq {#2}}
}
\cs_new_protected:Npn \__tag_get_marginpar_parent:N #1
{
\seq_clear:N\l__tag_tmpa_seq
\seq_map_pairwise_function:NNN
\g__tag_struct_tag_stack_seq
\g__tag_struct_stack_seq
\__tag_get_marginpar_parent_aux:nn
\seq_put_right:Nn\l__tag_tmpa_seq {2}
\seq_get_left:NN \l__tag_tmpa_seq #1
}
\cs_generate_variant:Nn \tag_struct_begin:n {e}
\socket_new_plug:nnn {tagsupport/marginpar/begin}{default}
{
\if_mode_horizontal:
\tag_mc_end:
\__tag_get_marginpar_parent:N \l__tag_tmpa_tl
\tag_struct_begin:e{tag=Aside,parent=\l__tag_tmpa_tl}%
\else:
\tag_struct_begin:n{tag=Aside}%
\fi:
}
\socket_new_plug:nnn {tagsupport/marginpar/end}{default}
{
\tag_struct_end:
\if_mode_horizontal: \tag_mc_begin:n{} \fi:
}
\socket_assign_plug:nn {tagsupport/marginpar/begin}{default}
\socket_assign_plug:nn {tagsupport/marginpar/end}{default}
\long\def \@savemarbox #1#2{%
\UseTaggingSocket{marginpar/begin}
\global\setbox #1%
\color@vbox
\vtop{%
\hsize\marginparwidth
\@parboxrestore
\@marginparreset
#2\par
\@minipagefalse
\outer@nobreak
}%
\color@endbox
\UseTaggingSocket{marginpar/end}
}
\long\def\@ympar#1{%
\@savemarbox\@marbox{#1}%
\global\setbox\@currbox\copy\@marbox
\tag_stop:
\@xympar
\tag_start:}
\long\def\@xmpar[#1]#2{%
\int_gincr:N\g__kernel_marginpar_int
\property_if_recorded:eTF { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }
{
\@savemarbox\@marbox {#1
\property_record:ee
{ tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}
}%
\tag_stop:
\@savemarbox\@currbox{#2}%
\tag_start:
}
{
\@savemarbox\@currbox{#2}%
\tag_stop:
\@savemarbox\@marbox{#1
\property_record:ee
{ tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}}
\tag_start:
}
\tag_stop:
\@xympar
\tag_start:
}
\endinput
%%
%% End of file `latex-lab-testphase-marginpar.sty'.
|