templates/neurips2025/neurips.sty
templates/neurips2025/neurips.styBrowse 56 files
3,976 tokens
11,625 bytes
Token encoding: o200k_base
Snapshot 24fd22b
← Back to SKILL.md
1% partial rewrite of the LaTeX2e package for submissions to the2% Conference on Neural Information Processing Systems (NeurIPS):3%4% - uses more LaTeX conventions5% - line numbers at submission time replaced with aligned numbers from6% lineno package7% - \nipsfinalcopy replaced with [final] package option8% - automatically loads times package for authors9% - loads natbib automatically; this can be suppressed with the10% [nonatbib] package option11% - adds foot line to first page identifying the conference12% - adds preprint option for submission to e.g. arXiv13% - conference acronym modified14%15% Roman Garnett (garnett@wustl.edu) and the many authors of16% nips15submit_e.sty, including MK and drstrip@sandia17%18% last revision: April 202519 20\NeedsTeXFormat{LaTeX2e}21\ProvidesPackage{neurips_2025}[2025/04/02 NeurIPS 2025 submission/camera-ready style file]22 23% declare final option, which creates camera-ready copy24\newif\if@neuripsfinal\@neuripsfinalfalse25\DeclareOption{final}{26 \@neuripsfinaltrue27}28 29% declare nonatbib option, which does not load natbib in case of30% package clash (users can pass options to natbib via31% \PassOptionsToPackage)32\newif\if@natbib\@natbibtrue33\DeclareOption{nonatbib}{34 \@natbibfalse35}36 37% declare preprint option, which creates a preprint version ready for38% upload to, e.g., arXiv39\newif\if@preprint\@preprintfalse40\DeclareOption{preprint}{41 \@preprinttrue42}43 44\ProcessOptions\relax45 46% determine whether this is an anonymized submission47\newif\if@submission\@submissiontrue48\if@neuripsfinal\@submissionfalse\fi49\if@preprint\@submissionfalse\fi50 51% fonts52\renewcommand{\rmdefault}{ptm}53\renewcommand{\sfdefault}{phv}54 55% change this every year for notice string at bottom56\newcommand{\@neuripsordinal}{39th}57\newcommand{\@neuripsyear}{2025}58\newcommand{\@neuripslocation}{San Diego}59 60% acknowledgments61\usepackage{environ}62\newcommand{\acksection}{\section*{Acknowledgments and Disclosure of Funding}}63\NewEnviron{ack}{%64 \acksection65 \BODY66}67 68 69% load natbib unless told otherwise70\if@natbib71 \RequirePackage{natbib}72\fi73 74% set page geometry75\usepackage[verbose=true,letterpaper]{geometry}76\AtBeginDocument{77 \newgeometry{78 textheight=9in,79 textwidth=5.5in,80 top=1in,81 headheight=12pt,82 headsep=25pt,83 footskip=30pt84 }85 \@ifpackageloaded{fullpage}86 {\PackageWarning{neurips_2025}{fullpage package not allowed! Overwriting formatting.}}87 {}88}89 90\widowpenalty=1000091\clubpenalty=1000092\flushbottom93\sloppy94 95 96% font sizes with reduced leading97\renewcommand{\normalsize}{%98 \@setfontsize\normalsize\@xpt\@xipt99 \abovedisplayskip 7\p@ \@plus 2\p@ \@minus 5\p@100 \abovedisplayshortskip \z@ \@plus 3\p@101 \belowdisplayskip \abovedisplayskip102 \belowdisplayshortskip 4\p@ \@plus 3\p@ \@minus 3\p@103}104\normalsize105\renewcommand{\small}{%106 \@setfontsize\small\@ixpt\@xpt107 \abovedisplayskip 6\p@ \@plus 1.5\p@ \@minus 4\p@108 \abovedisplayshortskip \z@ \@plus 2\p@109 \belowdisplayskip \abovedisplayskip110 \belowdisplayshortskip 3\p@ \@plus 2\p@ \@minus 2\p@111}112\renewcommand{\footnotesize}{\@setfontsize\footnotesize\@ixpt\@xpt}113\renewcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}114\renewcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt}115\renewcommand{\large}{\@setfontsize\large\@xiipt{14}}116\renewcommand{\Large}{\@setfontsize\Large\@xivpt{16}}117\renewcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{20}}118\renewcommand{\huge}{\@setfontsize\huge\@xxpt{23}}119\renewcommand{\Huge}{\@setfontsize\Huge\@xxvpt{28}}120 121% sections with less space122\providecommand{\section}{}123\renewcommand{\section}{%124 \@startsection{section}{1}{\z@}%125 {-2.0ex \@plus -0.5ex \@minus -0.2ex}%126 { 1.5ex \@plus 0.3ex \@minus 0.2ex}%127 {\large\bf\raggedright}%128}129\providecommand{\subsection}{}130\renewcommand{\subsection}{%131 \@startsection{subsection}{2}{\z@}%132 {-1.8ex \@plus -0.5ex \@minus -0.2ex}%133 { 0.8ex \@plus 0.2ex}%134 {\normalsize\bf\raggedright}%135}136\providecommand{\subsubsection}{}137\renewcommand{\subsubsection}{%138 \@startsection{subsubsection}{3}{\z@}%139 {-1.5ex \@plus -0.5ex \@minus -0.2ex}%140 { 0.5ex \@plus 0.2ex}%141 {\normalsize\bf\raggedright}%142}143\providecommand{\paragraph}{}144\renewcommand{\paragraph}{%145 \@startsection{paragraph}{4}{\z@}%146 {1.5ex \@plus 0.5ex \@minus 0.2ex}%147 {-1em}%148 {\normalsize\bf}%149}150\providecommand{\subparagraph}{}151\renewcommand{\subparagraph}{%152 \@startsection{subparagraph}{5}{\z@}%153 {1.5ex \@plus 0.5ex \@minus 0.2ex}%154 {-1em}%155 {\normalsize\bf}%156}157\providecommand{\subsubsubsection}{}158\renewcommand{\subsubsubsection}{%159 \vskip5pt{\noindent\normalsize\rm\raggedright}%160}161 162% float placement163\renewcommand{\topfraction }{0.85}164\renewcommand{\bottomfraction }{0.4}165\renewcommand{\textfraction }{0.1}166\renewcommand{\floatpagefraction}{0.7}167 168\newlength{\@neuripsabovecaptionskip}\setlength{\@neuripsabovecaptionskip}{7\p@}169\newlength{\@neuripsbelowcaptionskip}\setlength{\@neuripsbelowcaptionskip}{\z@}170 171\setlength{\abovecaptionskip}{\@neuripsabovecaptionskip}172\setlength{\belowcaptionskip}{\@neuripsbelowcaptionskip}173 174% swap above/belowcaptionskip lengths for tables175\renewenvironment{table}176 {\setlength{\abovecaptionskip}{\@neuripsbelowcaptionskip}%177 \setlength{\belowcaptionskip}{\@neuripsabovecaptionskip}%178 \@float{table}}179 {\end@float}180 181% footnote formatting182\setlength{\footnotesep }{6.65\p@}183\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}184\renewcommand{\footnoterule}{\kern-3\p@ \hrule width 12pc \kern 2.6\p@}185\setcounter{footnote}{0}186 187% paragraph formatting188\setlength{\parindent}{\z@}189\setlength{\parskip }{5.5\p@}190 191% list formatting192\setlength{\topsep }{4\p@ \@plus 1\p@ \@minus 2\p@}193\setlength{\partopsep }{1\p@ \@plus 0.5\p@ \@minus 0.5\p@}194\setlength{\itemsep }{2\p@ \@plus 1\p@ \@minus 0.5\p@}195\setlength{\parsep }{2\p@ \@plus 1\p@ \@minus 0.5\p@}196\setlength{\leftmargin }{3pc}197\setlength{\leftmargini }{\leftmargin}198\setlength{\leftmarginii }{2em}199\setlength{\leftmarginiii}{1.5em}200\setlength{\leftmarginiv }{1.0em}201\setlength{\leftmarginv }{0.5em}202\def\@listi {\leftmargin\leftmargini}203\def\@listii {\leftmargin\leftmarginii204 \labelwidth\leftmarginii205 \advance\labelwidth-\labelsep206 \topsep 2\p@ \@plus 1\p@ \@minus 0.5\p@207 \parsep 1\p@ \@plus 0.5\p@ \@minus 0.5\p@208 \itemsep \parsep}209\def\@listiii{\leftmargin\leftmarginiii210 \labelwidth\leftmarginiii211 \advance\labelwidth-\labelsep212 \topsep 1\p@ \@plus 0.5\p@ \@minus 0.5\p@213 \parsep \z@214 \partopsep 0.5\p@ \@plus 0\p@ \@minus 0.5\p@215 \itemsep \topsep}216\def\@listiv {\leftmargin\leftmarginiv217 \labelwidth\leftmarginiv218 \advance\labelwidth-\labelsep}219\def\@listv {\leftmargin\leftmarginv220 \labelwidth\leftmarginv221 \advance\labelwidth-\labelsep}222\def\@listvi {\leftmargin\leftmarginvi223 \labelwidth\leftmarginvi224 \advance\labelwidth-\labelsep}225 226% create title227\providecommand{\maketitle}{}228\renewcommand{\maketitle}{%229 \par230 \begingroup231 \renewcommand{\thefootnote}{\fnsymbol{footnote}}232 % for perfect author name centering233 \renewcommand{\@makefnmark}{\hbox to \z@{$^{\@thefnmark}$\hss}}234 % The footnote-mark was overlapping the footnote-text,235 % added the following to fix this problem (MK)236 \long\def\@makefntext##1{%237 \parindent 1em\noindent238 \hbox to 1.8em{\hss $\m@th ^{\@thefnmark}$}##1239 }240 \thispagestyle{empty}241 \@maketitle242 \@thanks243 \@notice244 \endgroup245 \let\maketitle\relax246 \let\thanks\relax247}248 249% rules for title box at top of first page250\newcommand{\@toptitlebar}{251 \hrule height 4\p@252 \vskip 0.25in253 \vskip -\parskip%254}255\newcommand{\@bottomtitlebar}{256 \vskip 0.29in257 \vskip -\parskip258 \hrule height 1\p@259 \vskip 0.09in%260}261 262% create title (includes both anonymized and non-anonymized versions)263\providecommand{\@maketitle}{}264\renewcommand{\@maketitle}{%265 \vbox{%266 \hsize\textwidth267 \linewidth\hsize268 \vskip 0.1in269 \@toptitlebar270 \centering271 {\LARGE\bf \@title\par}272 \@bottomtitlebar273 \if@submission274 \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}275 Anonymous Author(s) \\276 Affiliation \\277 Address \\278 \texttt{email} \\279 \end{tabular}%280 \else281 \def\And{%282 \end{tabular}\hfil\linebreak[0]\hfil%283 \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces%284 }285 \def\AND{%286 \end{tabular}\hfil\linebreak[4]\hfil%287 \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces%288 }289 \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\@author\end{tabular}%290 \fi291 \vskip 0.3in \@minus 0.1in292 }293}294 295% add conference notice to bottom of first page296\newcommand{\ftype@noticebox}{8}297\newcommand{\@notice}{%298 % give a bit of extra room back to authors on first page299 \enlargethispage{2\baselineskip}%300 \@float{noticebox}[b]%301 \footnotesize\@noticestring%302 \end@float%303}304 305% abstract styling306\renewenvironment{abstract}%307{%308 \vskip 0.075in%309 \centerline%310 {\large\bf Abstract}%311 \vspace{0.5ex}%312 \begin{quote}%313}314{315 \par%316 \end{quote}%317 \vskip 1ex%318}319 320% For the paper checklist321\newcommand{\answerYes}[1][]{\textcolor{blue}{[Yes] #1}}322\newcommand{\answerNo}[1][]{\textcolor{orange}{[No] #1}}323\newcommand{\answerNA}[1][]{\textcolor{gray}{[NA] #1}}324\newcommand{\answerTODO}[1][]{\textcolor{red}{\bf [TODO]}}325\newcommand{\justificationTODO}[1][]{\textcolor{red}{\bf [TODO]}}326 327% handle tweaks for camera-ready copy vs. submission copy328\if@preprint329 \newcommand{\@noticestring}{%330 Preprint. Under review.%331 }332\else333 \if@neuripsfinal334 \newcommand{\@noticestring}{%335 \@neuripsordinal\/ Conference on Neural Information Processing Systems336 (NeurIPS \@neuripsyear).%, \@neuripslocation.%337 }338 \else339 \newcommand{\@noticestring}{%340 Submitted to \@neuripsordinal\/ Conference on Neural Information341 Processing Systems (NeurIPS \@neuripsyear). Do not distribute.%342 }343 344 % hide the acknowledgements345 \NewEnviron{hide}{}346 \let\ack\hide347 \let\endack\endhide348 349 % line numbers for submission350 \RequirePackage{lineno}351 \linenumbers352 353 % fix incompatibilities between lineno and amsmath, if required, by354 % transparently wrapping linenomath environments around amsmath355 % environments356 \AtBeginDocument{%357 \@ifpackageloaded{amsmath}{%358 \newcommand*\patchAmsMathEnvironmentForLineno[1]{%359 \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname360 \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname361 \renewenvironment{#1}%362 {\linenomath\csname old#1\endcsname}%363 {\csname oldend#1\endcsname\endlinenomath}%364 }%365 \newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%366 \patchAmsMathEnvironmentForLineno{#1}%367 \patchAmsMathEnvironmentForLineno{#1*}%368 }%369 \patchBothAmsMathEnvironmentsForLineno{equation}%370 \patchBothAmsMathEnvironmentsForLineno{align}%371 \patchBothAmsMathEnvironmentsForLineno{flalign}%372 \patchBothAmsMathEnvironmentsForLineno{alignat}%373 \patchBothAmsMathEnvironmentsForLineno{gather}%374 \patchBothAmsMathEnvironmentsForLineno{multline}%375 }376 {}377 }378 \fi379\fi380 381 382\endinput383