-
Notifications
You must be signed in to change notification settings - Fork 0
/
pnasinvited.sty
127 lines (111 loc) · 3.4 KB
/
pnasinvited.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
%%% PNAS Invited Submission style file
%%% For use with pnas-new.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pnasinvited}[2018/05/06 v1.3 PNAS Invited Submission style]
%% Set whether the abstract is set into the first column
\setboolean{shortarticle}{false}
% true = set into first column
% false = spans page width
%% Set colors
\definecolor{color2}{RGB}{200,89,45} % color
%% Set up the author information
\newsavebox{\authfootinfo}
\additionalelement{} % Don't use the \additionalelement field (set blank)
% Author affiliation as footnote
% Patch the \@author from authblk -- shouldn't display affiliation here
\patchcmd{\@author}{\\[\affilsep]\AB@affillist}{}{}{}
\appto{\maketitle}{%
\savebox{\authfootinfo}{%
\begin{minipage}{\textwidth}
\footnotesize
\vskip4pt\hrule\vskip6pt
\AB@affillist\par
\@authorcontributions\par
\@equalauthors\par
\@correspondingauthor\par
\@authordeclaration\par
\end{minipage}%
}
\newlength\authfootheight
\settoheight{\authfootheight}{\usebox{\authfootinfo}}
\addtolength{\authfootheight}{\baselineskip}
\begin{authfoot}
\usebox{\authfootinfo}
\end{authfoot}
\afterpage{%
\begin{authfoot}
\vskip\dimexpr(\authfootheight+\baselineskip)
\end{authfoot}
}
}
% Author information in a box at the bottom as two floats.
\RequirePackage{float}
\floatstyle{plain}
\newfloat{authfoot}{b!}{auf}
%% Set sans as default font
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\keywordsfont}{\sffamily}
% Add line after abstract
\appto{\abscontent}{\par\textcolor{color2}{\hrulefill}}
% Add colour to the title
\appto{\titlefont}{\color{color2}}
% ...and section headings
\titleformat{\section}
{\large\sffamily\bfseries\color{color2}}
{\thesection.}
{0.5em}
{#1}
[]
\titleformat{name=\section,numberless}
{\large\sffamily\bfseries\color{color2}}
{}
{0em}
{#1}
[]
\titleformat{\subsection}[runin]
{\sffamily\bfseries\itshape}
{\thesubsection.}
{0.5em}
{#1. }
[]
% Other section headings left unchanged.
%% No dropcaps. So re-define to do nothing in case user switches
% from the research article template
\renewcommand{\dropcap}[1]{\noindent #1}
%% Tweaks to footer
\fancypagestyle{firststyle}{
\fancyfoot[R]{\footerfont PNAS\hspace{7pt}|\hspace{7pt}\textbf{\today}\hspace{7pt}|\hspace{7pt}vol. XXX\hspace{7pt}|\hspace{7pt}no. XX\hspace{7pt}|\hspace{7pt}\textbf{\thepage\space of\space\pageref{LastPage}}}
\fancyfoot[L]{\footerfont\@doi}
}
\fancyfoot[LE]{\footerfont\textbf{\thepage\space of\space\pageref{LastPage}}\hspace{7pt}|\hspace{7pt}\@doi}
%% Make the bibliography number labels bold
\renewcommand\@biblabel[1]{\textbf{#1}}
%% Adjust the style of the Materials & Methods section
\titleformat{\matmethods@section}
{\large\sffamily\bfseries\color{color2}}
{}
{0em}
{#1}
[]
\titlespacing{\matmethods@section}
{0pt}
{3.25ex plus 1ex minus .2ex}
{1.5ex plus .2ex}
\renewcommand{\showmatmethods}{% Display materials&methods section
\@ifundefined{@matmethods}{}{\matmethods@section{Materials and Methods}{\noindent\@matmethods}}
}
%% Adjust the style of the acknowledgments section
\titleformat{\acknow@section}
{\large\sffamily\bfseries\color{color2}}
{}
{0em}
{#1}
[]
\titlespacing{\acknow@section}
{0pt}
{3.25ex plus 1ex minus .2ex}
{1.5ex plus .2ex}
\renewcommand{\showacknow}{% Display acknowledgments section
\@ifundefined{@acknow}{}{\acknow@section{Acknowledgments}\noindent\@acknow}
}
\endinput