-
Notifications
You must be signed in to change notification settings - Fork 0
/
cekfaq.cls
211 lines (182 loc) · 7.26 KB
/
cekfaq.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
%% Filename : cekfaq.cls
%% Description : Caltech ERATO Kitano FAQ style
%% Author(s) : Michael Hucka <mhucka@@caltech.edu>
%% Organization: CDS, California Institute of Technology
%% Created : 2003-06-09 00:40 PDT
%% Revision : $Id$
%% $Source$
%%
%% Copyright 2003 California Institute of Technology and
%% Japan Science and Technology Corporation.
%%
%% This file is free software; you can redistribute it and/or modify it
%% under the terms of the GNU Lesser General Public License as published
%% by the Free Software Foundation; either version 2.1 of the License, or
%% any later version.
%%
%% This library is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
%% MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
%% documentation provided hereunder is on an "as is" basis, and the
%% California Institute of Technology and Japan Science and Technology
%% Corporation have no obligations to provide maintenance, support,
%% updates, enhancements or modifications. In no event shall the
%% California Institute of Technology or the Japan Science and Technology
%% Corporation be liable to any party for direct, indirect, special,
%% incidental or consequential damages, including lost profits, arising
%% out of the use of this software and its documentation, even if the
%% California Institute of Technology and/or Japan Science and Technology
%% Corporation have been advised of the possibility of such damage. See
%% the GNU Lesser General Public License for more details.
%%
%% You should have received a copy of the GNU Lesser General Public License
%% along with this library; if not, write to the Free Software Foundation,
%% Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
%% ----------------------------------------------------------------------------
%% Identification.
%% ----------------------------------------------------------------------------
%% It would be so nice to be able to put the CVS/RCS 'Date' tag in the
%% \filedate below. Unfortunately, LaTeX will barf on the resulting string.
\def\filedate{2003/06/09}
\def\fileversion{"$Revision$"}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cekfaq}[\filedate\space Caltech ERATO Kitano FAQ class]
%% ----------------------------------------------------------------------------
%% Definition of package options for this class.
%% ----------------------------------------------------------------------------
\newif\if@notoc
\newif\if@xdvi
\DeclareOption{toc}{\global\let\if@notoc\iffalse}
\DeclareOption{notoc}{\global\let\if@notoc\iftrue}
\DeclareOption{xdvi}{\global\let\if@xdvi\iffalse}
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{twoside}
\ProcessOptions
\LoadClass{article}
%% ----------------------------------------------------------------------------
%% Main code.
%% ----------------------------------------------------------------------------
% Most things are abstracted out into a common file between cekmanual
% and cekarticle2. The differences have to do with look and feel.
\RequirePackage{cekcommon}
% Margin adjustments. This is the same as cekarticle.cls.
\setlength{\marginparwidth}{0 pt}
\setlength{\oddsidemargin}{0 pt}
\setlength{\evensidemargin}{0 pt}
\setlength{\marginparsep}{0 pt}
\ifx\pdfoutput\undefined
\setlength{\topmargin}{1 ex}
\else
\setlength{\topmargin}{-8 ex}
\fi
\setlength{\voffset}{0 in}
\setlength{\hoffset}{0 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{9 in}
% Graphics adjustments. The path setup is so that the \includegraphics
% in the @puttile definition can find the logo file no matter where the
% document is located (but obviously, it only works for certain path
% combinations -- it's a total hack).
\graphicspath{{./logos/}{../tex/logos/}{../../tex/logos/}{../../../tex/logos/}}
% Title style. The logo is inserted at the top.
% Note about the logo: for PDF I'm using a TIFF file instead of a PDF
% file, because the PDF version looks ugly (rough and jagged) on the
% screen no matter what I do. (It prints file, just looks ugly.) Since
% we're in a modern age now and a lot of people look at PDF files on their
% screens instead of printing them out, I'm doing this to make it look
% reasonable on the screen. The logo TIFF file is high enough resolution
% that it prints acceptably as well.
\def\@puttitle{%
\vspace*{-6ex}%
\@ifundefined{pdfoutput}{%
\includegraphics[width=2.5in]{sbml-logo}\\%
}{%
\includegraphics[width=2.5in]{sbml-logo.tif}\\%
}
%% The use of the tabular here is incorrect latex, but I couldn't figure
%% out how to get the value of the width of the text (rather than the
%% width of the line). The stuff with all the line spacing etc. is all
%% ugly and should be improved.
\begin{center}
\vspace*{20pt}
\setlength{\extrarowheight}{6pt}
\begin{tabular}{l}
\toprule\\[-9pt]
\sffamily\bfseries\Huge\@title\\[7pt]
\midrule
\end{tabular}
\end{center}}
\def\@putauthorandaddress{%
\large
\renewcommand{\arraystretch}{0.95}%
\begin{tabular}[t]{c}%
\@author
\end{tabular}%
\\[1 pt]
\normalsize
\begin{tabular}[t]{c}%
{\ttfamily \@authoremail}\\
\@address
\end{tabular}%
\vskip 1 ex%
\@acknowledge%
\par}
% Table of contents changes.
\renewcommand{\contentsname}{FAQ Contents} % Standard LaTeX variable.
% Definition of section heading style.
\renewcommand{\section}{\@startsection%
{section}{1}{0pt}{-1.8ex \@plus 0.5ex \@minus -.2ex}%
{1.75ex}{\rule{\textwidth}{0.75pt}\nopagebreak\\[-1pt]\hspace*{-24.2pt}\normalfont\Large\bfseries\sffamily}}
\renewcommand{\subsection}{\@startsection%
{subsection}{2}{0pt}{-2ex \@plus 1ex \@minus -.2ex}%
{0.8ex}{\large\bfseries\sffamily}}
\renewcommand{\subsubsection}{\@startsection%
{subsubsection}{3}{0pt}{-1.5ex \@plus 1ex \@minus -.2ex}%
{0.5ex}{\normalsize\bfseries\sffamily}}
\renewcommand{\paragraph}{\@startsection%
{paragraph}{4}{0pt}{-1.25ex \@plus 1ex \@minus -.2ex}%
{0.5ex}{\normalsize\bfseries\sffamily}}
\newcommand\maketitlepage{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@[email protected]{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\vskip 2em%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{empty}\@thanks
\vfill
\@puttoc
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\@authoremail\@empty
\global\let\@address\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
\newpage
}
%% -----------------------------------------------------------------------------
%% End of file `cekarticle2.cls'.
%% -----------------------------------------------------------------------------