Enable 'touchscreen areas' on the D2, based on JdGordon's m:robe code. Disable the...
[kugel-rb.git] / manual / preamble.tex
blob3339e8833a67610199747ca3f8bb033c84a3cdcc
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % __________ __ ___.
3 % Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 % Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 % Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 % Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 % \/ \/ \/ \/ \/
8 % - M A N U A L -
10 % $Id$
12 % Copyright (C) 2006 The Rockbox Manual Team
14 % All files in this archive are subject to the GNU Free Documentation License
15 % See the file COPYING-MANUAL in the source tree docs/ directory for full license
16 % agreement.
18 % Contributors are listed in the file docs/CREDITS-MANUAL
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 \documentclass[a4paper,11pt]{scrreprt}
23 \usepackage[utf8x]{inputenc}
24 \usepackage{palatino}
26 \usepackage{tabularx}
27 \usepackage{multirow}
28 \usepackage{multicol}
30 \usepackage{float}
31 \floatstyle{ruled}
33 \usepackage{hyperref}
35 \usepackage{optional}
37 \input{platform/\platform.tex}
38 \input{features.tex}
40 \newcommand{\playername}{\playerman\ \playerlongtype}
42 \hypersetup{% add some values to the pdf properties
43 colorlinks = true,
44 pdfstartview = FitV,
45 linkcolor = blue,
46 citecolor = blue,
47 urlcolor = blue,
48 pdftitle = {Rockbox user manual},
49 pdfauthor = {The Rockbox Team},
50 pdfsubject = {Rockbox user manual for \playername}
53 \newcommand{\fname}[1]{\texttt{#1}}
54 \newcommand{\tabeltc}[1]{{\centering #1 \par}}
55 \newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
57 \newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
59 \usepackage{fancyhdr}
60 \usepackage{graphicx}
61 \usepackage{verbatim}
62 \usepackage{makeidx}
63 \usepackage{fancyvrb}
64 \usepackage{enumerate}
65 \usepackage{color}
66 \ifpdfoutput{\usepackage{booktabs}}%
67 {\newcommand{%
68 \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}%
70 \usepackage{longtable}
71 \usepackage{url}
72 \urlstyle{sf}
73 \usepackage{marvosym}
74 \usepackage{ifthen}
75 \usepackage{rotating}
77 % mark this ad draft version (only for pdflatex) -- comment this out at release
78 \ifpdfoutput{
79 \usepackage{pdfdraftcopy}
80 \draftstring{DRAFT VERSION}
81 % \draftangle{45}
84 % pdf output: try pdf first, then png and jpg as file format
85 % html output: try png first, then jpg. Ignore pdf files
86 % this only applies if no file extension is given!
87 \ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}%
88 {\DeclareGraphicsExtensions{.png,.jpg}}
90 % fancy header style adjustments
91 \fancyhead{}
92 \fancyfoot{}
93 \fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
94 \fancyhead[R]{\iffloatpage{}{\thepage}}
95 \fancyfoot[L]{\textsc{The Rockbox manual}}
96 \fancyfoot[R]{\textsc{\playerman{} \playertype}}
97 \fancypagestyle{plain}{}
99 \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
100 \renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
101 \setlength{\headheight}{18.5pt}
102 \newcounter{example}[chapter]
104 %% \newenvironment{example}
105 %% {\stepcounter{example}\paragraph{Example \theexample:}}
106 %% {\hfill$\Box$
108 %% \bigskip
109 %% \noindent}
111 % found on the internet, posting by Donald Arseneau
112 % I may as well include my robust expandable definions, which can be
113 % used in \edef or \write where the \def would not be executed:
115 % \if\blank --- checks if parameter is blank (Spaces count as blank)
116 % \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
117 % \if\nil --- checks if parameter is null (spaces are NOT null)
118 % use \if\given{ } ... \else ... \fi etc.
120 {\catcode`\!=8 % funny catcode so ! will be a delimiter
121 \catcode`\Q=3 % funny catcode so Q will be a delimiter
122 \long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
123 \long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
124 \long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
125 \long\gdef\IfN@Ught#1 #2!{\blank{#2}}
126 \long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
129 % add screenshot image.
130 % Usage: \screenshot{filename}{caption}{label}
131 % By using the 'H' (HERE) placement, the screenshots are placed where
132 % we want them.
133 % Note: use this only for screenshots!
134 % Note: leave caption empty to supress it.
135 \newcommand{\screenshot}[3]{
136 \begin{figure}[H]
137 \begin{center}
138 \IfFileExists{#1-\genericimg-\specimg.png}
139 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
140 \typeout{Note: device specific image used}}
141 {\IfFileExists{#1-\genericimg.png}
142 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
143 {\IfFileExists{#1}
144 {\includegraphics[width=\screenshotsize]{#1}
145 \typeout{Warning: deprecated plain image name used}}%
146 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
147 \color{red}{\textbf{WARNING!} Image not found}%
151 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
152 \caption{#2}}\fi
153 \end{center}
154 \end{figure}
157 % command to display a note.
158 % Usage: \note{text of your note}
159 % Note: do NOT use \textbf or similar to emphasize text, use \emph!
160 \ifpdfoutput{
161 \newcommand{\note}[1]{
162 \ifinner\else\par\noindent\fi
163 \textbf{Note:}\ %
164 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
166 {\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
168 % command to display a warning.
169 % Usage: \warn{text of your warning}
170 % Note: do NOT use \textbf or similar to emphasize text!
171 \ifpdfoutput{
172 \newcommand{\warn}[1]{
173 \ifinner\else\par\noindent\fi
174 \textbf{Warning:\ }%
175 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
177 {\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
179 % command to mark a text block as intended especially for blind people
180 % Usage: \blind{text}
181 \ifpdfoutput{
182 \newcommand{\blind}[1]{
183 \ifinner\else\par\noindent\fi
184 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
186 {\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
188 % make table floats use "H" (as for screenshots) as default positioning
189 \makeatletter\renewcommand{\fps@table}{H}\makeatother
190 % change defaults for floats on a page as we have a lot of small images
191 \setcounter{topnumber}{3} % default: 2
192 \setcounter{bottomnumber}{2} % default: 1
193 \setcounter{totalnumber}{5} % default: 3
195 % command to set the default table heading for button lists
196 \newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
198 % environment intended to be used with button maps
199 % usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
200 % Note: this automatically sets the table lines.
201 % Note: you *need* to terminate the last line with a linebreak \\
202 % Note: you still need to enclose this with \begin{table} / \end{table}
203 % Cheers for the usenet helping me building this up :)
204 \newenvironment{btnmap}[2]{%
205 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
206 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
207 \bottomrule
208 \SavedEndTab%
209 \if\given{#1}\caption{#1}\fi%
210 \if\given{#2}\label{#2}\fi%
211 \endcenter%
213 \center
214 \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule % here is the table width defined
215 \btnhead
217 \endtabularx
220 % command to set the default table heading for button lists
221 \newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
223 % environment intended to be used with tag maps (for wps)
224 % usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
225 % Note: this automatically sets the table lines.
226 % Note: you *need* to terminate the last line with a linebreak \\
227 % Note: you still need to enclose this with \begin{table} / \end{table}
228 % Cheers for the usenet helping me building this up :)
229 \newenvironment{tagmap}[2]{%
230 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
231 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
232 \bottomrule
233 \SavedEndTab%
234 \if\given{#1}\caption{#1}\fi%
235 \if\given{#2}\label{#2}\fi%
236 \endcenter%
238 \center
239 \tabularx{\textwidth}{lX}\toprule % here is the table width defined
240 \taghead
242 \endtabularx
245 \newcommand{\setting}[1]{\textsc{#1}}
247 \newcommand{\config}[1]{\texttt{#1}}
249 % set link to download server
250 % Usage: \download{bootloader/bootloader-ipodnano.ipod}
251 % gets expanded to
252 % "http://download.rockbox.org/bootloader/bootloader-ipodnano.ipod"
253 \newcommand{\download}[1]{\url{http://download.rockbox.org/#1}}
255 % set link to the wiki.
256 % Usage: \wikilink{WebHome}
257 % with "WebHome" being the wiki page name
258 \newcommand{\wikibaseurl}{http://www.rockbox.org/wiki/}
259 \ifpdfoutput{\newcommand{\wikiicon}{\Pointinghand}}
260 {\newcommand{\wikiicon}{}}
261 \newcommand{\wikilink}[1]{\wikiicon{}\href{\wikibaseurl#1}{#1}}
262 %\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/wiki/#1}}
264 % define environment "code" based on fancyvrb.
265 % use it to set code the user should type / see on his screen.
266 % Note: the first 4 characters of each line will be stripped,
267 % requiring everything to be indendet by exactly _4_ spaces!
268 % This is intended to make the LaTeX sources more readable.
269 % Note: when using the code environment you need to use optv instead of opt!
270 \DefineVerbatimEnvironment{code}{Verbatim}%
271 {framerule=0.4pt, framesep=1ex,frame=lines,%numbers=left,stepnumber=5,%
272 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
273 label=\textnormal{\textsc{Code}},%
274 commandchars=\\\{\}%
277 % define environment "example" based on fancyvrb.
278 % use it to set example code the user should type / see on his screen.
279 % Note: the first 4 characters of each line will be stripped,
280 % requiring everything to be indendet by exactly _4_ spaces!
281 % This is intended to make the LaTeX sources more readable.
282 % Note: when using the example environment you need to use optv instead of opt!
283 \DefineVerbatimEnvironment{example}{Verbatim}%
284 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
285 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
286 label=\textnormal{\textsc{Example}},%
287 commandchars=\\\{\}%
290 % Use the nopt command to exclude a certain defined feature from a sectio
291 % Example:
292 % \nopt{ondio}{This text will be excluded for ondios}
293 \newcommand{\optnvalue}{0}
294 \newcommand{\nopt}[2]{%
295 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
296 \ifthenelse{\optnvalue > 0}{}{#2}%
299 % Use the reference to handle get a flexible reference command
300 % usage \reference{ref_section}
301 \ifpdfoutput{%
302 \newcommand{\reference}[1]{%
303 section~\ref{#1} (page~\pageref{#1})%
305 {\newcommand{\reference}[1]{section~\ref{#1}}}
307 % special HTML output adjustments
308 \ifpdfoutput{}{\setlength{\parindent}{0mm}}
309 \ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
311 \newcommand{\btnfnt}[1]{\textbf{#1}}
312 %\hfuzz=2pt
314 % generate index
315 \usepackage{makeidx}
316 \makeindex