blob: 7a55319722950f01fa7c6bc09ae58ef75ad30f58 [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% new \ifpdf to check if running in pdf mode. Helps for html generation.
55\newif\ifpdf\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi
56
57% mark this ad draft version (only for pdflatex) -- comment this out at release
58\ifpdf
59 \usepackage{pdfdraftcopy}
60 \draftstring{DRAFT VERSION}
61% \draftangle{45}
62\fi
63
Martin Arver6d5d7342006-03-30 22:03:46 +000064% fancy header style adjustments
65%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
66%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
67\renewcommand{\rightmark}[1]{\thechapter\ }
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000068\fancyhead{}
69\fancyfoot{}
Martin Arver6d5d7342006-03-30 22:03:46 +000070\fancyhead[L]{{\textsc{\leftmark}}}
71\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}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000074
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000075\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
76\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
77\setlength{\headheight}{18.5pt}
78\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +000079
Martin Arver47ea9062006-06-07 12:15:46 +000080%% \newenvironment{example}
81%% {\stepcounter{example}\paragraph{Example \theexample:}}
82%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000083
Martin Arver47ea9062006-06-07 12:15:46 +000084%% \bigskip
85%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +000086
Martin Arvercbc55992006-03-30 15:54:47 +000087% found on the internet, posting by Donald Arseneau
88% I may as well include my robust expandable definions, which can be
89% used in \edef or \write where the \def would not be executed:
90%
91% \if\blank --- checks if parameter is blank (Spaces count as blank)
92% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
93% \if\nil --- checks if parameter is null (spaces are NOT null)
94% use \if\given{ } ... \else ... \fi etc.
95%
96{\catcode`\!=8 % funny catcode so ! will be a delimiter
97\catcode`\Q=3 % funny catcode so Q will be a delimiter
98\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
99\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
100\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
101\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
102\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
103}
104
105% add screenshot image.
106% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000107% By using the 'H' (HERE) placement, the screenshots are placed where
108% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000109% Note: use this only for screenshots!
110% Note: leave caption empty to supress it.
111\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000112 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000113 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000114 \IfFileExists{#1-\genericimg-\specimg.png}
115 {\includegraphics[width=4cm]{#1-\genericimg-\specimg.png}
116 \typeout{Note: device specific image used}}
117 {\IfFileExists{#1-\genericimg.png}
118 {\includegraphics[width=4cm]{#1-\genericimg.png}}
119 {\IfFileExists{#1}
120 {\includegraphics[width=4cm]{#1}
121 \typeout{Warning: deprecated plain image name used}}%
122 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
123 \color{red}{\textbf{WARNING!} Image not found}%
124 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000125 }
126 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000127 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000128 \caption{#2}}\fi
129 \end{center}
130 \end{figure}
131}
Martin Arver0da41d82006-03-24 11:53:07 +0000132
Martin Arver9be37f32006-03-31 13:29:27 +0000133% command to display a note.
134% Usage: \note{text of your note}
135% Note: do NOT use \textbf or similar to emphasize text, use \emph!
136\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000137 \ifinner\else\par\noindent\fi
138 \textbf{Note:}\ %
139 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Martin Arver9be37f32006-03-31 13:29:27 +0000140}
141
142% command to display a warning.
143% Usage: \warn{text of your warning}
144% Note: do NOT use \textbf or similar to emphasize text!
145\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%
149}
150
Martin Arverf6db3682006-04-26 11:06:45 +0000151% make table floats use "H" (as for screenshots) as default positioning
152\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000153% change defaults for floats on a page as we have a lot of small images
154\setcounter{topnumber}{3} % default: 2
155\setcounter{bottomnumber}{2} % default: 1
156\setcounter{totalnumber}{5} % default: 3
157
Dominik Riebeling8c177222006-04-03 22:45:01 +0000158% command to set the default table heading for button lists
159\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
160
161% environment intended to be used with button maps
162% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
163% Note: this automatically sets the table lines.
164% Note: you *need* to terminate the last line with a linebreak \\
165% Note: you still need to enclose this with \begin{table} / \end{table}
166% Cheers for the usenet helping me building this up :)
167\newenvironment{btnmap}[2]{%
168 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
169 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
170 \bottomrule
171 \SavedEndTab%
172 \if\given{#1}\caption{#1}\fi%
173 \if\given{#2}\label{#2}\fi%
174 \endcenter%
175 }
176 \center
177\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
178 \btnhead
179}{%
180 \endtabularx
181}
182
Dominik Riebeling36a31332006-04-09 21:22:42 +0000183% command to set the default table heading for button lists
184\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
185
186% environment intended to be used with tag maps (for wps)
187% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
188% Note: this automatically sets the table lines.
189% Note: you *need* to terminate the last line with a linebreak \\
190% Note: you still need to enclose this with \begin{table} / \end{table}
191% Cheers for the usenet helping me building this up :)
192\newenvironment{tagmap}[2]{%
193 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
194 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
195 \bottomrule
196 \SavedEndTab%
197 \if\given{#1}\caption{#1}\fi%
198 \if\given{#2}\label{#2}\fi%
199 \endcenter%
200 }
201 \center
202\tabularx{\textwidth}{lX}\toprule % here is the table width defined
203 \taghead
204}{%
205 \endtabularx
206}
207
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000208\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000209
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000210\newcommand{\config}[1]{\texttt{#1}}
211
212% set link to the wiki.
213% Usage: \wikilink{WebHome}
214% with "WebHome" being the wiki page name
215\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
216
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000217% define environment "code" based on fancyvrb.
218% use it to set code the user should type / see on his screen.
219% Note: the first 4 characters of each line will be stripped,
220% requiring everything to be indendet by exactly _4_ spaces!
221% This is intended to make the LaTeX sources more readable.
222% Note: when using the code environment you need to use optv instead of opt!
223\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebelingc7bb9492006-06-13 16:39:07 +0000224 {framerule=0.4pt, framesep=1ex,numbers=left,frame=lines,%stepnumber=5,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000225 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
226 label=\textnormal{\textsc{Code}},%
227 commandchars=\\\{\}%
228 }
229
Martin Arver47ea9062006-06-07 12:15:46 +0000230% define environment "example" based on fancyvrb.
231% use it to set example code the user should type / see on his screen.
232% Note: the first 4 characters of each line will be stripped,
233% requiring everything to be indendet by exactly _4_ spaces!
234% This is intended to make the LaTeX sources more readable.
235% Note: when using the example environment you need to use optv instead of opt!
236\DefineVerbatimEnvironment{example}{Verbatim}%
237 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Martin Arver49cdd5e2006-06-07 13:29:52 +0000238 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000239 label=\textnormal{\textsc{Example}},%
240 commandchars=\\\{\}%
241 }
242
Martin Arver1dbb2d22006-06-07 20:01:27 +0000243
244% Use the nopt command to exclude a certain defined feature from a sectio
245% Example:
246% \nopt{ondio}{This text will be excluded for ondios}
247\newcommand{\optnvalue}{0}
248 \newcommand{\nopt}[2]{%
249 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
250 \ifthenelse{\optnvalue > 0}{}{#2}
251 }