-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcoco-headings.sty
executable file
·543 lines (543 loc) · 19.9 KB
/
coco-headings.sty
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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
%%
%% This is file `coco-headings.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cocotex.dtx (with options: `headings')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from coco-headings.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file cocotex.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% module for CoCoTeX that extends heading objects.
%%
%% Maintainer: [email protected]
%%
%% lualatex - texlive >= 2019
%%
\NeedsTeXFormat{LaTeX2e}[2018/12/01]
\ProvidesPackage{coco-headings}
[2024/01/29 0.4.0 CoCoTeX headings module]
\RequirePackage{coco-meta}
\RequirePackage{bookmark}%
\hypersetup{bookmarksdepth=-999}%
\tpDeclareContainer{heading}{%
\tpInherit{Components,Properties}{CommonMeta}%
\tpDeclareType{Components}{%
\tp@heading@authors%
\tp@provide@hd@macros{Title}%
\tp@provide@hd@macros{Subtitle}%
\tp@provide@hd@macros{Number}%
\tp@provide@hd@macros{LicenceLogo}%
\tp@provide@hd@macros{LicenceName}%
\tp@heading@quotes
}%
\tpDeclareType{Properties}{}%
\tpDeclareEnv{\heading}{\endheading}%
}
\long\def\tpDeclareHeading{\tp@opt@empty\@tpDeclareHeading}
\long\def\@tpDeclareHeading[#1]#2#3#4{%
\ifcsdef{tp@container@#3}{%
\tpPackageInfo{Headings}{}{Appending to `#3'}%
\ifcsstring{tp@hdg@#3@level}{#2}{}{%
\tpPackageError{Headings}
{Level Mismatch}
{Level of heading `#3' cannot be altered!}
{The already existing heading `#3' has toc level `\csname tp@hdg@#3@level\endcsname', but your^^J%
re-declaration states `#2'.^^J%
^^J%
Consider declaring a new heading alltogether with `#3' as parent,^^J%
or add Properties to `#3' using \string\tpAddToType\string{Properties\string}\string{#3\string}.}%
}%
\if!#1!\else
\ifcsstring{tp@parent@#3}{#1}{}{%
\tpPackageError{Headings}
{Parent Mismatch}
{Parent of heading `#3'^^J cannot be altered!}
{The already existing heading `#3' inherits from `\csname tp@parent@#3\endcsname',^^J%
but your re-declaration sets Parent to `#1'.^^J%
^^J%
Consider declaring a new heading alltogether with `#1' as parent.}%
}%
\fi
\tpAddToType{Properties}{#3}{#4}%
\tp@declare@heading{#2}{#3}%
}{%
\tpDeclareContainer{#3}{%
\csgdef{tp@hdg@#3@level}{#2}%
\tpPackageInfo{Headings}{}{Declaring heading `#3'}%
\edef\@argi{#1}%
\tpDeclareType{Parent}{\tp@heading@create@parent{#1}{#3}}
\ifx\@argi\@empty
\tpInherit{Components,Properties}{heading}%
\else
\tpInherit{Components,Properties,Parent}{#1}%
\fi
\tpDeclareType{Properties}{%
#4%
}%
\tpDeclareType{Init}{%
\tp@init@hooks{#3}%
\let\@tp@cur@cont\tp@cur@cont
\def\tp@cur@cont{heading}%
\tp@init@l@{toc}{#2}{#3}%
\let\tp@cur@cont\@tp@cur@cont
\tp@init@cnt{#3}%
}%
\tp@declare@heading{#2}{#3}%
}%
}%
}
\def\tp@heading@create@parent#1#2{%
\def\tp@heading@name{#2}%
\if!#1!\else
\tpCheckParent{#1}{#2}%
\fi%
}
\def\tp@declare@heading#1#2{%
\tpEvalType{Parent}%
\tpEvalType{Init}%
\csgdef{tpUseHeading#2}{%
\tpNamespace{heading}%
\@setpar{\@@par}%
\def\tpHeadingLevel{#1}%
\tpEvalType[#2]{Properties}%
\tp@meta@role@eval{Author}%
\tpComposeCollection{tpAuthor}{author-contact-block-format}{AuthorContactBlock}%
\tpComposeCollection{tpAffil}{affil-block-item-format}{AffilBlock}%
\tpComposeCollection{tpQuote}{quote-block-format}{QuoteBlock}%
\def\Hy@toclevel{#1}%
\tp@auto@number{#1}{#2}%
\tpUseProperty{heading-par}%
\tp@hd@use@hook{before-hook}{#2}%
\tpUseProperty{before-heading}%
\tp@do@before@skip
\tp@format@number{}{}{#1}%
\tpIfProp{after-skip}{\expandafter\global\expandafter\@tempskipa\expandafter=\tpUseProperty{after-skip}\relax}{\global\@tempskipa=1sp\relax}%
\tp@hd@use@hook{before-print-hook}{#2}%
\def\@svsec{%
\tpUseProperty{before-heading-block}%
\tp@heading@create@labels{#2}% label facility
\leftskip\tpUseProperty{margin-left}%
\rightskip\tpUseProperty{margin-right}%
\bgroup
\tpUseProperty{heading-block}%
\tpIfPropVal{no-toc}{true}{}{\tp@make@toc}% ToC entries
\tpIfPropVal{no-BM}{true}{}{\tp@make@bookmarks}% Bookmarks
\tpUseProperty{toc-hook}%
\tpIfProp{extended}{\tpUseProperty{extended-heading}}{}%
\egroup%
\tp@make@run% Running headers
\tpUseProperty{after-heading-block}%
}%
\ifdim\@tempskipa <\z@\relax
\tp@inline@heading
\else
\tp@block@heading
\fi
\aftergroup\next%
}%
}
\def\tp@hd@use@hook#1#2{%
\expandafter\ifx\csname tp@parent@#2\endcsname\relax\else
\edef\@@parent{#1-\csname tp@parent@#2\endcsname}%
\expandafter\tpUseHook\expandafter{\@@parent}%
\fi
\tpUseHook{#1-\tp@heading@name}%
}
\def\tp@do@before@skip{%
\setlength\@tempskipa{\tpUseProperty{before-skip}}%
\ifdim\@tempskipa<\z@\relax
\def\do@skip{\minusvspace{-\@tempskipa}}%
\else
\def\do@skip{\addvspace{\@tempskipa}}%
\fi%
\if@nobreak
\everypar{}%
\do@skip
\else
\addpenalty\@secpenalty
\do@skip
\fi}
\def\tp@init@hooks#1{%
\tpDeclareHook{toc-before-hook-#1}% Expanded before the toc entry is printed
\tpDeclareHook{toc-after-hook-#1}% Expanded after the toc entry is printed
\tpDeclareHook{before-hook-#1}% Expanded before before-heading property is expanded
\tpDeclareHook{before-print-hook-#1}% Expanded at the very beginning of the local definition of \@svsec
}
\def\tp@init@cnt#1{\ifcsname c@#1\endcsname\else\@definecounter{#1}\fi}
\def\tp@auto@number#1#2{%
\tpIfPropVal{numbering}{auto}
{\expandafter\ifx\csname c@#2\endcsname\relax\tp@init@cnt{#2}\fi
\tpIfAttrIsset{heading}{nonumber}
{}
{\tpIfComp{Number}
{}
{\ifnum #1>\c@secnumdepth\relax\else
\stepcounter{#2}%
\edef\@tempa{\csname the#2\endcsname}%
\expandafter\tpNumber\expandafter{\@tempa}%
\fi}}
}{}}
\def\@tp@heading@parse@label#1,#2,\@nil{%
\@tp@heading@create@labels{#1}%
\if!#2!\else
\@tp@heading@parse@label#2,\@nil
\fi}
\def\tp@heading@create@labels#1{%
\ifx\Hy@MakeCurrentHrefAuto\@undefined\else
\Hy@MakeCurrentHrefAuto{tp:#1}%
\Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
\fi
\tpIfAttr{heading}{label}
{\expandafter\@tp@heading@parse@label\tp@heading@attr@label,,\@nil}{}}
\def\@tp@heading@create@labels#1{%
\if!#1!\else
\tpIfComp{Number}
{\edef\@tempa{\expandonce{\tp@heading@Number}}%
\let\@currentlabel\@tempa\relax
\let\@currentlabelname\tp@heading@Title}
{\phantomsection}%
\expandafter\hypertarget\expandafter{#1}{}%
\expandafter\tpltx@label\expandafter{#1}%
\fi
\global\let\label\tpltx@label}
\def\cch@set@author@name@list#1{%
\tpUnlessComp{#1AuthorNameList}{%
\ifx\tp@used@AuthorNameList@override\@empty
\expandafter\csname tp#1AuthorNameList\expandafter\endcsname\expandafter{\tp@heading@AuthorNameList}%
\else
\ifnum\tpAuthorCnt>\z@
\tpCompDef\cch@tempa{tpAuthor}{author-list-print-format}%
\ifx\cch@tempa\relax\else
\expandafter\csname tp#1AuthorNameList\expandafter\endcsname\expandafter{\cch@tempa}%
\fi
\fi
\fi
}}%
\def\tp@make@toc{%
\tp@check@empty{heading}{Title}{Toc}%
\tp@check@empty{heading}{Number}{Toc}%
\tp@check@empty{heading}{Subtitle}{Toc}%
\cch@set@author@name@list{Toc}%
\tpIfAttrIsset{heading}{notoc}
{}
{\protected@edef\tp@heading@toc@entry{%
\tpIfComp{TocTitle}{\string\tpTocTitle{\string\ignorespaces\space\expandonce{\tp@heading@TocTitle}}}{}%
\tpIfComp{TocNumber}{\string\tpTocNumber{\string\ignorespaces\space\expandonce{\tp@heading@TocNumber}}}{}%
\tpIfComp{TocAuthorNameList}{\string\tpTocAuthorNameList{\string\ignorespaces\space\expandonce{\tp@heading@TocAuthorNameList}}}{}%
\tpIfComp{TocSubtitle}{\string\tpTocSubtitle{\string\ignorespaces\space\expandonce{\tp@heading@TocSubtitle}}}{}%
}%
\tpIfProp{toc-level}{\edef\tp@heading@name{\tpUseProperty{toc-level}}}{}%
\protected@write\@auxout
{\tpGobble}%
{\string\@writefile{toc}{\protect\tpContentsline{\tp@heading@name}{\tp@heading@toc@entry}{\thepage}{\@currentHref}\protected@file@percent}}\relax
}
}
\def\tp@toc@extract@data#1#2#3#4{%
\tpNamespace{heading}%
\tpEvalType[#2]{Properties}%
\tpDeclareComp{TocPage}{}{}%
\tpTocPage{\tpUseProperty{toc-page-face}#4}%
\tpDeclareComp{TocTitle}{}{}%
\tpDeclareComp{TocSubtitle}{}{}%
\tpDeclareComp{TocNumber}{}{}%
\tpDeclareComp{TocAuthorNameList}{}{}%
\tp@expand@l@contents{#3}{heading}{Toc}{Title}%%
\tp@format@number{toc-}{Toc}{#1}%
}
\def\tp@toc@print@entry#1{%
\bgroup
\tpUseHook{toc-before-hook-#1}%
\tpUseProperty{toc-before-entry}%
\tpUseProperty{toc-format}%
\tpUseHook{toc-after-hook-#1}%
\tpUseProperty{toc-after-entry}%
\egroup}
\def\tp@make@run{%
\tp@check@empty{heading}{Title}{Run}%
\tp@check@empty{heading}{Number}{Run}%
\tp@check@empty{heading}{Subtitle}{Run}%
\cch@set@author@name@list{Run}%
\tpUseProperty{running-extra}%
\tpIfProp{running-level}
{\letcs\tp@mark@name{\tpUseProperty{running-level}mark}}
{\letcs\tp@mark@name{\tp@heading@name mark}}%
\letcs\tp@heading@parent{tp@parent@\tp@heading@name}%
\ifx\tp@mark@name\@undefined
\ifx\tp@heading@parent\relax\else
\letcs\tp@mark@name{\tp@heading@parent mark}%
\fi
\fi
\ifx\tp@mark@name\@undefined\else
\begingroup
\tpGobble
\protected@edef\@tempa{\csname tp@heading@running-heading\endcsname}%
\expandafter\tp@mark@name\expandafter{\@tempa}%
\endgroup
\fi
}
\def\tp@make@bookmarks{%
\tp@check@empty[Toc]{heading}{Title}{BM}%
\tp@check@empty[Toc]{heading}{Number}{BM}%
\tp@check@empty[Toc]{heading}{AuthorNameList}{BM}%
\tp@check@empty[Toc]{heading}{Subtitle}{BM}%
\tpIfAttrIsset{heading}{noBM}
{}
{\tpIfProp{bookmark-level}{\edef\Hy@toclevel{\tpUseProperty{bookmark-level}}}{}%
\begingroup
\tpGobble
\protected@edef\@tempa{\csname tp@heading@bookmark\endcsname}%
\bookmark[level=\Hy@toclevel,dest=\@currentHref]{\expandonce{\@tempa}}%
\endgroup
}}
\newbox\tp@inlinesecbox
\def\tp@inline@heading{%
\tpIfProp{after-indent}{\global\@afterindenttrue}{\global\@afterindentfalse}%
\tpIfProp{interline-para}
{\global\setbox\tp@inlinesecbox\hbox{\ifvoid\tp@inlinesecbox\else\unhbox\tp@inlinesecbox\tpUseProperty{interline-para-sep}\fi\@svsec}}%
{\global\setbox\tp@inlinesecbox\hbox{\@svsec}}
\@nobreakfalse
\global\@noskipsectrue
\gdef\next{%
\global\everypar{%
\if@noskipsec
\global\@noskipsecfalse
{\setbox\z@\lastbox}%
\clubpenalty\@M
\begingroup \unhbox\tp@inlinesecbox \endgroup
\unskip
\hskip -\@tempskipa
\else
\clubpenalty \@clubpenalty
\global\setbox\tp@inlinesecbox\box\voidb@x
\everypar{}%
\fi}%
\ignorespaces}}
\def\tp@block@heading{%
\@svsec
\tpUseProperty{after-heading-par}%
\tpIfProp{after-indent}{\global\@afterindenttrue}{\global\@afterindentfalse}%
\gdef\next{%
\ifdim\parskip>\z@\relax\advance\@tempskipa-\parskip\relax\fi
\vskip \@tempskipa
\@afterheading
\ignorespaces}}
\def\heading{\@ifnextchar [{\@heading}{\@heading[]}}%]
\def\@heading[#1]#2{%
\tp@heading@reserve
\tpParseAttributes{heading}{#1}%
\edef\tp@heading@name{#2}%
\tpEvalType[#2]{Components}%
}
\def\endheading{%
\expandafter\ifx\csname tpUseHeading\tp@heading@name\endcsname\relax
\PackageError{coco-headings.sty}{Heading level \tp@heading@name\space unknown!}{A Heading with level \tp@heading@name\space is unknown. Use the \string\tpDeclareHeading\space macro to declare heading levels.}%
\else
\csname tpUseHeading\tp@heading@name\endcsname%
\fi
\tp@heading@reset
}
\def\tp@heading@reserve{%
\tpNamespace{heading}%
\let\tpltx@dbl@backslash\\
\let\\\tpBreak
\let\tpltx@label\label
\let\tp@heading@label\relax
\def\tpAuthorCnt{\z@}%
\def\tpAffilCnt{\z@}%
\tp@reset@components{\tp@cur@cont}%
}
\def\tp@heading@reset{%
\let\tp@cur@cont\relax
\let\\\tpltx@dbl@backslash
\let\label\tpltx@label
\let\tp@heading@name\relax
\let\tp@heading@label\relax
}
\def\tp@heading@quotes{%
\tpDeclareComp{QuoteBlock}{}{}%
\tpDeclareComponentGroup{tpQuote}{%
\tpDeclareCountedComp{QuoteText}%
\tpDeclareCountedComp{QuoteSource}%
}%
}
\def\tp@heading@authors{%
\tpAddToRole{Author}{%
\tpDeclareCountedComp{AuthorContact}%
}%
\tpDeclareRoleBlock{Author}{ContactBlock}{author-contact-block-format}%
\tpGroupHandler{tpAuthor}{%
\tpIfComp{AuthorContact}{}{\csname tpAuthorContact\endcsname{\tpUseProperty{author-contact-format}}}{}%
}%
\tp@provide@hd@overrides{AuthorNameList}%
}
\def\tp@provide@hd@macros#1{%
\tpDeclareComp{#1}{}{}%
\tp@provide@hd@overrides{#1}%
}
\def\tp@provide@hd@overrides#1{%
\tpDeclareComp{Toc#1}{}{}% toc overrides
\tpDeclareComp{Run#1}{}{}% running overrides
\tpDeclareComp{BM#1}{}{}% bookmark overrides
}
\tpAddToDefault{heading}{%
\tpSetProperty{interline-para}{}%
\tpSetProperty{interline-para-sep}{\space}
\tpSetProperty{heading-par}{%
\tpIfProp{interline-para}{\if@noskipsec \leavevmode \fi}{}%
\par
\global\@afterindenttrue
}%
\tpSetProperty{after-heading-par}{\par \nobreak}% par commands at the end of non-inline headings
\tpSetProperty{before-heading}{}%
\tpSetProperty{title-face}{\bfseries}%
\tpSetProperty{subtitle-face}{\normalfont}%
\tpSetProperty{author-face}{\normalfont}%
\tpSetProperty{quote-face}{\raggedleft}%
\tpSetProperty{quote-source-face}{}%
\tpSetProperty{quote-block-format}{%
\bgroup
\tpUseProperty{quote-face}%
\tpUseComp{QuoteText}\par
\tpIfComp{QuoteSource}{{\tpUseProperty{quote-source-face}--\space\tpUseComp{QuoteSource}}\par}{}%
\egroup}
\tpSetProperty{heading-block}
{\tpUseProperty{title-face}%
\tpIfComp{Number}
{\tpUseProperty{hang-number}}
{\leftskip0pt}%
\tpUseComp{Title}\par%
\tpIfComp{Subtitle}{{\tpUseProperty{subtitle-face}\tpUseComp{Subtitle}}\par}{}%
\tpIfComp{AuthorNameList}{{\tpUseProperty{author-face}\tpUseComp{AuthorNameList}}\par}{}%
\tpIfComp{QuoteBlock}{\tpUseComp{QuoteBlock}}{}%
\tpIfComp{AffilBlock}{{\tpUseProperty{affil-block-face}\tpUseComp{AffilBlock}}\par}{}%
}%
\tpSetProperty{extended-heading}{%
\tpIfComp{Abstract}
{\par\vskip\baselineskip
{\bfseries\tpIfComp{AbstractLabel}{\tpUseComp{AbstractLabel}}{Abstract}}\par
{\itshape\small\tpUseComp{Abstract}}\par}
{}%
\tpIfComp{Keywords}
{\par\vskip\baselineskip
{\bfseries\tpIfComp{KeywordsLabel}{\tpUseComp{KeywordsLabel}}{Keywords}}\par
{\itshape\small\tpUseComp{Keywords}\par}}
{}%
}%
\tpSetProperty{before-skip}{\z@skip}% TODOC: values < 0pt use \minusvspace, else \addvspace. LaTeX's default behaviour of @afterindent is relocated to the after-indent property.
\tpSetProperty{after-heading-block}{}%
\tpSetProperty{before-heading-block}{\parindent\z@ \parskip\z@}%
\tpSetProperty{toc-hook}{}% Called, after ToC and BM entries have been written to the .aux file
\tpSetProperty{after-indent}{}%
\tpSetProperty{margin-left}{}%
\tpSetProperty{margin-right}{\@flushglue}%
\tpSetProperty{after-skip}{1sp}%
\tpSetProperty{indent}{auto}%
\tpSetProperty{number-width}{}%
\tpSetProperty{number-sep}{\space}%
\tpSetProperty{number-align}{left}%
\tpSetProperty{number-format}{%
\bgroup
\tpUseProperty{title-face}%
\tpUseProperty{number-face}%
\tpUseComp{Number}%
\tpUseProperty{number-sep}%
\egroup}
\tpSetProperty{numbering}{auto}%
%% running header
\tpSetProperty{running-level}{}% override level for running title, name
\tpSetProperty{running-heading}{%
\tpIfComp{RunAuthorNameList}{\tpUseComp{RunAuthorNameList}:\space}{}%
\tpUseComp{RunTitle}%
}%
%% ToC
\tpSetProperty{no-toc}{false}% toc entries are generally disabled iff true
\tpSetProperty{no-BM}{false}% bookmark entries are generally disabled, iff true
\tpSetProperty{toc-margin-top}{\z@}% left indent of the whole entry
\tpSetProperty{toc-margin-bottom}{\z@}% bottom margin of the whole entry
\tpSetProperty{toc-margin-left}{auto}% left indent of the whole entry
\tpSetProperty{toc-margin-right}{\@pnumwidth}% right margin of the whole entry
\tpSetProperty{toc-title-face}{}% appearance of title
\tpSetProperty{toc-indent}{auto}% offset of the first line of the entry. auto: hang indent by max-number-width for the level
\tpSetProperty{toc-number-width}{}% current width of the TocNumber
\tpSetProperty{toc-number-align}{left}% alignment of TocNumber within the hbox when hanging
\tpPropertyLet{toc-number-face}{toc-title-face}% appearance of the TocNumber
\tpSetProperty{toc-number-sep}{\enskip}% thing between TocNumber and TocTitle
\tpSetProperty{toc-number-format}{% Format of the TocNumber
\bgroup
\tpUseProperty{toc-number-face}%
\tpUseComp{TocNumber}%
\tpUseProperty{toc-number-sep}%
\egroup}
\tpSetProperty{toc-page-sep}{\dotfill}% between TocTitle and the page counter
\tpSetProperty{toc-page-face}{}% appearance of the page value
\tpSetProperty{toc-page-format}{% format of the page value
\tpUseProperty{toc-page-sep}%
\bgroup
\tpUseProperty{toc-page-face}%
\tpUseComp{TocPage}%
\egroup}%
\tpSetProperty{toc-link}{none}% should toc entries be linked? values: none,title,page,all
\tpSetProperty{toc-level}{}% override heading level for ToC, name!
\tpSetProperty{toc-before-entry}{% stuff before anything is output; used to setup margins, alignment, line-breaking rules, etc.
\addvspace{\tpUseProperty{toc-margin-top}}%
\parindent \z@
\let\\\@centercr
\hyphenpenalty=\@M
\rightskip \tpUseProperty{toc-margin-right} \@plus 1fil\relax
\parfillskip -\rightskip
\leftskip\tpUseProperty{toc-margin-left}%
}%
\tpSetProperty{toc-after-entry}{\par\addvspace{\tpUseProperty{toc-margin-bottom}}}% Thing at the end of the entry, after the page number
\tpSetProperty{toc-format}{% Order and formatting of the entry itself
\tpUseProperty{toc-title-face}%
\tpIfComp{TocNumber}
{\tpUseProperty{toc-hang-number}}
{\leftskip0pt\leavevmode}%
\tpIfComp{TocAuthorNameList}{\tpUseComp{TocAuthorNameList}:\space}{}%
\tpUseComp{TocTitle}%
\tpUseProperty{toc-page-format}%
}%
%% PDF-Bookmarks
\tpSetProperty{bookmark-level}{}% override heading level for PDF bookmarks, numeric!
\tpSetProperty{bookmark}{%
\tpIfComp{BMNumber}{\tpUseComp{BMNumber}\space}{}%
\tpUseComp{BMTitle}%
}%
\tpSetProperty{orcid-link}{% how the ORC-ID is rendered
\tpIfComp{ORCID}{\def\tp@Linkimg{\includegraphics[height=1em]{logos/ORCID.pdf}}\tpCompLink{ORCID}{\tp@Linkimg}}{}%
}%
%% a single Author's contact infomration block
\tpSetProperty{author-contact-format}{%Format of a single author's contact information
\tpUseComp{FullName}\tpWhenComp{RefAffil}{\textsuperscript{\tpUseComp{AffilRef}}}%
\tpUseProperty{orcid-link}%
}%
\tpPropertyLet{author-list-format}{author-list-print-format}%
\tpSetProperty{author-contact-block-format}{% Format of the whole contact information block
\tpUseComp{AuthorContact}\ifnum\tpCurCount<\tpTotalCount\tpUseProperty{counted-name-sep}\fi
}%
}
\newdimen\tpnewparskip \AtBeginDocument{\ifdim\tpnewparskip=\z@\relax \tpnewparskip=1\baselineskip\relax\fi}
\def\tpNewPar{\@ifnextchar[{\@tpnewpar}{\@tpnewpar[\the\tpnewparskip]}}%]
\def\@tpnewpar[#1]{%
\ifhmode\par\fi
\vskip#1\relax
\@afterheading
}
\let\TitleBreak\tpBreak
\endinput
%%
%% End of file `coco-headings.sty'.