Skip to content

HTTPS clone URL

Subversion checkout URL

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