1 % Copyright (C) 2008 Bert Burgemeister
3 % Permission is granted to copy, distribute and/or modify this
4 % document under the terms of the GNU Free Documentation License,
5 % Version 1.2 or any later version published by the Free Software
6 % Foundation; with no Invariant Sections, no Front-Cover Texts and
7 % no Back-Cover Texts. For details see file COPYING.
10 \newcommand{\maintitle}{Common Lisp Quick Reference
}
12 \documentclass[8pt,pagesize,twoside,footexclude,headexclude
]{scrartcl
}
15 % outsourced page dimensions
17 %\setlength{\paperwidth}{10.5cm}
18 %\setlength{\paperheight}{29.7cm}
19 %%\areaset[3mm]{9cm}{28.3cm}
29 \usepackage[usenames,
dvips]{color}
33 \definecolor{lightgray
}{gray
}{.85}
34 \usepackage[pagestyles
]{titlesec
}
38 % Two font alternatives:
43 % (B) Times with Helvetica
44 %\usepackage{mathptmx}
45 %\usepackage[scaled]{helvet}
49 \titleformat{\section}{\sffamily\mdseries\slshape}
50 {\huge\thesection}{.7em
}{\huge}[{\titlerule[0.25pt
]}]
52 \titleformat{\subsection}{\sffamily\mdseries\slshape}
53 {\Large\thesubsection}{.7em
}{\Large}[{\titlerule[0.25pt
]}]
55 % Kill toc header as we want it to span columns
57 \renewcommand{\toc@heading
}{}
60 \titlecontents{section
}
62 {\vspace{.5em plus
1em minus
.2em
}\sffamily\bfseries\upshape\filright}
63 {\contentslabel{1.5em
}}
65 {\hfill\contentspage\vspace{.1em
}}
67 \titlecontents{subsection
}
69 {\sffamily\mdseries\upshape\filright}
70 {\contentslabel{2.5em
}}
72 {\hspace{1ex
}\titlerule*
[1.5ex
]{.
}\contentspage}
74 \newenvironment{LIST
}[1]%
77 {\setlength{\itemindent}{-
#1}\setlength{\leftmargin}{#1}}%
78 %\parskip0pt\itemsep0pt
83 \renewcommand{\topfraction}{1}
84 \renewcommand{\bottomfraction}{1}
85 \renewcommand*
{\figureformat}{}
86 \renewcommand*
{\captionformat}{}
87 \renewcommand{\thefootnote}{\fnsymbol{footnote
}}
89 \setlength{\parfillskip}{5cm plus1cm minus3cm
}
90 \setlength{\arraycolsep}{0pt
}
92 \newcommand{\IT}[1]{\item{{\rule{0pt
}{2pt
}}%
93 #1}\hspace{2em plus
2em minus
.5em
}\penalty-
9$
\triangleright$
}
95 \newpagestyle{lispref
}[\sffamily\mdseries\slshape]{
97 \sethead*
{}{}{\maintitle\/
}
98 \setfoot*
{}{}{\thepage\/
}}
103 \newcommand{\LIT}[1]{\text{{\fontfamily{cmtt
}\selectfont#1}}}
106 \newcommand{\VAR}[1]{\text{{\fontfamily{cmr
}\fontshape{it
}\selectfont#1\/
}}}
109 \newcommand{\DF}[1]{\text{\textsubscript{\setlength{\fboxsep}{.5pt
}\setlength{\fboxrule}{.1pt
}\fbox{#1}}}}
111 % Optional Part, [], two sizes
112 \newcommand{\OP}[1]{{\text{$
\big[$
}{#1}\text{$
\big]$
}}}
113 \newcommand{\Op}[1]{{\text{$
[$
}{#1}\text{$
]$
}}}
116 \newcommand{\XOR}{\hspace{1pt
}\text{\rule[-
.9ex
]{.25pt
}{3ex
}}\hspace{1pt
}}
117 %\newcommand{\XOR}{\text{$\mid$}\hspace{0pt}}
120 \newcommand{\OPn}[1]{{{#1}\text{$
{}^
{*
}$
}}}
123 \newcommand{\RP}[1]{{{#1}\text{$
{}^
{+
}$
}}}
126 % Group of Objects {}, three sizes
127 \newcommand{\GOO}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}$
}}}
128 \newcommand{\GOo}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}$
}}}
129 \newcommand{\Goo}[1]{{\text{$\
{$
}{#1}\text{$\
}$
}}}
130 % Optional Group of Objects, {}*, three sizes
131 \newcommand{\GOOs}[1]{{$
\Big\
{$
{#1}$
\Big\
}^
{\!\!*
}$
}}
132 \newcommand{\GOos}[1]{\text{{$
\big\
{$
{#1}$
\big\
}^
{\!\!*
}$
}}}
133 \newcommand{\Goos}[1]{\text{{$\
{$
{#1}$\
}^
{\!*
}$
}}}
134 % Required Group of Objects, {}+, three sizes
135 \newcommand{\GOOp}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}^
{\!\!+
}$
}}}
136 \newcommand{\GOop}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}^
{\!\!+
}$
}}}
137 \newcommand{\Goop}[1]{{\text{$\
{$
}{#1}\text{$\
}^
{\!+
}$
}}}
139 % Vertically Arranged Group of Alternatives, {
140 % usage: \xorGOO{line1\\ line2...}{closing delimiter}
141 \newcommand{\xorGOO}[2]{\text{\(
%
149 % Vertically Arranged Group of Optional Objects, {|
150 % usage: \orGOO{line1\\line2}{closing delimiter}
151 \newcommand{\orGOO}[2]{\text{\(
%
159 % Vertically Arranged Group of Objects, No Opening {
160 % usage: \arrGOO{line1\\line2}{closing delimiter}
161 \newcommand{\arrGOO}[2]{{\(
%
169 % Boxed Group of Alternatives
170 % usage: \boxGOO{line1\\ line2...}
171 \newcommand{\boxGOO}[1]{\text{\hspace{1ex
}\(
%
172 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{0pt
}
174 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{.1pt
}
184 % All sorts of keywords
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 % Generic Keyword, Lowercase
188 \newcommand{\kwd}[1]{\text{{\sffamily\bfseries\selectfont%
190 % Generic Keyword, Uppercase
191 \newcommand{\KWD}[1]{\text{{\sffamily\bfseries\selectfont%
194 \newcommand{\SF}[1]{\text{{\sffamily\bfseries\selectfont%
195 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}SF
}}\lowercase{#1}}}}}
197 \newcommand{\FU}[1]{\text{{\sffamily\bfseries\selectfont%
198 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}Fu
}}\lowercase{#1}}}}}
200 \newcommand{\GFU}[1]{\text{{\sffamily\bfseries\selectfont%
201 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}gF
}}\lowercase{#1}}}}}
203 \newcommand{\V}[1]{\text{{\sffamily\bfseries\selectfont%
204 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.8em
}var
}}\lowercase{#1}}}}}
206 \newcommand{\CNS}[1]{\text{{\sffamily\bfseries\selectfont%
207 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}co
}}\lowercase{#1}}}}}
209 \newcommand{\LKWD}[1]{\text{{\sffamily\bfseries\selectfont%
210 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}}}\lowercase{#1}}}}}
212 % Return values, First, Second, Third
213 \newcommand{\retval}[1]{\underline{#1}}
214 \newcommand{\retvalii}[1]{\underline{\underline{#1}}}
215 \newcommand{\retvaliii}[1]{\underline{\underline{\underline{#1}}}}
218 \newcommand{\T}{\text{\ttfamily T
}}
219 \newcommand{\NIL}{\text{\ttfamily NIL
}}
221 \newcommand{\TLD}{{\textasciitilde}}
223 % Starred versions send argument into index:
224 \WithSuffix\newcommand\kwd*
[1]{\kwd{#1}\uppercase{\index{#1}}}
225 \WithSuffix\newcommand\KWD*
[1]{\KWD{#1}\uppercase{\index{#1}}}
226 \WithSuffix\newcommand\SF*
[1]{\SF{#1}\uppercase{\index{#1}}}
227 \WithSuffix\newcommand\FU*
[1]{\FU{#1}\uppercase{\index{#1}}}
228 \WithSuffix\newcommand\GFU*
[1]{\GFU{#1}\uppercase{\index{#1}}}
229 \WithSuffix\newcommand\V*
[1]{\V{#1}\uppercase{\index{#1}}}
230 \WithSuffix\newcommand\CNS*
[1]{\CNS{#1}\uppercase{\index{#1}}}
231 \WithSuffix\newcommand\LKWD*
[1]{\LKWD{#1}\uppercase{\index{#1}}}
235 \newlength{\titlepagewidth}
236 \setlength{\titlepagewidth}{8cm
}
237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
244 \begin{minipage
}{\titlepagewidth}
246 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
251 \begin{minipage
}{\titlepagewidth}
253 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont%
254 {\color{lightgray
}cl\/
}\\
258 \begin{minipage
}{\titlepagewidth}
259 \rmfamily\mdseries\itshape\fontsize{36}{0}\selectfont
260 \hfill Common\/\\
[2mm
]
261 \rmfamily\mdseries\upshape\fontsize{157}{0}\selectfont
262 \rule[3mm
]{\textwidth}{1.5mm
}\\
264 \rule[15mm
]{5.5cm
}{1.5mm
}\hfill\rule[15mm
]{1.77cm
}{1.5mm
}
266 \begin{minipage
}{\titlepagewidth}
267 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
276 \section*
{\contentsname}
279 \setlength{\columnsep}{1.5em
}%
284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
289 \section*
{Typographic Conventions
}
290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294 \IT{\kwd{NAME
},
\FU{NAME
},
\SF{NAME
},
\GFU{NAME
},
\V{*name*
},
296 Symbol defined in Common Lisp; esp. function, special form, generic function,
299 \IT{\VAR{them
}\DF{\LIT{foo
}}}
300 Placeholder for actual code. Defaults to
\LIT{foo
}.
303 Text to input literally, or output literally.
306 Either one
\VAR{foo
} or nothing.
308 \IT{\OPn{\VAR{foo
}};
\Goos{\VAR{foo
}}}
309 Zero or more
\VAR{foo
}s.
311 \IT{\RP{\VAR{foo
}};
\Goop{\VAR{foo
}}}
312 One or more
\VAR{foo
}s.
315 English plural denotes a list argument.
317 \IT{\Goo{\VAR{foo
}\XOR\VAR{bar
}\XOR\VAR{baz
}};
323 Either
\VAR{foo
}, or
\VAR{bar
}, or
\VAR{baz
}.
330 Anything from none to all of
\VAR{foo
},
\VAR{bar
}, and
\VAR{baz
}.
332 \IT{\retval{\VAR{foo
}};
\retvalii{\VAR{bar
}};
\retvaliii{\VAR{baz
}}}
333 \VAR{foo
},
\VAR{bar
},
\VAR{baz
} are
1st,
2nd, and
3rd return value.
339 \kwd*
{NIL
}, falsehood, or
\kwd{()
}.
343 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345 %%% Content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%
346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352 \input{clqr-characters
}
360 \input{clqr-sequences
}
362 \input{clqr-hash-tables
}
364 \input{clqr-structures
}
366 \input{clqr-control-structure
}
370 \input{clqr-conditions-and-errors
}
372 \input{clqr-input-output
}
374 \input{clqr-system-types-and-classes
}
376 \input{clqr-symbols-and-packages
}
378 \input{clqr-compiler
}
380 \input{clqr-environment
}
382 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
383 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
384 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
385 \renewcommand{\indexpagestyle}{lispref
}
386 \renewenvironment{theindex
}%
388 {\setlength{\itemindent}{-
1em
}\setlength{\leftmargin}{1em
}}%
389 \parskip0pt\itemsep0pt}%
391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
393 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
396 % Stock \printindex won't do as we want three-column.
397 \tiny\sffamily\input{clqr.ind
}
401 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
402 % Make (total) page count a multiple of four.
403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
406 \newcount\currentpage
407 \currentpage=
\value{page
}
408 \divide\currentpage by
4
409 \multiply\currentpage by
4
410 \advance\currentpage by -
\value{page
}
411 \ifthenelse{\equal{\the\currentpage}{-
3}}{\rule{0pt
}{0pt
}\clearpage}{}
412 \ifthenelse{\equal{\the\currentpage}{-
2}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
413 \ifthenelse{\equal{\the\currentpage}{-
1}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
415 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
417 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
423 \begin{minipage
}{\titlepagewidth}
425 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
426 \reflectbox{{\color{lightgray
}cl\/
}}\\
427 %\ttfamily\mdseries\upshape\fontsize{200}{0}\selectfont
428 %{\color{Gray}$(\lambda)$}
434 \begin{minipage
}{\titlepagewidth}
438 \makebox[\textwidth][l
]{\maintitle\
\hfill Revision
\input{REVISION
}
439 [\input{DATE
}\hspace{-
.65ex
}]}
440 \makebox[\textwidth][l
]{Copyright
\copyright\
2008 Bert
441 Burgemeister
\hfill\LaTeX\ source:
442 http://clqr.berlios.de
}\\
[1.5mm
]
443 Permission is granted to copy, distribute and/or modify this
444 document under the terms of the GNU Free Documentation License,
445 Version
1.2 or any later version published by the Free Software
446 Foundation; with no Invariant Sections, no Front-Cover Texts and
447 no Back-Cover Texts.
\hfill
448 http://www.gnu.org/licenses/fdl.html\\