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{\AUTHOR}{Bert~Burgemeister
}
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}
25 % outsourced hypertext colors
27 %\newcommand{\linkcolor}{Fuchsia}
28 %\newcommand{\urlcolor}{MidnightBlue}
29 %\newcommand{\bookmarks}{true}
30 %\newcommand{\pdfpagelayout}{TwoColumnLeft}
41 \usepackage[usenames,
dvips]{color}
45 \definecolor{frontcovergray
}{gray
}{.85}
46 \definecolor{backcovergray
}{gray
}{.87}
47 \usepackage[pagestyles
]{titlesec
}
51 % Two font alternatives:
52 % (A) All Computer Modern
56 % (B) Times mixed with Helvetica
57 %\usepackage{mathptmx}
58 %\usepackage[scaled]{helvet}
61 % should remain last usepackage:
63 [breaklinks,linktocpage,colorlinks,
%
64 bookmarksnumbered,bookmarks=
\bookmarks,
%
65 linkcolor=
\linkcolor,urlcolor=
\urlcolor,
%
66 pdfpagelayout=
\pdfpagelayout,
%
67 pdftitle=
\maintitle,pdfauthor=
\AUTHOR]%
71 \titleformat{\section}{\sffamily\mdseries\slshape}
72 {\huge\thesection}{.7em
}{\huge}[{\titlerule[0.25pt
]}]
74 \titleformat{\subsection}{\sffamily\mdseries\slshape}
75 {\Large\thesubsection}{.7em
}{\Large}[{\titlerule[0.25pt
]}]
77 % Kill toc header as we want it to span columns
79 \renewcommand{\toc@heading
}{}
82 \titlecontents{section
}%
84 {\vspace{.5em plus
1em minus
.2em
}\sffamily\bfseries\upshape\filright}%
85 {\contentslabel{1.5em
}}%
87 {\hfill\contentspage\vspace{.1em
}}%
89 \titlecontents{subsection
}%
91 {\sffamily\mdseries\upshape\filright}%
92 {\contentslabel{2.5em
}}%
94 {\hspace{.5ex plus
.5ex minus
.3ex
}\titlerule*
[1em
]{.
}\contentspage}%
96 \newlength{\LISTlinewidth}
97 \newenvironment{LIST
}[1]%
99 \LISTlinewidth=
\linewidth%
102 {\setlength{\itemindent}{-
#1}\setlength{\leftmargin}{#1}}%
103 %\parskip0pt\itemsep0pt%
109 %\renewcommand{\topfraction}{1}
110 \renewcommand{\bottomfraction}{1}
111 \renewcommand*
{\figureformat}{}
112 \renewcommand*
{\captionformat}{}
113 \renewcommand{\thefootnote}{\fnsymbol{footnote
}}
115 \setlength{\parfillskip}{5cm plus1cm minus3cm
}
116 \setlength{\arraycolsep}{0pt
}
119 \def\startexplanation{$
\triangleright$
\hskip1.4ex
}
122 \newlength{\ITtab}\ITtab=
3em
125 \settowidth{\ITwidth}{#1\unskip\hskip1em\hskip\ITtab}%
126 \ITrest=
\LISTlinewidth\advance\ITrest by -
\ITwidth%
127 \loop\ifdim\ITrest >
\ITtab%
128 \advance\ITrest by -
\ITtab%
131 \settowidth{\ITwidth}{%
132 #1\unskip\hskip1em\hskip\ITrest%
136 \ifdim\ITwidth <
\LISTlinewidth% Entry fits into a single line
137 #1\unskip\hskip1em\hskip\ITrest%
141 \unskip\penalty-
10000%
142 \parbox[t
]{\linewidth}{\startexplanation#2}%
147 \newpagestyle{lispref
}[\sffamily\mdseries\slshape]{
149 \sethead*
{}{}{\maintitle\/
}
150 \setfoot*
{}{}{\thepage\/
}}
155 \newcommand{\LIT}[1]{\text{{\fontfamily{cmtt
}\selectfont#1}}}
158 \newcommand{\VAR}[1]{\text{{\fontfamily{cmr
}\fontshape{it
}\selectfont#1\/
}}}
161 \newcommand{\NEV}[1]{\text{{$
\widehat{#1}$
}}}
163 % Subjected to Destruction
164 \newcommand{\DES}[1]{\text{{$
\widetilde{#1}$
}}}
167 \newcommand{\DF}[1]{\text{\textsubscript{\setlength{\fboxsep}{.5pt
}\setlength{\fboxrule}{.1pt
}\fbox{#1}}}}
169 % Optional Part, [], two sizes
170 \newcommand{\OP}[1]{{\text{$
\big[$
}{#1}\text{$
\big]$
}}}
171 \newcommand{\Op}[1]{{\text{$
[$
}{#1}\text{$
]$
}}}
174 \newcommand{\XOR}{\hspace{1pt
}\text{\rule[-
.9ex
]{.25pt
}{3ex
}}\hspace{1pt
}}
175 %\newcommand{\XOR}{\text{$\mid$}\hspace{0pt}}
178 \newcommand{\OPn}[1]{{{#1}\text{$
{}^
{*
}$
}}}
181 \newcommand{\RP}[1]{{{#1}\text{$
{}^
{+
}$
}}}
184 % Group of Objects {}, three sizes
185 \newcommand{\GOO}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}$
}}}
186 \newcommand{\GOo}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}$
}}}
187 \newcommand{\Goo}[1]{{\text{$\
{$
}{#1}\text{$\
}$
}}}
188 % Optional Group of Objects, {}*, three sizes
189 \newcommand{\GOOs}[1]{{$
\Big\
{$
{#1}$
\Big\
}^
{\!\!*
}$
}}
190 \newcommand{\GOos}[1]{\text{{$
\big\
{$
{#1}$
\big\
}^
{\!\!*
}$
}}}
191 \newcommand{\Goos}[1]{\text{{$\
{$
{#1}$\
}^
{\!*
}$
}}}
192 % Required Group of Objects, {}+, three sizes
193 \newcommand{\GOOp}[1]{{\text{$
\Big\
{$
}{#1}\text{$
\Big\
}^
{\!\!+
}$
}}}
194 \newcommand{\GOop}[1]{{\text{$
\big\
{$
}{#1}\text{$
\big\
}^
{\!\!+
}$
}}}
195 \newcommand{\Goop}[1]{{\text{$\
{$
}{#1}\text{$\
}^
{\!+
}$
}}}
197 % Vertically Arranged Group of Alternatives, {
198 % usage: \xorGOO{line1\\ line2...}{closing delimiter}
199 \newcommand{\xorGOO}[2]{\text{\(
%
207 % Vertically Arranged Group of Optional Objects, {|
208 % usage: \orGOO{line1\\line2}{closing delimiter}
209 \newcommand{\orGOO}[2]{\text{\(
%
217 % Vertically Arranged Group of Objects, No Opening {
218 % usage: \arrGOO{line1\\line2}{closing delimiter}
219 \newcommand{\arrGOO}[2]{\text{\(\!
%
227 % Boxed Group of Alternatives
228 % usage: \boxGOO{line1\\ line2...}
229 \newcommand{\boxGOO}[1]{\text{\hspace{1ex
}\(
%
230 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{0pt
}
232 \setlength{\fboxsep}{1pt
}\setlength{\fboxrule}{.1pt
}
242 % In a Boxed Group of Alternatives: Replacement for \\ with additional
244 \newcommand{\boxGOOcr}{\vspace{1ex
}\\
}
247 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
249 % All sorts of tags attached to lisp keywords
250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
253 \newlength{\TAGwidth}
254 \newlength{\KEYWORDwidth}
256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
257 % Generic Keyword, Lowercase
258 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
259 \newcommand{\kwd}[1]{\text{{\sffamily\bfseries\selectfont%
262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
263 % Generic Keyword, Uppercase
264 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
265 \newcommand{\KWD}[1]{\text{{\sffamily\bfseries\selectfont%
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
271 \newcommand{\MC}[1]{%
272 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.5em
}M
}%
273 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
274 \ifdim\TAGwidth >
\KEYWORDwidth%
275 \text{{\sffamily\bfseries\selectfont%
276 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}M
}}\lowercase{#1}}}}%
278 \text{{\sffamily\bfseries\selectfont%
279 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}M
}}\lowercase{#1}}}}%
282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
285 \newcommand{\SO}[1]{%
286 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.5em
}SO
}%
287 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
288 \ifdim\TAGwidth >
\KEYWORDwidth%
289 \text{{\sffamily\bfseries\selectfont%
290 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}sO
}}\lowercase{#1}}}}%
292 \text{{\sffamily\bfseries\selectfont%
293 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}sO
}}\lowercase{#1}}}}%
296 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
298 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
299 \newcommand{\FU}[1]{%
300 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.5em
}Fu
}%
301 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
302 \ifdim\TAGwidth >
\KEYWORDwidth%
303 \text{{\sffamily\bfseries\selectfont%
304 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}Fu
}}\lowercase{#1}}}}%
306 \text{{\sffamily\bfseries\selectfont%
307 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}Fu
}}\lowercase{#1}}}}%
310 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
313 \newcommand{\GFU}[1]{%
314 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.5em
}gF
}%
315 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
316 \ifdim\TAGwidth >
\KEYWORDwidth%
317 \text{{\sffamily\bfseries\selectfont%
318 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}gF
}}\lowercase{#1}}}}%
320 \text{{\sffamily\bfseries\selectfont%
321 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}gF
}}\lowercase{#1}}}}%
324 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
328 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.8em
}var
}%
329 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
330 \ifdim\TAGwidth >
\KEYWORDwidth%
331 \text{{\sffamily\bfseries\selectfont%
332 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}var
}}\lowercase{#1}}}}%
334 \text{{\sffamily\bfseries\selectfont%
335 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.8em
}var
}}\lowercase{#1}}}}%
338 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
340 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
341 \newcommand{\CNS}[1]{%
342 \settowidth{\TAGwidth}{\tiny\sffamily\mdseries\hspace*
{.5em
}co
}%
343 \settowidth{\KEYWORDwidth}{\lowercase{#1}}%
344 \ifdim\TAGwidth >
\KEYWORDwidth%
345 \text{{\sffamily\bfseries\selectfont%
346 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{0em
}co
}}\lowercase{#1}}}}%
348 \text{{\sffamily\bfseries\selectfont%
349 {\raisebox{1.4ex
}[0pt
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}co
}}\lowercase{#1}}}}%
352 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
354 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
355 \newcommand{\LKWD}[1]{\text{{\sffamily\bfseries\selectfont%
356 {\raisebox{1.4ex
}[1ex
][0pt
]{\tiny\sffamily\mdseries\makebox[0pt
][l
]{\hspace{.5em
}}}\lowercase{#1}}}}}
358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
359 % Return values, First, Second, nth, Third
360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
361 \newcommand{\retval}[1]{\uline{#1}}
362 \newcommand{\retvalii}[1]{\uuline{#1}}
363 \newcommand{\retvaln}[2]{{%
364 {\raisebox{-
1.7ex
}[0pt
][1.4ex
]{\tiny\sffamily\upshape\mdseries\makebox[0pt
][l
]{\hspace{-
.1em
}#1}}\uline{#2}}}}
365 \newcommand{\retvaliii}[1]{\retvaln{3}{#1}}
367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
369 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
370 \newcommand{\T}{\text{\ttfamily T
}}
371 \newcommand{\NIL}{\text{\ttfamily NIL
}}
373 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
376 \newcommand{\TLD}{{\textasciitilde}}
378 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
379 % Starred versions send their argument into index:
380 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
381 \WithSuffix\newcommand\kwd*
[1]{\kwd{#1}\uppercase{\index{#1}}}
382 \WithSuffix\newcommand\KWD*
[1]{\KWD{#1}\uppercase{\index{#1}}}
383 \WithSuffix\newcommand\MC*
[1]{\MC{#1}\uppercase{\index{#1}}}
384 \WithSuffix\newcommand\SO*
[1]{\SO{#1}\uppercase{\index{#1}}}
385 \WithSuffix\newcommand\FU*
[1]{\FU{#1}\uppercase{\index{#1}}}
386 \WithSuffix\newcommand\GFU*
[1]{\GFU{#1}\uppercase{\index{#1}}}
387 \WithSuffix\newcommand\V*
[1]{\V{#1}\uppercase{\index{#1}}}
388 \WithSuffix\newcommand\CNS*
[1]{\CNS{#1}\uppercase{\index{#1}}}
389 \WithSuffix\newcommand\LKWD*
[1]{\LKWD{#1}\uppercase{\index{#1}}}
391 \hyphenation{white-space pa-ra-me-ters
}
395 \newlength{\titlepagewidth}
396 \setlength{\titlepagewidth}{8cm
}
397 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
401 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
404 \begin{minipage
}{\titlepagewidth}
406 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
411 \begin{minipage
}{\titlepagewidth}
413 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont%
414 {\color{frontcovergray
}cl\/
}\\
418 \begin{minipage
}{\titlepagewidth}
419 \rmfamily\mdseries\itshape\fontsize{36}{0}\selectfont
420 \hfill Common\/\\
[2mm
]
421 \rmfamily\mdseries\upshape\fontsize{157}{0}\selectfont
422 \rule[3mm
]{\textwidth}{1.5mm
}\\
424 \rule[15mm
]{5.5cm
}{1.5mm
}\hfill\rule[15mm
]{1.77cm
}{1.5mm
}
426 \begin{minipage
}{\titlepagewidth}
427 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
435 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
437 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
438 \section*
{\contentsname}
441 \setlength{\columnsep}{1.5em
}%
446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
448 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
450 %%% Content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%
451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
453 \input{clqr-typographic-conventions
}
456 \input{clqr-characters
}
460 \input{clqr-sequences
}
461 \input{clqr-hash-tables
}
462 \input{clqr-structures
}
463 \input{clqr-control-structure
}
465 \input{clqr-conditions-and-errors
}
466 \input{clqr-input-output
}
467 \input{clqr-types-and-classes
}
468 \input{clqr-packages-and-symbols
}
469 \input{clqr-compiler
}
470 \input{clqr-environment
}
472 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
473 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
476 \clearpage % Uncomment/comment this line to waste/save some space
478 \renewcommand{\indexpagestyle}{lispref
}
479 \renewenvironment{theindex
}%
481 {\setlength{\itemindent}{-
1em
}\setlength{\leftmargin}{1em
}}%
482 \parskip0pt plus
.1pt
\itemsep0pt%
483 \raggedright\looseness=-
1%
487 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
488 [\section*
{Index
}\vspace{-
5ex
}]
489 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
490 % Stock \printindex won't do as we want more than two columns.
491 \tiny\sffamily\input{clqr.ind
}
495 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496 % Make (total) page count a multiple of four.
497 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
500 \newcount\currentpage
501 \currentpage=
\value{page
}
502 \divide\currentpage by
4
503 \multiply\currentpage by
4
504 \advance\currentpage by -
\value{page
}
505 \ifthenelse{\equal{\the\currentpage}{-
3}}{\rule{0pt
}{0pt
}\clearpage}{}
506 \ifthenelse{\equal{\the\currentpage}{-
2}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
507 \ifthenelse{\equal{\the\currentpage}{-
1}}{\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage\rule{0pt
}{0pt
}\clearpage}{}
509 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
514 \renewcommand{\rmdefault}{ptm
} %% Always times font on title
517 \begin{minipage
}{\titlepagewidth}
519 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
520 \reflectbox{{\color{backcovergray
}cl\/
}}\\
524 \vspace*
{43mm
}% Adjust here if text below changes
525 \begin{minipage
}{\titlepagewidth}
529 \makebox[\textwidth][l
]{\maintitle\
\hfill Revision
\input{REVISION
}
530 [\input{DATE
}\hspace{-
.65ex
}]}
531 \makebox[\textwidth][l
]{Copyright
\copyright\
2008 \AUTHOR\hfill\LaTeX\ source:
532 \href{http://clqr.berlios.de
}{http://clqr.berlios.de
}}\\
[1.5mm
]
533 Permission is granted to copy, distribute and/or modify this
534 document under the terms of the GNU Free Documentation License,
535 Version
1.2 or any later version published by the Free Software
536 Foundation; with no Invariant Sections, no Front-Cover Texts and
537 no Back-Cover Texts.
\hfill
538 \href{http://www.gnu.org/licenses/fdl.html
}{http://www.gnu.org/licenses/fdl.html
}\\
548 % LocalWords: ptm lightgray cl lispref theindex pt