Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: sagemathinc/cocalc-example-files
Path: blob/master/RMarkdown/rticles/pnas_article/pnasinvited.sty
Views: 1217
1
%%% PNAS Invited Submission style file
2
%%% For use with pnas-new.cls
3
\NeedsTeXFormat{LaTeX2e}
4
\ProvidesPackage{pnasinvited}[2016/02/28 v1.2 PNAS Invited Submission style]
5
6
%% Set whether the abstract is set into the first column
7
\setboolean{shortarticle}{false}
8
% true = set into first column
9
% false = spans page width
10
11
%% Set colors
12
\definecolor{color2}{RGB}{200,89,45} % color
13
14
%% Set up the author information
15
\newsavebox{\authfootinfo}
16
\additionalelement{} % Don't use the \additionalelement field (set blank)
17
% Author affiliation as footnote
18
% Patch the \@author from authblk -- shouldn't display affiliation here
19
\patchcmd{\@author}{\\[\affilsep]\AB@affillist}{}{}{}
20
21
\appto{\maketitle}{%
22
\savebox{\authfootinfo}{%
23
\begin{minipage}{\textwidth}
24
\footnotesize
25
\vskip4pt\hrule\vskip6pt
26
\AB@affillist\par
27
\@authorcontributions\par
28
\@equalauthors\par
29
\@correspondingauthor\par
30
\@authordeclaration\par
31
\end{minipage}%
32
}
33
\newlength\authfootheight
34
\settoheight{\authfootheight}{\usebox{\authfootinfo}}
35
\addtolength{\authfootheight}{\baselineskip}
36
\begin{authfoot}
37
\usebox{\authfootinfo}
38
\end{authfoot}
39
\afterpage{%
40
\begin{authfoot}
41
\vskip\dimexpr(\authfootheight+\baselineskip)
42
\end{authfoot}
43
}
44
}
45
46
% Author information in a box at the bottom as two floats.
47
\RequirePackage{float}
48
\floatstyle{plain}
49
\newfloat{authfoot}{b!}{auf}
50
51
%% Set sans as default font
52
\renewcommand{\familydefault}{\sfdefault}
53
\renewcommand{\keywordsfont}{\sffamily}
54
55
% Add line after abstract
56
\appto{\abscontent}{\par\textcolor{color2}{\hrulefill}}
57
58
% Add colour to the title
59
\appto{\titlefont}{\color{color2}}
60
61
% ...and section headings
62
\titleformat{\section}
63
{\large\sffamily\bfseries\color{color2}}
64
{\thesection.}
65
{0.5em}
66
{#1}
67
[]
68
\titleformat{name=\section,numberless}
69
{\large\sffamily\bfseries\color{color2}}
70
{}
71
{0em}
72
{#1}
73
[]
74
\titleformat{\subsection}[runin]
75
{\sffamily\bfseries\itshape}
76
{\thesubsection.}
77
{0.5em}
78
{#1. }
79
[]
80
% Other section headings left unchanged.
81
82
%% No dropcaps. So re-define to do nothing in case user switches
83
% from the research article template
84
\renewcommand{\dropcap}[1]{\noindent #1}
85
86
%% Tweaks to footer
87
\fancypagestyle{firststyle}{
88
\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}}}
89
\fancyfoot[L]{\footerfont\@doi}
90
}
91
92
\fancyfoot[LE]{\footerfont\textbf{\thepage\space of\space\pageref{LastPage}}\hspace{7pt}|\hspace{7pt}\@doi}
93
94
%% Make the bibliography number labels bold
95
\renewcommand\@biblabel[1]{\textbf{#1}}
96
97
%% Adjust the style of the Materials & Methods section
98
\titleformat{\matmethods@section}
99
{\large\sffamily\bfseries\color{color2}}
100
{}
101
{0em}
102
{#1}
103
[]
104
\titlespacing{\matmethods@section}
105
{0pt}
106
{3.25ex plus 1ex minus .2ex}
107
{1.5ex plus .2ex}
108
\renewcommand{\showmatmethods}{% Display materials&methods section
109
\@ifundefined{@matmethods}{}{\matmethods@section{Materials and Methods}{\noindent\@matmethods}}
110
}
111
112
%% Adjust the style of the acknowledgments section
113
\titleformat{\acknow@section}
114
{\large\sffamily\bfseries\color{color2}}
115
{}
116
{0em}
117
{#1}
118
[]
119
\titlespacing{\acknow@section}
120
{0pt}
121
{3.25ex plus 1ex minus .2ex}
122
{1.5ex plus .2ex}
123
\renewcommand{\showacknow}{% Display acknowledgments section
124
\@ifundefined{@acknow}{}{\acknow@section{Acknowledgments}\noindent\@acknow}
125
}
126
127
%% Break at end of article (before references)
128
% The blank line before the strip command ensures there is nothing placed
129
% directly before the break (which can cause formatting issues).
130
\newcommand{\pnasbreak}{
131
132
\begin{strip}
133
\vskip-5pt
134
\hrule
135
\vskip-6pt
136
\end{strip}
137
}
138
139
\endinput
140