blob: 6cf5bef4f767c55a86be5cbb2d509da1aca280ff [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 Arver63c8bb22006-03-21 10:28:35 +000018\newcommand{\playername}{\playerman\ \playertype}
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
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000031\newcommand{\fname}[1]{\textbf{#1}}
32\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}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000052
Dominik Riebeling009aeab2006-04-03 21:29:47 +000053% new \ifpdf to check if running in pdf mode. Helps for html generation.
54\newif\ifpdf\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi
55
56% mark this ad draft version (only for pdflatex) -- comment this out at release
57\ifpdf
58 \usepackage{pdfdraftcopy}
59 \draftstring{DRAFT VERSION}
60% \draftangle{45}
61\fi
62
Martin Arver6d5d7342006-03-30 22:03:46 +000063% fancy header style adjustments
64%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
65%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
66\renewcommand{\rightmark}[1]{\thechapter\ }
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000067\fancyhead{}
68\fancyfoot{}
Martin Arver6d5d7342006-03-30 22:03:46 +000069\fancyhead[L]{{\textsc{\leftmark}}}
70\fancyhead[R]{\iffloatpage{}{\thepage}}
71\fancyfoot[L]{\textsc{Rockbox users manual}}
72\fancyfoot[R]{\textsc{\playername}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000073
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000074\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
75\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
76\setlength{\headheight}{18.5pt}
77\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +000078
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000079\newenvironment{example}
80 {\stepcounter{example}\paragraph{Example \theexample:}}
81 {\hfill$\Box$
82
83 \bigskip
84 \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +000085
Martin Arvercbc55992006-03-30 15:54:47 +000086% found on the internet, posting by Donald Arseneau
87% I may as well include my robust expandable definions, which can be
88% used in \edef or \write where the \def would not be executed:
89%
90% \if\blank --- checks if parameter is blank (Spaces count as blank)
91% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
92% \if\nil --- checks if parameter is null (spaces are NOT null)
93% use \if\given{ } ... \else ... \fi etc.
94%
95{\catcode`\!=8 % funny catcode so ! will be a delimiter
96\catcode`\Q=3 % funny catcode so Q will be a delimiter
97\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
98\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
99\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
100\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
101\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
102}
103
104% add screenshot image.
105% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000106% By using the 'H' (HERE) placement, the screenshots are placed where
107% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000108% Note: use this only for screenshots!
109% Note: leave caption empty to supress it.
110\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000111 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000112 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000113 \IfFileExists{#1-\genericimg-\specimg.png}
114 {\includegraphics[width=4cm]{#1-\genericimg-\specimg.png}
115 \typeout{Note: device specific image used}}
116 {\IfFileExists{#1-\genericimg.png}
117 {\includegraphics[width=4cm]{#1-\genericimg.png}}
118 {\IfFileExists{#1}
119 {\includegraphics[width=4cm]{#1}
120 \typeout{Warning: deprecated plain image name used}}%
121 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
122 \color{red}{\textbf{WARNING!} Image not found}%
123 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000124 }
125 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000126 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000127 \caption{#2}}\fi
128 \end{center}
129 \end{figure}
130}
Martin Arver0da41d82006-03-24 11:53:07 +0000131
Martin Arver9be37f32006-03-31 13:29:27 +0000132% command to display a note.
133% Usage: \note{text of your note}
134% Note: do NOT use \textbf or similar to emphasize text, use \emph!
135\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000136 \ifinner\else\par\noindent\fi
137 \textbf{Note:}\ %
138 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Martin Arver9be37f32006-03-31 13:29:27 +0000139}
140
141% command to display a warning.
142% Usage: \warn{text of your warning}
143% Note: do NOT use \textbf or similar to emphasize text!
144\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000145 \ifinner\else\par\noindent\fi
146 \textbf{Warning:\ }%
147 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
148}
149
Martin Arverf6db3682006-04-26 11:06:45 +0000150% make table floats use "H" (as for screenshots) as default positioning
151\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000152% change defaults for floats on a page as we have a lot of small images
153\setcounter{topnumber}{3} % default: 2
154\setcounter{bottomnumber}{2} % default: 1
155\setcounter{totalnumber}{5} % default: 3
156
Dominik Riebeling8c177222006-04-03 22:45:01 +0000157% command to set the default table heading for button lists
158\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
159
160% environment intended to be used with button maps
161% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
162% Note: this automatically sets the table lines.
163% Note: you *need* to terminate the last line with a linebreak \\
164% Note: you still need to enclose this with \begin{table} / \end{table}
165% Cheers for the usenet helping me building this up :)
166\newenvironment{btnmap}[2]{%
167 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
168 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
169 \bottomrule
170 \SavedEndTab%
171 \if\given{#1}\caption{#1}\fi%
172 \if\given{#2}\label{#2}\fi%
173 \endcenter%
174 }
175 \center
176\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
177 \btnhead
178}{%
179 \endtabularx
180}
181
Dominik Riebeling36a31332006-04-09 21:22:42 +0000182% command to set the default table heading for button lists
183\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
184
185% environment intended to be used with tag maps (for wps)
186% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap}
187% Note: this automatically sets the table lines.
188% Note: you *need* to terminate the last line with a linebreak \\
189% Note: you still need to enclose this with \begin{table} / \end{table}
190% Cheers for the usenet helping me building this up :)
191\newenvironment{tagmap}[2]{%
192 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
193 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
194 \bottomrule
195 \SavedEndTab%
196 \if\given{#1}\caption{#1}\fi%
197 \if\given{#2}\label{#2}\fi%
198 \endcenter%
199 }
200 \center
201\tabularx{\textwidth}{lX}\toprule % here is the table width defined
202 \taghead
203}{%
204 \endtabularx
205}
206
Dominik Riebeling9c426e92006-04-27 18:52:16 +0000207\newcommand{\setting}[1]{\textsc{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000208
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000209\newcommand{\config}[1]{\texttt{#1}}
210
211% set link to the wiki.
212% Usage: \wikilink{WebHome}
213% with "WebHome" being the wiki page name
214\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/twiki/bin/view/Main/#1}}
215