1 \documentclass[a4paper,
11pt
]{scrreprt
}
2 \usepackage[latin1]{inputenc}
16 \input{platform/
\platform.tex
}
18 \newcommand{\playername}{\playerman\
\playerlongtype}
20 \hypersetup{% add some values to the pdf properties
26 pdftitle =
{Rockbox user manual
},
27 pdfauthor =
{The Rockbox Team
},
28 pdfsubject =
{Rockbox user manual for
\playername}
31 \newcommand{\fname}[1]{\texttt{#1}}
32 \newcommand{\tabeltc}[1]{{\centering #1 \par}}
33 \newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
35 \newcommand{\fixme}[1]{\textbf{\textcolor{red
}{#1}}}
42 \usepackage{enumerate
}
44 \ifpdfoutput{\usepackage{booktabs
}}%
46 \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}%
48 \usepackage{longtable
}
54 % mark this ad draft version (only for pdflatex) -- comment this out at release
56 \usepackage{pdfdraftcopy
}
57 \draftstring{DRAFT VERSION
}
61 % 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
}}
67 % fancy header style adjustments
70 \fancyhead[L
]{{\nouppercase{\textsc{\leftmark}}}}
71 \fancyhead[R
]{\iffloatpage{}{\thepage}}
72 \fancyfoot[L
]{\textsc{The Rockbox manual
}}
73 \fancyfoot[R
]{\textsc{\playerman{} \playertype}}
74 \fancypagestyle{plain
}{}
76 \renewcommand{\headrulewidth}{\iffloatpage{0pt
}{0.4pt
}}
77 \renewcommand{\footrulewidth}{\iffloatpage{0pt
}{0.4pt
}}
78 \setlength{\headheight}{18.5pt
}
79 \newcounter{example
}[chapter
]
81 %% \newenvironment{example}
82 %% {\stepcounter{example}\paragraph{Example \theexample:}}
88 % 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:
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.
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
106 % add screenshot image.
107 % Usage: \screenshot{filename}{caption}{label}
108 % By using the 'H' (HERE) placement, the screenshots are placed where
110 % Note: use this only for screenshots!
111 % Note: leave caption empty to supress it.
112 \newcommand{\screenshot}[3]{
115 \IfFileExists{#1-
\genericimg-
\specimg.png
}
116 {\includegraphics[width=
\screenshotsize]{#1-
\genericimg-
\specimg.png
}
117 \typeout{Note: device specific image used
}}
118 {\IfFileExists{#1-
\genericimg.png
}
119 {\includegraphics[width=
\screenshotsize]{#1-
\genericimg.png
}}
121 {\includegraphics[width=
\screenshotsize]{#1}
122 \typeout{Warning: deprecated plain image name used
}}%
123 {\typeout{Missing image:
#1 (
\genericimg) (
\specimg)
}%
124 \color{red
}{\textbf{WARNING!
} Image not found
}%
128 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
134 % 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!
138 \newcommand{\note}[1]{
139 \ifinner\else\par\noindent\fi
141 \ifinner#1\else\marginpar{\raisebox{-
6pt
}{\Huge\Writinghand}}#1\par\fi%
143 {\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:
{} }#1\par}}
145 % command to display a warning.
146 % Usage: \warn{text of your warning}
147 % Note: do NOT use \textbf or similar to emphasize text!
149 \newcommand{\warn}[1]{
150 \ifinner\else\par\noindent\fi
152 \ifinner#1\else\marginpar{\raisebox{-
6pt
}{\Huge\Stopsign}}#1\par\fi%
154 {\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:
{} }#1}}
156 % command to mark a text block as intended especially for blind people
157 % Usage: \blind{text}
159 \newcommand{\blind}[1]{
160 \ifinner\else\par\noindent\fi
161 \ifinner#1\else\marginpar{\raisebox{-
6pt
}{\Huge\ForwardToEnd}}#1\par\fi%
163 {\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
165 % make table floats use "H" (as for screenshots) as default positioning
166 \makeatletter\renewcommand{\fps@table
}{H
}\makeatother
167 % 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
172 % command to set the default table heading for button lists
173 \newcommand{\btnhead}{\textbf{Key
} &
\textbf{Action
} \\
\midrule}
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{%
186 \if\given{#1}\caption{#1}\fi%
187 \if\given{#2}\label{#2}\fi%
191 \tabularx{.75\textwidth}{lX
}\toprule % here is the table width defined
197 % command to set the default table heading for button lists
198 \newcommand{\taghead}{\textbf{Tag
} &
\textbf{Description
} \\
\midrule}
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{%
211 \if\given{#1}\caption{#1}\fi%
212 \if\given{#2}\label{#2}\fi%
216 \tabularx{\textwidth}{lX
}\toprule % here is the table width defined
222 \newcommand{\setting}[1]{\textsc{#1}}
224 \newcommand{\config}[1]{\texttt{#1}}
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}}
231 % 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
}%
238 {framerule=
0.4pt, framesep=
1ex,numbers=left,frame=lines,
%stepnumber=5,%
239 gobble=
4,fontsize=
\footnotesize,xleftmargin=
10pt,
%
240 label=
\textnormal{\textsc{Code
}},
%
244 % 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,
%
252 gobble=
4,fontsize=
\footnotesize,xleftmargin=
10pt,
%
253 label=
\textnormal{\textsc{Example
}},
%
257 % Use the nopt command to exclude a certain defined feature from a sectio
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}
266 % Use the reference to handle get a flexible reference command
267 % usage \reference{ref_section}
269 \newcommand{\reference}[1]{%
270 section~
\ref{#1} (page~
\pageref{#1})
%
272 {\newcommand{\reference}[1]{section~
\ref{#1}}}
274 % special HTML output adjustments
275 \ifpdfoutput{}{\setlength{\parindent}{0mm
}}
276 \ifpdfoutput{}{\renewcommand{\Forward}[1]{$
\triangleright$
{}#1}}
278 \newcommand{\btnfnt}[1]{\textbf{#1}}