Outsourced usepackages and macros.
[clqr.git] / clqr.tex
blob26ce8125e79185d456bff04cd7ff61f1447ca7be
1 % Copyright (C) 2008, 2009 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 %%%%%%%%%%%%%%%%%%
14 % pdf info
15 \newcommand{\SUBJECT}{Common\ Lisp}
16 \newcommand{\KEYWORDS}{{clqr cheatsheet lisp reference booklet}}
18 %%%%%%%%%%%%%%%%%%
19 % To be reset in paper-*.tex if there is plenty of room
20 \newcommand{\clearpagebeforeindex}{}
23 \documentclass[8pt,pagesize,twoside,footexclude,headexclude]{scrartcl}
26 %%%%%%%%%%%%%%%%%%
27 % outsourced page dimensions
28 \input{paper-current}
29 %\setlength{\paperwidth}{10.5cm}
30 %\setlength{\paperheight}{29.7cm}
31 %%\areaset[3mm]{9cm}{28.3cm}
32 %\typearea[2mm]{20}
33 %\renewcommand{\clearpagebeforeindex}{\clearpage}
34 %%%%%%%%%%%%%%%%%%
36 %%%%%%%%%%%%%%%%%%
37 % outsourced hypertext colors
38 \input{color-current}
39 %\newcommand{\linkcolor}{Fuchsia}
40 %\newcommand{\urlcolor}{MidnightBlue}
41 %\newcommand{\bookmarks}{true}
42 %\newcommand{\pdfpagelayout}{TwoColumnLeft}
43 %%%%%%%%%%%%%%%%%%
45 \input{clqr.packages}
47 \makeindex
48 \titleformat{\section}{\sffamily\mdseries\slshape}
49 {\huge\thesection}{.7em}{\huge}[{\titlerule[0.25pt]}]
51 \titleformat{\subsection}{\sffamily\mdseries\slshape}
52 {\Large\thesubsection}{.7em}{\Large}[{\titlerule[0.25pt]}]
54 % Kill toc header as we want it to span columns
55 \makeatletter
56 \renewcommand{\toc@heading}{}
57 \makeatother
59 \titlecontents{section}%
60 [1.5em]%
61 {\vspace{.5em plus 1em minus .2em}\sffamily\bfseries\upshape\filright}%
62 {\contentslabel{1.5em}}%
63 {\hspace*{3em}}%
64 {\hfill\contentspage\vspace{.1em}}%
66 \titlecontents{subsection}%
67 [4em]%
68 {\sffamily\mdseries\upshape\filright}%
69 {\contentslabel{2.5em}}%
70 {\hspace*{5.5em}}%
71 {\hspace{.5ex plus .5ex minus .3ex}\titlerule*[1em]{.}\contentspage}%
73 \input{clqr.macros}
75 \begin{document}
77 \newlength{\titlepagewidth}
78 \setlength{\titlepagewidth}{8cm}
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80 %% Front Cover
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 \begin{titlepage}
83 \renewcommand{\rmdefault}{ptm} %% Always times fonts on title
84 \advance\oddsidemargin by 1.5mm
85 \vspace*{15mm}
86 \begin{center}
87 \begin{minipage}{\titlepagewidth}
88 \begin{center}
89 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
90 Quick Reference\\
91 \end{center}
92 \end{minipage}
93 \vfill
94 \begin{minipage}{\titlepagewidth}
95 \begin{center}
96 \rmfamily\mdseries\itshape%
97 \fontsize{300}{0}\selectfont{\color{frontcovergray}cl\/}\\
98 \end{center}
99 \end{minipage}
100 \vfill
101 \begin{minipage}{\titlepagewidth}
102 \rmfamily\mdseries\itshape\fontsize{36}{0}\selectfont
103 \hfill Common\/\\[2mm]
104 \rmfamily\mdseries\upshape\fontsize{157}{0}\selectfont
105 \rule[3mm]{\textwidth}{1.5mm}\\
106 lisp\\[-10mm]
107 \rule[15mm]{5.5cm}{1.5mm}\hfill\rule[15mm]{1.77cm}{1.5mm}
108 \end{minipage}\\
109 \begin{minipage}{\titlepagewidth}
110 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
111 \AUTHOR
112 \vspace*{4mm}
113 \end{minipage}
114 \end{center}
116 \end{titlepage}
118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
119 % TOC
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
121 \section*{\contentsname}
122 \vspace{-3ex}
124 \setlength{\columnsep}{1.5em}%
125 \begin{multicols}{2}
126 \tableofcontents
127 \end{multicols}%
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130 \vfill
131 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 %%% CONTENT STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%
134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
136 \input{clqr-typographic-conventions}
137 \clearpage
138 \input{clqr-numbers}
139 \input{clqr-characters}
140 \input{clqr-strings}
141 \input{clqr-conses}
142 \input{clqr-arrays}
143 \input{clqr-sequences}
144 \input{clqr-hash-tables}
145 \input{clqr-structures}
146 \input{clqr-control-structure}
147 \input{clqr-clos}
148 \input{clqr-conditions-and-errors}
149 \input{clqr-input-output}
150 \input{clqr-types-and-classes}
151 \input{clqr-packages-and-symbols}
152 \input{clqr-compiler}
153 \input{clqr-external-environment}
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159 \clearpagebeforeindex % \clearpage dependent on paper size
161 \renewcommand{\indexpagestyle}{lispref}
162 \renewenvironment{theindex}%
163 {\begin{list}{}%
164 {\setlength{\itemindent}{-1em}\setlength{\leftmargin}{1em}}%
165 \parskip0pt plus .1pt \itemsep0pt%
166 \raggedright\looseness=-1%
168 {\end{list}}
169 \begin{multicols}{4}
170 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171 [\section*{Index}\vspace{-5ex}]
172 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173 % Stock \printindex won't do as we want more than two columns.
174 \tiny\sffamily\input{clqr.ind}
175 \end{multicols}
178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179 % Make (total) page count a multiple of four.
180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 \clearpage
182 \pagestyle{empty}
183 \newcount\currentpage
184 \currentpage=\value{page}
185 \divide\currentpage by 4
186 \multiply\currentpage by 4
187 \advance\currentpage by -\value{page}
189 \ifnum\the\currentpage=-3
190 \rule{0pt}{0pt}\clearpage
191 \else\ifnum\the\currentpage=-2
192 \rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage
193 \else\ifnum\the\currentpage=-1
194 \rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage
195 \fi\fi\fi
197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198 %% Back Cover
199 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200 \begin{titlepage}
201 \advance\evensidemargin by -1.5mm
202 \begin{center}
203 \renewcommand{\rmdefault}{ptm} %% Always times fonts on title
204 \vspace*{20pt}
205 \vfill
206 \begin{minipage}{\titlepagewidth}
207 \begin{center}
208 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
209 \reflectbox{{\color{backcovergray}cl\/}}\\
210 \end{center}
211 \end{minipage}
212 \vfill
213 \vspace*{40.5mm}% Adjust here if text below changes
214 \begin{minipage}{\titlepagewidth}
215 \hrule
216 \vspace{1.5mm}
217 \rmfamily\small
218 \makebox[\textwidth][l]{\maintitle\ \hfill Revision \input{REVISION}
219 [\input{DATE}\hspace{-.65ex}]}
220 \makebox[\textwidth][l]{Copyright \copyright\ 2008, 2009
221 \AUTHOR\hfill}
222 \makebox[\textwidth][l]{\LaTeX\ source:
223 \href{http://clqr.berlios.de}{http://clqr.berlios.de}\hfill}\\[1mm]
224 Permission is granted to copy, distribute and/or modify this
225 document under the terms of the GNU Free Documentation License,
226 Version 1.2 or any later version published by the Free Software
227 Foundation; with no Invariant Sections, no Front-Cover Texts and
228 no Back-Cover Texts.\hfill
229 \href{http://www.gnu.org/licenses/fdl.html}{http://www.gnu.org/licenses/fdl.html}\\
230 \vspace{-1mm}
231 \hrule
232 \end{minipage}
233 \end{center}
234 \end{titlepage}
236 \end{document}
237 % -*-latex-*-
239 % LocalWords: ptm lightgray cl lispref theindex pt
241 %%% Local Variables:
242 %%% mode: latex
243 %%% TeX-master: t
244 %%% End: