|
| 1 | +% partial rewrite of the LaTeX2e package for submissions to the |
| 2 | +% Conference on Neural Information Processing Systems (NIPS): |
| 3 | +% |
| 4 | +% - uses more LaTeX conventions |
| 5 | +% - line numbers at submission time replaced with aligned numbers from |
| 6 | +% lineno package |
| 7 | +% - \nipsfinalcopy replaced with [final] package option |
| 8 | +% - automatically loads times package for authors |
| 9 | +% - loads natbib automatically; this can be suppressed with the |
| 10 | +% [nonatbib] package option |
| 11 | +% - adds foot line to first page identifying the conference |
| 12 | +% |
| 13 | +% Roman Garnett (garnett@wustl.edu) and the many authors of |
| 14 | +% nips15submit_e.sty, including MK and drstrip@sandia |
| 15 | +% |
| 16 | +% last revision: March 2017 |
| 17 | + |
| 18 | +\NeedsTeXFormat{LaTeX2e} |
| 19 | +\ProvidesPackage{nips_2017}[2017/03/20 NIPS 2017 submission/camera-ready style file] |
| 20 | + |
| 21 | +% declare final option, which creates camera-ready copy |
| 22 | +\newif\if@nipsfinal\@nipsfinalfalse |
| 23 | +\DeclareOption{final}{ |
| 24 | + \@nipsfinaltrue |
| 25 | +} |
| 26 | + |
| 27 | +% declare nonatbib option, which does not load natbib in case of |
| 28 | +% package clash (users can pass options to natbib via |
| 29 | +% \PassOptionsToPackage) |
| 30 | +\newif\if@natbib\@natbibtrue |
| 31 | +\DeclareOption{nonatbib}{ |
| 32 | + \@natbibfalse |
| 33 | +} |
| 34 | + |
| 35 | +\ProcessOptions\relax |
| 36 | + |
| 37 | +% fonts |
| 38 | +\renewcommand{\rmdefault}{ptm} |
| 39 | +\renewcommand{\sfdefault}{phv} |
| 40 | + |
| 41 | +% change this every year for notice string at bottom |
| 42 | +\newcommand{\@nipsordinal}{31st} |
| 43 | +\newcommand{\@nipsyear}{2017} |
| 44 | +\newcommand{\@nipslocation}{Long Beach, CA, USA} |
| 45 | + |
| 46 | +% handle tweaks for camera-ready copy vs. submission copy |
| 47 | +\if@nipsfinal |
| 48 | + \newcommand{\@noticestring}{% |
| 49 | + \@nipsordinal\/ Conference on Neural Information Processing Systems |
| 50 | + (NIPS \@nipsyear), \@nipslocation.% |
| 51 | + } |
| 52 | +\else |
| 53 | + \newcommand{\@noticestring}{% |
| 54 | + Submitted to \@nipsordinal\/ Conference on Neural Information |
| 55 | + Processing Systems (NIPS \@nipsyear). Do not distribute.% |
| 56 | + } |
| 57 | + |
| 58 | + % line numbers for submission |
| 59 | + \RequirePackage{lineno} |
| 60 | + \linenumbers |
| 61 | + |
| 62 | + % fix incompatibilities between lineno and amsmath, if required, by |
| 63 | + % transparently wrapping linenomath environments around amsmath |
| 64 | + % environments |
| 65 | + \AtBeginDocument{% |
| 66 | + \@ifpackageloaded{amsmath}{% |
| 67 | + \newcommand*\patchAmsMathEnvironmentForLineno[1]{% |
| 68 | + \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname |
| 69 | + \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname |
| 70 | + \renewenvironment{#1}% |
| 71 | + {\linenomath\csname old#1\endcsname}% |
| 72 | + {\csname oldend#1\endcsname\endlinenomath}% |
| 73 | + }% |
| 74 | + \newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{% |
| 75 | + \patchAmsMathEnvironmentForLineno{#1}% |
| 76 | + \patchAmsMathEnvironmentForLineno{#1*}% |
| 77 | + }% |
| 78 | + \patchBothAmsMathEnvironmentsForLineno{equation}% |
| 79 | + \patchBothAmsMathEnvironmentsForLineno{align}% |
| 80 | + \patchBothAmsMathEnvironmentsForLineno{flalign}% |
| 81 | + \patchBothAmsMathEnvironmentsForLineno{alignat}% |
| 82 | + \patchBothAmsMathEnvironmentsForLineno{gather}% |
| 83 | + \patchBothAmsMathEnvironmentsForLineno{multline}% |
| 84 | + }{} |
| 85 | + } |
| 86 | +\fi |
| 87 | + |
| 88 | +% load natbib unless told otherwise |
| 89 | +\if@natbib |
| 90 | + \RequirePackage{natbib} |
| 91 | +\fi |
| 92 | + |
| 93 | +% set page geometry |
| 94 | +\usepackage[verbose=true,letterpaper]{geometry} |
| 95 | +\AtBeginDocument{ |
| 96 | + \newgeometry{ |
| 97 | + textheight=9in, |
| 98 | + textwidth=5.5in, |
| 99 | + top=1in, |
| 100 | + headheight=12pt, |
| 101 | + headsep=25pt, |
| 102 | + footskip=30pt |
| 103 | + } |
| 104 | + \@ifpackageloaded{fullpage} |
| 105 | + {\PackageWarning{nips_2016}{fullpage package not allowed! Overwriting formatting.}} |
| 106 | + {} |
| 107 | +} |
| 108 | + |
| 109 | +\widowpenalty=10000 |
| 110 | +\clubpenalty=10000 |
| 111 | +\flushbottom |
| 112 | +\sloppy |
| 113 | + |
| 114 | +% font sizes with reduced leading |
| 115 | +\renewcommand{\normalsize}{% |
| 116 | + \@setfontsize\normalsize\@xpt\@xipt |
| 117 | + \abovedisplayskip 7\p@ \@plus 2\p@ \@minus 5\p@ |
| 118 | + \abovedisplayshortskip \z@ \@plus 3\p@ |
| 119 | + \belowdisplayskip \abovedisplayskip |
| 120 | + \belowdisplayshortskip 4\p@ \@plus 3\p@ \@minus 3\p@ |
| 121 | +} |
| 122 | +\normalsize |
| 123 | +\renewcommand{\small}{% |
| 124 | + \@setfontsize\small\@ixpt\@xpt |
| 125 | + \abovedisplayskip 6\p@ \@plus 1.5\p@ \@minus 4\p@ |
| 126 | + \abovedisplayshortskip \z@ \@plus 2\p@ |
| 127 | + \belowdisplayskip \abovedisplayskip |
| 128 | + \belowdisplayshortskip 3\p@ \@plus 2\p@ \@minus 2\p@ |
| 129 | +} |
| 130 | +\renewcommand{\footnotesize}{\@setfontsize\footnotesize\@ixpt\@xpt} |
| 131 | +\renewcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt} |
| 132 | +\renewcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt} |
| 133 | +\renewcommand{\large}{\@setfontsize\large\@xiipt{14}} |
| 134 | +\renewcommand{\Large}{\@setfontsize\Large\@xivpt{16}} |
| 135 | +\renewcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{20}} |
| 136 | +\renewcommand{\huge}{\@setfontsize\huge\@xxpt{23}} |
| 137 | +\renewcommand{\Huge}{\@setfontsize\Huge\@xxvpt{28}} |
| 138 | + |
| 139 | +% sections with less space |
| 140 | +\providecommand{\section}{} |
| 141 | +\renewcommand{\section}{% |
| 142 | + \@startsection{section}{1}{\z@}% |
| 143 | + {-2.0ex \@plus -0.5ex \@minus -0.2ex}% |
| 144 | + { 1.5ex \@plus 0.3ex \@minus 0.2ex}% |
| 145 | + {\large\bf\raggedright}% |
| 146 | +} |
| 147 | +\providecommand{\subsection}{} |
| 148 | +\renewcommand{\subsection}{% |
| 149 | + \@startsection{subsection}{2}{\z@}% |
| 150 | + {-1.8ex \@plus -0.5ex \@minus -0.2ex}% |
| 151 | + { 0.8ex \@plus 0.2ex}% |
| 152 | + {\normalsize\bf\raggedright}% |
| 153 | +} |
| 154 | +\providecommand{\subsubsection}{} |
| 155 | +\renewcommand{\subsubsection}{% |
| 156 | + \@startsection{subsubsection}{3}{\z@}% |
| 157 | + {-1.5ex \@plus -0.5ex \@minus -0.2ex}% |
| 158 | + { 0.5ex \@plus 0.2ex}% |
| 159 | + {\normalsize\bf\raggedright}% |
| 160 | +} |
| 161 | +\providecommand{\paragraph}{} |
| 162 | +\renewcommand{\paragraph}{% |
| 163 | + \@startsection{paragraph}{4}{\z@}% |
| 164 | + {1.5ex \@plus 0.5ex \@minus 0.2ex}% |
| 165 | + {-1em}% |
| 166 | + {\normalsize\bf}% |
| 167 | +} |
| 168 | +\providecommand{\subparagraph}{} |
| 169 | +\renewcommand{\subparagraph}{% |
| 170 | + \@startsection{subparagraph}{5}{\z@}% |
| 171 | + {1.5ex \@plus 0.5ex \@minus 0.2ex}% |
| 172 | + {-1em}% |
| 173 | + {\normalsize\bf}% |
| 174 | +} |
| 175 | +\providecommand{\subsubsubsection}{} |
| 176 | +\renewcommand{\subsubsubsection}{% |
| 177 | + \vskip5pt{\noindent\normalsize\rm\raggedright}% |
| 178 | +} |
| 179 | + |
| 180 | +% float placement |
| 181 | +\renewcommand{\topfraction }{0.85} |
| 182 | +\renewcommand{\bottomfraction }{0.4} |
| 183 | +\renewcommand{\textfraction }{0.1} |
| 184 | +\renewcommand{\floatpagefraction}{0.7} |
| 185 | + |
| 186 | +\newlength{\@nipsabovecaptionskip}\setlength{\@nipsabovecaptionskip}{7\p@} |
| 187 | +\newlength{\@nipsbelowcaptionskip}\setlength{\@nipsbelowcaptionskip}{\z@} |
| 188 | + |
| 189 | +\setlength{\abovecaptionskip}{\@nipsabovecaptionskip} |
| 190 | +\setlength{\belowcaptionskip}{\@nipsbelowcaptionskip} |
| 191 | + |
| 192 | +% swap above/belowcaptionskip lengths for tables |
| 193 | +\renewenvironment{table} |
| 194 | + {\setlength{\abovecaptionskip}{\@nipsbelowcaptionskip}% |
| 195 | + \setlength{\belowcaptionskip}{\@nipsabovecaptionskip}% |
| 196 | + \@float{table}} |
| 197 | + {\end@float} |
| 198 | + |
| 199 | +% footnote formatting |
| 200 | +\setlength{\footnotesep }{6.65\p@} |
| 201 | +\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@} |
| 202 | +\renewcommand{\footnoterule}{\kern-3\p@ \hrule width 12pc \kern 2.6\p@} |
| 203 | +\setcounter{footnote}{0} |
| 204 | + |
| 205 | +% paragraph formatting |
| 206 | +\setlength{\parindent}{\z@} |
| 207 | +\setlength{\parskip }{5.5\p@} |
| 208 | + |
| 209 | +% list formatting |
| 210 | +\setlength{\topsep }{4\p@ \@plus 1\p@ \@minus 2\p@} |
| 211 | +\setlength{\partopsep }{1\p@ \@plus 0.5\p@ \@minus 0.5\p@} |
| 212 | +\setlength{\itemsep }{2\p@ \@plus 1\p@ \@minus 0.5\p@} |
| 213 | +\setlength{\parsep }{2\p@ \@plus 1\p@ \@minus 0.5\p@} |
| 214 | +\setlength{\leftmargin }{3pc} |
| 215 | +\setlength{\leftmargini }{\leftmargin} |
| 216 | +\setlength{\leftmarginii }{2em} |
| 217 | +\setlength{\leftmarginiii}{1.5em} |
| 218 | +\setlength{\leftmarginiv }{1.0em} |
| 219 | +\setlength{\leftmarginv }{0.5em} |
| 220 | +\def\@listi {\leftmargin\leftmargini} |
| 221 | +\def\@listii {\leftmargin\leftmarginii |
| 222 | + \labelwidth\leftmarginii |
| 223 | + \advance\labelwidth-\labelsep |
| 224 | + \topsep 2\p@ \@plus 1\p@ \@minus 0.5\p@ |
| 225 | + \parsep 1\p@ \@plus 0.5\p@ \@minus 0.5\p@ |
| 226 | + \itemsep \parsep} |
| 227 | +\def\@listiii{\leftmargin\leftmarginiii |
| 228 | + \labelwidth\leftmarginiii |
| 229 | + \advance\labelwidth-\labelsep |
| 230 | + \topsep 1\p@ \@plus 0.5\p@ \@minus 0.5\p@ |
| 231 | + \parsep \z@ |
| 232 | + \partopsep 0.5\p@ \@plus 0\p@ \@minus 0.5\p@ |
| 233 | + \itemsep \topsep} |
| 234 | +\def\@listiv {\leftmargin\leftmarginiv |
| 235 | + \labelwidth\leftmarginiv |
| 236 | + \advance\labelwidth-\labelsep} |
| 237 | +\def\@listv {\leftmargin\leftmarginv |
| 238 | + \labelwidth\leftmarginv |
| 239 | + \advance\labelwidth-\labelsep} |
| 240 | +\def\@listvi {\leftmargin\leftmarginvi |
| 241 | + \labelwidth\leftmarginvi |
| 242 | + \advance\labelwidth-\labelsep} |
| 243 | + |
| 244 | +% create title |
| 245 | +\providecommand{\maketitle}{} |
| 246 | +\renewcommand{\maketitle}{% |
| 247 | + \par |
| 248 | + \begingroup |
| 249 | + \renewcommand{\thefootnote}{\fnsymbol{footnote}} |
| 250 | + % for perfect author name centering |
| 251 | + \renewcommand{\@makefnmark}{\hbox to \z@{$^{\@thefnmark}$\hss}} |
| 252 | + % The footnote-mark was overlapping the footnote-text, |
| 253 | + % added the following to fix this problem (MK) |
| 254 | + \long\def\@makefntext##1{% |
| 255 | + \parindent 1em\noindent |
| 256 | + \hbox to 1.8em{\hss $\m@th ^{\@thefnmark}$}##1 |
| 257 | + } |
| 258 | + \thispagestyle{empty} |
| 259 | + \@maketitle |
| 260 | + \@thanks |
| 261 | + \@notice |
| 262 | + \endgroup |
| 263 | + \let\maketitle\relax |
| 264 | + \let\thanks\relax |
| 265 | +} |
| 266 | + |
| 267 | +% rules for title box at top of first page |
| 268 | +\newcommand{\@toptitlebar}{ |
| 269 | + \hrule height 4\p@ |
| 270 | + \vskip 0.25in |
| 271 | + \vskip -\parskip% |
| 272 | +} |
| 273 | +\newcommand{\@bottomtitlebar}{ |
| 274 | + \vskip 0.29in |
| 275 | + \vskip -\parskip |
| 276 | + \hrule height 1\p@ |
| 277 | + \vskip 0.09in% |
| 278 | +} |
| 279 | + |
| 280 | +% create title (includes both anonymized and non-anonymized versions) |
| 281 | +\providecommand{\@maketitle}{} |
| 282 | +\renewcommand{\@maketitle}{% |
| 283 | + \vbox{% |
| 284 | + \hsize\textwidth |
| 285 | + \linewidth\hsize |
| 286 | + \vskip 0.1in |
| 287 | + \@toptitlebar |
| 288 | + \centering |
| 289 | + {\LARGE\bf \@title\par} |
| 290 | + \@bottomtitlebar |
| 291 | + \if@nipsfinal |
| 292 | + \def\And{% |
| 293 | + \end{tabular}\hfil\linebreak[0]\hfil% |
| 294 | + \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces% |
| 295 | + } |
| 296 | + \def\AND{% |
| 297 | + \end{tabular}\hfil\linebreak[4]\hfil% |
| 298 | + \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces% |
| 299 | + } |
| 300 | + \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\@author\end{tabular}% |
| 301 | + \else |
| 302 | + \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@} |
| 303 | + Anonymous Author(s) \\ |
| 304 | + Affiliation \\ |
| 305 | + Address \\ |
| 306 | + \texttt{email} \\ |
| 307 | + \end{tabular}% |
| 308 | + \fi |
| 309 | + \vskip 0.3in \@minus 0.1in |
| 310 | + } |
| 311 | +} |
| 312 | + |
| 313 | +% add conference notice to bottom of first page |
| 314 | +\newcommand{\ftype@noticebox}{8} |
| 315 | +\newcommand{\@notice}{% |
| 316 | + % give a bit of extra room back to authors on first page |
| 317 | + \enlargethispage{2\baselineskip}% |
| 318 | + \@float{noticebox}[b]% |
| 319 | + \footnotesize\@noticestring% |
| 320 | + \end@float% |
| 321 | +} |
| 322 | + |
| 323 | +% abstract styling |
| 324 | +\renewenvironment{abstract}% |
| 325 | +{% |
| 326 | + \vskip 0.075in% |
| 327 | + \centerline% |
| 328 | + {\large\bf Abstract}% |
| 329 | + \vspace{0.5ex}% |
| 330 | + \begin{quote}% |
| 331 | +} |
| 332 | +{ |
| 333 | + \par% |
| 334 | + \end{quote}% |
| 335 | + \vskip 1ex% |
| 336 | +} |
| 337 | + |
| 338 | +\endinput |
| 339 | + |
0 commit comments