forked from noise-lab/paper-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
confpaper.cls
343 lines (296 loc) · 8.67 KB
/
confpaper.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{confpaper}[2014/6/17 conference paper latex class]
%%% Opitons
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}}
%%% Process given options
\ProcessOptions\relax
%%%
%%% Load base
%%%
\LoadClass[pdftex,letterpaper]{extarticle}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Custom variables to be set appropriately.
%%%
\newcommand{\AUTHORS}{Authors}
\newcommand{\TITLE}{Title}
\newcommand{\KEYWORDS}{Keywords}
\newcommand{\CONFERENCE}{Conference}
\newcommand{\PAGENUMBERS}{yes} % "yes" or "no"
\newcommand{\COLOR}{yes}
\newcommand{\showComments}{yes}
\newcommand{\comment}[1]{}
\newcommand{\onlyAbstract}{no}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% ACM Fonts.
%%%
\newfont{\secfnt}{ptmb8t at 12pt}
\newfont{\secit}{ptmbi8t at 12pt} %13 Jan 00 gkmt
\newfont{\subsecfnt}{ptmri8t at 11pt}
\newfont{\subsecit}{ptmbi8t at 11pt} %
\newfont{\ttlfnt}{phvb8t at 18pt}
\newfont{\ttlit}{phvbo8t at 18pt} % GM 2/4/2000
\newfont{\subttlfnt}{phvr8t at 14pt}
\newfont{\subttlit}{phvro8t at 14pt} % GM 2/4/2000
\newfont{\subttlbf}{phvb8t at 14pt} % 13 Jan 00 gkmt
\newfont{\aufnt}{phvr8t at 12pt}
\newfont{\auit}{phvro8t at 12pt} % GM 2/4/2000
\newfont{\affaddr}{phvr8t at 10pt}
\newfont{\affaddrit}{phvro8t at 10pt} % GM 2/4/2000
\newfont{\eaddfnt}{phvr8t at 12pt}
\newfont{\ixpt}{ptmr8t at 9pt}
\newfont{\confname}{ptmri8t at 8pt}
\newfont{\crnotice}{ptmr8t at 8pt}
\newfont{\ninept}{ptmr8t at 9pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% IEEE Formatting - Uncomment to get IEEE-Style Section headings
%%%
%
% \renewcommand{\thesection}{\Roman{section}}
% \renewcommand{\thesubsection}{\thesection.\Alph{subsection}}
%
% \titleformat{\section}% % IEEE/ACM: caps + period
% {\centering\sc}{\roman{section}.\quad}{0pt}{}
%
% \titleformat{\subsection}% % IEEE/ACM: caps + period
% {\flushleft\it}{\Alph{subsection}.\quad}{0pt}{}
%
% \titleformat{\subsubsection}% % IEEE/ACM: caps + period
% {\flushleft\it}{\Alph{subsection}.\arabic{subsubsection}.\quad}{0pt}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Page Setup
%%%
\RequirePackage{balance}
\RequirePackage{tabulary}
\RequirePackage{url}
\RequirePackage{ifthen}
\special{papersize=8.5in,11in}
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\ifthenelse{\equal{\PAGENUMBERS}{yes}}{%
\RequirePackage[nohead,
% SIGCOMM/ACM
left=0.75in,right=0.75in,top=0.75in, bottom=1in,
columnsep=0.33in
% USENIX
% left=1.0in,right=1.0in,top=1.0in,
% footskip=0.5in,bottom=1.0in, % Room for page numbers
% columnsep=0.25in
% IEEE
% left=0.75in,right=0.75in,top=0.75in, bottom=1in,
% columnsep=0.2in
% Custom
% left=1.5in,right=1.5in,top=1.0in,
% footskip=0.5in,bottom=1.0in, % Room for page numbers
% columnsep=0.25in
]{geometry}
}{%
\RequirePackage[noheadfoot,left=0.75in,right=0.75in,top=0.75in,
footskip=0.5in,bottom=1in,
columnsep=0.33in
]{geometry}
}
%%%
%%% Renew "itemize" environment
%%%
\renewenvironment{itemize}
{\begin{list}{$\bullet$}{
\setlength{\labelsep}{4pt}
\setlength{\labelwidth}{3pt}
\setlength{\rightmargin}{0pt}
\setlength{\leftmargin}{0pt}
\addtolength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
}}{\end{list}}
%%%
%%% Captions
%%%
%\RequirePackage[font=bf]{caption}
\RequirePackage[font=small,format=plain,labelfont=bf,textfont=it]{caption}
\RequirePackage{subcaption}
%% Space between figure and caption (assuming caption
%% is below figure)
%\RequirePackage[font=bf,aboveskip=0pt]{caption} % SPACE
%% Space between caption and body text of document
\addtolength{\textfloatsep}{-7pt} % SPACE
%%%
%%% Section headings
%%%
%\RequirePackage{titlesec}
%\titlespacing{\paragraph}{0pt}{*1}{*1} % SPACE
\RequirePackage[compact]{titlesec} % SPACE
%\titleformat{\section}% % IEEE/ACM: caps + period
% {\bf\large\uppercase}{\thesection.\quad}{0pt}{}
\titleformat{\section}{\bf\large}{\thesection}{8pt}{} % USENIX
%%%
%%% Lists
%%%
\RequirePackage{paralist}
\RequirePackage{enumitem}
\setlist{itemsep=0pt,parsep=0pt} % more compact lists
\renewcommand{\paragraph}[1]{\vspace*{0.03in}\noindent{\bf #1}}
%%%
%%% Custom Environments
%%%
\RequirePackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
%%%
%%% Header / Footer
%%%
\RequirePackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\ifthenelse{\equal{\PAGENUMBERS}{yes}}{%
\pagestyle{plain}
}{%
\pagestyle{empty}
}
%%%
%%% Bibliography
%%%
%\RequirePackage[numbers]{natbib}
\RequirePackage{cite}
%%%
%%% Footnotes / Endnotes
%%%
\interfootnotelinepenalty=10000 % Split footnotes are annoying
%% If you want endnodes, uncomment:
%\RequirePackage{endnotes}
%\RequirePackage{drafthead}
%\let\footnote=\endnote
%%%
%%% Tables
%%%
\RequirePackage{booktabs}
\RequirePackage{color}
\RequirePackage{colortbl}
\RequirePackage{float} % Must appear before hyperref to
% avoid weird PDF compile issues
%%%
%%% Fonts
%%%
\RequirePackage{mathptmx} % Times/Times-like math symbols
\RequirePackage{courier}
\RequirePackage[scaled=0.92]{helvet}
%%%
%%% PDF setup
%%%
\RequirePackage[breaklinks=true,pagebackref,filecolor=black,citecolor=blue,urlcolor=black,linkcolor=blue,colorlinks,pdfpagelabels,pdfpagelayout=SinglePage]{hyperref}
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{
\ifcase #1 %
(Not cited.) %
\or
{\small (Cited on page~#2.)}%
\else
{\small (Cited on pages~#2.)}%
\fi
}
\renewcommand*{\backrefsep}{, }
\renewcommand*{\backreftwosep}{ and~}
\renewcommand*{\backreflastsep}{ and~}
\hypersetup{%
pdfauthor = {\AUTHORS},
pdfsubject = {\CONFERENCE},
pdfkeywords = {\KEYWORDS},
bookmarksopen = {true}
}
%%
%% Figure placeholder macros
%%
\definecolor{placeholderbg}{rgb}{0.85,0.85,0.85}
\newcommand{\placeholder}[1]{%
\fcolorbox{black}{placeholderbg}{\parbox[top][1.5in][c]{0.95\columnwidth}{#1}}}
%%%
%%% Misc
%%%
\RequirePackage[pdftex]{graphicx}
\RequirePackage{soul}
\RequirePackage{subcaption}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{listings}
\RequirePackage{tikz}
\usetikzlibrary{arrows}
%\setlength{\parindent}{0pt}
%\setlength{\parskip}{\baselineskip}
\clubpenalty=10000 % Don't allow orphans
\widowpenalty=10000 % Don't allow widows
%%%
%%% To appear/appeared in text on title page
%%%
\RequirePackage[absolute]{textpos}
\newcommand{\ToAppear}{%
\begin{textblock*}{\textwidth}(0.95in,0.4in)
\begin{flushright}
%\noindent{\fbox{\textsf{Under submission---please do not redistribute.}}}
% --OR--
\noindent{\small To appear in \textit{Proceedings of the XYZ}\\
\noindent{\small \textit{Conference (XYZ'08)}, City, State, Month 2008}}
% --OR--
%\noindent{\small In \textit{Proceedings of the XYZ}\\
%\noindent{\small \textit{Conference (XYZ'08)}, City, State, Month 2008}}
\end{flushright}
\end{textblock*}
}
%%%
%%% Sample ACM Copyright Block
%%%
\floatstyle{plain}
\newfloat{acmcr}{b}{acmcr}
\newcommand{\AcmCopyright}{%
\begin{acmcr}
\parbox[b]{20pc}{%
\footnotesize
Permission to make digital or hard copies of all or part of this work
for personal or classroom use is granted without fee provided that
copies are not made or distributed for profit or commercial advantage
and that copies bear this notice and the full citation on the first
page. To copy otherwise, to republish, to post on servers or to
redistribute to lists, requires prior specific permission and/or a fee.
{\em Conference}, Month Date--Date, Year, Location\\
Copyright 200X ACM X-XXXXX-XX-X/XX/XX ...\$5.00}
\end{acmcr}}
%%%
%%% Comments
%%%
\newcommand{\note}[2]{
\ifthenelse{\equal{\showComments}{yes}}{\textcolor{#1}{#2}}{}
}
\newcommand{\xxx}[1]{\note{red}{#1}}
\newcommand{\todo}[1]{\note{red}{\bf #1}}
%%%
%%% Abbreviations
%%%
\newcommand{\ie}{{\em i.e.}}
\newcommand{\eg}{{\em e.g.}}
\newcommand{\ea}{{\em et al.}}
\newcommand{\fp}{\vspace*{0.05in}\noindent}
\newcommand{\name}{NAME\xspace}
%%%
%%% Theorems
%%%
\newtheoremstyle{tighter}
{3pt} % Space above
{3pt} % Space below
{\em} % Body font
{} % Indentation
{\bfseries} % Head font
{:} % Head punctuation
{.5em} % Head space
{} % Custom head spec
\theoremstyle{tighter}
\newtheorem{lesson}{Lesson}
\newtheorem{constraint}{Constraint}
%\newcommand{\lesson}[1]{\vspace{1em}{\centering\fbox{\parbox{0.95\columnwidth}{\centering\bf Lesson: #1}}}\vspace{1em}}
% This needs to be the last thing before \begin{document}
\RequirePackage{microtype} % SPACE
%%%
%%% Additional Packages
%%%
\usepackage{multirow}
\usepackage{xspace}
\endinput