blob: 4735cf87df062676e4e1ca5411abdc3707e7d0c8 (
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
%%
%% Package: spectralsequences v1.3.3 2023-01-28
%% Author: Hood Chatham
%% Email: hood@mit.edu
%% Date: 2023-01-28
%% License: Latex Project Public License
%%
%% File: sseqcheckdefinitions.code.tex
%%
%% A few tikz commands are modified in sseqpages. This file checks the definitions of all commands modified. Of course, this is insufficient to ensure that
%% the behavior isn't completely wrong, but at least it's a sanity check.
%%
% TODO: we could recover from failing to patch keys.
\sseq@tempiftrue
\begingroup
\def\sseq@checkprotecteddef#1{\def\sseq@temp{\sseq@checkdef@{#1}}\afterassignment\sseq@temp\protected\long\@xp\def\csname sseq@check@\sseq@macroname#1\endcsname}
\def\sseq@checkdef#1{\def\sseq@temp{\sseq@checkdef@{#1}}\afterassignment\sseq@temp\@xp\def\csname sseq@check@\sseq@macroname#1\endcsname}
\def\sseq@checkdef@#1{
\@xp\ifx\csname sseq@check@\sseq@macroname#1\endcsname#1\else
\sseq@tempiffalse
% \@xp\typeout\@xp{\sseq@macroname#1}
\fi
}
%%
%% sseqmacromakers.code.tex
%%
\ExplSyntaxOn
% I should work out how old the version of xparse has to be before this breaks,
% but I'm too lazy. It would also be nice if I could figure out how to ensure
% that my trick of setting \l__cmd_grab_expandably_bool to false works
% correctly, but this might be difficult
\@ifpackagelater{xparse}{2017/02/08}{
\cs_if_exist:NTF \__xparse_grab_u:w {
\global\sseq@patchxparseUtrue
}{
\sseq@checkprotecteddef \__cmd_grab_u:w #1#2 \__cmd_run_code:{
\__cmd_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn
}
\sseq@checkprotecteddef\__cmd_grab_u_aux:nnN #1#2#3 {
\tl_set:Nn \l__cmd_signature_tl {#2}
\exp_after:wN #3 \l__cmd_fn_tl ##1 #1
{ \__cmd_add_arg:n {##1} }
\l__cmd_fn_tl
}
\sseq@checkprotecteddef \__cmd_normalize_type_u:w #1 {
\quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn }
\__cmd_normalize_check_lu:N u
\__cmd_add_arg_spec_mandatory:n { u {#1} } % Oct 17, 2018
% \int_incr:N \l__cmd_mandatory_args_int
% \tl_clear:N \l__cmd_last_delimiters_tl
\__cmd_normalize_arg_spec_loop:n
}
\ifsseq@tempif
\global\sseq@patchxparseUtrue
\else
\global\sseq@patchxparseUfalse
\fi
\sseq@tempiftrue
}
}{}
\ExplSyntaxOff
\sseq@tempiftrue
%%
%% sseqkeys.code.tex
%%
\sseq@checkdef\pgfkeys@case@one{%
\pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}%
{\pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
{\pgfkeys@case@two}%
}
\ifsseq@tempif\else
% Try again with new v3.1.10 definition
\sseq@tempiftrue
\sseq@checkdef\pgfkeys@case@one{%
\pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}%
{\pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
\ifx\pgfkeys@code\relax\expandafter\pgfkeys@firstoftwo\else\expandafter\pgfkeys@secondoftwo\fi
{\pgfkeys@unknown}%
{\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}}
{\pgfkeys@case@two}%
}
\fi
\sseq@checkdef\pgfkeys@case@two@extern{%
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
\pgfkeysvalueof{\pgfkeyscurrentkey}%
\else%
\pgfkeyslet{\pgfkeyscurrentkey}\pgfkeyscurrentvalue%
\fi%
}
\ifsseq@tempif\else
\endgroup
\sseq@tempiffalse % We'll throw a critical error in spectralsequences.sty to end input
\endinput
\fi
\sseq@tempiftrue
%%
%% sseqdrawing.code.tex
%%
%from \pgf\frontendlayer\tikz\libraries\tikzlibraryfit.code.tex line 81
\sseq@checkdef\tikz@lib@fit@scan@handle#1{%
\iftikz@shapeborder%
% Ok, fit all four external anchors, if they exist
\tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{west}}%
\tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{east}}%
\tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{north}}%
\tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{south}}%
\else%
\tikz@lib@fit@adjust{#1}%
\fi%
\tikz@lib@fit@scan%
}
% from \pgf\frontendlayer\tikz\tikz.code.tex line 5164
\sseq@checkdef\tikz@calc@anchor#1.#2\tikz@stop{%
\pgfpointanchor{\tikz@pp@name{#1}}{#2}%
}
\ifsseq@tempif
\global\sseq@patchfittrue
\else
% New version of \tikz@calc@anchor
\sseq@tempiftrue
\sseq@checkdef\tikz@calc@anchor#1.#2\tikz@stop{%
\ifcsname pgf@sh@ns@\tikz@pp@name {#1}\endcsname
\pgfpointanchor {\tikz@pp@name {#1}}{#2}%
\else
\pgfpointanchor {#1}{#2}%
\fi
}
\ifsseq@tempif
\global\sseq@patchfittrue
\else
\sseq@warning{fit-patch-failed}
\global\sseq@patchfitfalse
\fi
\fi
\sseq@tempiftrue
%%
%% sseqforeach.code.tex
%%
\sseq@checkdef\pgffor@@vars@opt[#1]{\pgfkeys{/pgf/foreach/.cd,#1}\pgffor@vars}
\sseq@checkdef\pgffor@doloop{%
\pgffor@begingroup
\edef\pgffor@temp{\expandafter\Pgffor@geT\the\pgffor@iter}%
\edef\pgffor@incheck{{.0/}{\pgffor@temp/}}%
\expandafter\pgfutil@in@\pgffor@incheck%
\ifpgfutil@in@%
\expandafter\pgffor@strip\pgffor@temp%
\fi%
\expandafter\pgfutil@in@\expandafter/\expandafter{\pgffor@var}%
\ifpgfutil@in@%
\expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@temp//\relax}%
\expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
\else%
% Convert to alphabetic sequence, if necessary.
\ifpgffor@alphabeticsequence%
\pgffor@makealphabetic\pgffor@temp%
\expandafter\let\pgffor@var=\pgffor@temp%
\else%
\expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@temp}%
\fi%
\fi%
% Insert any context, if any.
\ifpgffor@context%
\let\pgffor@temp=\pgffor@dots@pre%
\expandafter\pgfutil@append@macrotomacro\expandafter%
{\expandafter\pgffor@temp\expandafter}\expandafter{\pgffor@var}%
\expandafter\pgfutil@append@macrotomacro\expandafter%
{\expandafter\pgffor@temp\expandafter}\expandafter{\pgffor@dots@post}%
\expandafter\let\pgffor@var=\pgffor@temp%
\fi%
% Perform assignments before loop body.
\ifx\pgffor@assign@before@code\pgfutil@empty%
\else%
\pgffor@assign@before@code%
\fi%
%
\expandafter\expandafter\expandafter\pgffor@reset@hooks\expandafter\pgffor@beginhook\expandafter\pgffor@body\pgffor@endhook%
%
% Perform assignments after loop body.
\ifx\pgffor@assign@after@code\pgfutil@empty%
\else%
\pgffor@assign@after@code%
\fi%
\pgffor@endgroup%
\pgffor@loop%
}
\sseq@checkdef\pgffor@invokebody{%
\pgffor@begingroup%
\expandafter\pgfutil@in@\expandafter/\expandafter{\pgffor@var}%
\ifpgfutil@in@%
\expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@value//\relax}%
\expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
\else%
\expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@value}%
\fi%
% Execute assign once code.
\ifx\pgffor@assign@once@code\pgfutil@empty%
\else\pgffor@assign@once@code%
\fi%
% Execute assign before code.
\ifx\pgffor@assign@before@code\pgfutil@empty%
\else\pgffor@assign@before@code%
\fi%
%
\expandafter\expandafter\expandafter\pgffor@reset@hooks\expandafter\pgffor@beginhook\expandafter\pgffor@body\pgffor@endhook%
% Execute assign after code.
\ifx\pgffor@assign@after@code\pgfutil@empty%
\else%
\pgffor@assign@after@code%
\fi%
%
\pgffor@endgroup%
}
\ifsseq@tempif
\global\sseq@patchforeachtrue
\else
\sseq@warning{foreach-patch-failed}
\global\sseq@patchforeachfalse
\fi
\endgroup
|