source: docs/Working/re/jpaper.cls @ 3649

Last change on this file since 3649 was 3624, checked in by cameron, 6 years ago

Formats for PACT

File size: 6.8 KB
Line 
1\NeedsTeXFormat{LaTeX2e}
2\ProvidesClass{jpaper}[2014/01/20 PACT Submission template]
3
4% jpaper provides two modes:
5% In addition to the usual options leqno and fleqn, jpaper also provides the
6% following additional flags (each of which can be turned on by specifying the
7% flag as an option, or turned off by specifying "no"flag as an option):
8% * lineno: Enables line numbering. This may be useful while editing.
9% * pageno: Enables page numbering. This is useful for anything that is not
10% * hyperref: Enables the hyperref package. While the hyperref package is
11%   normally convenient for your readers, IEEE PDF-eXpress does not allow it.
12%
13% The default set of options is camera,nolineno,nopageno,nohyperref.
14
15\RequirePackage{etoolbox}
16
17\DeclareOption{leqno}{\input{leqno.clo}}
18\DeclareOption{fleqn}{\input{fleqn.clo}}
19\newtoggle{jp@lineno}
20\newtoggle{jp@pageno}
21\newtoggle{jp@hyperref}
22\DeclareOption{lineno}{\toggletrue{jp@lineno}}
23\DeclareOption{nolineno}{\togglefalse{jp@lineno}}
24\DeclareOption{pageno}{\toggletrue{jp@pageno}}
25\DeclareOption{nopageno}{\togglefalse{jp@pageno}}
26\DeclareOption{hyperref}{\toggletrue{jp@hyperref}}
27\DeclareOption{nohyperref}{\togglefalse{jp@hyperref}}
28\ExecuteOptions{nolineno,pageno,hyperref}
29\ProcessOptions
30
31% Load the underlying article class.
32\LoadClass[letterpaper,10pt,twocolumn]{article}
33
34
35% Standard packages.
36\RequirePackage[utf8]{inputenc}
37\RequirePackage[T1]{fontenc}
38\RequirePackage{verbatim}
39\RequirePackage{fixltx2e}
40\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
41
42% Basic text typesetting options.
43\RequirePackage{mathptmx}
44\RequirePackage[scaled=0.833]{helvet}
45\RequirePackage[scaled=0.875]{couriers}
46\setlength{\parindent}{1em}
47\RequirePackage{setspace}
48\newcommand{\normalspacing}{}
49\RequirePackage{microtype}
50
51% High penalty for widows and orphans
52\widowpenalty=300 \clubpenalty=300
53
54% Page margins:
55% 3/4" left and right, 1" top, 1 1/8" bottom.
56\RequirePackage{geometry}
57\geometry{lmargin=0.75in,rmargin=0.75in,tmargin=1in,bmargin=1in}
58
59% 1/4" space between columns.
60\setlength{\columnsep}{0.25in}
61
62% Title formatting.
63\RequirePackage{titling}
64\setlength{\droptitle}{-3.5em}
65
66\pretitle{\begin{center}\vspace{-.5in}
67PACT Submission \#\pactsubmissionnumber -- Confidential Draft -- Do Not Distribute!!\\
68\vspace{.35in}
69\normalfont\Large\bfseries}
70\posttitle{\par\end{center}}
71\preauthor{\begin{center}\normalfont\large%
72    \begin{tabular}[t]{c}}
73\postauthor{\end{tabular}\par\end{center}}
74\predate{}
75\postdate{}
76
77
78% The abstract should be normally sized and italicized. Abstract leading
79% should, in general, follow the normal leading.
80\RequirePackage{abstract}
81\newcommand{\abstractspacing}{\normalspacing}
82\renewcommand{\abstractnamefont}{\normalfont\large\bfseries}
83\renewcommand{\abstracttextfont}{\normalfont\itshape\abstractspacing}
84\setlength{\absleftindent}{0in}
85\setlength{\absrightindent}{0in}
86\setlength{\abstitleskip}{-1.5em}
87
88% Compress vertical space around section and subsection headings. Make
89% subsubsection headings run-in (i.e. part of the following paragraph).
90\RequirePackage[compact]{titlesec}
91\titleformat{\section}[hang]{\normalfont\large\bfseries}{\thesection. }%
92  {0pt}{}{}
93\titleformat{\subsection}[hang]{\normalfont\bfseries}{\thesubsection. }%
94  {0pt}{}{}
95\titleformat{\subsubsection}[runin]{\normalfont\bfseries}{\thesubsubsection. }%
96  {0pt}{}{}
97\newlength{\sectionspace}
98\setlength{\sectionspace}{1.5ex plus 0.25ex}
99\titlespacing*{\section}{0pt}{\sectionspace}{\sectionspace}
100\titlespacing*{\subsection}{0pt}{\sectionspace}{\sectionspace}
101\titlespacing*{\subsubsection}{0pt}{\parskip}{0.25em plus 0.1em minus 0.05em}
102
103% Compress itemize and enumerate environments.
104\RequirePackage{enumerate}
105\RequirePackage{enumitem}
106\setlist{noitemsep, leftmargin=*, topsep=0pt, partopsep=0pt}
107
108% Bibliography formatting.
109\newcommand{\bibspacing}{\setstretch{0}}
110\let\jp@bibliography\thebibliography
111\renewcommand{\thebibliography}[1]{%
112  \jp@bibliography{#1}%
113  \setlength{\itemsep}{-0.25em} \footnotesize \bibspacing%
114  \vspace{-0.25em}}
115% This is IEEEtran's bibliography formatting control macro.
116\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
117\def\@bstctlcite[#1]#2{\@bsphack
118  \@for\@citeb:=#2\do{%
119    \edef\@citeb{\expandafter\@firstofone\@citeb}%
120    \if@filesw\immediate\write\csname #1\endcsname%
121      {\string\citation{\@citeb}}\fi}%
122  \@esphack}
123
124% Settings for figures and tables. Figure captions are placed below the figure,
125% while table captions are placed above the table. All captions are sans-serif.
126\RequirePackage[font={normalsize,sf,bf}]{caption}
127\RequirePackage[position=bottom]{subfig}
128\captionsetup[table]{aboveskip=0.5em, belowskip=0.5em}
129\captionsetup[figure]{aboveskip=0.5em, belowskip=0em}
130\captionsetup[subfloat]{font={small,sf}}
131\setcounter{topnumber}{2}
132\setcounter{dbltopnumber}{2}
133\setcounter{bottomnumber}{2}
134\setcounter{totalnumber}{4}
135\renewcommand{\topfraction}{0.85}
136\renewcommand{\dbltopfraction}{0.9}
137\renewcommand{\bottomfraction}{0.85}
138\renewcommand{\textfraction}{0.07}
139\renewcommand{\floatpagefraction}{0.85}
140\renewcommand{\dblfloatpagefraction}{0.85}
141
142\setlength{\floatsep}{0.5em plus 0.2em minus 0.2em}
143\setlength{\dblfloatsep}{0.5em plus 0.2em minus 0.2em}
144\setlength{\textfloatsep}{0.5em plus 0.2em minus 0.2em}
145\setlength{\dbltextfloatsep}{0.5em plus 0.2em minus 0.2em}
146
147% Utility packages for floats and tables.
148\RequirePackage{float}
149\RequirePackage{graphicx}
150\RequirePackage{booktabs}
151\RequirePackage{multirow}
152
153% Page numbering.
154\iftoggle{jp@pageno}{%
155  \pagestyle{plain}
156  \newcommand{\jp@mt@pageno}{}}{%
157  \pagestyle{empty}
158  \newcommand{\jp@mt@pageno}{\thispagestyle{empty}}}
159
160% Line numbering.
161\iftoggle{jp@lineno}{%
162  \RequirePackage{lineno}
163  \renewcommand{\linenumberfont}{\normalfont\tt\small}
164  \newcommand{\jp@mt@lineno}{\linenumbers}
165}{%
166  \newcommand{\jp@mt@lineno}{}
167}
168
169% Replace maketitle to invoke settings for leading, page numbering, and line
170% numbering.
171\let\jp@maketitle\maketitle
172\renewcommand{\maketitle}{%
173  \jp@maketitle%
174  \jp@mt@pageno%
175  \jp@mt@lineno%
176  \normalspacing}
177
178% Footnotes may not span pages.
179\interfootnotelinepenalty=10000
180
181% Formatting for margin notes (which you may find useful during editing).
182\let\jp@marginpar\marginpar
183\renewcommand\marginpar[1]{\jp@marginpar%
184  [\raggedleft\singlespacing\footnotesize\color{red} #1]%
185  {\raggedright\singlespacing\footnotesize\color{red} #1}}
186
187\setlength{\marginparwidth}{0.65in}
188
189% Link and URL formatting.
190\iftoggle{jp@hyperref}{%
191  \RequirePackage{hyperref}
192  \hypersetup{%
193    unicode=true,%
194    pdfstartview={FitH},%
195    colorlinks=true,%
196    citecolor=red,%
197    %filecolor=black,%
198    %linkcolor=black,%
199    %urlcolor=black
200}}{}
201\RequirePackage{url}
202
203% Scientific units.
204\RequirePackage[squaren]{SIunits}
205
206\endinput
Note: See TracBrowser for help on using the repository browser.