Adapt build process to FreeBSD
[clqr.git] / clqr.tex
blob1cef3827717e60e85b23066b271bc6b40937a2c3
1 % Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014
2 % Bert Burgemeister
4 % Permission is granted to copy, distribute and/or modify this
5 % document under the terms of the GNU Free Documentation License,
6 % Version 1.2 or any later version published by the Free Software
7 % Foundation; with no Invariant Sections, no Front-Cover Texts and
8 % no Back-Cover Texts. For details see file COPYING.
11 \newcommand{\maintitle}{Common\ Lisp\ Quick\ Reference}
12 \newcommand{\AUTHOR}{Bert\ Burgemeister}
14 %%%%%%%%%%%%%%%%%%
15 % pdf info
16 \newcommand{\SUBJECT}{Common\ Lisp}
17 \newcommand{\KEYWORDS}{{clqr cheatsheet lisp reference booklet}}
19 %%%%%%%%%%%%%%%%%%
20 % To be reset in paper-*.tex if there is plenty of room
21 \newcommand{\clearpagebeforeindex}{}
24 \documentclass[8pt,pagesize,twoside,footinclude=false,headinclude=false]{scrartcl}
27 %%%%%%%%%%%%%%%%%%
28 % outsourced page dimensions
29 \input{paper-current}
30 %\setlength{\paperwidth}{10.5cm}
31 %\setlength{\paperheight}{29.7cm}
32 %%\areaset[3mm]{9cm}{28.3cm}
33 %\typearea[2mm]{20}
34 %\renewcommand{\clearpagebeforeindex}{\clearpage}
35 %%%%%%%%%%%%%%%%%%
37 %%%%%%%%%%%%%%%%%%
38 % outsourced hypertext colors
39 \input{color-current}
40 %\newcommand{\linkcolor}{Fuchsia}
41 %\newcommand{\urlcolor}{MidnightBlue}
42 %\newcommand{\bookmarks}{true}
43 %\newcommand{\pdfpagelayout}{TwoColumnLeft}
44 %%%%%%%%%%%%%%%%%%
46 \input{clqr.packages}
47 % should remain last usepackage:
48 \usepackage%
49 [breaklinks,linktocpage,colorlinks,%
50 bookmarksnumbered,bookmarks=\bookmarks,%
51 linkcolor=\linkcolor,urlcolor=\urlcolor,%
52 pdfpagelayout=\pdfpagelayout,%
53 pdftitle=\maintitle,pdfauthor=\AUTHOR,%
54 pdfsubject=\SUBJECT,pdfkeywords=\KEYWORDS]%
55 {hyperref}
57 \makeindex
58 \titleformat{\section}{\sffamily\mdseries\slshape}
59 {\huge\thesection}{.7em}{\huge}[{\titlerule[0.25pt]}]
61 \titleformat{\subsection}{\sffamily\mdseries\slshape}
62 {\Large\thesubsection}{.7em}{\Large}[{\titlerule[0.25pt]}]
64 % Kill toc header as we want it to span columns
65 \deftocheading{toc}{}
67 \titlecontents{section}%
68 [1.5em]%
69 {\vspace{.5em plus 1em minus .2em}\sffamily\bfseries\upshape\filright}%
70 {\contentslabel{1.5em}}%
71 {\hspace*{3em}}%
72 {\hfill\contentspage\vspace{.1em}}%
74 \titlecontents{subsection}%
75 [4em]%
76 {\sffamily\mdseries\upshape\filright}%
77 {\contentslabel{2.5em}}%
78 {\hspace*{5.5em}}%
79 {\hspace{.5ex plus .5ex minus .3ex}\titlerule*[1em]{.}\contentspage}%
81 \input{clqr.macros}
83 \begin{document}
85 \newlength{\titlepagewidth}
86 \setlength{\titlepagewidth}{8cm}
87 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88 %% Front Cover
89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90 \begin{titlepage}
91 \renewcommand{\rmdefault}{ptm} %% Always times fonts on title
92 \advance\oddsidemargin by 1.5mm
93 \vspace*{15mm}
94 \begin{center}
95 \begin{minipage}{\titlepagewidth}
96 \begin{center}
97 \rmfamily\mdseries\itshape\fontsize{20}{0}\selectfont
98 Quick Reference\index{CLQR}\\
99 \end{center}
100 \end{minipage}
101 \vfill
102 \begin{minipage}{\titlepagewidth}
103 \begin{center}
104 \rmfamily\mdseries\itshape%
105 \fontsize{300}{0}\selectfont{\color{frontcovergray}cl\/}\\
106 \end{center}
107 \end{minipage}
108 \vfill
109 \begin{minipage}{\titlepagewidth}
110 \rmfamily\mdseries\itshape\fontsize{36}{0}\selectfont
111 \hfill Common\/\\[2mm]
112 \rmfamily\mdseries\upshape\fontsize{157}{0}\selectfont
113 \rule[3mm]{\textwidth}{1.5mm}\\
114 lisp\\[-10mm]
115 \rule[15mm]{5.5cm}{1.5mm}\hfill\rule[15mm]{1.77cm}{1.5mm}
116 \end{minipage}\\
117 \begin{minipage}{\titlepagewidth}
118 \rmfamily\mdseries\upshape\fontsize{14}{0}\selectfont
119 \AUTHOR
120 \vspace*{4mm}
121 \end{minipage}
122 \end{center}
124 \end{titlepage}
126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 % TOC
128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129 \section*{\contentsname}
130 \vspace{-3ex}
132 \setlength{\columnsep}{1.5em}%
133 \begin{multicols}{2}
134 \tableofcontents
135 \end{multicols}%
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138 \vfill
139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
140 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141 %%% CONTENT STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%
142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 \input{clqr-typographic-conventions}
145 \clearpage
146 \input{clqr-numbers}
147 \input{clqr-characters}
148 \input{clqr-strings}
149 \input{clqr-conses}
150 \input{clqr-arrays}
151 \input{clqr-sequences}
152 \input{clqr-hash-tables}
153 \input{clqr-structures}
154 \input{clqr-control-structure}
155 \input{clqr-clos}
156 \input{clqr-conditions-and-errors}
157 \input{clqr-types-and-classes}
158 \input{clqr-input-output}
159 \input{clqr-packages-and-symbols}
160 \input{clqr-compiler}
161 \input{clqr-external-environment}
163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167 \clearpagebeforeindex % \clearpage dependent on paper size
169 \renewcommand{\indexpagestyle}{lispref}
170 \renewenvironment{theindex}%
171 {\begin{list}{}%
172 {\setlength{\itemindent}{-1em}\setlength{\leftmargin}{1em}}%
173 \parskip0pt plus .1pt \itemsep0pt%
174 \raggedright\looseness=-1%
176 {\end{list}}
177 \begin{multicols}{4}
178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179 [\section*{Index}\vspace{-5ex}]
180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 % Stock \printindex won't do as we want more than two columns.
182 \tiny\sffamily\input{clqr.ind}
183 \end{multicols}
186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 % Make (total) page count a multiple of four.
188 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189 \clearpage
190 \pagestyle{empty}
191 \newcount\currentpage
192 \currentpage=\value{page}
193 \divide\currentpage by 4
194 \multiply\currentpage by 4
195 \advance\currentpage by -\value{page}
197 \ifnum\the\currentpage=-3
198 \rule{0pt}{0pt}\clearpage
199 \else\ifnum\the\currentpage=-2
200 \rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage
201 \else\ifnum\the\currentpage=-1
202 \rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage\rule{0pt}{0pt}\clearpage
203 \fi\fi\fi
205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206 %% Back Cover
207 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
208 \begin{titlepage}
209 \advance\evensidemargin by -1.5mm
210 \begin{center}
211 \renewcommand{\rmdefault}{ptm} %% Always times fonts on title
212 \vspace*{20pt}
213 \vfill
214 \begin{minipage}{\titlepagewidth}
215 \begin{center}
216 \rmfamily\mdseries\itshape\fontsize{300}{0}\selectfont
217 \reflectbox{{\color{backcovergray}cl\/}}\\
218 \end{center}
219 \end{minipage}
220 \vfill
221 \vspace*{40.5mm}% Adjust here if text below changes
222 \begin{minipage}{\titlepagewidth}
223 \hrule
224 \vspace{1.5mm}
225 \rmfamily\small
226 \makebox[\textwidth][l]{\maintitle\
227 \hfill
228 Revision \input{REVISION}
229 [\input{DATE}\hspace{-.65ex}]}
230 \makebox[\textwidth][l]{Copyright \copyright\ 2008 - 2014
231 \AUTHOR\hfill}
232 \makebox[\textwidth][l]{\LaTeX\ source:
233 \href{http://clqr.boundp.org}{http://clqr.boundp.org}
234 \hfill
235 \raisebox{-1mm}[0mm][0mm]{\includegraphics[origin=c,height=5mm,keepaspectratio,angle=-40]{housefly.eps}}
236 }\\[1mm]
237 Permission is granted to copy, distribute and/or modify this
238 document under the terms of the GNU Free Documentation License,
239 Version 1.2 or any later version published by the Free Software
240 Foundation; with no Invariant Sections, no Front-Cover Texts and
241 no Back-Cover Texts.\hfill
242 \href{http://www.gnu.org/licenses/fdl.html}{http://www.gnu.org/licenses/fdl.html}\\
243 \vspace{-1mm}
244 \hrule
245 \end{minipage}
246 \end{center}
247 \end{titlepage}
249 \end{document}
250 % -*-latex-*-
252 % LocalWords: ptm lightgray cl lispref theindex pt
254 %%% Local Variables:
255 %%% mode: latex
256 %%% TeX-master: t
257 %%% End: