blob: d79655a540ca605a3f088426e9e3a24b5295a456 [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
62%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
63%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
64\renewcommand{\rightmark}[1]{\thechapter\ }
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000065\fancyhead{}
66\fancyfoot{}
Martin Arver6d5d7342006-03-30 22:03:46 +000067\fancyhead[L]{{\textsc{\leftmark}}}
68\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000069\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000070\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000071
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000072\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
73\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
74\setlength{\headheight}{18.5pt}
75\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +000076
Martin Arver47ea9062006-06-07 12:15:46 +000077%% \newenvironment{example}
78%% {\stepcounter{example}\paragraph{Example \theexample:}}
79%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000080
Martin Arver47ea9062006-06-07 12:15:46 +000081%% \bigskip
82%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +000083
Martin Arvercbc55992006-03-30 15:54:47 +000084% found on the internet, posting by Donald Arseneau
85% I may as well include my robust expandable definions, which can be
86% used in \edef or \write where the \def would not be executed:
87%
88% \if\blank --- checks if parameter is blank (Spaces count as blank)
89% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
90% \if\nil --- checks if parameter is null (spaces are NOT null)
91% use \if\given{ } ... \else ... \fi etc.
92%
93{\catcode`\!=8 % funny catcode so ! will be a delimiter
94\catcode`\Q=3 % funny catcode so Q will be a delimiter
95\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
96\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
97\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
98\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
99\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
100}
101
102% add screenshot image.
103% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000104% By using the 'H' (HERE) placement, the screenshots are placed where
105% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000106% Note: use this only for screenshots!
107% Note: leave caption empty to supress it.
108\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000109 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000110 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000111 \IfFileExists{#1-\genericimg-\specimg.png}
112 {\includegraphics[width=4cm]{#1-\genericimg-\specimg.png}
113 \typeout{Note: device specific image used}}
114 {\IfFileExists{#1-\genericimg.png}
115 {\includegraphics[width=4cm]{#1-\genericimg.png}}
116 {\IfFileExists{#1}
117 {\includegraphics[width=4cm]{#1}
118 \typeout{Warning: deprecated plain image name used}}%
119 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
120 \color{red}{\textbf{WARNING!} Image not found}%
121 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000122 }
123 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000124 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000125 \caption{#2}}\fi
126 \end{center}
127 \end{figure}
128}
Martin Arver0da41d82006-03-24 11:53:07 +0000129
Martin Arver9be37f32006-03-31 13:29:27 +0000130% command to display a note.
131% Usage: \note{text of your note}
132% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000133\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000134\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000135 \ifinner\else\par\noindent\fi
136 \textbf{Note:}\ %
137 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000138}}
139{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000140
141% command to display a warning.
142% Usage: \warn{text of your warning}
143% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000144\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000145\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000146 \ifinner\else\par\noindent\fi
147 \textbf{Warning:\ }%
148 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000149}}
150{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000151
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000152% command to mark a text block as intended especially for blind people
153% Usage: \blind{text}
154\ifpdfoutput{
155\newcommand{\blind}[1]{
156 \ifinner\else\par\noindent\fi
157 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
158}}
159{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
160
Martin Arverf6db3682006-04-26 11:06:45 +0000161% make table floats use "H" (as for screenshots) as default positioning
162\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000163% change defaults for floats on a page as we have a lot of small images
164\setcounter{topnumber}{3} % default: 2
165\setcounter{bottomnumber}{2} % default: 1
166\setcounter{totalnumber}{5} % default: 3
167
Dominik Riebeling8c177222006-04-03 22:45:01 +0000168% command to set the default table heading for button lists
169\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
170
171% environment intended to be used with button maps
172% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
173% Note: this automatically sets the table lines.
174% Note: you *need* to terminate the last line with a linebreak \\
175% Note: you still need to enclose this with \begin{table} / \end{table}
176% Cheers for the usenet helping me building this up :)
177\newenvironment{btnmap}[2]{%
178 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
179 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
180 \bottomrule
181 \SavedEndTab%
182 \if\given{#1}\caption{#1}\fi%
183 \if\given{#2}\label{#2}\fi%
184 \endcenter%
185 }
186 \center
187\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
188 \btnhead
189}{%
190 \endtabularx
191}
192
Dominik Riebeling36a31332006-04-09 21:22:42 +0000193% command to set the default table heading for button lists
194\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
195
196% environment intended to be used with tag maps (for wps)
197% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \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{tagmap}[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{\textwidth}{lX}\toprule % here is the table width defined
213 \taghead
214}{%
215 \endtabularx
216}
217
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000218\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000219
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000220\newcommand{\config}[1]{\texttt{#1}}
221
222% set link to the wiki.
223% Usage: \wikilink{WebHome}
224% with "WebHome" being the wiki page name
225\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
226
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000227% define environment "code" based on fancyvrb.
228% use it to set code the user should type / see on his screen.
229% Note: the first 4 characters of each line will be stripped,
230% requiring everything to be indendet by exactly _4_ spaces!
231% This is intended to make the LaTeX sources more readable.
232% Note: when using the code environment you need to use optv instead of opt!
233\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebelingc7bb9492006-06-13 16:39:07 +0000234 {framerule=0.4pt, framesep=1ex,numbers=left,frame=lines,%stepnumber=5,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000235 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
236 label=\textnormal{\textsc{Code}},%
237 commandchars=\\\{\}%
238 }
239
Martin Arver47ea9062006-06-07 12:15:46 +0000240% define environment "example" based on fancyvrb.
241% use it to set example code the user should type / see on his screen.
242% Note: the first 4 characters of each line will be stripped,
243% requiring everything to be indendet by exactly _4_ spaces!
244% This is intended to make the LaTeX sources more readable.
245% Note: when using the example environment you need to use optv instead of opt!
246\DefineVerbatimEnvironment{example}{Verbatim}%
247 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Martin Arver49cdd5e2006-06-07 13:29:52 +0000248 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000249 label=\textnormal{\textsc{Example}},%
250 commandchars=\\\{\}%
251 }
252
Martin Arver1dbb2d22006-06-07 20:01:27 +0000253
254% Use the nopt command to exclude a certain defined feature from a sectio
255% Example:
256% \nopt{ondio}{This text will be excluded for ondios}
257\newcommand{\optnvalue}{0}
258 \newcommand{\nopt}[2]{%
259 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
260 \ifthenelse{\optnvalue > 0}{}{#2}
261 }
Martin Arver7a473132006-07-31 12:21:57 +0000262
263
264
265% Use the rockref to handle get a flexible reference command
266% usage \rockref{ref_section}
267\ifpdfoutput{
268 \newcommand{\rockref}[1]{%
269 section \ref{#1} (page \pageref{#1})
270}}
271{\newcommand{\rockref}[1]{section \ref{#1}}}