-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathjpaper.cls
More file actions
207 lines (177 loc) · 6.61 KB
/
jpaper.cls
File metadata and controls
207 lines (177 loc) · 6.61 KB
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{jpaper}[ASPLOS 2023 Submission template]
% jpaper provides two modes:
% In addition to the usual options leqno and fleqn, jpaper also provides the
% following additional flags (each of which can be turned on by specifying the
% flag as an option, or turned off by specifying "no"flag as an option):
% * lineno: Enables line numbering. This may be useful while editing.
% * pageno: Enables page numbering. This is useful for anything that is not
% * hyperref: Enables the hyperref package. While the hyperref package is
% normally convenient for your readers, IEEE PDF-eXpress does not allow it.
%
% The default set of options is camera,nolineno,nopageno,nohyperref.
\RequirePackage{etoolbox}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\newtoggle{jp@lineno}
\newtoggle{jp@pageno}
\newtoggle{jp@hyperref}
\DeclareOption{lineno}{\toggletrue{jp@lineno}}
\DeclareOption{nolineno}{\togglefalse{jp@lineno}}
\DeclareOption{pageno}{\toggletrue{jp@pageno}}
\DeclareOption{nopageno}{\togglefalse{jp@pageno}}
\DeclareOption{hyperref}{\toggletrue{jp@hyperref}}
\DeclareOption{nohyperref}{\togglefalse{jp@hyperref}}
\ExecuteOptions{nolineno,pageno,hyperref}
\ProcessOptions
% Load the underlying article class.
\LoadClass[letterpaper,10pt,twocolumn]{article}
% Standard packages.
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{verbatim}
%\RequirePackage{fixltx2e}
\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
% Basic text typesetting options.
\RequirePackage{mathptmx}
\RequirePackage[scaled=0.833]{helvet}
\RequirePackage[scaled=0.875]{couriers}
\setlength{\parindent}{1em}
\RequirePackage{setspace}
\newcommand{\normalspacing}{}
\RequirePackage{microtype}
% High penalty for widows and orphans
\widowpenalty=300 \clubpenalty=300
% Page margins:
% 3/4" left and right, 1" top, 1 1/8" bottom.
\RequirePackage{geometry}
\geometry{lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in}
% 1/4" space between columns.
\setlength{\columnsep}{0.25in}
% Title formatting.
\RequirePackage{titling}
\setlength{\droptitle}{-3.5em}
\pretitle{\begin{center}\vspace{-.5in}
ASPLOS'23 Submission \#\asplossubmissionnumber -- Confidential Draft -- Do Not Distribute!!\\
\vspace{.35in}
\normalfont\Large\bfseries}
\posttitle{\par\end{center}}
\preauthor{\begin{center}\normalfont\large%
\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\par\end{center}}
\predate{}
\postdate{}
% The abstract should be normally sized and italicized. Abstract leading
% should, in general, follow the normal leading.
\RequirePackage{abstract}
\newcommand{\abstractspacing}{\normalspacing}
\renewcommand{\abstractnamefont}{\normalfont\large\bfseries}
\renewcommand{\abstracttextfont}{\normalfont\itshape\abstractspacing}
\setlength{\absleftindent}{0in}
\setlength{\absrightindent}{0in}
\setlength{\abstitleskip}{-1.5em}
% Compress vertical space around section and subsection headings. Make
% subsubsection headings run-in (i.e. part of the following paragraph).
\RequirePackage[compact]{titlesec}
\titleformat{\section}[hang]{\normalfont\large\bfseries}{\thesection. }%
{0pt}{}{}
\titleformat{\subsection}[hang]{\normalfont\bfseries}{\thesubsection. }%
{0pt}{}{}
\titleformat{\subsubsection}[runin]{\normalfont\bfseries}{\thesubsubsection. }%
{0pt}{}{}
\newlength{\sectionspace}
\setlength{\sectionspace}{1.5ex plus 0.25ex}
\titlespacing*{\section}{0pt}{\sectionspace}{\sectionspace}
\titlespacing*{\subsection}{0pt}{\sectionspace}{\sectionspace}
\titlespacing*{\subsubsection}{0pt}{\parskip}{0.25em plus 0.1em minus 0.05em}
% Compress itemize and enumerate environments.
\RequirePackage{enumerate}
\RequirePackage{enumitem}
\setlist{noitemsep, leftmargin=*, topsep=0pt, partopsep=0pt}
% Bibliography formatting.
\newcommand{\bibspacing}{\setstretch{0}}
\let\jp@bibliography\thebibliography
\renewcommand{\thebibliography}[1]{%
\jp@bibliography{#1}%
\setlength{\itemsep}{-0.25em} \footnotesize \bibspacing%
\vspace{-0.25em}}
% This is IEEEtran's bibliography formatting control macro.
\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
\def\@bstctlcite[#1]#2{\@bsphack
\@for\@citeb:=#2\do{%
\edef\@citeb{\expandafter\@firstofone\@citeb}%
\if@filesw\immediate\write\csname #1\endcsname%
{\string\citation{\@citeb}}\fi}%
\@esphack}
% Settings for figures and tables. Figure captions are placed below the figure,
% while table captions are placed above the table. All captions are sans-serif.
\RequirePackage[font={normalsize,sf,bf}]{caption}
\RequirePackage[position=bottom]{subfig}
\captionsetup[table]{aboveskip=0.5em, belowskip=0.5em}
\captionsetup[figure]{aboveskip=0.5em, belowskip=0em}
\captionsetup[subfloat]{font={small,sf}}
\setcounter{topnumber}{2}
\setcounter{dbltopnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\dbltopfraction}{0.9}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.07}
\renewcommand{\floatpagefraction}{0.85}
\renewcommand{\dblfloatpagefraction}{0.85}
\setlength{\floatsep}{0.5em plus 0.2em minus 0.2em}
\setlength{\dblfloatsep}{0.5em plus 0.2em minus 0.2em}
\setlength{\textfloatsep}{0.5em plus 0.2em minus 0.2em}
\setlength{\dbltextfloatsep}{0.5em plus 0.2em minus 0.2em}
% Utility packages for floats and tables.
\RequirePackage{float}
\RequirePackage{graphicx}
\RequirePackage{booktabs}
\RequirePackage{multirow}
% Page numbering.
\iftoggle{jp@pageno}{%
\pagestyle{plain}
\newcommand{\jp@mt@pageno}{}}{%
\pagestyle{empty}
\newcommand{\jp@mt@pageno}{\thispagestyle{empty}}}
% Line numbering.
\iftoggle{jp@lineno}{%
\RequirePackage{lineno}
\renewcommand{\linenumberfont}{\normalfont\tt\small}
\newcommand{\jp@mt@lineno}{\linenumbers}
}{%
\newcommand{\jp@mt@lineno}{}
}
% Replace maketitle to invoke settings for leading, page numbering, and line
% numbering.
\let\jp@maketitle\maketitle
\renewcommand{\maketitle}{%
\jp@maketitle%
\jp@mt@pageno%
\jp@mt@lineno%
\normalspacing}
% Footnotes may not span pages.
\interfootnotelinepenalty=10000
% Formatting for margin notes (which you may find useful during editing).
\let\jp@marginpar\marginpar
\renewcommand\marginpar[1]{\jp@marginpar%
[\raggedleft\singlespacing\footnotesize\color{red} #1]%
{\raggedright\singlespacing\footnotesize\color{red} #1}}
\setlength{\marginparwidth}{0.65in}
% Link and URL formatting.
\iftoggle{jp@hyperref}{%
\RequirePackage{hyperref}
\hypersetup{%
unicode=true,%
pdfstartview={FitH},%
colorlinks=true,%
citecolor=red,%
%filecolor=black,%
%linkcolor=black,%
%urlcolor=black
}}{}
\RequirePackage{url}
% Scientific units.
\RequirePackage[squaren]{SIunits}
\endinput