PNAS (Proceedings of the National Academy of Sciences)
PNAS's own LaTeX template from its Author Center: the pnas-new class in its two-column research-article layout, with PNAS's bibliography style.
- Category
- Journal
- Document class
pnas-new(pnas-new.cls) — ships with TeX Live- Workflow
- Journal manuscript — submissions and revision rounds
- Author
- Proceedings of the National Academy of Sciences (PNAS)
- Source
- Proceedings of the National Academy of Sciences (PNAS)
- Licence
- pnas-new.cls: LaTeX Project Public License. The sample text is Proceedings of the National Academy of Sciences (PNAS)'s, provided for authors preparing a submission.
These are the publisher’s own files. This project starts from Proceedings of the National Academy of Sciences (PNAS)’s package for this publication — their manuscript, their pnas-new.cls, their bibliography style — so what compiles here is what they would have given you.
Proceedings of the National Academy of Sciences (PNAS) serves this exact file to Proceedings of the National Academy of Sciences and 2 other titles. Check Proceedings of the National Academy of Sciences (PNAS)’s author pages for the current instructions.
Where this differs from the publisher’s download.
- Added: pnas-sample.bib (written by Manulyx with the five keys the sample cites; PNAS does not publish the sample .bib on pnas.org), jabbrv.sty, jabbrv-ltwa-all.ldf, jabbrv-ltwa-en.ldf (Erich E. Hoover, LPPL 1.3c, from github.com/compholio/jabbrv: pnas-new.cls loads jabbrv, which is not in TeX Live and not on pnas.org), PNAS_Logo.pdf (a blank 66.4 x 24.5 pt page: pnas-new.cls prints PNAS_Logo.pdf in the title area and PNAS does not publish it on pnas.org, so the space is left empty rather than drawn) — Proceedings of the National Academy of Sciences (PNAS)’s package references these without including them, so the project would not have built as downloaded.
- Changed: PNAS-template-main.tex: sentences naming another online editor removed (the title's and the guide heading's 'using ...', its help paragraph, its submit-button and SI-template sentences), per the rule for samples that name another online editor; the frog figure, which PNAS does not publish on pnas.org, replaced by TeX Live's example-image (mwe) and its captions read 'Placeholder image with ...'. Class, styles and .bst unchanged (amendpnas.mjs, 2026-11-08)..
What you get
PNAS-template-main.tex— the file that is compiled · 14 KBPNAS_Logo.pdf· 433 Bjabbrv-ltwa-all.ldf· 67 KBjabbrv-ltwa-en.ldf· 448 KBjabbrv.sty· 22 KBpnas-new.bst· 19 KBpnas-new.cls· 24 KBpnas-sample.bib· 1 KBpnasresearcharticle.sty· 2 KBwidetext.sty· 2 KB
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Journals using this template
- PNAS
- Proceedings of the National Academy of Sciences
- Proceedings of the National Academy of Sciences of the United States of America
Source
PNAS-template-main.tex — the file that is compiled · 14 KB
\documentclass[9pt,twocolumn,twoside]{pnas-new}
% Use the lineno option to display guide line numbers if required.
\articletype{CLASSIFICATION}%%%% Article topic/classification
\templatetype{pnasresearcharticle} % Choose template
% {pnasresearcharticle} = Template for a two-column research article
% {pnasmathematics} %= Template for a one-column mathematics article
% {pnasinvited} %= Template for a PNAS invited submission
\begin{document}
\title{Your paper}
% Use letters for affiliations, numbers to show equal authorship (if applicable) and to indicate the corresponding author
\author[a,c,1]{Author One}
\author[b,1,2]{Author Two}
\author[a]{Author Three}
\affil[a]{Affiliation One}
\affil[b]{Affiliation Two}
\affil[c]{Affiliation Three}
% Please give the surname of the lead author for the running footer
\leadauthor{Lead author last name}
% Please add a significance statement to explain the relevance of your work
\significancestatement{Authors must submit a significance statement between 50 and 120 words in length about the significance of their research paper written at a level understandable to an undergraduate educated scientist outside their field of speciality. The primary goal of the significance statement is to explain the relevance of the work in broad context to a broad readership. If submitting a Direct Submission, please add a significance statement to explain the relevance of your work. Brief Reports do not publish with a significance statement, and should be omitted for this article type.}
% Please include corresponding author, author contribution and author declaration information
\authorcontributions{Please provide details of author contributions here.}
\authordeclaration{Please declare any competing interests here.}
\equalauthors{\textsuperscript{1}A.O.(Author One) contributed equally to this work with A.T. (Author Two) (remove if not applicable).}
\correspondingauthor{\textsuperscript{2}To whom correspondence should be addressed. E-mail: author.two\@email.com}
% At least three keywords are required at submission. Please provide three to five keywords, separated by the pipe symbol.
\keywords{Keyword 1 $|$ Keyword 2 $|$ Keyword 3 $|$ ...}
\begin{abstract}
Please provide an abstract of no more than 250 words in a single paragraph. Abstracts should explain to the general reader the major contributions of the article. References in the abstract must be cited in full within the abstract itself and cited in the text.
\end{abstract}
\dates{This manuscript was compiled on \today}
\doi{\url{www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX}}
\maketitle
\thispagestyle{firststyle}
\ifthenelse{\boolean{shortarticle}}{\ifthenelse{\boolean{singlecolumn}}{\abscontentformatted}{\abscontent}}{}
\Firstpage
%The \Firstpage command is used to format the first page text column size. The same size will be maintained for subsequent paragraph until the \Endparasplit or \Parasplit command is encountered.
This PNAS journal template is provided to help you write your work in the correct journal format. Instructions for use are provided below.
Note: please start your introduction without including the word ``Introduction'' as a section heading (except for math articles in the Physical Sciences section); this heading is implied in the first paragraphs.
\section*{Guide to using this template}
Please note that whilst this template provides a preview of the typeset manuscript for submission, to help in this preparation, it will not necessarily be the final publication layout. For more detailed information please see the \href{https://www.pnas.org/author-center/submitting-your-manuscript}{PNAS Author Center}.
\subsection*{Author Affiliations}
For each author, include institutional unit (e.g., division, department, or section), institution, city, state with ZIP code (for US institutions) or country with postal code (for non-US institutions). Use lower case letters to match authors with institutions, as shown in the example. PNAS requires the corresponding author to provide an ORCID identifier at submission and strongly encourages all authors to use an ORCID ID. Do not include ORCIDs in the manuscript file; individual authors must link their ORCID account to their PNAS profile at \href{http://www.pnascentral.org/}{www.pnascentral.org}. For proper authentication, authors must provide their ORCID at submission and are not permitted to add ORCIDs on proofs.
\subsection*{Submitting Manuscripts}
All authors must submit their articles at \href{http://www.pnascentral.org/cgi-bin/main.plex}{PNAScentral}.
\subsection*{Format}
Many authors find it useful to organize their manuscripts with the following order of sections: introduction, results, discussion, materials and methods, acknowledgments, and references. Other orders and headings are permitted.
\subsection*{Manuscript Length}
A standard 6-page article is approximately 4,000 words, 50 references, and 4 medium-size graphical elements (i.e., figures and tables). The preferred length of Direct Submission articles remains at 6 pages, but PNAS will allow articles up to a maximum of 12 pages. Brief Reports are limited to 3 pages, which is approximately 1,600 words (including the manuscript text, title page, abstract, and figure legends), and 15 references.
\subsection*{References}
References should be cited in numerical order as they appear in text; this will be done automatically via bibtex, e.g. \cite{belkin2002using} and \cite{berard1994embedding,coifman2005geometric,phdthesis,masterthesis}. All references cited in the main text should be included in the main manuscript file.\Endparasplit
%The \Endparasplit command is used to end the formatting of the text column size that was set by the \Firstpage command. This will restore the default column size for the subsequent text.
%
%The \Parasplit command should be used if the page ends in the middle of a paragraph, allowing the column formatting to continue seamlessly on the next page.
\subsection*{Language-Editing Services}
Prior to submission, authors who believe their manuscripts would benefit from professional editing are encouraged to use a language-editing service (see list at https://www.pnas.org/author-center/language-editing). PNAS does not take responsibility for or endorse these services, and their use has no bearing on acceptance of a manuscript for publication.
\begin{figure}%[tbhp]
\centering
\includegraphics[width=.8\linewidth]{example-image}
\caption{Placeholder image with a long example legend to show justification setting.}
\label{fig:frog1}
\end{figure}
\begin{figure*}[t!]
\centering
\includegraphics[scale=0.6]{example-image}
\caption{Placeholder image with a long example legend to show justification setting.}
\label{fig:frog2}
\end{figure*}
\begin{table}[t!]
\centering
\caption{Comparison of the fitted potential energy surfaces and ab initio benchmark electronic energy calculations}
\begin{tabular}{lrrr}
Species & CBS & CV & G3 \\
\midrule
1. Acetaldehyde & 0.0 & 0.0 & 0.0 \\
2. Vinyl alcohol & 9.1 & 9.6 & 13.5 \\
3. Hydroxyethylidene & 50.8 & 51.2 & 54.0\\
\bottomrule
\end{tabular}
\addtabletext{nomenclature for the TSs refers to the numbered species in the table.}
\end{table}
\begin{table*}[t!]
\centering
\caption{Impact on Emission Behaviors by Socioeconomic Status}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lccccc@{}}
& (1) & (2) & (3) & (4) & (5) \\
\midrule
& \multicolumn{2}{c}{City-level} & Firm-level & \multicolumn{2}{c}{City-level} \\
Dep. Var.: & \multicolumn{2}{c}{COD Emission (1,000 tons)} & COD Emission (ton) & Firm Entry & Firm Exit \\
\multicolumn{6}{c}{Panel A: Population Share without College Education} \\
Share of Below College $\times$ Post$_{05}$ & 0.165*** & 0.292** & 0.358*** & 0.623** & 0.280 \\
& (0.026) & (0.119) & (0.106) & (0.266) & (0.487) \\
Share of Below College & -0.208 & & & & \\
& (0.141) & & & & \\
Post$_{05}$ & -16.426*** & & & & \\
& (2.873) & & & & \\
\multicolumn{6}{c}{Panel B: Population Share without High School Education} \\
Share of Below HS $\times$ Post$_{05}$ & 0.099*** & 0.218** & 0.232** & 0.453** & 0.089 \\
& (0.005) & (0.090) & (0.079) & (0.195) & (0.333) \\
Share of Below HS & -0.213* & & & & \\
& (0.100) & & & & \\
Post$_{05}$ & -9.465*** & & & & \\
& (0.564) & & & & \\
\bottomrule
\end{tabular*}
\addtabletext{*** P $<$ 0.01, ** P $<$ 0.05, * P $<$ 0.1}
\end{table*}
\subsection*{Digital Figures}
EPS and high-resolution PDF are preferred formats for figures that will be used in the main manuscript. Authors may submit PRC or U3D files for 3D images; these must be accompanied by 2D representations in TIFF, EPS, or high-resolution PDF format. Color images must be in RGB (red, green, blue) mode. Include the font files for any text.
Images must be provided at final size, preferably 1 column width (8.7cm). Figures wider than 1 column should be sized to 11.4cm or 17.8cm wide. Numbers, letters, and symbols should be no smaller than 6 points (2mm) and no larger than 12 points (6mm) after reduction and must be consistent.
Figures and tables should be labelled and referenced in the standard way using the \verb|\label{}| and \verb|\ref{}| commands.
Figure \ref{fig:frog1} shows an example of how to insert a column-wide figure. To insert a figure wider than one column, please use the \verb|\begin{figure*}...\end{figure*}| environment. Figures wider than one column should be sized to 11.4 cm or 17.8 cm wide. Use \verb|\begin{SCfigure*}...\end{SCfigure*}| for a wide figure with side legends.
\begin{SCfigure*}[\sidecaptionrelwidth][t!]
\centering
\includegraphics[width=11.4cm,height=11.4cm]{example-image}
\caption{This legend would be placed at the side of the figure, rather than below it.}\label{fig:side}
\end{SCfigure*}
\subsection*{Tables}
Tables should be included in the main manuscript file and should not be uploaded separately.
\subsection*{Footnotes}
Footnotes are ordered by symbols such as *, \textdagger, \textdaggerdbl, etc. The article should contain only 13 footnotes\footnote{Footnote Example 1}\footnote{Footnote Example 2}.
\subsection*{Single column equations}
Authors may use 1- or 2-column equations in their article, according to their preference.
\begin{align*}
(x+y)^3&=(x+y)(x+y)^2\\
&=(x+y)(x^2+2xy+y^2) \numberthis \label{eqn:example1} \\
&=x^3+3x^2y+3xy^3+x^3.
\end{align*}
To allow an equation to span both columns, use the \verb|\begin{figure*}...\end{figure*}| environment mentioned above for figures.
Note that the use of the \verb|widetext| environment for equations is not recommended, and should not be used.
\begin{figure*}[bt!]
\begin{align*}
(x+y)^3&=(x+y)(x+y)^2\\
&=(x+y)(x^2+2xy+y^2) \numberthis \label{eqn:example2} \\
&=x^3+3x^2y+3xy^3+x^3.
\end{align*}
\end{figure*}
\subsection*{Supporting Information Appendix (SI)}
Authors should submit SI as a single separate SI Appendix PDF file, combining all text, figures, tables, movie legends, and SI references. SI will be published as provided by the authors; it will not be edited or composed. Additional details can be found in the \href{https://www.pnas.org/author-center/submitting-your-manuscript#supporting-information}{PNAS Author Center}. Refer to the SI Appendix in the manuscript at an appropriate point in the text. Number supporting figures and tables starting with S1, S2, etc.
Authors who place detailed materials and methods in an SI Appendix must provide sufficient detail in the main text methods to enable a reader to follow the logic of the procedures and results and also must reference the SI methods. If a paper is fundamentally a study of a new method or technique, then the methods must be described completely in the main text.
Supporting information (SI) for PNAS Brief Reports is limited to extended methods, essential supporting datasets, software, and video/audio files; supporting text, tables or figures are not permitted.
\subsubsection*{SI Datasets}
Supply .xlsx, .csv, .txt, .rtf, GZ or .pdf files. This file type will be published in raw format and will not be edited or composed.
\paragraph*{SI Movies}
Supply Audio Video Interleave (avi), Quicktime (mov), Windows Media (wmv), animated GIF (gif), or MPEG-4 Part 14 (mp4) files. Movie legends should be included in the SI Appendix file. All movies should be submitted at the desired reproduction size and length. Movies should be no more than 10MB in size.
\matmethods{Please describe your materials and methods here. This can be more than one paragraph, and may contain subsections and equations as required. If your research involved human or animal participants, please identify the institutional review board and/or licensing committee that approved the experiments. Please also include a brief description of your informed consent procedure if your experiments involved human participants.
\subsection*{Subsection for Method}
Example text for subsection.
}
\showmatmethods{} % Display the Materials and Methods section
\dataavail{To allow others to replicate and build on work published in PNAS, authors must make materials, data, and associated protocols, including code and scripts, available to readers in a public repository upon publication. Restrictions on full or partial access to these materials and requests for legal, ethical, and logistical (e.g., size) exceptions must be noted at submission. If requested, these materials must be made available to editors and reviewers during submission for the purpose of evaluating the manuscript. A statement detailing sharing plans will be included in the published article as provided within the submission form. Research datasets, whether original or previously published, must be cited in the references as a condition for publication. Please refer to our full \href{https://www.pnas.org/author-center/editorial-and-journal-policies\#materials-and-data-availability}{policy}.}
\acknow{Please include your acknowledgments here, set in a single paragraph. Please do not include any acknowledgments in the Supporting Information, or anywhere else in the manuscript.}
\showacknow{} % Display the acknowledgments section
\bibsplit[3]
%Use \bibsplit to split the references from the body of the text. Value "[3]" represents the number of reference in the left column (Note: Please avoid single column figures & tables on this page.)
% Bibliography
\bibliography{pnas-sample}
\end{document}
PNAS_Logo.pdf — binary, 433 B
jabbrv-ltwa-all.ldf — binary, 67 KB
jabbrv-ltwa-en.ldf — binary, 448 KB
jabbrv.sty · 22 KB
%% 2018_02_07 - Modifications of Marie-Jean Thoraval ([email protected]):
%% Suppress the end period after non-abbreviated journal titles.
%%
%% Copyright 2010 Erich Hoover
%% E-mail: [email protected]
%%
%% =============================================
%% IMPORTANT NOTICE:
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c of this
%% license or (at your option) any later version.
%% The latest version of this license is available at
%% http://www.latex-project.org/lppl.txt
%% =============================================
%%
%% This package provides the "\JournalTitle{<title>}" command, where
%% "<title>" is a journal title that you wish to have automatically
%% abbreviated. For example,
%% \JournalTitle{Journal of the Optical Society of America}
%% will be replaced to read
%% J. Opt. Soc. Am.
%%
%% The default behavior of this package is to place a period after
%% each abbreviation. For publications that require period-less
%% abbreviations simply include the package option "noperiod":
%% \usepackage[noperiod]{jabbrv}
%%
%% The default behavior of this package is to not abbreviate a
%% journal title that only contains one word. You can disable this
%% behavior (still abbreviate one word titles) by including the
%% "oneword" package option:
%% \usepackage[oneword]{jabbrv}
%%
%% This package also ignores undefined abbreviations (does not
%% abbreviate them) by default. In order to make sure that all the
%% words you expect to be abbreviated are actually abbreviated then
%% include the "warnundef" option:
%% \usepackage[warnundef]{jabbrv}
%% Please note that this option outputs a LaTeX warning for each
%% title word that does not have an abbreviation, possibly resulting
%% in a large number of warnings in the output log.
%%
%% To change the language used for the set of abbreviations (english
%% by default), use the ``lang=<value>'' option with the Unix
%% language code for <value>; for example:
%% \usepackage[lang=es]{jabbrv}
%% sets the abbreviation language to Spanish.
%%
%% In order to add customize abbreviations this package provides
%% four additional commands:
%% \DefineJournalAbbreviation
%% \DefineJournalPartialAbbreviation
%% \DefineSpuriousJournalWord
%% \DefineSpuriousJournalPrefix
%%
%% \DefineJournalAbbreviation takes
%% two parameters, the first parameter is the case-sensitive word to
%% abbreviate and the second parameter is the actual abbreviation,
%% for example:
%% \DefineJournalAbbreviation{Journal}{J}
%%
%% \DefineJournalPartialAbbreviation takes two
%% parameters juts like \DefineJournalAbbreviation; however,
%% \DefineJournalPartialAbbreviation creates an entry that matches
%% any title that begins with the first parameter, for example:
%% \DefineJournalPartialAbbreviation{Communica}{Commun}
%% will match longer words such as ``Communications'' and
%% abbreviate any such word with the given abbreviated form. Please
%% note that care should be taken with creating custom partial
%% abbreviations, as such abbreviations that are not approved by
%% the ISSN may match unintended title words.
%%
%% \DefineSpuriousJournalWord simply takes a single case-sensitive
%% parameter, this parameter will be added to the list of words to
%% completely remove in the output.
%%
%% \DefineSpuriousJournalPrefix takes a single case-sensitive
%% parameter, this parameter will be added to a list that is checked
%% before processing any title words to remove that prefix before
%% checking the word. For example, in French the prefix "d'" should
%% be removed when processing "d'agriculture" and result in the
%% abbreviation "d'agric".
%%
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{jabbrv}[2010/08/18 v0.2
Automatic Journal Title Abbreviation Package]
\RequirePackage{kvoptions}[2006/08/17]
% Special if statement for ensuring there are no double-spaces in the resulting entries
\newif\if@gobble@space@
% Special if for warning when an abbreviation is not defined
\newif\if@warn@noabbrv@ \@warn@noabbrv@false
% Special if for whether an abbreviation match was found
\newif\if@jabbrv@match@found@
% Special if for handling exceptions to the abbreviation rules
\newif\if@abbreviate@journal@
% Special if for handling non-breaking spaces and slashes
\newif\if@jabbrv@special@sep@
% Special if for abbreviating when a title only contains one word
\newif\if@jabbrv@abbrv@one@word@title@ \@jabbrv@abbrv@one@word@title@false
\def\jabbrv@one@word@title{%
\if@jabbrv@abbrv@one@word@title@%
\journal@output@abbrv%
\else%
\the\temp@journal@text%
\fi%
}
% Special definition for the period so that a double-period doesn't result at the end of the entry
\newif\if@show@period@ \@show@period@true
\newif\if@end@period@
\newif\if@no@space@ \@no@space@false
\newif\if@special@period@
\def\journal@abbrv@period@noperiod{\global\@end@period@true}
\def\journal@abbrv@period@period{%
\if@show@period@%
.%
\fi%
}
\def\journal@abbrv@period{%
\ifx\journal@char@stop\@jrnl@temp@char%
\journal@abbrv@period@noperiod%
\else%
\ifx.\@jrnl@temp@char%
\else%
\journal@abbrv@period@period%
\fi%
\fi%
}
% Custom ``comma below'' command (use only if \textcommabelow is defined):
\global\let\jabbrv@textcommabelow=\textcommabelow
\gdef\J@C{%
\expandafter\ifx\csname jabbrv@textcommabelow\endcsname\relax%
\def\jabbrv@comma{}%
\else%
\def\jabbrv@comma{\jabbrv@textcommabelow}%
\fi%
\jabbrv@comma%
}
% Redefinitions for diacritical marks (ignored by ISO-4) and unusual symbols so that they can be
% processed as command names
\def\journal@char@empty{\@gobble X} % cannot be empty or it will match \journal@char@stop
\def\jabbrv@redefine@diacritic{%
\let\`\journal@char@empty% grave accent
\let\'\journal@char@empty% accute accent
\let\^\journal@char@empty% circumflex
\let\"\journal@char@empty% umlaut
\let\=\journal@char@empty% macron accent
\let\c\journal@char@empty% cedilla
\let\t\journal@char@empty% tie
\let\u\journal@char@empty% breve
\let\v\journal@char@empty% caron
\def\~{@TILDE@}%
\def\aa{@RINGa@}%
\def\AA{@RINGA@}%
\def\ae{@aeDIPHTHONG@}%
\def\AE{@AEDIPHTHONG@}%
\def\o{@SLASHo@}%
\def\O{@SLASHO@}%
\def\oe{@oeDIPHTHONG@}%
\def\OE{@OEDIPHTHONG@}%
\def\ss{@ESZETT@}%
\def\&{@AND@}%
\def\textlefthalfring{@LEFTHALFRING@}%
% Custom \J@C may be called directly or defined through \textcommabelow:
\def\J@C{@JABBRVCOMMA@}%
\let\textcommabelow=\J@C%
}
\global\let\jabbrv@graveaccent=\`
\global\let\jabbrv@accuteaccent=\'
\global\let\jabbrv@circumflex=\^
\global\let\jabbrv@umlaut=\"
\global\let\jabbrv@macronaccent=\=
\global\let\jabbrv@tilde=\~
\global\let\jabbrv@ringa=\aa
\global\let\jabbrv@ringA=\AA
\global\let\jabbrv@aediphthong=\ae
\global\let\jabbrv@AEdiphthong=\AE
\global\let\jabbrv@cedilla=\c
\global\let\jabbrv@slasho=\o
\global\let\jabbrv@slashO=\O
\global\let\jabbrv@oediphthong=\oe
\global\let\jabbrv@OEdiphthong=\OE
\global\let\jabbrv@eszett=\ss
\global\let\jabbrv@tie=\t
\global\let\jabbrv@breve=\u
\global\let\jabbrv@caron=\v
\global\let\jabbrv@and=\&
\global\let\jabbrv@=\textlefthalfring
% Custom:
\global\let\jabbrv@comma=\J@C
% When outputing abbreviations or un-abbreviated words the diacritic match
% list should be disabled (return things to normal):
\def\jabbrv@normal@diacritic{%
\let\`=\jabbrv@graveaccent%
\let\'=\jabbrv@accuteaccent%
\let\^=\jabbrv@circumflex%
\let\"=\jabbrv@umlaut%
\let\==\jabbrv@macronaccent%
\let\~=\jabbrv@tilde%
\let\c=\jabbrv@cedilla%
\let\aa=\jabbrv@ringa%
\let\AA=\jabbrv@ringA%
\let\ae=\jabbrv@aediphthong%
\let\AE=\jabbrv@AEdiphthong%
\let\o=\jabbrv@slasho%
\let\O=\jabbrv@slashO%
\let\oe=\jabbrv@oediphthong%
\let\OE=\jabbrv@OEdiphthong%
\let\ss=\jabbrv@eszett%
\let\t=\jabbrv@tie%
\let\u=\jabbrv@breve%
\let\v=\jabbrv@caron%
\let\&=\jabbrv@and%
\let\textlefthalfring=\jabbrv@textlefthalfring%
% Custom \J@C may be called directly or defined through \textcommabelow:
\let\J@C=\jabbrv@comma%
\let\textcommabelow=\jabbrv@comma%
}
\def\jabbrv@nbsp{@NBSP@}
\def\jabbrv@slash{@SLASH@}
\def\jabbrv@openparen{@OPENPAREN@}
\def\jabbrv@closeparen{@CLOSEPAREN@}
\def\jabbrv@space{@SPACE@}
\def\jabbrv@underscore{@UNDERSCORE@}
\def\jabbrv@redefine@special{%
\let~=\jabbrv@nbsp%
\let\slash=\jabbrv@slash%
\let\ =\jabbrv@space%
\let\_=\jabbrv@underscore%
}
\catcode`\(=\active
\catcode`\)=\active
\def\jabbrv@redefine@extra@special{%
\catcode`\(=\active%
\catcode`\)=\active%
\let(=\jabbrv@openparen%
\let)=\jabbrv@closeparen%
}
\def\jabbrv@redefine@extra@special@{%
\catcode`\(12\relax%
\catcode`\)12\relax%
}
\catcode`\(12\relax
\catcode`\)12\relax
\global\let\jabbrv@slash@orig=\slash
\global\let\jabbrv@space@orig=\
\global\let\jabbrv@underscore@orig=\_
\global\let\jabbrv@openparen@orig=(
\global\let\jabbrv@closeparen@orig=)
% Define Common Abbreviations (see language definition files for the list):
\providecommand{\DefineJournalAbbreviation}[2]{
\begingroup
\jabbrv@redefine@diacritic
\expandafter\gdef\csname journal@abbrv@#1\endcsname{%
\begingroup%
\jabbrv@normal@diacritic%
#2%
\endgroup%
\@gobble@space@false%
\journal@abbrv@period%
}
\endgroup
}
% Define specific journals that are exceptions:
\providecommand{\DefineJournalException}[2]{
\begingroup
\jabbrv@redefine@diacritic
\expandafter\gdef\csname journal@exception@#1\endcsname{%
\begingroup%
\jabbrv@normal@diacritic%
#2%
\endgroup%
\@gobble@space@false%
}
\endgroup
}
% Define specific journal words that are exceptions:
\providecommand{\DefineJournalWordException}[2]{
\begingroup
\jabbrv@redefine@diacritic
\expandafter\gdef\csname journal@word@exception@#1\endcsname{%
\begingroup%
\jabbrv@normal@diacritic%
#2%
\endgroup%
\@gobble@space@false%
}
\endgroup
}
% Define Common Partial Abbreviations (see language definition files for the list):
\providecommand{\DefineJournalPartialAbbreviation}[2]{
\begingroup
\jabbrv@redefine@diacritic
\expandafter\gdef\csname journal@partial@abbrv@#1\endcsname{%
\begingroup%
\jabbrv@normal@diacritic%
#2%
\endgroup%
\@gobble@space@false%
\journal@abbrv@period%
}
\endgroup
}
% Define Suprious Word Removal:
\providecommand{\DefineSpuriousJournalWord}[1]{%
\expandafter\def\csname journal@abbrv@#1\endcsname{\journal@output@space}%
}
% Define Suprious Prefix Removal:
\newcounter{jabbrv@prefix@count}
\setcounter{jabbrv@prefix@count}{0}%
\providecommand{\DefineSpuriousJournalPrefix}[1]{%
\expandafter\def\csname journal@prefix@\the\value{jabbrv@prefix@count}\endcsname{#1}%
\addtocounter{jabbrv@prefix@count}{1}%
}
% Handle the rather generic \futurelet code:
\newtoks\temp@journal@text
\newtoks\temp@journal@text@
\temp@journal@text{}
\def\journal@char@stop{}
\def\@journal@space{\afterassignment\@journal@space@\let\@tempa= }
\def\@journal@space@{\journal@char@loop}
\def\@journal@gobble#1{\journal@char@loop}
\def\@journal@character#1{%
\temp@journal@text\expandafter{\the\temp@journal@text#1}%
\journal@char@loop%
}
\def\journal@char@loop{%
\futurelet\@jrnl@temp@char%
\journal@char@loop@%
}
% Code for finding the length of a string:
\newcounter{jabbrv@strlen@count}
\def\jabbrv@strlen@stop{}
\def\jabbrv@strlen#1{%
\edef\1{#1}%
\ifx \1\empty%
\setcounter{jabbrv@strlen@count}{0}%
\else%
\setcounter{jabbrv@strlen@count}{1}%
\expandafter\jabbrv@strlen@ #1\jabbrv@strlen@stop%
\fi%
}
\def\jabbrv@strlen@#1{%
\@ifnextchar\jabbrv@strlen@stop%
{}%
{%
\addtocounter{jabbrv@strlen@count}{1}%
\expandafter\jabbrv@strlen@%
}%
}
% The following ``for loop'' command is a convenience function for going over the word's characters
\newcommand{\jabbrv@for@loop}[5][1]{%
\setcounter{#2}{#3}%
\ifnum#4\relax%
#5%
\addtocounter{#2}{#1}%
\jabbrv@for@loop[#1]{#2}{\value{#2}}{#4}{#5}%
\fi%
}
% Gobble a given number of characters off the end of a string
\newcounter{jabbrv@gobble@temp}
\def\jabbrv@gobble@stop{}
\def\jabbrv@gobble@ending#1#2#3{%
\setcounter{jabbrv@gobble@temp}{#3}%
\addtocounter{jabbrv@gobble@temp}{+1}%
\addtocounter{jabbrv@gobble@temp}{-#2}%
\temp@journal@text@{}%
\expandafter\jabbrv@gobble@ending@ #1\jabbrv@gobble@stop%
}
\def\jabbrv@gobble@ending@{%
\futurelet\@jrnl@gobble@char%
\jabbrv@gobble@ending@@%
}
\def\jabbrv@gobble@ending@character#1{%
\expandafter\ifnum\value{jabbrv@gobble@temp} > 0\relax%
\temp@journal@text@\expandafter{\the\temp@journal@text@#1}%
\fi%
\jabbrv@gobble@ending@%
}
\def\jabbrv@gobble@ending@character@#1{%
\jabbrv@gobble@ending@%
}
\def\jabbrv@gobble@ending@@{%
\addtocounter{jabbrv@gobble@temp}{-1}%
\ifx \jabbrv@gobble@stop\@jrnl@gobble@char%
\let\@tempa\@gobble%
\else\ifcat\noexpand\@jrnl@gobble@char\relax%
\let\@tempa\jabbrv@gobble@ending@character@%
\else%
\let\@tempa\jabbrv@gobble@ending@character%
\fi\fi%
\@tempa%
}
% Gobble a given number of characters off the beginning of a string
\def\jabbrv@gobble@beginning#1#2{%
\setcounter{jabbrv@gobble@temp}{#2}%
\addtocounter{jabbrv@gobble@temp}{+1}%
\temp@journal@text@{}%
\expandafter\jabbrv@gobble@beginning@ #1\jabbrv@gobble@stop%
}
\def\jabbrv@gobble@beginning@{%
\futurelet\@jrnl@gobble@char%
\jabbrv@gobble@beginning@@%
}
\def\jabbrv@gobble@beginning@character#1{%
\expandafter\ifnum\value{jabbrv@gobble@temp} > 0\relax\else%
\temp@journal@text@\expandafter{\the\temp@journal@text@#1}%
\fi%
\jabbrv@gobble@beginning@%
}
\def\jabbrv@gobble@beginning@character@#1{%
\jabbrv@gobble@beginning@%
}
\def\jabbrv@gobble@beginning@@{%
\addtocounter{jabbrv@gobble@temp}{-1}%
\ifx \jabbrv@gobble@stop\@jrnl@gobble@char%
\let\@tempa\@gobble%
\else\ifcat\noexpand\@jrnl@gobble@char\relax%
\let\@tempa\jabbrv@gobble@beginning@character@%
\else%
\let\@tempa\jabbrv@gobble@beginning@character%
\fi\fi%
\@tempa%
}
% Gobble any recognized prefix off the beginning of a title word
\def\jabbrv@gobble@prefix{%
% loop over the list of prefixes
\setcounter{jabbrv@loop@max}{\value{jabbrv@prefix@count}}%
\jabbrv@for@loop{jabbrv@loop@i}{0}{\value{jabbrv@loop@i} < \value{jabbrv@loop@max}}{%
\edef\jabbrv@loop@prefix{\csname journal@prefix@\the\value{jabbrv@loop@i}\endcsname}%
\jabbrv@strlen{\jabbrv@loop@prefix}%
% truncate the title word to the length of the prefix we are testing
\jabbrv@gobble@ending{\the\temp@journal@text}{0}{\value{jabbrv@strlen@count}}%
\edef\temp@journal@text@@{\the\temp@journal@text@}%
% check and see if the prefix matches
\ifx\temp@journal@text@@\jabbrv@loop@prefix\relax%
% if we have a match then remove the prefix from the title word and exit the loop
\jabbrv@gobble@beginning{\the\temp@journal@text}{\the\value{jabbrv@strlen@count}}%
\setcounter{jabbrv@loop@i}{\value{jabbrv@loop@max}}%
\temp@journal@text\expandafter{\the\temp@journal@text@}%
\fi%
}%
}
% Find partial title word matches
\newcounter{jabbrv@loop@i}
\newcounter{jabbrv@loop@max}
\def\journal@output@abbrv@partial{%
\jabbrv@strlen{\the\temp@journal@text}%
\setcounter{jabbrv@loop@max}{\value{jabbrv@strlen@count}}%
\jabbrv@for@loop{jabbrv@loop@i}{0}{\value{jabbrv@loop@i} < \value{jabbrv@loop@max}}{%
\jabbrv@gobble@ending{\the\temp@journal@text}{\value{jabbrv@loop@i}}{\value{jabbrv@loop@max}}%
\expandafter\ifx\csname journal@partial@abbrv@\the\temp@journal@text@\endcsname\relax%
% No known partial abbreviation
\else%
\@jabbrv@match@found@true%
\csname journal@partial@abbrv@\the\temp@journal@text@\endcsname%
\setcounter{jabbrv@loop@i}{\value{jabbrv@loop@max}}%
\fi%
}%
}
% Output single spaces even when there are multiple spaces together
\def\journal@output@space{%
\if@gobble@space@%
\else%
\if@jabbrv@special@sep@%
\@jabbrv@special@sep@false%
\else%
\space%
\fi%
\@gobble@space@true%
\fi%
}
% Output the correct abbreviation for a title word
\def\journal@output@abbrv{%
\if@special@period@%
\journal@abbrv@period%
\else%
\if@no@space@%
.% There was a user-entered period with no space after it
\else%
\journal@output@space%
\fi%
\@jabbrv@match@found@false%
\jabbrv@gobble@prefix%
\expandafter\ifx\csname journal@abbrv@\the\temp@journal@text\endcsname\relax%
\expandafter\ifcsname journal@word@exception@\the\temp@journal@text\endcsname%
\expandafter\csname journal@word@exception@\the\temp@journal@text\endcsname%
\@jabbrv@match@found@true%
\else%
\journal@output@abbrv@partial%
\fi%
\else%
% Replace with abbreviation
\expandafter\csname journal@abbrv@\the\temp@journal@text\endcsname%
\@jabbrv@match@found@true%
\fi%
\if@jabbrv@match@found@%
% A match was output, do nothing.
\else%
% No known abbreviation
\if@warn@noabbrv@%
\@latex@warning{No abbreviation defined for `\the\temp@journal@text'}%
\fi%
\begingroup%
\jabbrv@normal@diacritic%
\the\temp@journal@text%
\endgroup%
\global\@end@period@false % reset the "need a period at the end" indicator
\@gobble@space@false%
\fi%
\fi%
\@special@period@false%
}
% Allow us to keep track of the number of words in an abbreviation so that when there's only one we can choose not to abbreviate
\newcounter{jabbrv@word@count}
\def\jabbrv@reset@word@count{%
\setcounter{jabbrv@word@count}{0}%
}
\def\jabbrv@step@word@count{%
\addtocounter{jabbrv@word@count}{1}%
}
\def\@journal@group#1{\journal@char@loop#1}
\def\@journal@word@sep{%
\journal@output@abbrv%
\jabbrv@step@word@count%
\temp@journal@text{}%
\@no@space@false%
\let\@tempa\@journal@space%
}
% Loop through the \futurelet characters finding title words to replace
\def\journal@char@loop@{%
% remove the group ({}) wrapping around whatever commands are within it
\ifx\bgroup\@jrnl@temp@char%
\let\@tempa\@journal@group%
% The space character is the ``special token'' - use this character to find
% title words to abbreviate
\else\ifx \@sptoken\@jrnl@temp@char%
\@journal@word@sep%
% Capture the '\ ' style space and treat it the same as a regular space
\else\ifx \jabbrv@space\@jrnl@temp@char%
\@journal@word@sep%
% Capture the non-breaking space and treat it similar to a regular space
\else\ifx \jabbrv@nbsp\@jrnl@temp@char%
\@journal@word@sep%
\@jabbrv@special@sep@true%
\leavevmode\nobreak\space% {\nobreakspace}
% Capture the underscore and treat it as a word separator
\else\ifx \jabbrv@underscore\@jrnl@temp@char%
\@journal@word@sep%
\@jabbrv@special@sep@true%
\jabbrv@underscore@orig%
% Capture the slash and treat it as a word separator
\else\ifx \jabbrv@slash\@jrnl@temp@char%
\@journal@word@sep%
\@jabbrv@special@sep@true%
\jabbrv@slash@orig%
% Capture open parenthesis and treat it as a word separator
\else\ifx \jabbrv@openparen\@jrnl@temp@char%
\@journal@word@sep%
\@jabbrv@special@sep@true%
\jabbrv@openparen@orig%
% Capture close parenthesis and treat it as a word separator
\else\ifx \jabbrv@closeparen\@jrnl@temp@char%
\@journal@word@sep%
\@jabbrv@special@sep@true%
\jabbrv@closeparen@orig%
\else%
% \journal@char@stop is specially defined so this routine knows
% when the entire text has been read (where to stop)
\ifx \journal@char@stop\@jrnl@temp@char%
\expandafter\ifnum\value{jabbrv@word@count} > 0\relax%
\journal@output@abbrv%
\else%
\jabbrv@one@word@title%
\fi%
\let\@tempa\@gobble%
\else%
% Measure all other characters and include them in the title word
\@special@period@false%
\let\@tempa\@journal@character%
\fi%
\fi% else
\fi% \jabbrv@closeparen
\fi% \jabbrv@openparen
\fi\fi\fi\fi\fi%
\@tempa%
}
% Eat a period at the end of the entry if the next character is also a period
\def\@jrnl@eat@period{%
\if@end@period@%
\@jrnl@eat@period@%
\fi%
}
\def\@jrnl@eat@period@{%
\@ifnextchar.%
{\@gobble}%
{\journal@abbrv@period@period}%
}
% Skip groups after the \JournalTitle command
\def\@jrnl@eat@period@groupskip{%
\@ifnextchar\egroup%
{\@jrnl@eat@period@groupskip@}%
{\@jrnl@eat@period}%
}
\def\@jrnl@eat@period@groupskip@{%
\egroup \expandafter\@jrnl@eat@period\bgroup%
}
% Call \journal{<title>}, where <title> is the title for which
% journal abbreviation replacements should be performed.
\def\JournalTitle{%
\jabbrv@redefine@extra@special%
\JournalTitle@%
}
\def\JournalTitle@#1{%
\jabbrv@redefine@extra@special@%
\@abbreviate@journal@true%
\global\@end@period@false%
\begingroup%
\jabbrv@redefine@diacritic%
\jabbrv@redefine@special%
\edef\journal@fulltitle{#1}%
\ifcsname journal@exception@#1\endcsname%
\csname journal@exception@#1\endcsname%
\global\@abbreviate@journal@false%
\fi%
\endgroup%
\if@abbreviate@journal@%
\begingroup%
\@gobble@space@true%
\@special@period@false%
\jabbrv@redefine@diacritic%
\jabbrv@redefine@special%
\jabbrv@reset@word@count%
\expandafter\journal@char@loop%
#1%
\journal@char@stop%
\endgroup%
\fi%
% If the next character is not a period then add one in
% if the last character would have been a period
\@jrnl@eat@period@groupskip%
}
% Declare an option for disabling periods
\DeclareVoidOption{noperiod}{\@show@period@false}
% Declare an option for abbreviating one word titles
\DeclareVoidOption{oneword}{\@jabbrv@abbrv@one@word@title@true}
% Declare an option for enabling undefined abbreviation warnings
\DeclareVoidOption{warnundef}{\@warn@noabbrv@true}
% Declare an option for the default abbreviation list
\gdef\jabbrv@lang{en}
\define@key{jabbrv}{lang}{\gdef\jabbrv@lang{#1}}
% Process the option list and input the language definitions
\ProcessKeyvalOptions{jabbrv}
\InputIfFileExists{jabbrv-ltwa-all.ldf}{}{%
\@latex@error{The master abbreviation language file `jabbrv-ltwa-all.ldf' was not found}{Make sure the file is in the appropriate folder and recompile.}%
}
\InputIfFileExists{jabbrv-ltwa-\[email protected]}{}{%
\@latex@error{Abbreviation language `jabbrv-ltwa-\[email protected]' not found}{Select a valid language and recompile.}%
}
\def\jabbrv@lang@spurious@en{
\DefineSpuriousJournalWord{of}
\DefineSpuriousJournalWord{in}
\DefineSpuriousJournalWord{and}
\DefineSpuriousJournalWord{the}
}
\def\jabbrv@lang@spurious@fr{
\DefineSpuriousJournalPrefix{d'}
}
\csname jabbrv@lang@spurious@\jabbrv@lang\endcsname
% If working with biblatex then apply the journal title as a "field handler"
\@ifl@t@r\fmtversion{2020-10-01}{%
\AddToHook{begindocument/before}{%
\@ifpackageloaded{biblatex}{%
\DeclareFieldInputHandler{journaltitle}{%
\def\NewValue{\JournalTitle{#1}}%
}%
}{}%
}%
}{%
\global\let\jabbrv@begin@document=\document%
\gdef\document{%
\endgroup%
\@ifpackageloaded{biblatex}{%
\DeclareFieldInputHandler{journaltitle}{%
\def\NewValue{\JournalTitle{##1}}%
}%
}{}%
\begingroup%
\jabbrv@begin@document%
}%
}
pnas-new.bst · 19 KB
%%% ====================================================================
%%% @BibTeX-style-file{
%%% author = "Russell Standish"
%%% }
%%% ====================================================================
% This is "pnas-new.bst", adapted from
% "pnas2016.bst", "pnas2011.bst" "pnas2009.bst" and "pnas.bst",
% modified from "unsrt.bst"
% April 2019: Bold article volume numbers, ignore issue numbers, move publication year to end, abbreviate journal names.
% August 2021: Issue warning if an @article is missing the volume field.
% BibTeX standard bibliography style `unsrt'
% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
% Copyright (C) 1985, all rights reserved.
% Copying of this file is authorized only if either
% (1) you make absolutely no changes to your copy, including name, or
% (2) if you do make changes, you name it something other than
% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
% The file btxbst.doc has the documentation for this style.
ENTRY
{ address
author
booktitle
chapter
edition
editor
howpublished
institution
journal
key
month
note
number
issue
organization
pages
eid
publisher
school
series
title
type
volume
year
url
doi
}
{}
{ label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
}
STRINGS { s t }
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
% { ", " * write$ }
{ " " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
% { add.period$ " " * write$ }
{ ", " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
FUNCTION {output}
{ duplicate$ empty$
'pop$
'output.nonnull
if$
}
FUNCTION {output.check}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'output.nonnull
if$
}
FUNCTION {new.block}
{ output.state before.all =
'skip$
{ after.block 'output.state := }
if$
}
FUNCTION {format.url}
{ url empty$
{ "" }
{ new.block "URL \url{" url * "}" * }
if$
}
FUNCTION {format.doi}
{ doi empty$
{ "" }
{ new.block "\doi{" doi * "}" * }
if$
}
FUNCTION {output.bibitem}
{ newline$
"\bibitem{" write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
FUNCTION {fin.entry}
{ add.period$
write$
newline$
}
FUNCTION {new.sentence}
{ output.state after.block =
'skip$
{ output.state before.all =
'skip$
{ after.sentence 'output.state := }
if$
}
if$
}
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
FUNCTION {new.block.checka}
{ empty$
'skip$
'new.block
if$
}
FUNCTION {new.block.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.block
if$
}
FUNCTION {new.sentence.checka}
{ empty$
'skip$
'new.sentence
if$
}
FUNCTION {new.sentence.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.sentence
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {emphasize}
{ duplicate$ empty$
{ pop$ "" }
{ "{\em " swap$ * "}" * }
if$
}
FUNCTION {parenthesize}
{ duplicate$ empty$
{ pop$ "" }
{ "(" swap$ * ")" * }
if$
}
FUNCTION {boldface}
{ duplicate$ empty$
{ pop$ "" }
{ "{\bf " swap$ * "}" * }
if$
}
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
% { s nameptr "{vv~}{ll}{, jj}{ f{}}"
{ s nameptr "{f{} }{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #1 >
{ ", " * }
'skip$
if$
t "others" =
{ ", et~al." * }
{ t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
namesleft #4 >
{ ", et~al." *
#0 'namesleft :=
}
'skip$
if$
}
while$
}
FUNCTION {format.publisher}
{ publisher empty$
{ address empty$
{ "" }
{ address }
if$
}
{ address empty$
{ publisher}
{ publisher ", " * address * }
if$
}
if$
}
FUNCTION {format.editors.as.authors}
{ editor empty$
{ organization }
{ editor format.names
editor num.names$ #1 >
{ ", eds." * }
{ ", ed." * }
if$
}
if$
}
FUNCTION {format.authors}
{ author empty$
{ editor empty$
{ "" }
{ editor format.names
editor num.names$ #1 >
{ ", eds." * }
{ ", ed." * }
if$
}
if$
}
{ author format.names }
if$
}
FUNCTION {format.editors}
{ editor empty$
{ "" }
{ author empty$ %in this case, see format.authors
{ "" }
{ editor num.names$ #1 >
{ "eds.{} " }
{ "ed.{} " }
if$
editor format.names *
}
if$
}
if$
}
FUNCTION {format.title}
{ title "t" change.case$
}
FUNCTION {enquote}
{ duplicate$ empty$
{pop$ "" }
{"``" swap$ * ",''" * }
if$
}
FUNCTION {format.atitle}
{ title enquote
}
FUNCTION {n.dashify}
{ 't :=
""
{ t empty$ not }
{ t #1 #1 substring$ "-" =
{ t #1 #2 substring$ "--" = not
{ "--" *
t #2 global.max$ substring$ 't :=
}
{ { t #1 #1 substring$ "-" = }
{ "-" *
t #2 global.max$ substring$ 't :=
}
while$
}
if$
}
{ t #1 #1 substring$ *
t #2 global.max$ substring$ 't :=
}
if$
}
while$
}
FUNCTION {format.date}
{ year empty$
{ "year?" parenthesize }
{ year parenthesize }
if$
}
FUNCTION {format.btitle.series}
{ title empty$
{ "" }
{ title emphasize }
if$
series empty$
{ "" * }
{ ", " * series * }
if$
}
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$ * *
}
FUNCTION {comma.connect}
{ duplicate$ empty$
{ pop$ }
{ swap$
duplicate$ empty$
{ pop$ }
{ swap$ ", " swap$ * * }
if$
}
if$
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume.number}
{ volume empty$
{ number empty$
{ "" }
{ "No.{}" number tie.or.space.connect }
if$
}
{ "Vol.{}" volume tie.or.space.connect
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.number}
{ volume empty$
{ number empty$
{ "" }
{ "No.{}" number tie.or.space.connect }
if$
}
{ "" }
if$
}
FUNCTION {format.edition}
{ edition empty$
{ "" }
{ output.state mid.sentence =
{ edition "l" change.case$ " edition" * }
{ edition "t" change.case$ " edition" * }
if$
}
if$
}
INTEGERS { multiresult }
FUNCTION {multi.page.check}
{ 't :=
#0 'multiresult :=
{ multiresult not
t empty$ not
and
}
{ t #1 #1 substring$
duplicate$ "-" =
swap$ duplicate$ "," =
swap$ "+" =
or or
{ #1 'multiresult := }
{ t #2 global.max$ substring$ 't := }
if$
}
while$
multiresult
}
FUNCTION {format.pages}
{ pages empty$
{ "" }
{ pages multi.page.check
{ "pp." pages n.dashify tie.or.space.connect }
{ "p." pages tie.or.space.connect }
if$
}
if$
}
%%% April 2019: bold volume, ignore issue
FUNCTION {format.vol.num.pages}
{ %volume field.or.null
% number empty$
% {
% issue empty$
% 'skip$
% { "(" issue * ")" * * }
% if$
% }
% {
% "(" number * ")" * *
% volume empty$
% { "there's a number but no volume in " cite$ * warning$ }
% 'skip$
% if$
% }
% if$
%%% August 2021: display warning if volume is missing, instead of erroring out about empty stack
volume empty$
% 'skip$
{ "empty volume in " cite$ * warning$ ""}
{ "\textbf{" volume field.or.null * "}" * }
if$
pages empty$
{
eid empty$
'skip$
{
duplicate$ empty$
{ pop$ format.pages }
% { ":" * eid n.dashify * }
{ ", " * eid n.dashify * }
if$
}
if$
}
{
duplicate$ empty$
{ pop$ format.pages }
% { ":" * pages n.dashify * }
{ ", " * pages n.dashify * }
if$
}
if$
}
FUNCTION {format.chapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ "chapter" }
{ type "l" change.case$ }
if$
chapter tie.or.space.connect
pages empty$
'skip$
{ ", " * format.pages * }
if$
}
if$
}
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
{ "" }
{ "in " booktitle emphasize * }
if$
series empty$
{ "" * }
{ booktitle empty$
{ "XXmissing booktitle \& seriesXX" * }
{ ", " * }
if$
series *
}
if$
}
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
month empty$ year empty$ note empty$
and and and and and
{ "all relevant fields are empty in " cite$ * warning$ }
'skip$
if$
}
FUNCTION {format.thesis.type}
{ type empty$
'skip$
{ pop$
type "t" change.case$
}
if$
}
FUNCTION {format.address.thesis}
{ address empty$
{ "" }
{", " * address }
if$
}
FUNCTION {format.school.thesis}
{ school empty$
{ "" }
{", " * school }
if$
}
FUNCTION {format.tr.number}
{ type empty$
{ "Technical Report" }
'type
if$
number empty$
{ "t" change.case$ }
{ number tie.or.space.connect }
if$
}
FUNCTION {format.journal}
{
"{\em\protect\JournalTitle{" journal * "}}" *
}
FUNCTION {format.article.crossref}
{ key empty$
{ journal empty$
{ "need key or journal for " cite$ * " to crossref " * crossref *
warning$
""
}
% { "In {\em " journal * "\/}" * }
{ "In " format.journal * "\/" * }
if$
}
{ "In " key * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
editor num.names$ duplicate$
#2 >
{ pop$ ", et~al." * }
{ #2 <
'skip$
{ editor #2 "{vv }{ll}{ jj}{, f}" format.name$ "others" =
{ ", et~al." * }
{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
if$
}
if$
}
if$
}
FUNCTION {format.book.crossref}
{ volume empty$
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
"In "
}
{ "Vol.{}" volume tie.or.space.connect
" of " *
}
if$
editor empty$
editor field.or.null author field.or.null =
or
{ key empty$
{ series empty$
{ "need editor, key, or series for " cite$ * " to crossref " *
crossref * warning$
"" *
}
{ "{\em " * series * "\/}" * }
if$
}
{ key * }
if$
}
{ format.crossref.editor * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
editor field.or.null author field.or.null =
or
{ key empty$
{ booktitle empty$
{ "need editor, key, or booktitle for " cite$ * " to crossref " *
crossref * warning$
""
}
{ "in {\em " booktitle * "\/}" * }
if$
}
{ "in " key * }
if$
}
{ "in " format.crossref.editor * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
new.sentence
% format.date "year" output.check
format.title "title" output.check
new.block
crossref missing$
% April 2019: abbreviate journal names
{ %journal emphasize "journal" output.check
format.journal "journal" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
%new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {book}
{ output.bibitem
format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
new.sentence
% format.date "year" output.check
format.btitle.series "title" output.check
crossref missing$
{ format.editors output
new.block
format.publisher parenthesize output
format.bvolume.number output
new.sentence
}
{ new.block
format.book.crossref output.nonnull
}
if$
format.edition output
new.sentence
format.pages output
%new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {booklet}
{ output.bibitem
format.authors output
new.sentence
% format.date output
format.title "title" output.check
howpublished address comma.connect parenthesize output
%new.block
format.date output
note output
fin.entry
}
FUNCTION {inbook}
{ output.bibitem
format.authors output.nonnull
new.sentence
% format.date "year" output.check
format.btitle.series "title" output.check
new.sentence
crossref missing$
{ format.editors output
new.block
format.publisher parenthesize output
format.bvolume.number output
new.sentence
}
{ format.chapter.pages "chapter and pages" output.check
new.block
format.book.crossref output.nonnull
}
if$
format.edition output
new.sentence
format.pages output
%new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
new.sentence
% format.date "year" output.check
format.title "title" output.check
format.in.ed.booktitle "title" output.check
new.sentence
crossref missing$
{ format.editors output
new.block
format.publisher parenthesize output
format.bvolume.number output
new.sentence
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.edition output
new.sentence
format.pages output
% new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check
new.sentence
% format.date "year" output.check
format.title "title" output.check
format.in.ed.booktitle "title" output.check
new.sentence
crossref missing$
{ format.editors output
new.block
organization publisher comma.connect
address comma.connect
parenthesize output
new.sentence
format.bvolume.number output
new.sentence
}
{ format.incoll.inproc.crossref output.nonnull
}
if$
format.edition output
new.sentence
format.pages output
%new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
author empty$
{ organization empty$
'skip$
{ organization output.nonnull }
if$
}
{ format.authors output.nonnull }
if$
new.sentence
% format.date "year" output.check
format.btitle.series "title" output.check
author empty$
{ "" }
{ organization }
if$
publisher comma.connect address comma.connect parenthesize output
new.sentence
format.edition output
%new.block
format.date "year" output.check
note output
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
new.sentence
format.atitle "title" output.check
"M.Sc. thesis" format.thesis.type output.nonnull
format.school.thesis output
format.address.thesis output
format.date "year" output.check
new.block
format.doi output
format.url output
new.block
note output
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors output
new.sentence
% format.date output
format.title output
howpublished parenthesize output
%new.block
format.date output
note output
fin.entry
empty.misc.check
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
new.sentence
format.atitle "title" output.check
"PhD thesis" format.thesis.type output.nonnull
format.school.thesis output
format.address.thesis output
format.date "year" output.check
new.block
format.doi output
format.url output
new.block
note output
fin.entry
}
FUNCTION {proceedings}
{ output.bibitem
format.editors.as.authors output
new.sentence
% format.date output
format.btitle.series "title" output.check
organization publisher comma.connect
address comma.connect parenthesize output
format.bvolume.number output
new.sentence
format.pages output
% new.block
format.date output
note output
fin.entry
}
FUNCTION {techreport}
{ output.bibitem
format.authors "author" output.check
new.sentence
% format.date output
format.title "title" output.check
new.sentence
institution address comma.connect parenthesize output
new.sentence
format.tr.number output.nonnull
% new.block
format.date output
fin.entry
}
FUNCTION {unpublished}
{ output.bibitem
format.authors "author" output.check
new.sentence
% format.date output
format.title "title" output.check
new.block
note "note" output.check
format.date output
fin.entry
}
FUNCTION {default.type} { misc }
MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}
MACRO {acmcs} {"ACM Computing Surveys"}
MACRO {acta} {"Acta Informatica"}
MACRO {cacm} {"Communications of the ACM"}
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
MACRO {ibmsj} {"IBM Systems Journal"}
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
MACRO {ieeetc} {"IEEE Transactions on Computers"}
MACRO {ieeetcad}
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
MACRO {ipl} {"Information Processing Letters"}
MACRO {jacm} {"Journal of the ACM"}
MACRO {jcss} {"Journal of Computer and System Sciences"}
MACRO {scp} {"Science of Computer Programming"}
MACRO {sicomp} {"SIAM Journal on Computing"}
MACRO {tocs} {"ACM Transactions on Computer Systems"}
MACRO {tods} {"ACM Transactions on Database Systems"}
MACRO {tog} {"ACM Transactions on Graphics"}
MACRO {toms} {"ACM Transactions on Mathematical Software"}
MACRO {toois} {"ACM Transactions on Office Information Systems"}
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
MACRO {tcs} {"Theoretical Computer Science"}
READ
STRINGS { longest.label }
INTEGERS { number.label longest.label.width }
FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
#1 'number.label :=
#0 'longest.label.width :=
}
FUNCTION {longest.label.pass}
{ number.label int.to.str$ 'label :=
number.label #1 + 'number.label :=
label width$ longest.label.width >
{ label 'longest.label :=
label width$ 'longest.label.width :=
}
'skip$
if$
}
EXECUTE {initialize.longest.label}
ITERATE {longest.label.pass}
FUNCTION {begin.bib}
{ preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
"\begin{thebibliography}{" longest.label * "}" * write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
pnas-new.cls · 24 KB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pnas-new.cls, v1.47, 2025/11/01
%
% This class file enables authors to prepare research
% articles for submission to PNAS.
%
% Please note that whilst this template provides a
% preview of the typeset manuscript for submission, it
% will not necessarily be the final publication layout.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt and
% version 1.3 or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% For use with latex+dvipdfm, pdflatex, xelatex & lualatex
% For compiling with plain latex, please use latex+dvipdfm
% to produce the PDF, not dvis -> ps -> pdf nor dvipdf
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{pnas-new}[2025/11/01, v1.47]
\AtEndOfClass{\RequirePackage{microtype}}
% Option for line numbers
%\newif\if@pnaslineno
%\DeclareOption{lineno}{\@pnaslinenotrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}}
\ProcessOptions*
\LoadClass{extarticle}
\widowpenalty=10000 % To avoid widow & orphan lines
\clubpenalty=10000 % To avoid single line remain at preceding page
\hyphenpenalty=750 % For proper hyphenation
%% Fonts and language
\RequirePackage[utf8]{inputenc}
\RequirePackage[english]{babel}
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{lmodern}
\RequirePackage[scaled]{helvet}
%\RequirePackage[T1]{fontenc}
\RequirePackage{lettrine} % For dropped capitals
%% For the Significance Statement & footnote on the first page
\RequirePackage{afterpage}
\RequirePackage{ifpdf,ifxetex}
\ifpdf\else
\ifxetex\else
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\fi\fi
\RequirePackage{xcolor}
\RequirePackage{tikz}
\RequirePackage[framemethod=tikz]{mdframed}
%% Hyperlinking
\RequirePackage[colorlinks=true, allcolors=blue]{hyperref}
%% Set up main title page fonts
\newcommand{\headerfont}{\normalfont\sffamily\fontsize{7}{9} \selectfont}
\newcommand{\footerfont}{\normalfont\sffamily\fontsize{7}{9} \selectfont}
\newcommand{\titlefont}{\fontfamily{lmss}\bfseries\fontsize{15}{20}\selectfont}
\newcommand{\dropcapfont}{\fontfamily{lmss}\bfseries\fontsize{26pt}{28pt}\selectfont}
\newcommand{\datesfont}{\normalfont\sffamily\fontsize{7}{8}\selectfont}
\newcommand{\absfont}{\normalfont\bfseries\fontsize{10}{12}\selectfont}
\newcommand{\keywordsfont}{\normalfont\sffamily\fontsize{7}{9}\selectfont}
\newcommand{\copyrightfont}{\normalfont\rmfamily\fontsize{6}{8}\selectfont}
%% Set URL link color & font
\renewcommand\UrlFont{\color{black}\sffamily}
%% Author and affiliation
\RequirePackage{authblk}
\setlength{\affilsep}{8.5pt} % 16.5pts between base of author line and base of affil line
\renewcommand\Authfont{\color{color0}\sffamily\fontsize{6}{7.5}\selectfont}
\renewcommand\Affilfont{\color{color0}\sffamily\fontsize{6}{7.5}\selectfont}
\renewcommand\AB@affilsepx{; \protect\Affilfont}
\renewcommand\Authands{, and }
\renewcommand\@author{\ifx\AB@affillist\AB@empty\AB@author\else
\ifnum\value{affil}>\value{Maxaffil}\def\rlap##1{##1}%
\AB@authlist%\\[\affilsep]\AB@affillist
\else \AB@authors\fi\fi}
%% Choose template type
\newcommand*{\templatetype}[1]{%
\RequirePackage{#1}}
%% Options for element switching
\RequirePackage{xifthen}
\newboolean{shortarticle}
\newboolean{singlecolumn}
%% For numbering just one line of an equation
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
%% Watermark
\newboolean{displaywatermark}
\setboolean{displaywatermark}{true} % Set to false to remove the watermark
\AtBeginDocument{%
\ifthenelse{\boolean{displaywatermark}}{%
\RequirePackage{draftwatermark}
\SetWatermarkAngle{45}
\SetWatermarkColor{gray!20}
\SetWatermarkFontSize{3cm}
\SetWatermarkText{{\fontfamily{bch}\bfseries DRAFT}}
}{}
}
%% Copyright statement (not used)
\newboolean{displaycopyright}
\setboolean{displaycopyright}{false} % Confirmed as not required
\RequirePackage{textcomp} % For copyright symbol styling
\newcommand{\copyrightstatement}{\, \textcopyright\, 2015 by The National Academy of Sciences of the USA}
%% Graphics, tables and other formatting
\RequirePackage{graphicx,xcolor}
\RequirePackage{colortbl}
\RequirePackage{booktabs}
\RequirePackage{algorithm}
\RequirePackage[noend]{algpseudocode}
\RequirePackage{changepage}
\RequirePackage[twoside,%
letterpaper,includeheadfoot,%
layoutsize={8.125in,10.875in},%
layouthoffset=0.1875in,%
layoutvoffset=0.0625in,%
%left=22.5pt,%
%right=48pt,%
top=43pt,% 10pt provided by headsep
bottom=44pt,%
headheight=0pt,% No Header
headsep=-2pt,%
footskip=25pt,
marginparwidth=38pt]{geometry}
\RequirePackage[labelfont={bf,sf},%
labelsep=period,%
figurename=Fig.]{caption}
\setlength{\columnsep}{13.5pt} % Distance between the two columns of text
\setlength{\parindent}{12pt} % Paragraph indent
\setlength{\headheight}{12pt}
%% Set document color scheme
\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
\definecolor{color2}{RGB}{16,131,16} %
% For sig statement box
\definecolor{pnasbluetext}{RGB}{0,101,165} %
%\definecolor{pnasblueback}{RGB}{205,217,235} %
\definecolor{pnasblueback}{cmyk}{.07,.02,.01,0}%
\definecolor{pantone}{cmyk}{1,.46,.02,.002}%used for significant head
%\definecolor{pnasbluetext}{RGB}{0,115,209} % Not used
%\definecolor{pnasblueback}{RGB}{210,230,247} % Not used
%%%%%%%%%%%%Straive changes 2025%%%%%%%%%%%%%%
\advance\paperwidth by -.375in%
\advance\paperheight by -.13in
\setlength{\topmargin}{-50pt}
\setlength{\columnwidth}{247pt}%
\setlength{\columnsep}{18pt}%
\setlength{\evensidemargin}{-35.1pt}%
\setlength{\oddsidemargin}{-35.1pt}%
\setlength{\textwidth}{512pt}%
\advance\textheight by2.37\baselineskip
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bibliography
%% v1.41 (15/11/2016)
%% Use pnas-new.bst if available
%% If not, try to use pnas2011.bst instead
%% If both aren't available, fall back to
%% unsrtnat
\RequirePackage[numbers,sort&compress,merge,round]{natbib}
\setlength{\bibsep}{0.0pt}
\IfFileExists{pnas-new.bst}{
\bibliographystyle{pnas-new}
}{
\IfFileExists{pnas2011.bst}{
\bibliographystyle{pnas2011}
\PackageWarning{pnas-new}{pnas-new.bst not found; using pnas2011.bst instead}
}{
\bibliographystyle{unsrtnat}
\PackageWarning{pnas-new}{pnas-new.bst and pnas2011.bst not found; falling back to unsrtnat instead}
}
}
\renewcommand{\bibsection}{} % Remove header
\renewcommand\bibfont{\normalfont\sffamily\fontsize{6}{8}\selectfont} % set font to be sans serif
%% April 29, 2019: abbreviate journal names
\RequirePackage{jabbrv}
\renewcommand\@biblabel[1]{ #1.} % Remove brackets from label
\def\tagform@#1{\maketag@@@{\bfseries(\ignorespaces#1\unskip\@@italiccorr)}}
\renewcommand{\eqref}[1]{\textup{{\normalfont Eq.~(\ref{#1}}\normalfont)}}
\renewenvironment{thebibliography}[1]{%
\bibsection
\parindent\z@
\labelsep2.8pt
\bibpreamble
\fontsize{6.75pt}{8pt}\selectfont
\list{\@biblabel{\the\c@NAT@ctr}}{\@bibsetup{#1}\global\c@NAT@ctr\z@}%
\ifNAT@openbib
\renewcommand\newblock{\par}%
\else
\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
\fi
\sloppy
\clubpenalty4000\widowpenalty4000
\sfcode`\.\@m
\let\NAT@bibitem@first@sw\@firstoftwo
\let\citeN\cite \let\shortcite\cite
%\let\citeasnoun\cite\xbibfont
\bibfont\raggedright
}{%
\bibitem@fin
\bibpostamble
\def\@noitemerr{%
\PackageWarning{natbib}{Empty `thebibliography' environment}%
}%
\endlist
\bibcleanup
\label{LastPage}
}%
%% Figure caption style
\DeclareCaptionFormat{pnasformat}{\normalfont\sffamily\fontsize{7}{9}\selectfont#1#2#3}
\captionsetup*{format=pnasformat}
%% Table style
\RequirePackage{etoolbox}
\captionsetup*[table]{labelfont+={small},textfont+={small,sf,bf},skip=10pt,position=above}
% booktabs provide nice spacing, but rule widths and distances need fixing
\setlength{\heavyrulewidth}{0.5pt}
\setlength{\lightrulewidth}{0.5pt}
\setlength{\aboverulesep}{1.5pt}
\setlength{\belowrulesep}{1.5pt}
\setlength{\belowbottomsep}{10pt}
\AtBeginEnvironment{tabular}{
\sffamily\fontsize{7.5}{10}\selectfont
}
\AtBeginEnvironment{tabular*}{
\sffamily\fontsize{7.5}{10}\selectfont
}
\newcommand{\addtabletext}[1]{{\setlength{\leftskip}{9pt}\fontsize{7}{9}\selectfont#1}}
%% Equation numbering - use square brackets
\renewcommand\tagform@[1]{\maketag@@@ {\bfseries[\ignorespaces #1\unskip \@@italiccorr ]}}
%% Headers and footers
\RequirePackage{fancyhdr} % custom headers/footers
\RequirePackage{lastpage} % Number of pages in the document
\pagestyle{fancy} % Enables the custom headers/footers
\fancypagestyle{firststyle}{
\fancyfoot[L]{\footerfont \textbf{PNAS}\hspace{7pt}\today\hspace{7pt}LaTex v2025\hspace{7pt}Vol. XXX\hspace{7pt}No. XX\hspace{7pt}eXXXXXXXXXX}
\fancyfoot[R]{\footerfont\@ifundefined{@doi}{}{\@doi}\hspace{7pt}\textbf{\thepage of \pageref*{LastPage}}}
\newsavebox{\PNAS@linecount@bx}
\newlength\PNAS@linecount@bxht
\newcount\PNAS@linecount
\PNAS@linecount\@ne\relax
\def\PNAS@mk@linecount{%
\savebox{\PNAS@linecount@bx}[4em][t]{\parbox[t]{4em}{\raggedleft\vskip4pc\sffamily
\normalsize
\setlength{\PNAS@linecount@bxht}{0pt}%
\loop{\raggedleft\scriptsize\the\PNAS@linecount}\\
\global\advance\PNAS@linecount by \@ne
\addtolength{\PNAS@linecount@bxht}{\baselineskip}%
\ifdim\PNAS@linecount@bxht<0.93\textheight\repeat
{\raggedleft\scriptsize\the\PNAS@linecount}\hfill
\global\advance\PNAS@linecount by \@ne}}}
\def\PNAS@linecountLO{%
\PNAS@mk@linecount
\begin{picture}(0,0)%
\put(-50,7){\usebox{\PNAS@linecount@bx}}%
\end{picture}%
}
\def\PNAS@linecountRO{%
\PNAS@mk@linecount
\begin{picture}(0,0)%
\put(-13,7){\usebox{\PNAS@linecount@bx}}%
\end{picture}%
}
\def\PNAS@linecountLE{%
\PNAS@mk@linecount
\begin{picture}(0,0)%
\put(-28,4){\usebox{\PNAS@linecount@bx}}%
\end{picture}%
}
\def\PNAS@linecountRE{%
\PNAS@mk@linecount
\begin{picture}(0,0)%
\put(11,4){\usebox{\PNAS@linecount@bx}}%
\end{picture}%
}
\fancyhead[LO]{\PNAS@linecountLO}
\fancyhead[RO]{\PNAS@linecountRO}
\fancyhead[LE]{\PNAS@linecountLE}
\fancyhead[RE]{\PNAS@linecountRE}
}
\newsavebox{\PNAS@linecount@bxsecpage}
\newlength\PNAS@linecount@bxhtsecpage
%\newcount\PNAS@linecount
%\PNAS@linecount\@ne\relax
\def\PNAS@mk@linecountsecpage{%
\savebox{\PNAS@linecount@bxsecpage}[4em][t]{\parbox[t]{4em}{\raggedleft\vskip15pt\sffamily
\normalsize
\setlength{\PNAS@linecount@bxhtsecpage}{0pt}%
\loop{\raggedright\scriptsize\the\PNAS@linecount}\\
\global\advance\PNAS@linecount by \@ne
\addtolength{\PNAS@linecount@bxhtsecpage}{\baselineskip}%
\ifdim\PNAS@linecount@bxhtsecpage<0.98\textheight\repeat
{\raggedright\scriptsize\the\PNAS@linecount}\hfill
\global\advance\PNAS@linecount by \@ne}}}
\def\PNAS@linecountsecpageLO{%
\PNAS@mk@linecountsecpage
\begin{picture}(0,0)%
\put(-50,7){\usebox{\PNAS@linecount@bxsecpage}}%
\end{picture}%
}
\def\PNAS@linecountsecpageRO{%
\PNAS@mk@linecountsecpage
\begin{picture}(0,0)%
\put(-13,7){\usebox{\PNAS@linecount@bxsecpage}}%
\end{picture}%
}
\def\PNAS@linecountsecpageLE{%
\PNAS@mk@linecountsecpage
\begin{picture}(0,0)%
\put(-50,7){\usebox{\PNAS@linecount@bxsecpage}}%
\end{picture}%
}
\def\PNAS@linecountsecpageRE{%
\PNAS@mk@linecountsecpage
\begin{picture}(0,0)%
\put(-13,7){\usebox{\PNAS@linecount@bxsecpage}}%
\end{picture}%
}
\fancyhead[LO]{\PNAS@linecountsecpageLO}
\fancyhead[RO]{\PNAS@linecountsecpageRO}
\fancyhead[LE]{\PNAS@linecountsecpageLE}
\fancyhead[RE]{\PNAS@linecountsecpageRE}
% Headers
%\fancyhead[LE,RO]{}
%\fancyhead[LO,RE]{}
% Footers
\lfoot{}%
\cfoot{}%
\rfoot{}%
\fancyfoot[LE]{\footerfont\textbf{\thepage} \textbf{of} \textbf{\pageref*{LastPage}}\hspace{7pt}\@ifundefined{@doi}{}{\@doi}}
\fancyfoot[RO]{\footerfont\@ifundefined{@doi}{}{\@doi}\hspace{7pt}\textbf{\thepage} \textbf{of} \textbf{\pageref*{LastPage}}}
%\fancyfoot[RE,LO]{\footerfont\@ifundefined{@leadauthor}{}{\@leadauthor}\ifnum \value{authors} > 1\hspace{5pt}\textit{et al.}\fi}
\fancyfoot[RE]{\footerfont pnas.org}
\fancyfoot[LO]{\footerfont \textbf{PNAS}\hspace{7pt}\today\hspace{7pt}LaTex v2025 \hspace{7pt}Vol. XXX\hspace{7pt}No. XX\hspace{7pt} eXXXXXXXXXX}
\renewcommand{\headrulewidth}{0pt}% % No header rule
\renewcommand{\footrulewidth}{0pt}% % No footer rule
%% Section/subsection/paragraph set-up
\RequirePackage[explicit]{titlesec}
\setcounter{secnumdepth}{6}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\renewcommand{\theparagraph}{\thesubsubsection.\arabic{paragraph}}
\titleformat{\section}
{\large\sffamily\bfseries}
{\thesection.}
{0.5em}
{#1}
[]
\titleformat{name=\section,numberless}
{\large\sffamily\bfseries}
{}
{0em}
{#1}
[]
\titleformat{\subsection}[runin]
{\sffamily\bfseries\fontsize{8}{10}\selectfont}
{\thesubsection.}
{0.5em}
{#1. }
[]
\titleformat{\subsubsection}[runin]
{\sffamily\small\bfseries\itshape}
{\thesubsubsection.}
{0.5em}
{#1. }
[]
\titleformat{\paragraph}[runin]
{\sffamily\small\itshape\bfseries}
{\indent\theparagraph. }
{0em}
{#1.}
\titlespacing*{\section}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}
\titlespacing*{\subsection}{0pc}{2.5ex \@plus3pt \@minus2pt}{6pt}
\titlespacing*{\subsubsection}{0pc}{2ex \@plus2.5pt \@minus1.5pt}{6pt}
\titlespacing*{\paragraph}{0pc}{1.5ex \@plus2pt \@minus1pt}{6pt}
%% Article meta data additional fields
\newcommand{\additionalelement}[1]{\def\@additionalelement{#1}}
\newcommand{\dates}[1]{\def\@dates{#1}}
\newcommand{\doi}[1]{\def\@doi{#1}}
\newcommand{\leadauthor}[1]{\def\@leadauthor{#1}}
\newcommand{\etal}[1]{\def\@etal{#1}}
\newcommand{\keywords}[1]{\def\@keywords{#1}}
\newcommand{\authorcontributions}[1]{\def\@authorcontributions{#1}}
\newcommand{\authordeclaration}[1]{\def\@authordeclaration{#1}}
\newcommand{\equalauthors}[1]{\def\@equalauthors{#1}}
\newcommand{\correspondingauthor}[1]{\def\@correspondingauthor{#1}}
\newcommand{\significancestatement}[1]{\def\@significancestatement{\raggedright\fontsize{8.5}{12}\selectfont#1}}
\newcommand{\matmethods}[1]{\def\@matmethods{#1}}
\newcommand{\acknow}[1]{\def\@acknow{#1}}
%% Dropped capital for first letter of main text
\newcommand{\dropcap}[1]{\lettrine[lines=2,lraise=0.05,findent=0.1em, nindent=0em]{{\dropcapfont{#1}}}{}}
%% 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
\parbox{\dimexpr1.35\linewidth}{%
\vskip3pt%
\absfont \theabstract
}%
\vskip10pt%
\noindent
\parbox{\dimexpr1.35\linewidth}{%
{
\keywordsfont \@ifundefined{@keywords}{}{\@keywords}}%
}
\vskip12pt%
}
\newcommand{\secondpage}{\@ifstar{\pnaspar}{\parabreak}}
\newcommand{\Parasplit}{\parfillskip=0pt\eject\clearpage\setlength{\columnwidth}{\linewidth}\setlength{\columnwidth}{247pt}\setlength{\linewidth}{247pt}\setlength{\hsize}{247pt}\parfillskip=0pt plus 1fil\noindent}
\newcommand{\Endparasplit}{\vfill\eject\clearpage\setlength{\columnwidth}{\linewidth}\setlength{\columnwidth}{247pt}\setlength{\linewidth}{247pt}\setlength{\hsize}{247pt}\parfillskip=0pt plus 1fil}
\newcommand{\normalcolwidth}{\setlength{\columnwidth}{\linewidth}\setlength{\columnwidth}{247pt}\setlength{\linewidth}{247pt}\setlength{\hsize}{247pt}}
\newcounter{parcount}
\newcommand*\replicate[1]{%
\expandafter\replicate@aux\romannumeral\number\numexpr #1\relax000Q{}
}
\newcommand*\replicate@aux[1]{\csname replicate@aux@#1\endcsname}
\newcommand\replicate@aux@m{}
\long\def\replicate@aux@m#1Q#2#3{\replicate@aux#1Q{#2#3}{#3}}
\newcommand\replicate@aux@Q[2]{#1}
\DeclareRobustCommand*\adjlinewidth[3]{%
\parshape = #1
\replicate{#1-1}{#2\textwidth #3\textwidth}%
0pt\columnwidth
}
\newcommand{\Firstpage}{%
\setlength{\columnwidth}{0.695\textwidth}
\setlength{\linewidth}{0.66\textwidth}
\setlength{\hsize}{0.66\textwidth}
\setlength{\columnsep}{10pt}
\setlength{\parskip}{0pt}}
\newcommand{\firstpage}[2][1]{%
\let\FPeverypar\everypar
\newtoks\everypar
\newtoks\listeverypar
\setlength{\columnwidth}{0.7\textwidth}
\setlength{\linewidth}{0.655\textwidth}
\setlength{\hsize}{0.655\textwidth}
\setlength{\parskip}{0pt}\FPeverypar{\the\everypar\the\listeverypar\stepcounter{parcount}\ifnum\theparcount=0\relax\else\ifnum\theparcount>0\ifnum\theparcount=#2\normalcolwidth\adjlinewidth{#1}{0}{0.655}\fi\fi\fi}}
\newcounter{BalanceAtReference}
\setcounter{BalanceAtReference}{\z@}
\newcounter{ReferenceIndexForBalancing}
\def\@balancereference{%
\ifnum\value{ReferenceIndexForBalancing}=\value{BalanceAtReference}
\ifnum\value{BalanceAtReference}=\z@
\relax
\else
\vfill\eject
\fi\fi
\stepcounter{ReferenceIndexForBalancing}
}
\pretocmd{\bibitem}{\@balancereference}
{} % on success
{\@latex@error{Patching \bibitem failed}{\@ehd}}
\RequirePackage{cuted}
\def\@outputdblcol{%
\if@firstcolumn
\global \@firstcolumnfalse
\global \setbox\@leftcolumn \box\@outputbox
\splitmaxdepth\maxdimen
\vbadness\maxdimen
\setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
\setbox\@outputbox\vsplit\@outputbox to\maxdimen
\else
\ifnum\value{page}=1
%\linewidth=0.655\textwidth
%\hsize=0.655\textwidth
\global \@firstcolumntrue
\setbox\@outputbox \vbox {%
\hb@xt@\textwidth {%
\hb@[email protected]\textwidth {%
\box\@leftcolumn \hss}%
\hfil
\vrule \@width\columnseprule
\hfil
\hb@xt@\columnwidth {%
\box\@outputbox \hss}%
}%
}%
\else
\global \@firstcolumntrue
\setbox\@outputbox \vbox {%
\hb@xt@\textwidth {%
\hb@xt@\columnwidth {%
\box\@leftcolumn \hss}%
\hfil
\vrule \@width\columnseprule
\hfil
\hb@xt@\columnwidth {%
\box\@outputbox \hss}%
}%
}%
\fi
\ifvoid\hold@viper
\else
\setbox\@outputbox \vbox{\box\hold@viper\box\@outputbox}%
\fi
\@combinedblfloats
\@outputpage
\begingroup
\@dblfloatplacement
\@startdblcolumn
\@whilesw\if@fcolmade \fi
{\@outputpage
\@startdblcolumn}%
\ifvoid\@viper
\else
\global\setbox\@viper\vbox{%
\vskip-\stripsep\unvbox\@viper}\@viperoutput
\fi
\endgroup
\fi
}
\newcommand\bibsplit[1][]{\begin{strip}\vspace*{-12pt}\end{strip}\setcounter{BalanceAtReference}{#1}}
% Option to format abstract differently for certain layouts (not used)
\newcommand{\abscontentformatted}{
\abscontent
}
%% Manual adjustment to line up main content with line numbers
\newlength\pnas@vertadjust
\newcommand\verticaladjustment[1]{\setlength{\pnas@vertadjust}{#1}}
\definecolor{typecol}{cmyk}{0,.67,.9,.0}%
\definecolor{gray80}{gray}{0.75}
\newcommand{\articletype}[1]{\def\@articletype{\footnotesize\sffamily#1}}
%% Custom title page
\renewcommand{\@maketitle}{\vskip-8.5\p@%
{\includegraphics[height=24.5pt,width=66.4pt]{PNAS_Logo.pdf}%
\put(28.9,9.05){\color{typecol}\sffamily\bfseries\footnotesize RESEARCH ARTICLE}\put(102,3.55){\color{gray80}{\rule{0.5pt}{16pt}}}\put(110,9.05){\@articletype}\par\vskip11\p@%
\ifthenelse{\boolean{shortarticle}}
{\ifthenelse{\boolean{singlecolumn}}{}{
{\raggedright\baselineskip= 24pt\titlefont \@title\par}%
\vskip10pt% 21pts between base of title and base of author line
{\raggedright \@author\par}
\vskip8pt% 16pts between base of affiliations and base of dates line
{\raggedright \datesfont \@ifundefined{@dates}{}{\@dates}\par}
\vskip12pt%
}}
{% else
%
\vskip10pt%
{\raggedright\baselineskip= 20pt\titlefont \@title\par}%
\vskip10pt% 21pts between base of title and base of author line
{\raggedright \@author\par}
\vskip8pt% 16pts between base of affiliations and base of dates line
{\raggedright \datesfont \@ifundefined{@dates}{}{\@dates}\par}
\vskip12pt
{%
\abscontent
}%
\vskip25pt%
}%
%%%
\@additionalelement
}%
\vskip\pnas@vertadjust
}
%%%% Adding line numbers
%\if@twocolumn
% \RequirePackage[switch,mathlines]{lineno}
%\else
% \RequirePackage[mathlines]{lineno}
%\fi
%
%\if@pnaslineno
% \linenumbers
%
% \patchcmd{\abscontent}{\noindent}{\noindent\nolinenumbers}{}{}
% \patchcmd{\abscontent}{\theabstract}{\internallinenumbers\theabstract}{}{}
% \appto{\abscontent}{\linenumbers*}
%
% \if@twocolumn
% \else
% \preto{\@maketitle}{\nolinenumbers}
% \fi
%\fi
%
%% Footnotes set up
\RequirePackage[flushmargin,ragged,symbol*]{footmisc}
\renewcommand*{\footnotelayout}{\normalfont\sffamily\fontsize{6}{8}\selectfont} % set the footnote font
\renewcommand{\footnoterule}{% Set the footnote hrule style
\kern -3pt
{\color{black50} \hrule width 72pt height 0.25pt}
\kern 2.5pt
}
%% Set up the acknowledgments field
\titleclass{\acknow@section}{straight}[\part]
\newcounter{acknow@section}
\providecommand*{\toclevel@acknow@section}{0}
% Format is set for research articles by default
\titleformat{\acknow@section}[runin]
{\sffamily\normalsize\bfseries}
{}
{0em}
{#1.}
[]
\titlespacing{\acknow@section}
{0pt}
{3.25ex plus 1ex minus .2ex}
{1.5ex plus .2ex}
\newcommand{\showacknow}{% Display acknowledgments section
\@ifundefined{@acknow}{}{
\vskip 3.25ex plus 1ex minus .2ex
\noindent{\sffamily\bfseries\fontsize{7}{9}\selectfont ACKNOWLEDGMENTS.\hspace{0.5ex plus .2ex}}
\sffamily\small\@acknow}
}
\newcommand{\dataavail}[1]{% Display acknowledgments section
\vskip 3.25ex plus 1ex minus .2ex
\noindent{\sffamily\bfseries\fontsize{7}{9}\selectfont Data, Materials, and Software Availability.\hspace{0.5ex plus .2ex}}
\sffamily\small#1}
%% Set up the materials&methods field
\titleclass{\matmethods@section}{straight}[\part]
\newcounter{matmethods@section}
\providecommand*{\toclevel@matmethods@section}{0}
% Format is set for research articles by default
\titleformat{\matmethods@section}
{\sffamily\normalsize\bfseries}
{}
{0em}
{#1}
[]
\titlespacing{\matmethods@section}
{0pt}
{3.25ex plus 1ex minus .2ex}
{1.5ex plus .2ex}
\newcommand{\showmatmethods}{% Display materials&methods section
\@ifundefined{@matmethods}{}{\section*{Materials and Methods}{\sffamily\small\noindent\@matmethods}}
}
%% Other packages
\RequirePackage{enumitem} % For reducing bullet list item separation
%% For sidecaptions
\RequirePackage[rightcaption]{sidecap}
%% Define widetext as a double-column float, with a warning
\RequirePackage{float}
\RequirePackage{stfloats}
\RequirePackage{marginnote}
\floatstyle{plain}
\newfloat{@widetext}{hbt!}{wtt}
\newenvironment{widetext}{%
\PackageWarning{pnas-new}{Use of `widetext` is not recommended. We will now place it at the top or bottom of a page.}
\begin{@widetext*}[bt!]
\marginnote{\itshape\footnotesize\color{red}Use of \texttt{widetext} is not recommended.}
\hrule
}{
\hrule
\end{@widetext*}
}
%% For backward compatibility; does nothing
\def\pnasbreak{}
\endinput
pnas-sample.bib · 1 KB
% Supplied by Manulyx (2026-11-08): PNAS publishes its template .tex, class, styles and .bst on
% pnas.org, but not the pnas-sample.bib the sample cites. These entries carry the same keys.
@inproceedings{belkin2002using,
author = {Belkin, Mikhail and Niyogi, Partha},
title = {Using manifold structure for partially labelled classification},
booktitle = {Advances in Neural Information Processing Systems 15},
year = {2002}
}
@article{berard1994embedding,
author = {B{\'e}rard, Pierre and Besson, G{\'e}rard and Gallot, Sylvestre},
title = {Embedding {R}iemannian manifolds by their heat kernel},
journal = {Geometric and Functional Analysis},
volume = {4},
number = {4},
pages = {373--398},
year = {1994}
}
@article{coifman2005geometric,
author = {Coifman, Ronald R. and Lafon, St{\'e}phane and Lee, Ann B. and Maggioni, Mauro and Nadler, Boaz and Warner, Frederick and Zucker, Steven W.},
title = {Geometric diffusions as a tool for harmonic analysis and structure definition of data: Diffusion maps},
journal = {Proceedings of the National Academy of Sciences},
volume = {102},
number = {21},
pages = {7426--7431},
year = {2005}
}
@phdthesis{phdthesis,
author = {Author, A.},
title = {Title of the Doctoral Thesis},
school = {Name of the University},
year = {2025}
}
@mastersthesis{masterthesis,
author = {Author, B.},
title = {Title of the Master's Thesis},
school = {Name of the University},
year = {2025}
}
pnasresearcharticle.sty · 2 KB
%%% PNAS two column research article style file
%%% For use with pnas-new.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pnasresearcharticle}[2018/05/06 v1.3 PNAS two column research article style]
%% Set whether the abstract is set into the first column
\setboolean{shortarticle}{true}
% true = set into first column
% false = spans page width
%% Set colors
\definecolor{color2}{RGB}{130,0,0} % color
%% Set up the first page footnote/fact box here
\RequirePackage{float}
\floatstyle{plain}
\newfloat{sigstatement}{tp!}{sst}
\newfloat{sigstatements}{bp!}{sst}
\additionalelement{%
\afterpage{\begin{sigstatement}
\sffamily
\mdfdefinestyle{pnassigstyle}{backgroundcolor=pnasblueback,linecolor=pnasblueback,fontcolor=pnasbluetext,innertopmargin=9.3pt,innerrightmargin=11.4pt,innerbottommargin=12pt,innerleftmargin=11.4pt,linewidth=0pt,userdefinedwidth=157pt}
\@ifundefined{@significancestatement}{}{%
\begin{mdframed}[style=pnassigstyle]%
\section*{\textcolor{pantone}{Significance}}%
\raggedright\fontsize{8.5}{12}\selectfont\textcolor{black}\@significancestatement
\end{mdframed}}
\end{sigstatement}
\begin{sigstatements}
\sffamily
\mdfdefinestyle{pnassigstyle}{linewidth=0pt,innertopmargin=0pt,innerrightmargin=0pt,innerbottommargin=-30pt,innerleftmargin=0pt,userdefinedwidth=157pt}
% \medskip
\begin{mdframed}[style=pnassigstyle]%
\scriptsize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if!\AB@affillist!\else Author affiliations: \AB@affillist\par\vskip11.7pt
\hrule width 157pt height.5pt\par\vskip13.5pt\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@ifundefined{@authorcontributions}{\vskip-3pt}{\@authorcontributions}
\vskip3pt%
\@ifundefined{@authordeclaration}{\vskip-3pt}{\@authordeclaration}
\vskip3pt%
\@ifundefined{@equalauthors}{\vskip-3pt}{\@equalauthors}
\vskip3pt%
\@ifundefined{@correspondingauthor}{\vskip-3pt}{\@correspondingauthor}
\end{mdframed}\vskip-6pt
\end{sigstatements}\clearpage
}
}
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt\@xipt
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\endinput
widetext.sty · 2 KB
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{widetext}
%% Mimics the widetext environment of revtex4 for any other class package
%% Eg: article.cls
%%
%% Compiled by: Anjishnu Sarkar
%%
%% Advantages:
%% *) Supports float (eg: figure) in two column format (Advantage over
%% multicol package)
%% *) One and twocolumn exist on the same page
%% *) Flow of text shown via rule
%% *) Equal height of text when in two column format
%%
%% Acknowledgment(s):
%% 1. Instead of re-inventing the wheel, two packages (flushend, cuted) of
%% the sttools bundle are used. The sttools bundle is available from CTAN.
%% Lisence of these packages rests with their corresponding author.
%% Any bug/problem with flushend and cuted should be forwarded to their
%% corresponding package authors.
%% 2. The idea of the rule came from the following latex community website
%% http://www.latex-community.org/forum/viewtopic.php?f=5&t=2770
%%
%% This package just defines the widetext environment and the rules.
%%
%% Usage:
%% \documentclass[a4paper,12pt,twocolumn]{article}
%% \usepackage{widetext}
%%
%% \begin{document}
%%
%% Some text in twocolumn
%%
%% \begin{widetext}
%% Text in onecolumn format.
%% \end{widetext}
%%
%% Some more text in twocolumn
%%
%% \end{document}
%%%%%%%%%%%%%%%%%%%%
%% Package required for equal height while in 2 columns format
\IfFileExists{flushend.sty}
{\RequirePackage{flushend}}
{\typeout{}
\typeout{Package widetext error: Install the flushend package which is
a part of sttools bundle. Available from CTAN.}
\typeout{}
\stop
}
%% Package required for onecolumn and twocolumn to exist on the same page.
%% and also required for widetext environment.
\IfFileExists{cuted.sty}
{\RequirePackage{cuted}}
{\typeout{}
\typeout{Package widetext error: Install the cuted package which is
a part of sttools bundle. Available from CTAN.}
\typeout{}
\stop
}
\newlength\@parindent
\setlength\@parindent{\parindent}
\if@twocolumn
\newenvironment{widetext}
{%
\begin{strip}
\rule{\dimexpr(0.5\textwidth-0.5\columnsep-0.4pt)}{0.4pt}%
\rule{0.4pt}{6pt}
\par %\vspace{6pt}
\parindent \@parindent
}%
{%
\par
\hfill\rule[-6pt]{0.4pt}{6.4pt}%
\rule{\dimexpr(0.5\textwidth-0.5\columnsep-1pt)}{0.4pt}
\end{strip}
}
\else
\newenvironment{widetext}{}{}
\fiThe first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗