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
}
11 \newcommand{\revision}{\input{REVISION
}}
13 \documentclass[8pt,pagesize,twoside,footexclude,headexclude
]{scrartcl
}
16 % outsourced page dimensions
18 %\setlength{\paperwidth}{10.5cm}
19 %\setlength{\paperheight}{29.7cm}
20 %%\areaset[3mm]{9cm}{28.3cm}
30 \usepackage[usenames,
dvips]{color}
34 \definecolor{lightgray
}{gray
}{.85}
35 \usepackage[pagestyles
]{titlesec
}
39 % Two font alternatives:
44 % (B) Times with Helvetica
45 %\usepackage{mathptmx}
46 %\usepackage[scaled]{helvet}
50 \titleformat{\section}{\sffamily\mdseries\slshape}
51 {\huge\thesection}{.7em
}{\huge}[{\titlerule[0.25pt
]}]
53 \titleformat{\subsection}{\sffamily\mdseries\slshape}
54 {\Large\thesubsection}{.7em
}{\Large}[{\titlerule[0.25pt
]}]
56 % Kill toc header as we want it to span columns
58 \renewcommand{\toc@heading
}{}
61 \titlecontents{section
}
63 {\vspace{.5em plus
1em minus
.2em
}\sffamily\bfseries\upshape\filright}
64 {\contentslabel{1.5em
}}
66 {\hfill\contentspage\vspace{.1em
}}
68 \titlecontents{subsection
}
70 {\sffamily\mdseries\upshape\filright}
71 {\contentslabel{2.5em
}}
73 {\hspace{1ex
}\titlerule*
[1.5ex
]{.
}\contentspage}
75 \newenvironment{LIST
}[1]%
78 {\setlength{\itemindent}{-
#1}\setlength{\leftmargin}{#1}}%
79 %\parskip0pt\itemsep0pt
84 \renewcommand{\topfraction}{1}
85 \renewcommand{\bottomfraction}{1}
86 \renewcommand*
{\figureformat}{}
87 \renewcommand*
{\captionformat}{}
88 \renewcommand{\thefootnote}{\fnsymbol{footnote
}}
90 \setlength{\parfillskip}{5cm plus1cm minus3cm
}
91 \setlength{\arraycolsep}{0pt
}
93 \newcommand{\IT}[1]{\item{{\rule{0pt
}{2pt
}}%
94 #1}\hspace{2em plus
2em minus
.5em
}\penalty-
9$
\triangleright$
}
96 \newpagestyle{lispref
}[\sffamily\mdseries\slshape]{
98 \sethead*
{}{}{\maintitle\/
}
99 \setfoot*
{}{}{\thepage\/
}}
104 \newcommand{\LIT}[1]{\text{{\fontfamily{cmtt
}\selectfont#1}}}
107 \newcommand{\VAR}[1]{\text{{\fontfamily{cmr
}\fontshape{it
}\selectfont#1\/
}}}
110 \newcommand{\DF}[1]{\text{\textsubscript{\setlength{\fboxsep}{.5pt
}\setlength{\fboxrule}{.1pt
}\fbox{#1}}}}
112 % Optional Part, [], two sizes
113 \newcommand{\OP}[1]{{\text{$
\big[$
}{#1}\text{$
\big]$
}}}
114 \newcommand{\Op}[1]{{\text{$
[$
}{#1}\text{$
]$
}}}
117 \newcommand{\XOR}{\hspace{1pt
}\text{\rule[-
.9ex
]{.25pt
}{3ex
}}\hspace{1pt
}}
118 %\newcommand{\XOR}{\text{$\mid$}\hspace{0pt}}
121 \newcommand{\OPn}[1]{{{#1}\text{$
{}^
{*
}$
}}}
124 \newcommand{\RP}[1]{{{#1}\text{$
{}^
{+
}$
}}}
127 % Group of Objects {}, three sizes
128 \newcommand{\GOO}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}$
}}}
129 \newcommand{\GOo}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}$
}}}
130 \newcommand{\Goo}[1]{{\text{$\
{$
}{#1}\text{$\
}$
}}}
131 % Optional Group of Objects, {}*, three sizes
132 \newcommand{\GOOs}[1]{{$
\Big\
{$
{#1}$
\Big\
}^
{\!\!*
}$
}}
133 \newcommand{\GOos}[1]{\text{{$
\big\
{$
{#1}$
\big\
}^
{\!\!*
}$
}}}
134 \newcommand{\Goos}[1]{\text{{$\
{$
{#1}$\
}^
{\!*
}$
}}}
135 % Required Group of Objects, {}+, three sizes
136 \newcommand{\GOOp}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}^
{\!\!+
}$
}}}
137 \newcommand{\GOop}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}^
{\!\!+
}$
}}}
138 \newcommand{\Goop}[1]{{\text{$\
{$
}{#1}\text{$\
}^
{\!+
}$
}}}
140 % Vertically Arranged Group of Alternatives, {
141 % usage: \xorGOO{line1\\ line2...}{closing delimiter}
142 \newcommand{\xorGOO}[2]{\text{\(
%
150 % Vertically Arranged Group of Optional Objects, {|
151 % usage: \orGOO{line1\\line2}{closing delimiter}
152 \newcommand{\orGOO}[2]{\text{\(
%
160 % Vertically Arranged Group of Objects, No Opening {
161 % usage: \arrGOO{line1\\line2}{closing delimiter}
162 \newcommand{\arrGOO}[2]{{\(
%
170 % Boxed Group of Alternatives
171 % usage: \boxGOO{line1\\ line2...}
172 \newcommand{\boxGOO}[1]{\text{\hspace{1ex
}\(
%
173 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{0pt
}
175 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{.1pt
}
185 % All sorts of keywords
186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
188 % Generic Keyword, Lowercase
189 \newcommand{\kwd}[1]{\text{{\sffamily\bfseries\selectfont%
191 % Generic Keyword, Uppercase
192 \newcommand{\KWD}[1]{\text{{\sffamily\bfseries\selectfont%
195 \newcommand{\SF}[1]{\text{{\sffamily\bfseries\selectfont%
196 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}SF
}}\lowercase{#1}}}}}
198 \newcommand{\FU}[1]{\text{{\sffamily\bfseries\selectfont%
199 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}Fu
}}\lowercase{#1}}}}}
201 \newcommand{\GFU}[1]{\text{{\sffamily\bfseries\selectfont%
202 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}gF
}}\lowercase{#1}}}}}
204 \newcommand{\V}[1]{\text{{\sffamily\bfseries\selectfont%
205 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.8em
}var
}}\lowercase{#1}}}}}
207 \newcommand{\CNS}[1]{\text{{\sffamily\bfseries\selectfont%
208 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}co
}}\lowercase{#1}}}}}
210 \newcommand{\LKWD}[1]{\text{{\sffamily\bfseries\selectfont%
211 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}}}\lowercase{#1}}}}}
213 % Return values, First, Second, Third
214 \newcommand{\retval}[1]{\underline{#1}}
215 \newcommand{\retvalii}[1]{\underline{\underline{#1}}}
216 \newcommand{\retvaliii}[1]{\underline{\underline{\underline{#1}}}}
219 \newcommand{\T}{\text{\ttfamily T
}}
220 \newcommand{\NIL}{\text{\ttfamily NIL
}}
222 \newcommand{\TLD}{{\textasciitilde}}
224 % Starred versions send argument into index:
225 \WithSuffix\newcommand\kwd*
[1]{\kwd{#1}\uppercase{\index{#1}}}
226 \WithSuffix\newcommand\KWD*
[1]{\KWD{#1}\uppercase{\index{#1}}}
227 \WithSuffix\newcommand\SF*
[1]{\SF{#1}\uppercase{\index{#1}}}
228 \WithSuffix\newcommand\FU*
[1]{\FU{#1}\uppercase{\index{#1}}}
229 \WithSuffix\newcommand\GFU*
[1]{\GFU{#1}\uppercase{\index{#1}}}
230 \WithSuffix\newcommand\V*
[1]{\V{#1}\uppercase{\index{#1}}}
231 \WithSuffix\newcommand\CNS*
[1]{\CNS{#1}\uppercase{\index{#1}}}
232 \WithSuffix\newcommand\LKWD*
[1]{\LKWD{#1}\uppercase{\index{#1}}}
236 \newlength{\titlepagewidth}
237 \setlength{\titlepagewidth}{8cm
}
238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
242 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
245 \begin{minipage
}{\titlepagewidth}
247 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
252 \begin{minipage
}{\titlepagewidth}
254 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont%
255 {\color{lightgray
}cl\/
}\\
256 %\rmfamily\mdseries\upshape\fontsize{350}{0}\selectfont
257 %{\color{lightgray}\boldmath$\lambda$}\\
261 \begin{minipage
}{\titlepagewidth}
262 \rmfamily\mdseries\itshape\fontsize{36}{0}\selectfont
263 \hfill Common\/\\
[2mm
]
264 \rmfamily\mdseries\upshape\fontsize{157}{0}\selectfont
265 \rule[3mm
]{\textwidth}{1.5mm
}\\
267 \rule[15mm
]{5.5cm
}{1.5mm
}\hfill\rule[15mm
]{1.77cm
}{1.5mm
}
269 \begin{minipage
}{\titlepagewidth}
270 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
279 \section*
{\contentsname}
282 \setlength{\columnsep}{1.5em
}%
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
291 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
292 \section*
{Typographic Conventions
}
293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
297 \IT{\kwd{NAME
},
\FU{NAME
},
\SF{NAME
},
\GFU{NAME
},
\V{*name*
},
299 Symbol defined in Common Lisp; esp. function, special form, generic function,
302 \IT{\VAR{them
}\DF{\LIT{foo
}}}
303 Placeholder for actual code. Defaults to
\LIT{foo
}.
306 Text to input literally, or output literally.
309 Either one
\VAR{foo
} or nothing.
311 \IT{\OPn{\VAR{foo
}};
\Goos{\VAR{foo
}}}
312 Zero or more
\VAR{foo
}s.
314 \IT{\RP{\VAR{foo
}};
\Goop{\VAR{foo
}}}
315 One or more
\VAR{foo
}s.
318 English plural denotes a list argument.
320 \IT{\Goo{\VAR{foo
}\XOR\VAR{bar
}\XOR\VAR{baz
}};
326 Either
\VAR{foo
}, or
\VAR{bar
}, or
\VAR{baz
}.
333 Anything from none to all of
\VAR{foo
},
\VAR{bar
}, and
\VAR{baz
}.
335 \IT{\retval{\VAR{foo
}};
\retvalii{\VAR{bar
}};
\retvaliii{\VAR{baz
}}}
336 \VAR{foo
},
\VAR{bar
},
\VAR{baz
} are
1st,
2nd, and
3rd return value.
342 \kwd*
{NIL
}, falsehood, or
\kwd{()
}.
346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348 %%% Content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%
349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
351 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
355 \input{clqr-characters
}
363 \input{clqr-sequences
}
365 \input{clqr-hash-tables
}
367 \input{clqr-structures
}
369 \input{clqr-control-structure
}
373 \input{clqr-conditions-and-errors
}
375 \input{clqr-input-output
}
377 \input{clqr-system-types-and-classes
}
379 \input{clqr-symbols-and-packages
}
381 \input{clqr-compiler
}
383 \input{clqr-environment
}
385 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
388 \renewcommand{\indexpagestyle}{lispref
}
389 \renewenvironment{theindex
}%
391 {\setlength{\itemindent}{-
1em
}\setlength{\leftmargin}{1em
}}%
392 \parskip0pt\itemsep0pt}%
394 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
399 % Stock \printindex won't do as we want three-column.
400 \tiny\sffamily\input{clqr.ind
}
404 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
405 % Make (total) page count a multiple of four.
406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
409 \newcount\currentpage
410 \currentpage=
\value{page
}
411 \divide\currentpage by
4
412 \multiply\currentpage by
4
413 \advance\currentpage by -
\value{page
}
414 \ifthenelse{\equal{\the\currentpage}{-
3}}{\rule{0pt
}{0pt
}\clearpage}{}
415 \ifthenelse{\equal{\the\currentpage}{-
2}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
416 \ifthenelse{\equal{\the\currentpage}{-
1}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
418 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
423 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
426 \begin{minipage
}{\titlepagewidth}
428 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
429 \reflectbox{{\color{lightgray
}cl\/
}}\\
430 %\ttfamily\mdseries\upshape\fontsize{200}{0}\selectfont
431 %{\color{Gray}$(\lambda)$}
437 \begin{minipage
}{\titlepagewidth}
441 \makebox[\textwidth][l
]{\maintitle\
\hfill Revision
\revision [\number\year-
\number\month-
\number\day]}
442 \makebox[\textwidth][l
]{Copyright
\copyright\
2008 Bert Burgemeister
}\\
444 Permission is granted to copy, distribute and/or modify this
445 document under the terms of the GNU Free Documentation License,
446 Version
1.2 or any later version published by the Free Software
447 Foundation; with no Invariant Sections, no Front-Cover Texts and
448 no Back-Cover Texts.\\
449 http://www.gnu.org/licenses/fdl.html\\