blob: 999bcbf2f9bdd172bf322909b9bb0e0e2a051ea0 [file] [log] [blame]
Dominik Riebeling40afbd22007-01-02 20:50:03 +00001%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2% __________ __ ___.
3% Open \______ \ ____ ____ | | _\_ |__ _______ ___
4% Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5% Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6% Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7% \/ \/ \/ \/ \/
8% - M A N U A L -
9%
10% $Id$
11%
12% Copyright (C) 2006 The Rockbox Manual Team
13%
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/ folder for full license
16% agreement.
17%
18% Contributors are listed in the file docs/CREDITS-MANUAL
19%
20%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
Martin Arver3622c932006-03-29 18:48:52 +000022\documentclass[a4paper,11pt]{scrreprt}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000023\usepackage[latin1]{inputenc}
Martin Arver8bedb5c2006-03-22 23:26:30 +000024\usepackage{palatino}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000025
Martin Arverec60a052006-03-29 18:40:42 +000026\usepackage{tabularx}
Nils Wallméniusc687b302006-04-02 13:50:01 +000027\usepackage{multirow}
Dominik Riebelingb074b222006-06-05 10:08:54 +000028\usepackage{multicol}
Martin Arver0da41d82006-03-24 11:53:07 +000029
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000030\usepackage{float}
31\floatstyle{ruled}
32
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000033\usepackage{hyperref}
34
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000035\usepackage{optional}
36
37\input{platform/\platform.tex}
38
Martin Arver4c981062006-06-07 18:48:56 +000039\newcommand{\playername}{\playerman\ \playerlongtype}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000040
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000041\hypersetup{% add some values to the pdf properties
42 colorlinks = true,
43 pdfstartview = FitV,
44 linkcolor = blue,
45 citecolor = blue,
46 urlcolor = blue,
47 pdftitle = {Rockbox user manual},
48 pdfauthor = {The Rockbox Team},
49 pdfsubject = {Rockbox user manual for \playername}
50}
51
Martin Arver47ea9062006-06-07 12:15:46 +000052\newcommand{\fname}[1]{\texttt{#1}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000053\newcommand{\tabeltc}[1]{{\centering #1 \par}}
54\newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
55
Martin Arvera0cdee02006-03-31 12:25:22 +000056\newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
57
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000058\usepackage{fancyhdr}
59\usepackage{graphicx}
60\usepackage{verbatim}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000061\usepackage{makeidx}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000062\usepackage{fancyvrb}
63\usepackage{enumerate}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000064\usepackage{color}
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000065\ifpdfoutput{\usepackage{booktabs}}%
66 {\newcommand{%
67 \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}%
68 }
Martin Arverd3d3e342006-03-15 10:56:14 +000069\usepackage{longtable}
Martin Arver7d6810c2006-03-31 11:50:33 +000070\usepackage{url}
71\urlstyle{sf}
Martin Arver9be37f32006-03-31 13:29:27 +000072\usepackage{marvosym}
Martin Arver1dbb2d22006-06-07 20:01:27 +000073\usepackage{ifthen}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000074
Dominik Riebeling009aeab2006-04-03 21:29:47 +000075% mark this ad draft version (only for pdflatex) -- comment this out at release
Dominik Riebeling6424c502006-07-17 19:10:31 +000076\ifpdfoutput{
Dominik Riebeling009aeab2006-04-03 21:29:47 +000077 \usepackage{pdfdraftcopy}
78 \draftstring{DRAFT VERSION}
79% \draftangle{45}
Dominik Riebeling6424c502006-07-17 19:10:31 +000080 }
Dominik Riebeling009aeab2006-04-03 21:29:47 +000081
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000082% pdf output: try pdf first, then png and jpg as file format
83% html output: try png first, then jpg. Ignore pdf files
84% this only applies if no file extension is given!
85\ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}%
86 {\DeclareGraphicsExtensions{.png,.jpg}}
87
Martin Arver6d5d7342006-03-30 22:03:46 +000088% fancy header style adjustments
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000089\fancyhead{}
90\fancyfoot{}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000091\fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
Martin Arver6d5d7342006-03-30 22:03:46 +000092\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000093\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000094\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000095\fancypagestyle{plain}{}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000096
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000097\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
98\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
99\setlength{\headheight}{18.5pt}
100\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +0000101
Martin Arver47ea9062006-06-07 12:15:46 +0000102%% \newenvironment{example}
103%% {\stepcounter{example}\paragraph{Example \theexample:}}
104%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000105
Martin Arver47ea9062006-06-07 12:15:46 +0000106%% \bigskip
107%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +0000108
Martin Arvercbc55992006-03-30 15:54:47 +0000109% found on the internet, posting by Donald Arseneau
110% I may as well include my robust expandable definions, which can be
111% used in \edef or \write where the \def would not be executed:
112%
113% \if\blank --- checks if parameter is blank (Spaces count as blank)
114% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
115% \if\nil --- checks if parameter is null (spaces are NOT null)
116% use \if\given{ } ... \else ... \fi etc.
117%
118{\catcode`\!=8 % funny catcode so ! will be a delimiter
119\catcode`\Q=3 % funny catcode so Q will be a delimiter
120\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
121\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
122\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
123\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
124\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
125}
126
127% add screenshot image.
128% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000129% By using the 'H' (HERE) placement, the screenshots are placed where
130% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000131% Note: use this only for screenshots!
132% Note: leave caption empty to supress it.
133\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000134 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000135 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000136 \IfFileExists{#1-\genericimg-\specimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000137 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000138 \typeout{Note: device specific image used}}
139 {\IfFileExists{#1-\genericimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000140 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000141 {\IfFileExists{#1}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000142 {\includegraphics[width=\screenshotsize]{#1}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000143 \typeout{Warning: deprecated plain image name used}}%
144 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
145 \color{red}{\textbf{WARNING!} Image not found}%
146 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000147 }
148 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000149 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000150 \caption{#2}}\fi
151 \end{center}
152 \end{figure}
153}
Martin Arver0da41d82006-03-24 11:53:07 +0000154
Martin Arver9be37f32006-03-31 13:29:27 +0000155% command to display a note.
156% Usage: \note{text of your note}
157% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000158\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000159\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000160 \ifinner\else\par\noindent\fi
161 \textbf{Note:}\ %
162 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000163}}
164{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000165
166% command to display a warning.
167% Usage: \warn{text of your warning}
168% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000169\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000170\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000171 \ifinner\else\par\noindent\fi
172 \textbf{Warning:\ }%
173 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000174}}
175{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000176
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000177% command to mark a text block as intended especially for blind people
178% Usage: \blind{text}
179\ifpdfoutput{
180\newcommand{\blind}[1]{
181 \ifinner\else\par\noindent\fi
182 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
183}}
184{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
185
Martin Arverf6db3682006-04-26 11:06:45 +0000186% make table floats use "H" (as for screenshots) as default positioning
187\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000188% change defaults for floats on a page as we have a lot of small images
189\setcounter{topnumber}{3} % default: 2
190\setcounter{bottomnumber}{2} % default: 1
191\setcounter{totalnumber}{5} % default: 3
192
Dominik Riebeling8c177222006-04-03 22:45:01 +0000193% command to set the default table heading for button lists
194\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
195
196% environment intended to be used with button maps
197% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
198% Note: this automatically sets the table lines.
199% Note: you *need* to terminate the last line with a linebreak \\
200% Note: you still need to enclose this with \begin{table} / \end{table}
201% Cheers for the usenet helping me building this up :)
202\newenvironment{btnmap}[2]{%
203 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
204 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
205 \bottomrule
206 \SavedEndTab%
207 \if\given{#1}\caption{#1}\fi%
208 \if\given{#2}\label{#2}\fi%
209 \endcenter%
210 }
211 \center
212\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
213 \btnhead
214}{%
215 \endtabularx
216}
217
Dominik Riebeling36a31332006-04-09 21:22:42 +0000218% command to set the default table heading for button lists
219\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
220
221% environment intended to be used with tag maps (for wps)
222% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
223% Note: this automatically sets the table lines.
224% Note: you *need* to terminate the last line with a linebreak \\
225% Note: you still need to enclose this with \begin{table} / \end{table}
226% Cheers for the usenet helping me building this up :)
227\newenvironment{tagmap}[2]{%
228 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
229 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
230 \bottomrule
231 \SavedEndTab%
232 \if\given{#1}\caption{#1}\fi%
233 \if\given{#2}\label{#2}\fi%
234 \endcenter%
235 }
236 \center
237\tabularx{\textwidth}{lX}\toprule % here is the table width defined
238 \taghead
239}{%
240 \endtabularx
241}
242
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000243\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000244
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000245\newcommand{\config}[1]{\texttt{#1}}
246
Dominik Riebeling40afbd22007-01-02 20:50:03 +0000247% set link to download server
248% Usage: \download{bootloader/bootloader-ipodnano.ipod}
249% gets expanded to
250% "http://download.rockbox.org/bootloader/bootloader-ipodnano.ipod"
251\newcommand{\download}[1]{\url{http://download.rockbox.org/#1}}
252
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000253% set link to the wiki.
254% Usage: \wikilink{WebHome}
255% with "WebHome" being the wiki page name
256\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
257
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000258% define environment "code" based on fancyvrb.
259% use it to set code the user should type / see on his screen.
260% Note: the first 4 characters of each line will be stripped,
261% requiring everything to be indendet by exactly _4_ spaces!
262% This is intended to make the LaTeX sources more readable.
263% Note: when using the code environment you need to use optv instead of opt!
264\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebelingc7bb9492006-06-13 16:39:07 +0000265 {framerule=0.4pt, framesep=1ex,numbers=left,frame=lines,%stepnumber=5,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000266 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
267 label=\textnormal{\textsc{Code}},%
268 commandchars=\\\{\}%
269 }
270
Martin Arver47ea9062006-06-07 12:15:46 +0000271% define environment "example" based on fancyvrb.
272% use it to set example code the user should type / see on his screen.
273% Note: the first 4 characters of each line will be stripped,
274% requiring everything to be indendet by exactly _4_ spaces!
275% This is intended to make the LaTeX sources more readable.
276% Note: when using the example environment you need to use optv instead of opt!
277\DefineVerbatimEnvironment{example}{Verbatim}%
278 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Martin Arver49cdd5e2006-06-07 13:29:52 +0000279 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000280 label=\textnormal{\textsc{Example}},%
281 commandchars=\\\{\}%
282 }
283
Martin Arver1dbb2d22006-06-07 20:01:27 +0000284% Use the nopt command to exclude a certain defined feature from a sectio
285% Example:
286% \nopt{ondio}{This text will be excluded for ondios}
287\newcommand{\optnvalue}{0}
288 \newcommand{\nopt}[2]{%
289 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
290 \ifthenelse{\optnvalue > 0}{}{#2}
291 }
Martin Arver7a473132006-07-31 12:21:57 +0000292
Martin Arver26c6e7b2006-08-01 11:57:38 +0000293% Use the reference to handle get a flexible reference command
294% usage \reference{ref_section}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +0000295\ifpdfoutput{%
Martin Arver26c6e7b2006-08-01 11:57:38 +0000296 \newcommand{\reference}[1]{%
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000297 section~\ref{#1} (page~\pageref{#1})%
Martin Arver7a473132006-07-31 12:21:57 +0000298}}
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000299{\newcommand{\reference}[1]{section~\ref{#1}}}
Dominik Riebeling5eb1e152006-08-07 20:46:26 +0000300
301% special HTML output adjustments
302\ifpdfoutput{}{\setlength{\parindent}{0mm}}
303\ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000304
Dominik Riebelingf6b4b912006-08-24 15:09:34 +0000305\newcommand{\btnfnt}[1]{\textbf{#1}}
Dominik Riebelinga9a5c352006-10-05 16:47:17 +0000306%\hfuzz=2pt
307
308% generate index
309\usepackage{makeidx}
310\makeindex