Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 452 lines (399 sloc) 13.874 kb
57fec11 @trebb intial revision, cleaned for public
authored
1 % Copyright (C) 2008 Bert Burgemeister
2 %
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.
8 %
9
10 \newcommand{\maintitle}{Common Lisp Quick Reference}
11 \newcommand{\revision}{\input{REVISION}}
12
13 \documentclass[8pt,pagesize,twoside,footexclude,headexclude]{scrartcl}
14 %
15 %%%%%%%%%%%%%%%%%%
16 % outsourced page dimensions
17 \input{paper-current}
18 %\setlength{\paperwidth}{10.5cm}
19 %\setlength{\paperheight}{29.7cm}
20 %%\areaset[3mm]{9cm}{28.3cm}
21 %\typearea[2mm]{20}
22 %%%%%%%%%%%%%%%%%%
23 \usepackage{amsmath}
24 \usepackage{amsfonts}
25 \usepackage{amssymb}
26 \usepackage{rotating}
27 \usepackage{graphics}
28 \usepackage{multicol}
29 \usepackage{textcase}
30 \usepackage[usenames,dvips]{color}
31 \usepackage{ifthen}
32 \usepackage{suffix}
33 \usepackage{makeidx}
34 \definecolor{lightgray}{gray}{.85}
35 \usepackage[pagestyles]{titlesec}
36 \usepackage{titletoc}
37 %
38 %%%%%%%%%%%%%%%%%%
39 % Two font alternatives:
40 % (A) Computer Modern
41 \usepackage{type1cm}
42 \usepackage{exscale}
43 %%%%%%%%%%%%%%%%%%
44 % (B) Times with Helvetica
45 %\usepackage{mathptmx}
46 %\usepackage[scaled]{helvet}
47 %%%%%%%%%%%%%%%%%%
48 %
49 \makeindex
50 \titleformat{\section}{\sffamily\mdseries\slshape}
51 {\huge\thesection}{.7em}{\huge}[{\titlerule[0.25pt]}]
52
53 \titleformat{\subsection}{\sffamily\mdseries\slshape}
54 {\Large\thesubsection}{.7em}{\Large}[{\titlerule[0.25pt]}]
55
56 % Kill toc header as we want it to span columns
57 \makeatletter
58 \renewcommand{\toc@heading}{}
59 \makeatother
60
61 \titlecontents{section}
62 [1.5em]
63 {\vspace{.5em plus 1em minus .2em}\sffamily\bfseries\upshape\filright}
64 {\contentslabel{1.5em}}
65 {\hspace*{3em}}
66 {\hfill\contentspage\vspace{.1em}}
67
68 \titlecontents{subsection}
69 [4em]
70 {\sffamily\mdseries\upshape\filright}
71 {\contentslabel{2.5em}}
72 {\hspace*{5.5em}}
73 {\hspace{1ex}\titlerule*[1.5ex]{.}\contentspage}
74
75 \newenvironment{LIST}[1]%
76 {%
77 \begin{list}{}%
78 {\setlength{\itemindent}{-#1}\setlength{\leftmargin}{#1}}%
79 %\parskip0pt\itemsep0pt
80 }%
81 {\end{list}%
82 }%
83 %
84 \renewcommand{\topfraction}{1}
85 \renewcommand{\bottomfraction}{1}
86 \renewcommand*{\figureformat}{}
87 \renewcommand*{\captionformat}{}
88 \renewcommand{\thefootnote}{\fnsymbol{footnote}}
89 %
90 \setlength{\parfillskip}{5cm plus1cm minus3cm}
91 \setlength{\arraycolsep}{0pt}
92 %
93 \newcommand{\IT}[1]{\item{{\rule{0pt}{2pt}}%
94 #1}\hspace{2em plus 2em minus.5em}\penalty-9$\triangleright$}
95 %
96 \newpagestyle{lispref}[\sffamily\mdseries\slshape]{
97 \headrule\footrule
98 \sethead*{}{}{\maintitle\/}
99 \setfoot*{}{}{\thepage\/}}
100 \pagestyle{lispref}
101
102 %
103 % Literal Text
104 \newcommand{\LIT}[1]{\text{{\fontfamily{cmtt}\selectfont#1}}}
105 %
106 % Variable Text
107 \newcommand{\VAR}[1]{\text{{\fontfamily{cmr}\fontshape{it}\selectfont#1\/}}}
108 %
109 % Default Value
110 \newcommand{\DF}[1]{\text{\textsubscript{\setlength{\fboxsep}{.5pt}\setlength{\fboxrule}{.1pt}\fbox{#1}}}}
111 %
112 % Optional Part, [], two sizes
113 \newcommand{\OP}[1]{{\text{$\big[$}{#1}\text{$\big]$}}}
114 \newcommand{\Op}[1]{{\text{$[$}{#1}\text{$]$}}}
115 %
116 % Or, |
117 \newcommand{\XOR}{\hspace{1pt}\text{\rule[-.9ex]{.25pt}{3ex}}\hspace{1pt}}
118 %\newcommand{\XOR}{\text{$\mid$}\hspace{0pt}}
119 %
120 % Optional Parts, *
121 \newcommand{\OPn}[1]{{{#1}\text{${}^{*}$}}}
122 %
123 % Required Parts, +
124 \newcommand{\RP}[1]{{{#1}\text{${}^{+}$}}}
125 %
126 %
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]{{$\Big\{${#1}$\Big\}^{\!\!+}$}}
137 \newcommand{\GOop}[1]{{$\big\{${#1}$\big\}^{\!\!+}$}}
138 \newcommand{\Goop}[1]{{$\{${#1}$\}^{\!+}$}}
139 %
140 % Vertically Arranged Group of Alternatives, {
141 % usage: \xorGOO{line1\\ line2...}{closing delimiter}
142 \newcommand{\xorGOO}[2]{\text{\(%
143 \left\{%
144 \begin{array}{l}%
145 #1%
146 \end{array}%
147 \right#2%
148 \)}}
149 %
150 % Vertically Arranged Group of Optional Objects, {|
151 % usage: \orGOO{line1\\line2}{closing delimiter}
152 \newcommand{\orGOO}[2]{\text{\(%
153 \left\{\!\left|%
154 \begin{array}{l}%
155 #1%
156 \end{array}%
157 \right.\right#2%
158 \)}}
159 %
160 % Vertically Arranged Group of Objects, No Opening {
161 % usage: \arrGOO{line1\\line2}{closing delimiter}
162 \newcommand{\arrGOO}[2]{{\(%
163 \left.%
164 \begin{array}{l}%
165 #1%
166 \end{array}%
167 \right#2%
168 \)}}
169 %
170 % Boxed Group of Alternatives
171 % usage: \boxGOO{line1\\ line2...}
172 \newcommand{\boxGOO}[1]{\text{\hspace{1ex}\(%
173 \setlength{\fboxsep}{1pt}\setlength{\fboxrule}{0pt}
174 \boxed{
175 \setlength{\fboxsep}{1pt}\setlength{\fboxrule}{.1pt}
176 \boxed{\;%
177 \begin{array}{l}%
178 #1%
179 \end{array}%
180 }%
181 }%
182 \)}}
183 %
184 %
185 % All sorts of keywords
186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 %
188 % Generic Keyword, Lowercase
189 \newcommand{\kwd}[1]{\text{{\sffamily\bfseries\selectfont%
190 \lowercase{#1}}}}
191 % Generic Keyword, Uppercase
192 \newcommand{\KWD}[1]{\text{{\sffamily\bfseries\selectfont%
193 \uppercase{#1}}}}
194 % Special Form
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}}}}}
197 % Function
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}}}}}
200 % Generic Function
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}}}}}
203 % Variable
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}}}}}
206 % Constant
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}}}}}
209 % Loop Keyword
210 \newcommand{\LKWD}[1]{\text{{\sffamily\bfseries\selectfont%
211 {\raisebox{1.4ex}[1ex][0pt]{\tiny\sffamily\mdseries\makebox[0pt][l]{\hspace{.5em}}}\lowercase{#1}}}}}
212
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}}}}
217
218 % T and NIL
219 \newcommand{\T}{\text{\ttfamily T}}
220 \newcommand{\NIL}{\text{\ttfamily NIL}}
221 % ~
222 \newcommand{\TLD}{{\textasciitilde}}
223
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}}}
233
234 \begin{document}
235
236 \newlength{\titlepagewidth}
237 \setlength{\titlepagewidth}{8cm}
238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239 %% Front Cover
240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 \begin{titlepage}
242 \renewcommand{\rmdefault}{ptm} %% Always times font on title
243 \vspace*{15mm}
244 \begin{center}
245 \begin{minipage}{\titlepagewidth}
246 \begin{center}
247 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
248 Quick Reference\\
249 \end{center}
250 \end{minipage}
251 \vfill
252 \begin{minipage}{\titlepagewidth}
253 \begin{center}
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$}\\
258 \end{center}
259 \end{minipage}
260 \vfill
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}\\
266 lisp\\[-10mm]
267 \rule[15mm]{5.5cm}{1.5mm}\hfill\rule[15mm]{1.77cm}{1.5mm}
268 \end{minipage}
269 \begin{minipage}{\titlepagewidth}
270 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
271 Bert Burgemeister
272 \vspace*{4mm}
273 \end{minipage}
274 \end{center}
275
276 \end{titlepage}
277
278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
279 \section*{\contentsname}
280 \vspace{-3ex}
281 {%
282 \setlength{\columnsep}{1.5em}%
283 \begin{multicols}{2}
284 \tableofcontents
285 \end{multicols}%
286 }
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288 \vfill
289 \raggedright
290
291 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
292 \section*{Typographic Conventions}
293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294
295 \begin{LIST}{1cm}
296
297 \IT{\kwd{NAME}, \FU{NAME}, \SF{NAME}, \GFU{NAME}, \V{*name*},
298 \CNS{name}}
299 Symbol defined in Common Lisp; esp. function, special form, generic function,
300 variable, constant.
301
302 \IT{\VAR{them}\DF{\LIT{foo}}} Placeholder for actual code. Defaults to \LIT{foo}.
303
304 \IT{\LIT{me}} Text to input literally, or output literally.
305
306 \IT{\Op{\VAR{foo}}} Either one \VAR{foo} or nothing.
307
308 \IT{\OPn{\VAR{foo}}; \Goos{\VAR{foo}}} Any number of \VAR{foo}s.
309
310 \IT{\RP{\VAR{foo}}; \Goop{\VAR{foo}}} One or more \VAR{foo}s.
311
312 \IT{\Goo{\VAR{foo}\XOR\VAR{bar}\XOR\VAR{baz}};
313 \xorGOO{
314 \VAR{foo}\\
315 \VAR{bar}\\
316 \VAR{baz}%
317 }{.}}
318 Either \VAR{foo}, or \VAR{bar}, or \VAR{baz}.
319
320 \IT{\orGOO{
321 \VAR{foo}\\
322 \VAR{bar}\\
323 \VAR{baz}
324 }{.}}
325 Anything from none to all of \VAR{foo}, \VAR{bar}, and \VAR{baz}.
326
327 \IT{\retval{\VAR{foo}}; \retvalii{\VAR{bar}}; \retvaliii{\VAR{baz}}}
328 \VAR{foo}, \VAR{bar}, \VAR{baz} are 1st, 2nd, and 3rd return value.
329
330 \IT{\T}
331 \kwd*{T}, or truth.
332
333 \IT{\NIL}
334 \kwd*{NIL}, falsehood, or \kwd{()}.
335
336 \end{LIST}
337 \clearpage
338 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
339 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
340 %%% Content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%
341 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
342 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
343 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344
345 \input{clqr-numbers}
346
347 \input{clqr-characters}
348
349 \input{clqr-strings}
350
351 \input{clqr-conses}
352
353 \input{clqr-arrays}
354
355 \input{clqr-sequences}
356
357 \input{clqr-hash-tables}
358
359 \input{clqr-structures}
360
361 \input{clqr-control-structure}
362
363 \input{clqr-clos}
364
365 \input{clqr-conditions-and-errors}
366
367 \input{clqr-input-output}
368
369 \input{clqr-system-types-and-classes}
370
371 \input{clqr-symbols-and-packages}
372
373 \input{clqr-compiler}
374
375 \input{clqr-environment}
376
377 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
378 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
380 \renewcommand{\indexpagestyle}{lispref}
381 \renewenvironment{theindex}%
382 {\begin{list}{}%
383 {\setlength{\itemindent}{-1em}\setlength{\leftmargin}{1em}}%
384 \parskip0pt\itemsep0pt}%
385 {\end{list}}
386 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 \section*{Index}
388 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
389 \vspace{-3ex}
390 \begin{multicols}{3}
391 % Stock \printindex won't do as we want three-column.
392 \tiny\sffamily\input{clqr.ind}
393 \end{multicols}
394
395
396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
397 % Make (total) page count a multiple of four.
398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
399 \clearpage
400 \pagestyle{empty}
401 \newcount\currentpage
402 \currentpage=\value{page}
403 \divide\currentpage by 4
404 \multiply\currentpage by 4
405 \advance\currentpage by -\value{page}
406 \ifthenelse{\equal{\the\currentpage}{-3}}{\rule{0pt}{0pt}\clearpage}{}
407 \ifthenelse{\equal{\the\currentpage}{-2}}{\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage}{}
408 \ifthenelse{\equal{\the\currentpage}{-1}}{\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage}{}
409 %
410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
411 %% Back Cover
412 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
413 \begin{titlepage}
414 \begin{center}
415 \renewcommand{\rmdefault}{ptm} %% Always times font on title
416 \vspace*{15mm}
417 \vfill
418 \begin{minipage}{\titlepagewidth}
419 \begin{center}
420 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
421 \reflectbox{{\color{lightgray}cl\/}}\\
422 %\ttfamily\mdseries\upshape\fontsize{200}{0}\selectfont
423 %{\color{Gray}$(\lambda)$}
424 \end{center}
425 \end{minipage}
426 \vfill
427 \rule{1.75cm}{0pt}
428 \vfill
429 \begin{minipage}{\titlepagewidth}
430 \hrule
431 \vspace{1.5mm}
432 \rmfamily\small
433 \makebox[\textwidth][l]{\maintitle\ \hfill Revision \revision [\number\year-\number\month-\number\day]}
434 \makebox[\textwidth][l]{Copyright \copyright\ 2008 Bert Burgemeister}\\
435
436 Permission is granted to copy, distribute and/or modify this
437 document under the terms of the GNU Free Documentation License,
438 Version 1.2 or any later version published by the Free Software
439 Foundation; with no Invariant Sections, no Front-Cover Texts and
440 no Back-Cover Texts.\\
441 http://www.gnu.org/licenses/fdl.html\\
442
443 \vspace{-1mm}
444 \hrule
445 \end{minipage}
446 \end{center}
447 \end{titlepage}
448
449 \end{document}
450 % -*-latex-*-
451
Something went wrong with that request. Please try again.