blob: 5a9ecccd1e331bcef07af50bed8e137913952e8f [file] [log] [blame]
Martin Arver3622c932006-03-29 18:48:52 +00001\documentclass[a4paper,11pt]{scrreprt}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00002\usepackage[latin1]{inputenc}
Martin Arver8bedb5c2006-03-22 23:26:30 +00003\usepackage{palatino}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00004
Martin Arverec60a052006-03-29 18:40:42 +00005\usepackage{tabularx}
Nils Wallméniusc687b302006-04-02 13:50:01 +00006\usepackage{multirow}
Dominik Riebelingb074b222006-06-05 10:08:54 +00007\usepackage{multicol}
Martin Arver0da41d82006-03-24 11:53:07 +00008
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00009\usepackage{float}
10\floatstyle{ruled}
11
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000012\usepackage{hyperref}
13
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000014\usepackage{optional}
15
16\input{platform/\platform.tex}
17
Martin Arver4c981062006-06-07 18:48:56 +000018\newcommand{\playername}{\playerman\ \playerlongtype}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000019
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000020\hypersetup{% add some values to the pdf properties
21 colorlinks = true,
22 pdfstartview = FitV,
23 linkcolor = blue,
24 citecolor = blue,
25 urlcolor = blue,
26 pdftitle = {Rockbox user manual},
27 pdfauthor = {The Rockbox Team},
28 pdfsubject = {Rockbox user manual for \playername}
29}
30
Martin Arver47ea9062006-06-07 12:15:46 +000031\newcommand{\fname}[1]{\texttt{#1}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000032\newcommand{\tabeltc}[1]{{\centering #1 \par}}
33\newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
34
Martin Arvera0cdee02006-03-31 12:25:22 +000035\newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
36
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000037\usepackage{fancyhdr}
38\usepackage{graphicx}
39\usepackage{verbatim}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000040\usepackage{makeidx}
41\usepackage{amsmath}
42\usepackage{amssymb}
43\usepackage{fancyvrb}
44\usepackage{enumerate}
45\usepackage{subfigure}
46\usepackage{color}
Martin Arvera245e882006-03-08 15:04:36 +000047\usepackage{booktabs}
Martin Arverd3d3e342006-03-15 10:56:14 +000048\usepackage{longtable}
Martin Arver7d6810c2006-03-31 11:50:33 +000049\usepackage{url}
50\urlstyle{sf}
Martin Arver9be37f32006-03-31 13:29:27 +000051\usepackage{marvosym}
Martin Arver1dbb2d22006-06-07 20:01:27 +000052\usepackage{ifthen}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000053
Dominik Riebeling009aeab2006-04-03 21:29:47 +000054% mark this ad draft version (only for pdflatex) -- comment this out at release
Dominik Riebeling6424c502006-07-17 19:10:31 +000055\ifpdfoutput{
Dominik Riebeling009aeab2006-04-03 21:29:47 +000056 \usepackage{pdfdraftcopy}
57 \draftstring{DRAFT VERSION}
58% \draftangle{45}
Dominik Riebeling6424c502006-07-17 19:10:31 +000059 }
Dominik Riebeling009aeab2006-04-03 21:29:47 +000060
Martin Arver6d5d7342006-03-30 22:03:46 +000061% fancy header style adjustments
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000062\fancyhead{}
63\fancyfoot{}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000064\fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
Martin Arver6d5d7342006-03-30 22:03:46 +000065\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000066\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000067\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000068\fancypagestyle{plain}{}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000069
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000070\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
71\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
72\setlength{\headheight}{18.5pt}
73\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +000074
Martin Arver47ea9062006-06-07 12:15:46 +000075%% \newenvironment{example}
76%% {\stepcounter{example}\paragraph{Example \theexample:}}
77%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000078
Martin Arver47ea9062006-06-07 12:15:46 +000079%% \bigskip
80%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +000081
Martin Arvercbc55992006-03-30 15:54:47 +000082% found on the internet, posting by Donald Arseneau
83% I may as well include my robust expandable definions, which can be
84% used in \edef or \write where the \def would not be executed:
85%
86% \if\blank --- checks if parameter is blank (Spaces count as blank)
87% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
88% \if\nil --- checks if parameter is null (spaces are NOT null)
89% use \if\given{ } ... \else ... \fi etc.
90%
91{\catcode`\!=8 % funny catcode so ! will be a delimiter
92\catcode`\Q=3 % funny catcode so Q will be a delimiter
93\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
94\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
95\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
96\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
97\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
98}
99
100% add screenshot image.
101% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000102% By using the 'H' (HERE) placement, the screenshots are placed where
103% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000104% Note: use this only for screenshots!
105% Note: leave caption empty to supress it.
106\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000107 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000108 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000109 \IfFileExists{#1-\genericimg-\specimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000110 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000111 \typeout{Note: device specific image used}}
112 {\IfFileExists{#1-\genericimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000113 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000114 {\IfFileExists{#1}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000115 {\includegraphics[width=\screenshotsize]{#1}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000116 \typeout{Warning: deprecated plain image name used}}%
117 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
118 \color{red}{\textbf{WARNING!} Image not found}%
119 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000120 }
121 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000122 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000123 \caption{#2}}\fi
124 \end{center}
125 \end{figure}
126}
Martin Arver0da41d82006-03-24 11:53:07 +0000127
Martin Arver9be37f32006-03-31 13:29:27 +0000128% command to display a note.
129% Usage: \note{text of your note}
130% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000131\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000132\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000133 \ifinner\else\par\noindent\fi
134 \textbf{Note:}\ %
135 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000136}}
137{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000138
139% command to display a warning.
140% Usage: \warn{text of your warning}
141% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000142\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000143\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000144 \ifinner\else\par\noindent\fi
145 \textbf{Warning:\ }%
146 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000147}}
148{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000149
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000150% command to mark a text block as intended especially for blind people
151% Usage: \blind{text}
152\ifpdfoutput{
153\newcommand{\blind}[1]{
154 \ifinner\else\par\noindent\fi
155 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
156}}
157{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
158
Martin Arverf6db3682006-04-26 11:06:45 +0000159% make table floats use "H" (as for screenshots) as default positioning
160\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000161% change defaults for floats on a page as we have a lot of small images
162\setcounter{topnumber}{3} % default: 2
163\setcounter{bottomnumber}{2} % default: 1
164\setcounter{totalnumber}{5} % default: 3
165
Dominik Riebeling8c177222006-04-03 22:45:01 +0000166% command to set the default table heading for button lists
167\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
168
169% environment intended to be used with button maps
170% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
171% Note: this automatically sets the table lines.
172% Note: you *need* to terminate the last line with a linebreak \\
173% Note: you still need to enclose this with \begin{table} / \end{table}
174% Cheers for the usenet helping me building this up :)
175\newenvironment{btnmap}[2]{%
176 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
177 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
178 \bottomrule
179 \SavedEndTab%
180 \if\given{#1}\caption{#1}\fi%
181 \if\given{#2}\label{#2}\fi%
182 \endcenter%
183 }
184 \center
185\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
186 \btnhead
187}{%
188 \endtabularx
189}
190
Dominik Riebeling36a31332006-04-09 21:22:42 +0000191% command to set the default table heading for button lists
192\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
193
194% environment intended to be used with tag maps (for wps)
195% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
196% Note: this automatically sets the table lines.
197% Note: you *need* to terminate the last line with a linebreak \\
198% Note: you still need to enclose this with \begin{table} / \end{table}
199% Cheers for the usenet helping me building this up :)
200\newenvironment{tagmap}[2]{%
201 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
202 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
203 \bottomrule
204 \SavedEndTab%
205 \if\given{#1}\caption{#1}\fi%
206 \if\given{#2}\label{#2}\fi%
207 \endcenter%
208 }
209 \center
210\tabularx{\textwidth}{lX}\toprule % here is the table width defined
211 \taghead
212}{%
213 \endtabularx
214}
215
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000216\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000217
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000218\newcommand{\config}[1]{\texttt{#1}}
219
220% set link to the wiki.
221% Usage: \wikilink{WebHome}
222% with "WebHome" being the wiki page name
223\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
224
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000225% define environment "code" based on fancyvrb.
226% use it to set code the user should type / see on his screen.
227% Note: the first 4 characters of each line will be stripped,
228% requiring everything to be indendet by exactly _4_ spaces!
229% This is intended to make the LaTeX sources more readable.
230% Note: when using the code environment you need to use optv instead of opt!
231\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebelingc7bb9492006-06-13 16:39:07 +0000232 {framerule=0.4pt, framesep=1ex,numbers=left,frame=lines,%stepnumber=5,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000233 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
234 label=\textnormal{\textsc{Code}},%
235 commandchars=\\\{\}%
236 }
237
Martin Arver47ea9062006-06-07 12:15:46 +0000238% define environment "example" based on fancyvrb.
239% use it to set example code the user should type / see on his screen.
240% Note: the first 4 characters of each line will be stripped,
241% requiring everything to be indendet by exactly _4_ spaces!
242% This is intended to make the LaTeX sources more readable.
243% Note: when using the example environment you need to use optv instead of opt!
244\DefineVerbatimEnvironment{example}{Verbatim}%
245 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Martin Arver49cdd5e2006-06-07 13:29:52 +0000246 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000247 label=\textnormal{\textsc{Example}},%
248 commandchars=\\\{\}%
249 }
250
Martin Arver1dbb2d22006-06-07 20:01:27 +0000251% Use the nopt command to exclude a certain defined feature from a sectio
252% Example:
253% \nopt{ondio}{This text will be excluded for ondios}
254\newcommand{\optnvalue}{0}
255 \newcommand{\nopt}[2]{%
256 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
257 \ifthenelse{\optnvalue > 0}{}{#2}
258 }
Martin Arver7a473132006-07-31 12:21:57 +0000259
Martin Arver26c6e7b2006-08-01 11:57:38 +0000260% Use the reference to handle get a flexible reference command
261% usage \reference{ref_section}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +0000262\ifpdfoutput{%
Martin Arver26c6e7b2006-08-01 11:57:38 +0000263 \newcommand{\reference}[1]{%
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000264 section~\ref{#1} (page~\pageref{#1})%
Martin Arver7a473132006-07-31 12:21:57 +0000265}}
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000266{\newcommand{\reference}[1]{section~\ref{#1}}}
Dominik Riebeling5eb1e152006-08-07 20:46:26 +0000267
268% special HTML output adjustments
269\ifpdfoutput{}{\setlength{\parindent}{0mm}}
270\ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000271
272%\hfuzz=2pt