Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 440 lines (404 sloc) 13.793 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{\(%
8593f12 @trebb rearragements, changes in layout
authored
142 \left\{\!%
57fec11 @trebb intial revision, cleaned for public
authored
143 \begin{array}{l}%
144 #1%
8593f12 @trebb rearragements, changes in layout
authored
145 \end{array}\!%
57fec11 @trebb intial revision, cleaned for public
authored
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%
8593f12 @trebb rearragements, changes in layout
authored
155 \end{array}\!%
57fec11 @trebb intial revision, cleaned for public
authored
156 \right.\right#2%
157 \)}}
158 %
159 % Vertically Arranged Group of Objects, No Opening {
160 % usage: \arrGOO{line1\\line2}{closing delimiter}
8593f12 @trebb rearragements, changes in layout
authored
161 \newcommand{\arrGOO}[2]{{\(\!%
57fec11 @trebb intial revision, cleaned for public
authored
162 \left.%
163 \begin{array}{l}%
164 #1%
8593f12 @trebb rearragements, changes in layout
authored
165 \end{array}\!%
57fec11 @trebb intial revision, cleaned for public
authored
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 \end{center}
256 \end{minipage}
257 \vfill
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}\\
263 lisp\\[-10mm]
264 \rule[15mm]{5.5cm}{1.5mm}\hfill\rule[15mm]{1.77cm}{1.5mm}
265 \end{minipage}
266 \begin{minipage}{\titlepagewidth}
267 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
268 Bert Burgemeister
269 \vspace*{4mm}
270 \end{minipage}
271 \end{center}
272
273 \end{titlepage}
274
275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
276 \section*{\contentsname}
277 \vspace{-3ex}
278 {%
279 \setlength{\columnsep}{1.5em}%
280 \begin{multicols}{2}
281 \tableofcontents
282 \end{multicols}%
283 }
284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
285 \vfill
8593f12 @trebb rearragements, changes in layout
authored
286 \begin{flushleft}
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288 \section*{Typographic Conventions}
289 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
290
291 \begin{LIST}{1cm}
292
293 \IT{\kwd{NAME}, \FU{NAME}, \SF{NAME}, \GFU{NAME}, \V{*name*},
294 \CNS{name}}
295 Symbol defined in Common Lisp; esp. function, special form, generic function,
296 variable, constant.
297
298 \IT{\VAR{them}\DF{\LIT{foo}}}
299 Placeholder for actual code. Defaults to \LIT{foo}.
300
301 \IT{\LIT{me}}
302 Text to input literally, or output literally.
303
304 \IT{\Op{\VAR{foo}}}
305 Either one \VAR{foo} or nothing.
306
307 \IT{\OPn{\VAR{foo}}; \Goos{\VAR{foo}}}
308 Zero or more \VAR{foo}s.
309
310 \IT{\RP{\VAR{foo}}; \Goop{\VAR{foo}}}
311 One or more \VAR{foo}s.
312
313 \IT{\VAR{foos}}
314 English plural denotes a list argument.
315
316 \IT{\Goo{\VAR{foo}\XOR\VAR{bar}\XOR\VAR{baz}};
317 \xorGOO{
318 \VAR{foo}\\
319 \VAR{bar}\\
320 \VAR{baz}%
321 }{.}}
322 Either \VAR{foo}, or \VAR{bar}, or \VAR{baz}.
323
324 \IT{\orGOO{
325 \VAR{foo}\\
326 \VAR{bar}\\
327 \VAR{baz}
328 }{.}}
329 Anything from none to all of \VAR{foo}, \VAR{bar}, and \VAR{baz}.
330
331 \IT{\retval{\VAR{foo}}; \retvalii{\VAR{bar}}; \retvaliii{\VAR{baz}}}
332 \VAR{foo}, \VAR{bar}, \VAR{baz} are 1st, 2nd, and 3rd return value.
333
334 \IT{\T}
335 \kwd*{T}, or truth.
336
337 \IT{\NIL}
338 \kwd*{NIL}, falsehood, or \kwd{()}.
339
340 \end{LIST}
341 \clearpage
342 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
343 %%% Content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%
344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345
346 \input{clqr-numbers}
347 \input{clqr-characters}
348 \input{clqr-strings}
349 \input{clqr-conses}
350 \input{clqr-arrays}
351 \input{clqr-sequences}
352 \input{clqr-hash-tables}
353 \input{clqr-structures}
354 \input{clqr-control-structure}
355 \input{clqr-clos}
356 \input{clqr-conditions-and-errors}
357 \input{clqr-input-output}
358 \input{clqr-system-types-and-classes}
359 \input{clqr-packages-and-symbols}
360 \input{clqr-compiler}
361 \input{clqr-environment}
362
363 \end{flushleft}
57fec11 @trebb intial revision, cleaned for public
authored
364
365 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
366 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8593f12 @trebb rearragements, changes in layout
authored
368 %
369 %\clearpage % Uncomment this line to save some space
370 %
57fec11 @trebb intial revision, cleaned for public
authored
371 \renewcommand{\indexpagestyle}{lispref}
372 \renewenvironment{theindex}%
373 {\begin{list}{}%
374 {\setlength{\itemindent}{-1em}\setlength{\leftmargin}{1em}}%
375 \parskip0pt\itemsep0pt}%
376 {\end{list}}
8593f12 @trebb rearragements, changes in layout
authored
377 \begin{multicols}{4}
8db8f39 @trebb added missing symbols
authored
378 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
379 [\section*{Index}\vspace{-5ex}]
380 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57fec11 @trebb intial revision, cleaned for public
authored
381 % Stock \printindex won't do as we want three-column.
382 \tiny\sffamily\input{clqr.ind}
383 \end{multicols}
384
385
386 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 % Make (total) page count a multiple of four.
388 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
389 \clearpage
390 \pagestyle{empty}
391 \newcount\currentpage
392 \currentpage=\value{page}
393 \divide\currentpage by 4
394 \multiply\currentpage by 4
395 \advance\currentpage by -\value{page}
396 \ifthenelse{\equal{\the\currentpage}{-3}}{\rule{0pt}{0pt}\clearpage}{}
397 \ifthenelse{\equal{\the\currentpage}{-2}}{\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage}{}
398 \ifthenelse{\equal{\the\currentpage}{-1}}{\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage}{}
399 %
400 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
401 %% Back Cover
402 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
403 \begin{titlepage}
404 \begin{center}
405 \renewcommand{\rmdefault}{ptm} %% Always times font on title
406 \vspace*{15mm}
407 \vfill
408 \begin{minipage}{\titlepagewidth}
409 \begin{center}
410 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
411 \reflectbox{{\color{lightgray}cl\/}}\\
412 \end{center}
413 \end{minipage}
414 \vfill
415 \rule{1.75cm}{0pt}
416 \vfill
417 \begin{minipage}{\titlepagewidth}
418 \hrule
419 \vspace{1.5mm}
420 \rmfamily\small
d18f824 @trebb minor changes
authored
421 \makebox[\textwidth][l]{\maintitle\ \hfill Revision \input{REVISION}
422 [\input{DATE}\hspace{-.65ex}]}
28e57ae @trebb minor changes
authored
423 \makebox[\textwidth][l]{Copyright \copyright\ 2008 Bert
d18f824 @trebb minor changes
authored
424 Burgemeister\hfill\LaTeX\ source:
425 http://clqr.berlios.de}\\[1.5mm]
57fec11 @trebb intial revision, cleaned for public
authored
426 Permission is granted to copy, distribute and/or modify this
427 document under the terms of the GNU Free Documentation License,
428 Version 1.2 or any later version published by the Free Software
429 Foundation; with no Invariant Sections, no Front-Cover Texts and
28e57ae @trebb minor changes
authored
430 no Back-Cover Texts.\hfill
57fec11 @trebb intial revision, cleaned for public
authored
431 http://www.gnu.org/licenses/fdl.html\\
432 \vspace{-1mm}
433 \hrule
434 \end{minipage}
435 \end{center}
436 \end{titlepage}
437
438 \end{document}
439 % -*-latex-*-
Something went wrong with that request. Please try again.