pnasinvited.sty 3.7 KB

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