-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdefines-instr-close.tex
409 lines (358 loc) · 22 KB
/
defines-instr-close.tex
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
% ───────────────────────────────────────────────────────────────────────────────────────
% ─████████████───██████████████─██████████████─██████████████─██████████─██████─────────
% ─██░░░░░░░░████─██░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░██─██░░██─────────
% ─██░░████░░░░██─██░░██████████─██████░░██████─██░░██████░░██─████░░████─██░░██─────────
% ─██░░██──██░░██─██░░██─────────────██░░██─────██░░██──██░░██───██░░██───██░░██─────────
% ─██░░██──██░░██─██░░██████████─────██░░██─────██░░██████░░██───██░░██───██░░██─────────
% ─██░░██──██░░██─██░░░░░░░░░░██─────██░░██─────██░░░░░░░░░░██───██░░██───██░░██─────────
% ─██░░██──██░░██─██░░██████████─────██░░██─────██░░██████░░██───██░░██───██░░██─────────
% ─██░░██──██░░██─██░░██─────────────██░░██─────██░░██──██░░██───██░░██───██░░██─────────
% ─██░░████░░░░██─██░░██████████─────██░░██─────██░░██──██░░██─████░░████─██░░██████████─
% ─██░░░░░░░░████─██░░░░░░░░░░██─────██░░██─────██░░██──██░░██─██░░░░░░██─██░░░░░░░░░░██─
% ─████████████───██████████████─────██████─────██████──██████─██████████─██████████████─
% ───────────────────────────────────────────────────────────────────────────────────────
% ▒█▀▀█ ▒█▀▀▀ ▒█▀▀▄ ▒█▀▀▀ ▒█▀▀█ ▒█░░░ ░█▀▀█ ▒█▀▀█ ░█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█ ▒█▀▀▀█
% ▒█▄▄▀ ▒█▀▀▀ ▒█░▒█ ▒█▀▀▀ ▒█░░░ ▒█░░░ ▒█▄▄█ ▒█▄▄▀ ▒█▄▄█ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█ ░▀▀▀▄▄
% ▒█░▒█ ▒█▄▄▄ ▒█▄▄▀ ▒█▄▄▄ ▒█▄▄█ ▒█▄▄█ ▒█░▒█ ▒█░▒█ ▒█░▒█ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█ ▒█▄▄▄█
% ~ doesn't work here, so we need to use invisible characters instead
\renewcommand{\SymTab}{\phantom{>>}}
% similar to \SymTab, ~ doesn't work, so we use manual space instead; however the macros already space it way too much, so we basically need to reduce it to get approximate 1 space
\renewcommand{\SymSpc}{\hspace*{-2ex}}
% all drawings should be scaled up and drawn slightly to the left to be aligned perfectly with the rest of the text. Note that instruction tables use optional parameter for vertical spacing, we take it over for horizontal spacing - vertical spacing is fine in details, but we do need horizontal to align drawing with rest of the text
\renewcommand{\SymDrawing}[2][-1.7em]{
\hspace*{#1}
\scalebox{1.5}{
\scriptsize
#2
}
}
% these redeclaration allows us to reuse all previously declared flags so changes can only be made in single place
\renewcommand{\FlagsFPP}{\FS} % we indicate PF status in header, so use standard in table
\renewcommand{\FlagsFPV}{\FS} % we indicate VF status in header, so use standard in table
\renewcommand{\FlagsSmall}[1]{\footnotesize #1} % larger font than in tables above
\renewcommand{\FlagsSee}[1]{} % we don't want to display any footnotes in details section, we describe unusual cases below table
\renewcommand{\FlagsNoEffect}{No effect on flags} % we do want to show this text in details
% and the main flags redeclaration as well - we need additional columns and different formatting in details tables
% see "EFFECTS TABLE" section below for table declaration
\renewcommand{\Flags}[7][]{
&
#1 &
\multicolumn{1}{|c|}{\tt #2} &
{\tt #3} &
&
{\tt #4} &
&
{\tt #5} &
{\tt #6} &
{\tt #7} \notet\noteb \\\cline{3-10}
}
% ▒█▀▀█ ▒█▀▀▀█ ▒█▀▄▀█ ▒█▀▄▀█ ▒█▀▀▀█ ▒█▄░▒█ ▒█▀▀▄ ▒█▀▀▀ ▒█▀▀█ ▒█░░░ ░█▀▀█ ▒█▀▀█ ░█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█ ▒█▀▀▀█
% ▒█░░░ ▒█░░▒█ ▒█▒█▒█ ▒█▒█▒█ ▒█░░▒█ ▒█▒█▒█ ▒█░▒█ ▒█▀▀▀ ▒█░░░ ▒█░░░ ▒█▄▄█ ▒█▄▄▀ ▒█▄▄█ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█ ░▀▀▀▄▄
% ▒█▄▄█ ▒█▄▄▄█ ▒█░░▒█ ▒█░░▒█ ▒█▄▄▄█ ▒█░░▀█ ▒█▄▄▀ ▒█▄▄▄ ▒█▄▄█ ▒█▄▄█ ▒█░▒█ ▒█░▒█ ▒█░▒█ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█ ▒█▄▄▄█
% mnemonic - also serves as the title for instruction
\newcommand{\DetailMnemonic}[1]{\item[{\tt \large \textbf{#1}}]}
% symbolic operation
\newcommand{\DetailSymbol}[1]{{\tt #1}}
% symbolic operation for alternative variants
\newcommand{\DetailSymbolVariants}[2]{
\small
\underline{\tt #1}:\\[1ex]
\DetailSymbol{#2}
}
% name - explains the letters used for mnemonic
\newcommand{\DetailName}[1]{\textbf{#1}}
% (I)nstruction (H)ighlight (for highlighting letters forming mnemonic in `DetailName`)
\newcommand{\IH}[1]{\underline{#1}}
% forms label name for the given item
% #1 mnemonic
\newcommand{\DetailItemRef}[1]{InstrDetailRef#1}
% this is used to avoid warning about repeated label in macros below (in reality there is no repetition in the generated document, just suppresses compiler warning)
\newcommand{\DetailItemLabel}[1]{\label{\DetailItemRef{#1}}}
% convenience for less verbose page reference for given item
% #1 mnemonic
\newcommand{\DetailItemPageRef}[1]{\pageref{\DetailItemRef{#1}}}
% ▒█▀▄▀█ ░█▀▀█ ▀█▀ ▒█▄░▒█ ▒█▀▀▄ ▒█▀▀▀ ▒█▀▀█ ▒█░░░ ░█▀▀█ ▒█▀▀█ ░█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█ ▒█▀▀▀█
% ▒█▒█▒█ ▒█▄▄█ ▒█░ ▒█▒█▒█ ▒█░▒█ ▒█▀▀▀ ▒█░░░ ▒█░░░ ▒█▄▄█ ▒█▄▄▀ ▒█▄▄█ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█ ░▀▀▀▄▄
% ▒█░░▒█ ▒█░▒█ ▄█▄ ▒█░░▀█ ▒█▄▄▀ ▒█▄▄▄ ▒█▄▄█ ▒█▄▄█ ▒█░▒█ ▒█░▒█ ▒█░▒█ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█ ▒█▄▄▄█
% main instruction enviroment, takes 3 parameters:
% #1 mnemonic only (mainly for section names and references)
% #2 parameters (uses `DetailMnemonic` under the hood)
% #3 name (uses `DetailName` under the hood)
% #4 symbolic operation (uses `DetailSymbol` under the hood)
\newenvironment{DetailItem}[4]{
% insert invisible section marker for TOC
\refstepcounter{section}
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}
\sectionmark{#1}
\DetailItemLabel{#1}
\DetailMnemonic{#1 #2}
\DetailName{#3}
% if symbolic operation is not given we should not use any spacing, otherwise, we should
\if\relax\detokenize{#4}\relax
% we don't have symbolic operation
\else
\\[1.2ex]
\DetailSymbol{#4}
\fi
% reduce spacing before and after multicols
\setlength{\multicolsep}{1ex}
}{
% we want some spacing below each item
\vspace{1em}
}
% same as DetailItem but allows 2 lines for title:
% #1 mnemonic line 1 (uses `DetailMnemonic` under the hood)
% #2 parameters line 1
% #3 name for line 1 (uses `DetailName` under the hood)
% #4 mnemonic line 2 (for second line)
% #5 parameters line 2
% #6 name for line 2
% #7 symbolic operation (uses `DetailSymbol` under the hood)
\newenvironment{DetailItemMultiline}[7]{
% insert invisible section marker for TOC (only for e-book)
\ifdefined\isPDF
\refstepcounter{section}
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1 / #4}
\sectionmark{#1 / #4}
\fi
\DetailItemLabel{#1}
\DetailItemLabel{#4}
\DetailMnemonic{#1 #2\\#4 #5}
\DetailName{#3\\#6}
% if symbolic operation is not given we should not use any spacing, otherwise, we should
\if\relax\detokenize{#7}\relax
% we don't have symbolic operation
\else
\\[1.2ex]
\DetailSymbol{#7}
\fi
% reduce spacing before and after multicols
\setlength{\multicolsep}{1ex}
}{
% we want some spacing below each item
\vspace{1em}
}
% use this as parameters in above 2 macros when ZX Next Extended instruction doesn't have any parameters. It will eliminate space between mnemonic and ZX indicator
\newcommand{\DetailItemZXN}{\hspace*{-1ex}\ZXN}
% ▒█▀▀▄ ▒█▀▀▀ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀█ ▀█▀ ▒█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█ ▒█▀▀▀█ ▒█▀▀▀ ▒█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█
% ▒█░▒█ ▒█▀▀▀ ░▀▀▀▄▄ ▒█░░░ ▒█▄▄▀ ▒█░ ▒█▄▄█ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█ ░▀▀▀▄▄ ▒█▀▀▀ ▒█░░░ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█
% ▒█▄▄▀ ▒█▄▄▄ ▒█▄▄▄█ ▒█▄▄█ ▒█░▒█ ▄█▄ ▒█░░░ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█ ▒█▄▄▄█ ▒█▄▄▄ ▒█▄▄█ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█
% describes all variants of the instruction - only used where applicable. Note this can generate 2 variants based on optional parameter:
% - if parameter is number (defaults to 3), then `multicols` environment is used and parameter is taken to be number of columns
% - otherwise `tabularx` is used and parameter is taken to be columns definitions
\NewDocumentEnvironment{DetailVariants}{ O{3} +b }{
{
\tt
\StrLeft{#1}{1}[\FirstLetter]
\IfInteger{\FirstLetter}{
\begin{multicols}{#1}
#2
\end{multicols}
}{
\vspace*{0.8ex}
\begin{tabularx}{\linewidth}{@{}#1}
#2
\end{tabularx}
}
}
}{}
% `itemize` environment with less spacing, suitable for instruction description section
\NewDocumentEnvironment{DetailCompactList}{ O{} +b }{
#1
\vspace{-6pt}
\setlist{leftmargin=1em}
\begin{itemize}
\setlength\itemsep{-1pt}
#2
\end{itemize}
}{}
% ▒█▀▀▀ ▒█▀▀▀ ▒█▀▀▀ ▒█▀▀▀ ▒█▀▀█ ▀▀█▀▀ ▒█▀▀▀█ ▀▀█▀▀ ░█▀▀█ ▒█▀▀█ ▒█░░░ ▒█▀▀▀
% ▒█▀▀▀ ▒█▀▀▀ ▒█▀▀▀ ▒█▀▀▀ ▒█░░░ ░▒█░░ ░▀▀▀▄▄ ░▒█░░ ▒█▄▄█ ▒█▀▀▄ ▒█░░░ ▒█▀▀▀
% ▒█▄▄▄ ▒█░░░ ▒█░░░ ▒█▄▄▄ ▒█▄▄█ ░▒█░░ ▒█▄▄▄█ ░▒█░░ ▒█░▒█ ▒█▄▄█ ▒█▄▄█ ▒█▄▄▄
% renders PV title that also indicates whether the PV indicates parity or overflow; parameters:
% (required) #1 parity type:
% - p = indicate Parity
% - v = indicate oVerflow
% - default = just PV
\NewDocumentCommand{\DetailParityOverflow}{ m }{
\IfEqCase{#1}
{
{p}{
\hspace*{-0.9ex} % this achieves better visually pleasing centering in the tables
\small
\begin{tikzpicture}[baseline=(p.base), plain/.style={}]
\node (p) [plain] {P};
\node (v) [plain, right=1.9ex of p.west] {V};
\draw (p.center) ++(0,0.2pt) circle(1.3ex);
\end{tikzpicture}
}
{v}{
\hspace*{-1.4ex} % this achieves better visually pleasing centering in the tables
\small
\begin{tikzpicture}[baseline=(p.base), plain/.style={}]
\node (p) [plain] {P};
\node (v) [plain, right=1.95ex of p.west] {V};
\draw (v.center) ++(0.2pt,0.5pt) circle(1.3ex);
\end{tikzpicture}
}
{}{PV}
}
}
% renders header cell for effects table
\NewDocumentCommand{\DetailEffectHead}{ m }{\cellcolor{PrintableLightGray}#1}
% effects table for instruction; optional parameter:
% - p = indicate Parity
% - v = indicate oVerflow
% - default = just PV
\NewDocumentEnvironment{DetailEffects}{ O{} O{Effects} +b }{
% /spacer
% |/note
\vspace{3pt} %||/SF /ZF /(YF) /HF /(XF) /PV /NF /CF |
\begin{tabularx}{\linewidth}{@{}lXC{3.8ex}|C{3.8ex}|C{3.6ex}|C{3.8ex}|C{3.6ex}|C{3.8ex}|C{3.8ex}|C{3.8ex}|@{}}
% we need to use hhline because \cellcolor renders on top of cline/hline, and we can't use \rowcolor because we only want some cells to use background...
\hhline{~~|*{8}{-|}}
\multicolumn{2}{@{}X}{\textbf{#2}} &
\multicolumn{1}{|c|}{\DetailEffectHead{SF}} &
\DetailEffectHead{ZF} &
\DetailEffectHead{} &
\DetailEffectHead{HF} &
\DetailEffectHead{} &
\DetailEffectHead{\DetailParityOverflow{#1}} &
\DetailEffectHead{NF} &
\DetailEffectHead{CF}\notet\noteb\\[1pt]\cline{3-10}
#3
\end{tabularx}
\vspace{2pt}
}{}
% effects details
\NewDocumentEnvironment{DetailEffectsFlags}{ +b }{
{
\vspace{0pt}
\renewcommand{\arraystretch}{0.5} % setting default row spacing low will allow us to manipulate individual rows to be taller (see \DetailFlag)
\begin{tabularx}{\linewidth}{@{}llR{3.35cm}X}
#1
\end{tabularx}
\vspace{2pt}
}
}{}
% common flag result descriptions
\NewDocumentCommand{\DetailFlagResultHalfBorrow}{ s }{borrow from bit 4\IfBooleanTF{#1}{ (bit 12 for 16-bit)}{}}
\NewDocumentCommand{\DetailFlagResultBorrow}{ s }{borrow from bit 8\IfBooleanTF{#1}{ (bit 16 for 16-bit)}{}}
\NewDocumentCommand{\DetailFlagResultHalfCarry}{ s }{carry from bit 3\IfBooleanTF{#1}{ (bit 11 for 16-bit)}{}}
\NewDocumentCommand{\DetailFlagResultCarry}{ s }{carry from bit 7\IfBooleanTF{#1}{ (bit 15 for 16-bit)}{}}
\newcommand{\DetailFlagResultOverflowListBottomSpacing}{\vspace*{-4ex}}
\newcommand{\DetailFlagResultSign}[1][]{\IfEq{#1}{}{result}{{\tt #1}} is negative (bit {\tt 7} is set)}
\newcommand{\DetailFlagResultZero}[1][]{\IfEq{#1}{}{result}{{\tt #1}} is {\tt 0}}
\newcommand{\DetailFlagResultParity}[1][]{\IfEq{#1}{}{result}{{\tt #1}} has even number of bits set}
\newcommand{\DetailFlagResultOverflow}{
\DetailFlagsList{
\item both operands positive and result negative
\item both operands negative and result positve
}
\DetailFlagResultOverflowListBottomSpacing % we don't want additional space below the table, otherwise next item would have larger gap
}
% describes the given flag in details
% #1 mandatory flag name, empty will leave less space before this row
% #2 mandatory prefix before description
% #3 mandatory description
% #4 optional, if "p" some vertical "prefix" space is inserted above
% note use of \rule when #1 (flag name) is empty - we want to have less spacing before next row in such case to keep all rows of the same flag closer together (don't use both, #4=p and empty #1 since they both set rules, results may be unpredictable)
\NewDocumentCommand{\DetailFlag}{ m m m O{} }{
& \textbf{#1} & #2 & #3
\IfEq{#4}{p}{
\rule{0pt}{1ex}
\rule[-2ex]{0pt}{0pt}
}{}
\IfEq{#1}{}{}{
\rule[2.5ex]{0pt}{0pt}
} \\[2pt]
}
% concrete flags (so we don't have to type in the names as strings)
% #1 optional prefix before description (default = "set if:")
% #2 optional name of the flag, empty will leave less space before this row
% #3 mandatory description
% #4 * to add some vertical spacing before the item, empty to leave default
\NewDocumentCommand{\DetailFlagSF}{ O{set if:} O{SF} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
\NewDocumentCommand{\DetailFlagZF}{ O{set if:} O{ZF} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
\NewDocumentCommand{\DetailFlagHF}{ O{set if:} O{HF} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
\NewDocumentCommand{\DetailFlagPV}{ O{set if:} O{PV} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
\NewDocumentCommand{\DetailFlagNF}{ O{set if:} O{NF} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
\NewDocumentCommand{\DetailFlagCF}{ O{set if:} O{CF} m s }{\DetailFlag{#2}{#1}{#3}[\IfBooleanTF{#4}{p}{}]}
% creates a list with specific margins and spacing to be used within detail flags descriptions
\newcommand{\DetailFlagsList}[1]{
\vspace{-3ex}
\setlist{leftmargin=1em,after=\vspace{-2ex}}
\begin{itemize}
\setlength\itemsep{-1pt}
#1
\end{itemize}
}
% this is used where additional comments are needed below flags table (actually, technically, from LaTeX point of view, from within the table itself); each item should be provided with `\item` command
\newcommand{\DetailFlagsComments}[1]{
& & \multicolumn{8}{p{7.8cm}}{
\vspace{1ex} % compensate for -3ex from \DetailFlagsList, we want -2ex
\DetailFlagsList{#1}
\vspace{2ex} % compenase for -2ex from \DetailFlagsList, we want default
} \\[-3ex]
}
% ▀▀█▀▀ ▀█▀ ▒█▀▄▀█ ▀█▀ ▒█▄░▒█ ▒█▀▀█ ▒█▀▀▀█ ▒█▀▀▀ ▒█▀▀█ ▀▀█▀▀ ▀█▀ ▒█▀▀▀█ ▒█▄░▒█
% ░▒█░░ ▒█░ ▒█▒█▒█ ▒█░ ▒█▒█▒█ ▒█░▄▄ ░▀▀▀▄▄ ▒█▀▀▀ ▒█░░░ ░▒█░░ ▒█░ ▒█░░▒█ ▒█▒█▒█
% ░▒█░░ ▄█▄ ▒█░░▒█ ▄█▄ ▒█░░▀█ ▒█▄▄█ ▒█▄▄▄█ ▒█▄▄▄ ▒█▄▄█ ░▒█░░ ▄█▄ ▒█▄▄▄█ ▒█░░▀█
% the main timing environment; optional parameter allows specifying the title, defaults to "Timing"
\NewDocumentEnvironment{DetailTiming}{ O{Timing} +b }{
\vspace{1pt}
\begin{tabularx}{0.8\textwidth}{@{}lXccrrrr@{}}
\multicolumn{2}{@{}X}{\textbf{#1}} & Mc & Ts & 3.5MHz & 7MHz & 14MHz & 28MHz \\[1pt]
#2
\end{tabularx}
}{}
% formats individual timing item; parameters
% - optional: number of digits to round to (defaults to 2)
% - T states
% - CPU frequency to adjust to
% note: this is meant to be used internally by other detail time commands, the only reason for implementing it as its own command is to unify formatting
% note: command must be single line to avoid spaces being added on either side...
\newcommand{\DetailTimeItem}[3][2]{\nprounddigits{#1}{\small {\tt \numprint{\fpeval{#2/#3}}}$\mu$s}}
% individual time; parameters:
% - optional description, omit if none (which is the default)
% - number of machine cycles
% - number to T states
% note: the times in microsec are automatically calculated from Ts
\newcommand{\DetailTimeRegular}[3][]{
& #1 & #2 & #3 &
\DetailTimeItem[1]{#3}{3.5} &
\DetailTimeItem{#3}{7} &
\DetailTimeItem{#3}{14} &
\DetailTimeItem{#3}{28} \\
}
% same as `DetailTimeRegular` but uses mono font for first (optional) parameter
\newcommand{\DetailTime}[3][]{\DetailTimeRegular[{\tt #1}]{#2}{#3}}
% ▒█▀▄▀█ ▀█▀ ▒█▀▀▀█ ▒█▀▀█
% ▒█▒█▒█ ▒█░ ░▀▀▀▄▄ ▒█░░░
% ▒█░░▒█ ▄█▄ ▒█▄▄▄█ ▒█▄▄█
% notes with additional information about instruction; optional parameter: if not empty, it is interpretted as size, empty will yield no space (this is used for multiple successive notes so that they are more compact vertically)
\newcommand{\DetailNote}[2][1.5ex]{
\IfEq{#1}{}{
% if empty, no spacing should be applied
}{
% otherwise interpret #1 as size and use for vertical spacing
\vspace*{#1}
}
% either way, print note in smaller font
{\small \normalfont{#2}}
}
% references to multiple items from other pages; parameters:
% #1 items description
% #2 page references (from `label` command)
\newcommand{\DetailItemsSeePageReference}[2]{
\vspace*{-1.5em}
\desclabelstyle{\pushlabel}
\DetailMnemonic{#1}
\desclabelstyle{\multilinelabel}
\DetailNote{#2}
}
% reference to single item from another page
% #1 mnemonic (also serves to form the page reference itself)
\newcommand{\DetailItemSeePageReference}[1]{
\DetailItemsSeePageReference{#1}{See page \DetailItemPageRef{#1}}
}