blob: 81013eab6545ea3c64e6eb55fb2fb9dbcb9e9ae3 [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}
Martin Arver35dcf902006-03-08 17:58:11 +00004%\renewcommand{\familydefault}{\sfdefault}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00005
Martin Arverec60a052006-03-29 18:40:42 +00006\usepackage{tabularx}
Nils Wallméniusc687b302006-04-02 13:50:01 +00007\usepackage{multirow}
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{xspace}
15\usepackage{optional}
16
17\input{platform/\platform.tex}
18
Martin Arver63c8bb22006-03-21 10:28:35 +000019\newcommand{\playername}{\playerman\ \playertype}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000020
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000021\hypersetup{% add some values to the pdf properties
22 colorlinks = true,
23 pdfstartview = FitV,
24 linkcolor = blue,
25 citecolor = blue,
26 urlcolor = blue,
27 pdftitle = {Rockbox user manual},
28 pdfauthor = {The Rockbox Team},
29 pdfsubject = {Rockbox user manual for \playername}
30}
31
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000032\newcommand{\fname}[1]{\textbf{#1}}
33\newcommand{\tabeltc}[1]{{\centering #1 \par}}
34\newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
35
Martin Arvera0cdee02006-03-31 12:25:22 +000036\newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
37
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000038\usepackage{fancyhdr}
39\usepackage{graphicx}
40\usepackage{verbatim}
41\usepackage{lscape}
42\usepackage{makeidx}
43\usepackage{amsmath}
44\usepackage{amssymb}
45\usepackage{fancyvrb}
46\usepackage{enumerate}
47\usepackage{subfigure}
48\usepackage{color}
Martin Arvera245e882006-03-08 15:04:36 +000049\usepackage{booktabs}
Martin Arverd3d3e342006-03-15 10:56:14 +000050\usepackage{longtable}
Martin Arver7d6810c2006-03-31 11:50:33 +000051\usepackage{url}
52\urlstyle{sf}
Martin Arver9be37f32006-03-31 13:29:27 +000053\usepackage{marvosym}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000054
Dominik Riebeling009aeab2006-04-03 21:29:47 +000055% new \ifpdf to check if running in pdf mode. Helps for html generation.
56\newif\ifpdf\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi
57
58% mark this ad draft version (only for pdflatex) -- comment this out at release
59\ifpdf
60 \usepackage{pdfdraftcopy}
61 \draftstring{DRAFT VERSION}
62% \draftangle{45}
63\fi
64
Martin Arver6d5d7342006-03-30 22:03:46 +000065% fancy header style adjustments
66%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
67%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
68\renewcommand{\rightmark}[1]{\thechapter\ }
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000069\fancyhead{}
70\fancyfoot{}
Martin Arver6d5d7342006-03-30 22:03:46 +000071\fancyhead[L]{{\textsc{\leftmark}}}
72\fancyhead[R]{\iffloatpage{}{\thepage}}
73\fancyfoot[L]{\textsc{Rockbox users manual}}
74\fancyfoot[R]{\textsc{\playername}}
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
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000081\newenvironment{example}
82 {\stepcounter{example}\paragraph{Example \theexample:}}
83 {\hfill$\Box$
84
85 \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}
108% Note: use this only for screenshots!
109% Note: leave caption empty to supress it.
110\newcommand{\screenshot}[3]{
111 \begin{figure}[!ht]
112 \begin{center}
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000113 \IfFileExists{#1-\genericimg.png}
114 {\includegraphics[width=4cm]{#1-\genericimg.png}}
115 {\IfFileExists{#1}
116 {\includegraphics[width=4cm]{#1}
117 \typeout{Warning: deprecated plain image name used}}%
118 {\typeout{Missing image: #1 (\genericimg)}%
119 \color{red}{\textbf{WARNING!} Image not found}%
120 }
121 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000122 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000123 \caption{#2}}\fi
124 \end{center}
125 \end{figure}
126}
Martin Arver0da41d82006-03-24 11:53:07 +0000127
Martin Arver9be37f32006-03-31 13:29:27 +0000128% command to display a note.
129% Usage: \note{text of your note}
130% Note: do NOT use \textbf or similar to emphasize text, use \emph!
131\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000132 \ifinner\else\par\noindent\fi
133 \textbf{Note:}\ %
134 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Martin Arver9be37f32006-03-31 13:29:27 +0000135}
136
137% command to display a warning.
138% Usage: \warn{text of your warning}
139% Note: do NOT use \textbf or similar to emphasize text!
140\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000141 \ifinner\else\par\noindent\fi
142 \textbf{Warning:\ }%
143 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
144}
145
Dominik Riebeling38385a52006-04-03 18:14:25 +0000146% make table floats use "!htb" as default positioning
147\makeatletter\renewcommand{\fps@table}{!htb}\makeatother
148% change defaults for floats on a page as we have a lot of small images
149\setcounter{topnumber}{3} % default: 2
150\setcounter{bottomnumber}{2} % default: 1
151\setcounter{totalnumber}{5} % default: 3
152
Dominik Riebeling8c177222006-04-03 22:45:01 +0000153% command to set the default table heading for button lists
154\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
155
156% environment intended to be used with button maps
157% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
158% Note: this automatically sets the table lines.
159% Note: you *need* to terminate the last line with a linebreak \\
160% Note: you still need to enclose this with \begin{table} / \end{table}
161% Cheers for the usenet helping me building this up :)
162\newenvironment{btnmap}[2]{%
163 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
164 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
165 \bottomrule
166 \SavedEndTab%
167 \if\given{#1}\caption{#1}\fi%
168 \if\given{#2}\label{#2}\fi%
169 \endcenter%
170 }
171 \center
172\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
173 \btnhead
174}{%
175 \endtabularx
176}
177
Dominik Riebeling36a31332006-04-09 21:22:42 +0000178% command to set the default table heading for button lists
179\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
180
181% environment intended to be used with tag maps (for wps)
182% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
183% Note: this automatically sets the table lines.
184% Note: you *need* to terminate the last line with a linebreak \\
185% Note: you still need to enclose this with \begin{table} / \end{table}
186% Cheers for the usenet helping me building this up :)
187\newenvironment{tagmap}[2]{%
188 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
189 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
190 \bottomrule
191 \SavedEndTab%
192 \if\given{#1}\caption{#1}\fi%
193 \if\given{#2}\label{#2}\fi%
194 \endcenter%
195 }
196 \center
197\tabularx{\textwidth}{lX}\toprule % here is the table width defined
198 \taghead
199}{%
200 \endtabularx
201}
202
203