blob: af9fba904c70f51303737f7bd27dc456f4f4339c [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}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000041\usepackage{fancyvrb}
42\usepackage{enumerate}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000043\usepackage{color}
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000044\ifpdfoutput{\usepackage{booktabs}}%
45 {\newcommand{%
46 \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}%
47 }
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
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000061% pdf output: try pdf first, then png and jpg as file format
62% html output: try png first, then jpg. Ignore pdf files
63% this only applies if no file extension is given!
64\ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}%
65 {\DeclareGraphicsExtensions{.png,.jpg}}
66
Martin Arver6d5d7342006-03-30 22:03:46 +000067% fancy header style adjustments
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000068\fancyhead{}
69\fancyfoot{}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000070\fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
Martin Arver6d5d7342006-03-30 22:03:46 +000071\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000072\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000073\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000074\fancypagestyle{plain}{}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000075
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000076\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
77\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
78\setlength{\headheight}{18.5pt}
79\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +000080
Martin Arver47ea9062006-06-07 12:15:46 +000081%% \newenvironment{example}
82%% {\stepcounter{example}\paragraph{Example \theexample:}}
83%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000084
Martin Arver47ea9062006-06-07 12:15:46 +000085%% \bigskip
86%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +000087
Martin Arvercbc55992006-03-30 15:54:47 +000088% found on the internet, posting by Donald Arseneau
89% I may as well include my robust expandable definions, which can be
90% used in \edef or \write where the \def would not be executed:
91%
92% \if\blank --- checks if parameter is blank (Spaces count as blank)
93% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
94% \if\nil --- checks if parameter is null (spaces are NOT null)
95% use \if\given{ } ... \else ... \fi etc.
96%
97{\catcode`\!=8 % funny catcode so ! will be a delimiter
98\catcode`\Q=3 % funny catcode so Q will be a delimiter
99\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
100\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
101\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
102\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
103\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
104}
105
106% add screenshot image.
107% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000108% By using the 'H' (HERE) placement, the screenshots are placed where
109% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000110% Note: use this only for screenshots!
111% Note: leave caption empty to supress it.
112\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000113 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000114 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000115 \IfFileExists{#1-\genericimg-\specimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000116 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000117 \typeout{Note: device specific image used}}
118 {\IfFileExists{#1-\genericimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000119 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000120 {\IfFileExists{#1}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000121 {\includegraphics[width=\screenshotsize]{#1}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000122 \typeout{Warning: deprecated plain image name used}}%
123 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
124 \color{red}{\textbf{WARNING!} Image not found}%
125 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000126 }
127 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000128 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000129 \caption{#2}}\fi
130 \end{center}
131 \end{figure}
132}
Martin Arver0da41d82006-03-24 11:53:07 +0000133
Martin Arver9be37f32006-03-31 13:29:27 +0000134% command to display a note.
135% Usage: \note{text of your note}
136% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000137\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000138\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000139 \ifinner\else\par\noindent\fi
140 \textbf{Note:}\ %
141 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000142}}
143{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000144
145% command to display a warning.
146% Usage: \warn{text of your warning}
147% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000148\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000149\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000150 \ifinner\else\par\noindent\fi
151 \textbf{Warning:\ }%
152 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000153}}
154{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000155
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000156% command to mark a text block as intended especially for blind people
157% Usage: \blind{text}
158\ifpdfoutput{
159\newcommand{\blind}[1]{
160 \ifinner\else\par\noindent\fi
161 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
162}}
163{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
164
Martin Arverf6db3682006-04-26 11:06:45 +0000165% make table floats use "H" (as for screenshots) as default positioning
166\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000167% change defaults for floats on a page as we have a lot of small images
168\setcounter{topnumber}{3} % default: 2
169\setcounter{bottomnumber}{2} % default: 1
170\setcounter{totalnumber}{5} % default: 3
171
Dominik Riebeling8c177222006-04-03 22:45:01 +0000172% command to set the default table heading for button lists
173\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
174
175% environment intended to be used with button maps
176% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
177% Note: this automatically sets the table lines.
178% Note: you *need* to terminate the last line with a linebreak \\
179% Note: you still need to enclose this with \begin{table} / \end{table}
180% Cheers for the usenet helping me building this up :)
181\newenvironment{btnmap}[2]{%
182 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
183 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
184 \bottomrule
185 \SavedEndTab%
186 \if\given{#1}\caption{#1}\fi%
187 \if\given{#2}\label{#2}\fi%
188 \endcenter%
189 }
190 \center
191\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
192 \btnhead
193}{%
194 \endtabularx
195}
196
Dominik Riebeling36a31332006-04-09 21:22:42 +0000197% command to set the default table heading for button lists
198\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
199
200% environment intended to be used with tag maps (for wps)
201% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
202% Note: this automatically sets the table lines.
203% Note: you *need* to terminate the last line with a linebreak \\
204% Note: you still need to enclose this with \begin{table} / \end{table}
205% Cheers for the usenet helping me building this up :)
206\newenvironment{tagmap}[2]{%
207 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
208 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
209 \bottomrule
210 \SavedEndTab%
211 \if\given{#1}\caption{#1}\fi%
212 \if\given{#2}\label{#2}\fi%
213 \endcenter%
214 }
215 \center
216\tabularx{\textwidth}{lX}\toprule % here is the table width defined
217 \taghead
218}{%
219 \endtabularx
220}
221
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000222\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000223
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000224\newcommand{\config}[1]{\texttt{#1}}
225
226% set link to the wiki.
227% Usage: \wikilink{WebHome}
228% with "WebHome" being the wiki page name
229\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
230
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000231% define environment "code" based on fancyvrb.
232% use it to set code the user should type / see on his screen.
233% Note: the first 4 characters of each line will be stripped,
234% requiring everything to be indendet by exactly _4_ spaces!
235% This is intended to make the LaTeX sources more readable.
236% Note: when using the code environment you need to use optv instead of opt!
237\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebelingc7bb9492006-06-13 16:39:07 +0000238 {framerule=0.4pt, framesep=1ex,numbers=left,frame=lines,%stepnumber=5,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000239 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
240 label=\textnormal{\textsc{Code}},%
241 commandchars=\\\{\}%
242 }
243
Martin Arver47ea9062006-06-07 12:15:46 +0000244% define environment "example" based on fancyvrb.
245% use it to set example code the user should type / see on his screen.
246% Note: the first 4 characters of each line will be stripped,
247% requiring everything to be indendet by exactly _4_ spaces!
248% This is intended to make the LaTeX sources more readable.
249% Note: when using the example environment you need to use optv instead of opt!
250\DefineVerbatimEnvironment{example}{Verbatim}%
251 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Martin Arver49cdd5e2006-06-07 13:29:52 +0000252 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000253 label=\textnormal{\textsc{Example}},%
254 commandchars=\\\{\}%
255 }
256
Martin Arver1dbb2d22006-06-07 20:01:27 +0000257% Use the nopt command to exclude a certain defined feature from a sectio
258% Example:
259% \nopt{ondio}{This text will be excluded for ondios}
260\newcommand{\optnvalue}{0}
261 \newcommand{\nopt}[2]{%
262 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
263 \ifthenelse{\optnvalue > 0}{}{#2}
264 }
Martin Arver7a473132006-07-31 12:21:57 +0000265
Martin Arver26c6e7b2006-08-01 11:57:38 +0000266% Use the reference to handle get a flexible reference command
267% usage \reference{ref_section}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +0000268\ifpdfoutput{%
Martin Arver26c6e7b2006-08-01 11:57:38 +0000269 \newcommand{\reference}[1]{%
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000270 section~\ref{#1} (page~\pageref{#1})%
Martin Arver7a473132006-07-31 12:21:57 +0000271}}
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000272{\newcommand{\reference}[1]{section~\ref{#1}}}
Dominik Riebeling5eb1e152006-08-07 20:46:26 +0000273
274% special HTML output adjustments
275\ifpdfoutput{}{\setlength{\parindent}{0mm}}
276\ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000277
Dominik Riebelingf6b4b912006-08-24 15:09:34 +0000278\newcommand{\btnfnt}[1]{\textbf{#1}}
Dominik Riebelinga9a5c352006-10-05 16:47:17 +0000279%\hfuzz=2pt
280
281% generate index
282\usepackage{makeidx}
283\makeindex