-
Notifications
You must be signed in to change notification settings - Fork 0
/
cekmanual.README
147 lines (110 loc) · 5.16 KB
/
cekmanual.README
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
2001-10-31 <mhucka@caltech.edu>
"cekmanual" is a new style for authoring SBW manuals. It has some
similarities to our "cekarticle" style, but many differences. It uses a
different body font (charter), colored and styled headings, and provides
commands for code listings with line numbers and other features. Here is a
quick summary.
-----------------------------------------------------------------------------
FRONT PAGE MATERIAL
-----------------------------------------------------------------------------
Here's an example of what to put after \begin{document} for generating our
more-or-less standard front page:
\documentclass{cekmanual}
\begin{document}
\title{Systems Biology Workbench\\[5pt]
Java\textsuperscript{\tiny{\texttrademark}} Programming Manual}
\author{Andrew Finney, Michael Hucka, Herbert Sauro, Hamid Bolouri}
\authoremail{\{afinney,mhucka,hsauro,hbolouri\}@cds.caltech.edu}
\address{Systems Biology Workbench Development Group\\
ERATO Kitano Systems Biology Project\\
Control and Dynamical Systems, MC 107-81\\
California Institute of Technology, Pasadena, CA 91125, USA\\[3pt]
{\url{http://www.cds.caltech.edu/erato}}}
\acknowledge{Principal Investigators: John Doyle and Hiroaki Kitano}
\maketitlepage
-----------------------------------------------------------------------------
SPECIAL COMMANDS
-----------------------------------------------------------------------------
\class{...}
\method{...}
\variable{...}
Whenever you refer to a class or data type in text, use \class{foo}.
Whenever you refer to a method in text, use \method{foo}.
Whenever you refer to a variable in text, use \variable{foo}.
\begin{exampleFigure} \end{exampleFigure}
New figure environment to be used in conjunction with
\begin{codeVerbatim}, described below. Use this to show code examples.
For instance,
\begin{exampleFigure}[htb]
\begin{codeVerbatim}
import java.util.*;
import edu.caltech.sbw;
interface Trigonometry
{
double sin(double x) throws SBWException;
double cos(double x) throws SBWException;
}
\end{codeVerbatim}
\caption{Java example}
\label{fig:javacalltrig}
\end{exampleFigure}
\begin{codeVerbatim} \end{codeVerbatim}
\codenote{...}
This sets up a boxed, line-numbered environment useful for describing
code examples. The box is colored in a dark teal color matched to the
color of headings in the cekmanual style. Everything within this
environment is printed verbatim, with the exception that TeX/LaTeX
commands work within the environment.
Use \textbackslash{} to get a '\' character within the text.
The \codenote{} command creates a margin note for mentioning line
numbers in reference to the lines in the \begin{codeVerbatim}
environment. Example:
The sin method throws \class{SBWException}\codenote{line 6} if it
encounters a problem.
Note that the text in the \codenote{} has to be fully spelled out, as in
"line 6", rather than simply "6" -- \codenote{} prints exactly what you
put in it and no more. See the SBW Java API manual .tex file for lots
of examples of usage.
\begin{example} \end{example}
\begin{exampleTight} \end{exampleTight}
This should be used around sample code outside of figures, whether it
is in a programming language or XML snippets. The "exampleTight"
version uses tighter inter-line spacing. In general, you should not
use "exampleTight" unless you are trying to fit something and nothing
else seems to work.
\begin{methoddef}{methodsig} \end{methoddef}
Use this environment to define a method in a class. The first argument
must be the signature string of the method. Example:
\begin{methoddef}{String getName()}
Returns the unique identification of the module. This name
typically follows a notational convention such as that outlined
in Section~\ref{sec:ref:naming}; for example, a module's unique
name might be ``edu.caltech.trigonometry''.
\end{methoddef}
\toprule
\midrule
\bottomrule
\addlinespace
By virtue of loading the `booktabs' package, `cek-article' provides new
commands for inserting rules (horizontal lines) in tabular
environments, for creating nicer-looking tables than what LaTeX
produces by default. The \toprule and \bottomrule commands create
slightly thicker lines for the top and bottom of a table and the
\midrule creates a slightly thinner line for use inside a table (for
example, under the column headings). \addlinespace adds a small amount
of vertical space between lines. Here is an example of the use of
these commands:
\begin{table}[bh]
\centering
\begin{tabular}{ll}
\toprule
\textbf{Almond Joy} & \textbf{Mounds}\\
\midrule
Sometimes you feel like a nut & Sometimes you don't\\
\bottomrule
\end{tabular}
\caption{Foo.}
\end{table}
\url{}
This formats its contents in a particular way. You can use this when
writing a URL in text.