-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpi-article.cls
645 lines (562 loc) · 21.9 KB
/
pi-article.cls
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
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pi-article.cls, v4.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{pi-article}[08/09/2021, v5.0]
\RequirePackage{etoolbox} % a necessity
%%%%%%%%%%%%%%%%%%%%%% Class options and conditionals
%% Toggles for various conditions and options
\newtoggle{SI} % switching to SI format
\newtoggle{shortintro} % will not include abstract in the title page
\newtoggle{tocfig} % small figure next to the abstract
\newtoggle{twocolumn} % text will be laid out in two column
\newtoggle{toprule} % large line at the top
\toggletrue{toprule} % on by default
\newtoggle{linenumbers} % including line numbers
\newtoggle{affiltop} % author affiliation at the top
\newtoggle{footdate} % add current date in footer
\toggletrue{footdate} % on by default
\newtoggle{footpreprint} % add a "Preprint" text in footer
\toggletrue{footpreprint} % on by default
\newtoggle{debug} % debugging activated
% Option for type of article
\newcommand{\arttype}{ARTICLE}
\DeclareOption{commun}{\renewcommand{\arttype}{COMMUNICATION}}
\DeclareOption{review}{\renewcommand{\arttype}{REVIEW}}
\DeclareOption{persp}{\renewcommand{\arttype}{PERSPECTIVE}}
% Option for switching to SI format
\DeclareOption{SI}{\toggletrue{SI}}
% Option for two column format
\DeclareOption{twocolumn}{
\toggletrue{twocolumn}
\PassOptionsToClass{twocolumn}{extarticle}
}
% Option for line numbers
\DeclareOption{lineno}{\toggletrue{linenumbers}}
% Option for footer
\DeclareOption{nofootdate}{\togglefalse{footdate}}
\DeclareOption{nofootprint}{\togglefalse{footpreprint}}
% Option for affiliation location
\DeclareOption{affiltop}{\toggletrue{affiltop}}
% Option for toc image
\DeclareOption{tocfig}{\toggletrue{tocfig}}
% Option for debugging format
\DeclareOption{debug}{\toggletrue{debug}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}} % pass other options to base class
\ProcessOptions*\relax % finish options
\LoadClass{extarticle}
%%%%%%%%%%%%%%%%%%%%%% Global settings for SI format
\iftoggle{SI}{
\togglefalse{toprule} % no top rule
\toggletrue{shortintro} % no abstract
\toggletrue{twocolumn} % single column
\def\thepage{S\arabic{page}} % pages as S1-SX
\renewcommand*\thefigure{S\arabic{figure}} % Figures as Fig. S1
\renewcommand*\thetable{S\arabic{table}} % Tables as Table S1
\renewcommand*\theequation{S\arabic{equation}} % Equations as Eq. S1
\AtBeginDocument{% % Bibliographies as Ref. S1
\renewcommand*\citenumfont[1]{S#1}%
\renewcommand*\bibnumfmt[1]{(S#1)}%
}
}{}
%%%%%%%%%%%%%%%%%%%%%% Fonts and language
% Fonts
\RequirePackage{lmodern}
\renewcommand*\familydefault{\sfdefault}
% Microtype
\AtEndOfClass{\RequirePackage{microtype}}
%% Set up main page fonts
\newcommand{\headerfont}{\fontfamily{lmss}\color{gray}\bfseries\sffamily\fontsize{16pt}{20pt}\selectfont}
\newcommand{\footerfont}{\normalfont\sffamily\fontsize{7pt}{9pt}\selectfont}
\newcommand{\titlefont}{\fontfamily{lmss}\bfseries\fontsize{22pt}{24pt}\selectfont}
\newcommand{\subtitlefont}{\fontfamily{lmss}\bfseries\fontsize{15pt}{20pt}\selectfont}
\newcommand{\contactfont}{\itshape\sffamily\fontsize{7pt}{9pt}\selectfont}
\newcommand{\absfont}{\normalfont\sffamily\bfseries\fontsize{8pt}{11pt}\selectfont}
\newcommand{\keywordsfont}{\normalfont\sffamily\fontsize{8pt}{11pt}\selectfont}
\newcommand{\footnotefont}{\normalfont\sffamily\fontsize{7}{9}\selectfont}
% AMS maths packages
\RequirePackage{
amsmath,
amsfonts,
amsthm,
amssymb
}
%% Add bolding to math where needed
\g@addto@macro\bfseries{\boldmath}
% Encodings
\RequirePackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\RequirePackage{cmap}
\RequirePackage[TS1,T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
% undo the wrong changes made by mathspec
\let\RequirePackage\original@RequirePackage
\let\usepackage\RequirePackage
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% Language
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\RequirePackage[english]{babel}
\else
\usepackage{polyglossia}
\setmainlanguage[]{english}
\fi
%%%%%%%%%%%%%%%%%%%%%% General pagination setup and tools
\RequirePackage[
a4paper,includeheadfoot, % paper size, head/foot included in geometry
top=35pt,bottom=50pt, % top/bottom
left=75pt,right=75pt, % left/right
marginparwidth=2cm, % margins (used for line numbers)
marginparsep=5pt, % margin separation
headheight=20pt, % header height
headsep=20pt, % text distance from header
footskip=25pt
]{geometry}
\iftoggle{twocolumn}{ % smaller margins if two-column
\geometry{
top=25pt,bottom=35pt, % top/bottom
left=55pt,right=55pt, % left/right
headsep=10pt
}
}{}
\iftoggle{debug}{
\geometry{
showframe,showcrop, % for debugging
}
}{}
\setlength{\columnsep}{13.5pt} % Distance between the two columns of text
\setlength{\parindent}{12pt} % Paragraph indent
\RequirePackage{changepage} % change odd/even page at any point
\RequirePackage{lastpage} % Refer to last page of the document
\RequirePackage{afterpage} % execute a command on next page (useful for \clearpage flush)
\RequirePackage{enumitem} % For reducing bullet list item separation
%%%%%%%%%%%%%%%%%%%%%% Figures, tables, equations and listings
% Figures
\RequirePackage{graphicx} % include pictures
\RequirePackage{tikz} % drawing pictures
\usetikzlibrary{svg.path} % TIKZ svg paths
\usetikzlibrary{calc} % TIKZ calculations
\RequirePackage[framemethod=tikz]{mdframed} % breakable framed and coloured boxes
%% Set document color scheme
\RequirePackage{xcolor} % driver indepentent color extensions
\definecolor{black50}{gray}{0.5} % 50% black for hrules
\definecolor{color0}{RGB}{0,0,0} % Base
\definecolor{color1}{RGB}{59,90,198} % author email, doi
% Tables
\RequirePackage{
booktabs, % overall nice table quality
array, % better column and row definitions
longtable, % for tables spanning multiple pages
makecell, % multilined table cells
tabularx, % width-expanding column (with 'x')
multirow, % for multirow cells (with \\)
colortbl % to add colours to table cells
}
% booktabs provide nice spacing, but rule widths and distances need modifying
\setlength{\heavyrulewidth}{0.5pt} % wide rule
\setlength{\lightrulewidth}{0.5pt} % light rule
\setlength{\aboverulesep}{1.5pt} % blank space above rules
\setlength{\belowrulesep}{1.5pt} % blank space below rules
\setlength{\belowbottomsep}{5pt} % blank space below whole table
\AtBeginEnvironment{tabular}{% % font inside tables will be small
\sffamily\fontsize{7.5}{10}\selectfont
}
%% command we can use to add some text e.g. below the table
\newcommand{\addtabletext}[1]{{\setlength{\leftskip}{9pt}\fontsize{7}{9}\selectfont#1}}
% Code snippets/listings
\RequirePackage{listings}
% Equations
% placed in square brackets
\renewcommand\tagform@[1]{\maketag@@@ {[\ignorespaces #1\unskip \@@italiccorr ]}}
% For numbering just one line of an equation
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
%%%%%%%%%%%%%%%%%%%%%% Floats, subfloats and their captions
\RequirePackage{float} % improved interface for floating objects
\RequirePackage{dblfloatfix} % fixes for twocolumn floats
\RequirePackage{placeins} % for the floatbarrier macro
% distance between floats and text
\setlength{\textfloatsep}{6pt \@plus 2.0pt \@minus 2.0pt}
% distance between two floats
\setlength{\floatsep}{8pt \@plus 2.0pt \@minus 2.0pt}
% Better captions
\RequirePackage[
skip=3pt, % vertical space between caption and figure
labelfont={bf,sf}, % we bold the caption label
labelsep=colon, % periods after label (Fig. 1:)
figurename=Fig., % figure will be abbreviated
% tablename=Tbl., % table will be abbreviated
]{caption}
% overall font types (excluding label)
\DeclareCaptionFormat{fmt}{\normalfont\sffamily\fontsize{7}{9}\selectfont#1#2#3}
\captionsetup*{format=fmt} % for figures
\captionsetup*[table]{format=fmt,position=above} % for tables
% Subfigures
\RequirePackage{subcaption}
% Sidecaptions
\RequirePackage[rightcaption]{sidecap}
%%%%%%%%%%%%%%%%%%%%%% Utilities
% Filler text
\RequirePackage{lipsum}
% Todo notes
\RequirePackage{todonotes}
%%%%%%%%%%%%%%%%%%%%%% Science-related packages
% In-line fractions
\RequirePackage{xfrac}
% The SIunitx package enables the \SI{}{} command.
\RequirePackage{siunitx}
\sisetup{
detect-weight=true,
detect-family=true,
per-mode=reciprocal,
range-units=single, % brief SIrange
range-phrase=-- % and using lines
}
% The mchem package for formula subscripts using \ce{}
\RequirePackage[version=4]{mhchem}
%%%%%%%%%%%%%%%%%%%%%% Bibliography, footnotes and their settings
% Natbib package for text references
\RequirePackage[
numbers, % numbers as references
merge, % merge multiple references in one
super, % superscript
sort&compress
]{natbib}
% Moves references after punctuation
\RequirePackage{natmove}
\renewcommand*{\natmovechars}{.} % only after full stop
% Bibliography style
%% No separation between references
\setlength{\bibsep}{0.0pt}
%% Use pi-bib.bst as a style (if available) else fall back to unsrtnat
\IfFileExists{templates/pi/pi-bib.bst}{
\bibliographystyle{templates/pi/pi-bib}
}{
\IfFileExists{pi-bib.bst}{
\bibliographystyle{pi-bib}
}{
\PackageWarning{pi-bib}{templates/pi/pi-bib.bst not found; must specify manually}
\bibliographystyle{unsrt}
}}
%% set Bibliography font
\renewcommand\bibfont{\normalfont\sffamily\fontsize{6}{8}\selectfont}
%% Use "References" as bibliography title
\renewcommand{\bibname}{References}
\renewcommand{\refname}{References}
\AtEndOfClass{
\renewcommand{\tocbibname}{References}
}
%% Remove brackets from label
\renewcommand\@biblabel[1]{ #1.}
% Footnotes
\RequirePackage[flushmargin,ragged,symbol*]{footmisc}
\renewcommand*{\footnotelayout}{\footnotefont}
\renewcommand{\footnoterule}{% Set the footnote hrule style
\kern -3pt
{\color{black50} \hrule width 72pt height 0.25pt}
\kern 2.5pt
}
%%%%%%%%%%%%%%%%%%%%%% References and bookmarks
% Xr:
% To reference another document, in this case the SI
\RequirePackage{xr, xr-hyper}
% Hyperlinking
\RequirePackage[
colorlinks=true,
allcolors=blue,
pagebackref=false
]{hyperref}
%% Set URL link color & font
\renewcommand\UrlFont{\color{black}\sffamily}
% References
\RequirePackage[
capitalise,
nameinlink,
]{cleveref}
% Equation reference label has no brackets
\creflabelformat{equation}{#2\textup{#1}#3}
\RequirePackage{doi} % DOIs
\RequirePackage[nottoc]{tocbibind} % References section in TOC (for SI)
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Other Setup
%%%%%%%%%%%%%%%%%%%%%% Author and affiliation
% Keeps footnotes where they should be
\RequirePackage{titling}
\setlength\thanksmarkwidth{0em}
\setlength\thanksmargin{-\thanksmarkwidth}
% Typesetting for authors/affiliations
\RequirePackage{authblk}
\setlength{\affilsep}{8.5pt} % 16.5pts between base of author line and base of affil line
\renewcommand\Authfont{\color{color0}\normalfont\sffamily\bfseries\fontsize{9}{11}\selectfont}
\renewcommand\Affilfont{\color{color0}\footnotefont}
\renewcommand\AB@affilsepx{\newline\protect\Affilfont}
\renewcommand\Authands{, and }
%%%%%%%%%%%%%%%%%%%%%% Author and paper metadata
%% ORCID logo
\definecolor{orcidlogocol}{HTML}{A6CE39}
\tikzset{
orcidlogo/.pic={
\fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z};
\fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z}
svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z}
svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z};
}
x}
%% Article meta data additional fields
\newcommand{\pubdoi}[1]{\def\@pubdoi{#1}} % publication DOI
\newcommand{\keywords}[1]{\def\@keywords{#1}} % keywords
\newcommand{\sep}[0]{; } % keyword separator
\newcommand{\contact}[1]{\def\@contact{#1}} % contact author
\newcommand{\leadauthor}[1]{\def\@leadauthor{#1}} % lead (first) author
\newcommand{\equalcontrib}[1]{\def\@equalcontrib{#1}} % equal contribution switch
\newcommand{\orcid}[1]{ % ORCID
\href{https://orcid.org/#1}{\mbox{
\begin{tikzpicture}[overlay,remember picture]
\coordinate (A);
\coordinate (B) at ($(A)-(6pt,-8pt)$);
\end{tikzpicture}
\begin{tikzpicture}[overlay,remember picture,yscale=-0.04,xscale=0.04,transform shape]
\pic at (B) {orcidlogo};
\end{tikzpicture}
}{}}}
%%%%%%%%%%%%%%%%%%%%%% Headers and footers
%% Fancyhdr styling
\RequirePackage{fancyhdr} % custom headers/footers
\pagestyle{fancy} % Set all pagestyle to fancy
% Clear everything
\fancyhf{}
% Headers
\renewcommand{\headrulewidth}{0pt} % No header rule normally
% Footers
\renewcommand{\footrulewidth}{0pt} % No footer rule normally
\fancyfoot[R]{% % footer right side
\iftoggle{SI}{
\footerfont\textit{Supplementary Information}\hspace{7pt}|% % we add SI as text
}{
\iftoggle{footpreprint}{
\footerfont\textit{Preprint}\hspace{7pt}|% % we add preprint text
}{}
}
\iftoggle{footdate}{
\hspace{7pt}\textbf{\today}\hspace{7pt}|% % add date
}{}
\hspace{7pt}\textbf{\thepage}} % add page number
\fancyfoot[L]{% % footer left side
\footerfont\@ifundefined{@pubdoi}{}{%
\href{https://dx.doi.org/\@pubdoi}{DOI: \@pubdoi}} % add DOI + hyperlink
% \footerfont\@ifundefined{@leadauthor}{}{\@leadauthor}% % lead author name
% \ifnum \value{authors} > 1\textit{ et al.}\fi% % and et.al.
}
% Modifying the plain style (applied automatically with title page)
\fancypagestyle{plain}{%
\fancyhf{} % clear everything
\iftoggle{toprule}{% % if SI, we add a top rule
\fancyhead[L]{% % Add article type and rule
\colorbox{black}{\parbox{18em}{\centering\color{white}\subtitlefont{\arttype}}}}
\renewcommand{\headrulewidth}{3pt}%
}{}
\fancyfoot[R]{ % footer right side
\iftoggle{SI}{
\footerfont\textit{Supplementary Information}\hspace{7pt}|% % we add SI as text
}{
\iftoggle{footpreprint}{
\footerfont\textit{Preprint}\hspace{7pt}|% % we add preprint text
}{}
}
\iftoggle{footdate}{
\hspace{7pt}\textbf{\today}\hspace{7pt}|% % add date
}{}
\hspace{7pt}\textbf{\thepage\textendash\pageref{LastPage}}} % add page number
\fancyfoot[L]{\footerfont\@ifundefined{@pubdoi}{}{% % footer left side
\href{https://dx.doi.org/\@pubdoi}{DOI: \@pubdoi}}} % add DOI + hyperlink
}
%%%%%%%%%%%%%%%%%%%%%% Line numbers
% Check switch for line numbers
\iftoggle{linenumbers}{
% use lineno in switch mode if doublecolumn
\iftoggle{twocolumn}{
\RequirePackage[switch]{lineno}
}{
\RequirePackage{lineno}
}
\renewcommand\linenumberfont{\normalfont\tiny\sffamily}
\linenumbers
}{}
%%%%%%%%%%%%%%%%%%%%%% Typesetting
%% Section/subsection/paragraph set-up
\RequirePackage[explicit]{titlesec}
\setcounter{secnumdepth}{5}
\titleformat{\section}
{\large\sffamily\bfseries}
{\thesection.}
{0.5em}
{#1}
[]
\titleformat{name=\section,numberless}
{\large\sffamily\bfseries}
{}
{0em}
{#1}
[]
\titleformat{\subsection}[runin]
{\sffamily\bfseries}
{\thesubsection.}
{0.5em}
{#1. }
[]
\titleformat{\subsubsection}[runin]
{\sffamily\bfseries}
{\thesubsubsection.}
{0.5em}
{#1. }
[]
\titleformat{\paragraph}[runin]
{\sffamily\small\bfseries}
{}
{0em}
{#1}
\titlespacing*{\section}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}
\titlespacing*{\subsection}{0pc}{2.5ex \@plus3pt \@minus2pt}{2pt}
\titlespacing*{\subsubsection}{0pc}{2ex \@plus2.5pt \@minus1.5pt}{2pt}
\titlespacing*{\paragraph}{0pc}{1.5ex \@plus2pt \@minus1pt}{12pt}
%% Abstract formatting
\def\xabstract{abstract}
\long\def\abstract#1\end#2{
\def\two{#2}
\ifx\two\xabstract
\long\gdef\theabstract{\ignorespaces#1}
\def\go{\end{abstract}}
\else
\typeout{^^J^^J PLEASE DO NOT USE ANY \string\begin\space \string\end^^J COMMANDS WITHIN ABSTRACT^^J^^J}#1\end{#2}
\gdef\theabstract{%
\vskip12pt BADLY FORMED ABSTRACT: PLEASE DO NOT USE {\tt\string\begin...\string\end} COMMANDS WITHIN THE ABSTRACT\vskip12pt%
}\let\go\relax
\fi
\go}
% Define an environment with abstract content and styling
\newcommand{\abscontent}{
\noindent
{%
\vskip3pt%
\iftoggle{tocfig}{
\begin{minipage}{0.56\linewidth}
\absfont \theabstract
\end{minipage}
\begin{minipage}{0.4\linewidth}
\raggedleft
\IfFileExists{figs/tocfig.png}{% no good way of checking for extension
\includegraphics[width=0.9\linewidth]{figs/tocfig}}
{\IfFileExists{figs/tocfig.bmp}{
\includegraphics[width=0.9\linewidth]{figs/tocfig}}
{\IfFileExists{figs/tocfig.pdf}{
\includegraphics[width=0.9\linewidth]{figs/tocfig}}
}{\includegraphics[width=0.9\linewidth]{example-image}}}
\end{minipage}%
}{
\begin{minipage}{\linewidth}
\absfont \theabstract
\end{minipage}
}
}%
\vskip10pt%
\noindent
\@ifundefined{@abstractadd}{}{%
{%
\parbox{\linewidth}{%
\abstractaddfont \@abstractadd}%
}%
\vskip10pt%
}%
\noindent
\@ifundefined{@keywords}{}{%
{%
\parbox{\linewidth}{%
\keywordsfont %
\textbf{Keywords:} \@keywords}%
}%
\vskip10pt%
}%
}
%% Manual adjustment of vertical distance, useful for overall formatting
\newlength\vert@adjust
\newcommand\verticaladjustment[1]{\setlength{\vert@adjust}{#1}}
%% Command to define an affiliation list in a footnote
\def\authaffil{%
\iftoggle{affiltop}{
\@author\par%
% \vskip2pt
}{
\AB@authlist\par
\protected@xdef\@thanks{\@thanks\protect\footnotetext[\the\c@footnote]{\AB@affillist\newline}}%
}
}
%% Command to define a contact email switch
\def\contactswitch{%
\contactfont\@ifundefined{@contact}{}{\textbf{\normalfont*}~E-Mail:~\@contact}\par%
%
\vskip3pt
}
%% Command to define an "equal contribution" switch
\def\equalcontribswitch{
\footerfont\@ifundefined{@equalcontrib}{}{\textsuperscript{\textbf{\dag}}~These authors contributed equally}\par%
%
\vskip3pt
}
%%%% Custom title page
\renewcommand{\@maketitle}{%
\iftoggle{shortintro}
{% if short intro i.e. SI
% patch author command to center section
\patchcmd{\@author}{\raggedright}{\centering}{}{}
%
\topskip0pt
\vspace*{\fill}%
%
{\centering\baselineskip=24pt\subtitlefont Supplementary Information for\par}%
{\centering\baselineskip=24pt\titlefont \@title\par}%
%
\vskip10pt
%
% author names / addresses
{\centering\authaffil{}}
%
\vskip8pt
%
% equal contribution
{\centering\equalcontribswitch{}}
% corresponding email
{\centering\contactswitch{}}
%
\vspace*{\fill}%
}
{% else if complete paper
%
\vskip10pt%
%
{\raggedright\baselineskip=24pt\titlefont \@title\par}%
%
\vskip10pt
%
% author names / addresses
\raggedright\authaffil{}
%
\vskip3pt
%
% equal contribution
\raggedright\equalcontribswitch{}
% corresponding email
\raggedright\contactswitch{}
% abstract / TOC section
\raggedright{\abscontent{}}
%
\noindent\makebox[\linewidth]{\rule{\linewidth}{0.4pt}}%
%
\vskip15pt%
}%
\@ifundefined{vert@adjust}{}{\vskip\vert@adjust}%
}%