blob: b56859f471e5788f35d800c42e2563ef45472ce7 (
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
%%
%% This is file `ltpara.ltx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ltpara.dtx (with options: `2ekernel')
%%
%% This is a generated file.
%%
%% The source is maintained by the LaTeX Project team and bug
%% reports for it can be opened at https://latex-project.org/bugs.html
%% (but please observe conditions on bug reports sent to that address!)
%%
%%
%% Copyright (C) 1993-2021
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the LaTeX base system.
%% --------------------------------------------------------------
%%
%% 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
%% https://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 has the LPPL maintenance status "maintained".
%%
%% This file may only be distributed together with a copy of the LaTeX
%% base system. You may however distribute the LaTeX base system without
%% such generated files.
%%
%% The list of all files belonging to the LaTeX base distribution is
%% given in the file `manifest.txt'. See also `legal.txt' for additional
%% information.
%%
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File: ltpara.dtx (C) Copyright 2020-2021
%%% From File: lthooks.dtx
\def\ltparaversion{v1.0d}
\def\ltparadate{2021/02/18}
\ExplSyntaxOn
\hook_new_pair:nn{para/before}{para/after}
\hook_new_pair:nn{para/begin}{para/end}
\let \@kernel@before@para@before \@empty
\let \@kernel@before@para@begin \@empty
\let \@kernel@after@para@end \@empty
\let \@kernel@after@para@after \@empty
\tl_new:N \g__para_standard_everypar_tl
\tl_gset:Nn \g__para_standard_everypar_tl {
\box_gset_to_last:N \g_para_indentation_box
\group_begin:
\tex_par:D
\group_end:
\tex_everypar:D { \__kernel_msg_error:nnnn {para}{mode}{before}{vertical} }
\@kernel@before@para@before
\hook_use:n {para/before}
\group_begin:
\tex_everypar:D {}
\skip_zero:N \tex_parskip:D
\tex_noindent:D
\group_end:
\tex_everypar:D{\g__para_standard_everypar_tl}
\cs_set_eq:NN \__para_handle_indent: \__para_add_indentation_box:
\@kernel@before@para@begin
\hook_use:n {para/begin}
\if_mode_horizontal: \else:
\__kernel_msg_error:nnnn {para}{mode}{begin}{vertical} \fi:
\__para_handle_indent:
}
\tex_everypar:D{\g__para_standard_everypar_tl}
\newtoks \everypar
\tl_gput_right:Nx \g__para_standard_everypar_tl {
\exp_not:N \the
\exp_not:N \toks
\the \allocationnumber
\c_space_tl
}
\box_new:N \g_para_indentation_box
\cs_new:Npn \__para_add_indentation_box: {
\box_use_drop:N \g_para_indentation_box
}
\cs_new_eq:NN \__para_handle_indent: \__para_add_indentation_box:
\cs_new:Npn \para_suppress_indentation: {
\cs_set_eq:NN \__para_handle_indent: \prg_do_nothing:
}
\cs_set_eq:NN \IndentationBox \g_para_indentation_box
\cs_set_eq:NN \SuppressIndentationBox \para_suppress_indentation:
\cs_new_protected:Npn \para_end: {
\mode_if_horizontal:TF {
\mode_if_inner:F {
\tex_unskip:D
\hook_use:n{para/end}
\@kernel@after@para@end
\mode_if_horizontal:TF {
\if_int_compare:w 0 < \tex_lastnodetype:D
\tex_kern:D \c_zero_dim
\fi:
\tex_par:D
\hook_use:n{para/after}
\@kernel@after@para@after
}
{ \__kernel_msg_error:nnnn {para}{mode}{end}{horizontal} }
}
}
\tex_par:D
}
\cs_set_eq:NN \par \para_end:
\cs_set_eq:NN \@@par \para_end:
\cs_set_eq:NN \endgraf \para_end:
\everypar{\@nodocument} %% To get an error if text appears before the
\__kernel_msg_new:nnnn {para} {mode}
{
Illegal~mode~ change~ in~ hook~ 'para/#1'.\\
Hook~ code~ did~ not~ remain~ in~ #2~ mode.
}
{
Paragraph~ hooks~ cannot~ change~ the~ TeX~ mode~ without~ causing~
endless~ recursion.~ The~ hook~ code~ in~ 'para/#1'~ needs~ to~ stay~
in~ #2~ mode,~ but~ it~ didn't.~ Examine~ the~ hook~
code~ with~ \ShowHook~ to~ find~ the~ issue.
}
\ExplSyntaxOff
\IfFormatAtLeastTF{2021/05/01}{}
{
\long\def \@savemarbox #1#2{%
\global\setbox #1%
\color@vbox
\vtop{%
\hsize\marginparwidth
\@parboxrestore
\@marginparreset
#2\par % <-- needed
\@minipagefalse
\outer@nobreak
}%
\color@endbox
}
\newcounter{paracnt}
\def\@kernel@before@para@begin{%
\stepcounter{paracnt}%
\typeout{PARA: \arabic{paracnt} start
(\@currenvir\space level\on@line)}%
}
\def\@kernel@after@para@end {%
\typeout{PARA: \arabic{paracnt} end \space\space
(\@currenvir\space level\on@line)}%
\addtocounter{paracnt}{-1}%
}
\let\color@begingroup\begingroup
\def\color@endgroup{\endgraf\endgroup}
\def\color@setgroup{\color@begingroup} % \def\color@setgroup{\color@begingroup\set@color}
\def\color@hbox{\hbox\bgroup\color@begingroup}
\def\color@vbox{\vbox\bgroup\color@begingroup}
\def\color@endbox{\color@endgroup\egroup}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
%% End of file `ltpara.ltx'.
|