blob: 90aa303528dfca0c4121afdbe0f0f62ce334d1f6 [file] [log] [blame]
Dominik Riebeling40afbd22007-01-02 20:50:03 +00001%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2% __________ __ ___.
3% Open \______ \ ____ ____ | | _\_ |__ _______ ___
4% Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5% Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6% Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7% \/ \/ \/ \/ \/
8% - M A N U A L -
9%
10% $Id$
11%
12% Copyright (C) 2006 The Rockbox Manual Team
13%
14% All files in this archive are subject to the GNU Free Documentation License
Marianne Arnoldb2f7c612007-12-14 02:03:58 +000015% See the file COPYING-MANUAL in the source tree docs/ directory for full license
Dominik Riebeling40afbd22007-01-02 20:50:03 +000016% agreement.
17%
18% Contributors are listed in the file docs/CREDITS-MANUAL
19%
20%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
Martin Arver3622c932006-03-29 18:48:52 +000022\documentclass[a4paper,11pt]{scrreprt}
Dominik Riebeling3e166f62008-12-02 23:12:39 +000023\usepackage[utf8]{inputenc}
Dominik Riebeling48832cd2010-06-05 13:55:36 +000024\usepackage[T1]{fontenc}
Dominik Riebelingcee8f012008-12-01 21:21:42 +000025% This manual used to use Palatino as font. This caused issues with small caps
26% (textsc), so do not use that font as default one anymore.
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000027
Martin Arverec60a052006-03-29 18:40:42 +000028\usepackage{tabularx}
Nils Wallméniusc687b302006-04-02 13:50:01 +000029\usepackage{multirow}
Dominik Riebelingb074b222006-06-05 10:08:54 +000030\usepackage{multicol}
Martin Arver0da41d82006-03-24 11:53:07 +000031
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000032\usepackage{float}
33\floatstyle{ruled}
34
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000035\usepackage{hyperref}
Dominik Riebelinga2c6b672008-09-23 20:27:39 +000036\usepackage{enumitem}
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000037
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000038\usepackage{optional}
39
Alex Parker7dfec972009-08-23 22:23:33 +000040\usepackage[table]{xcolor}
41
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000042\input{platform/\platform.tex}
Nils Wallménius22a5c602008-02-13 16:40:57 +000043\input{features.tex}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000044
Martin Arver4c981062006-06-07 18:48:56 +000045\newcommand{\playername}{\playerman\ \playerlongtype}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000046
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000047\hypersetup{% add some values to the pdf properties
48 colorlinks = true,
49 pdfstartview = FitV,
50 linkcolor = blue,
51 citecolor = blue,
52 urlcolor = blue,
53 pdftitle = {Rockbox user manual},
54 pdfauthor = {The Rockbox Team},
55 pdfsubject = {Rockbox user manual for \playername}
56}
57
Martin Arver47ea9062006-06-07 12:15:46 +000058\newcommand{\fname}[1]{\texttt{#1}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000059\newcommand{\tabeltc}[1]{{\centering #1 \par}}
60\newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
61
Martin Arvera0cdee02006-03-31 12:25:22 +000062\newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
63
Alexander Levin4acf5d32009-08-24 18:08:00 +000064% Colors used to typeset table headers and alternating table rows
Alex Parker73bac432009-08-24 22:50:45 +000065\colorlet{tblhdrbgcolor}{blue!30} % Background color for headers
66\colorlet{tbloddrowbgcolor}{blue!10} % Background color for odd rows (headers not included)
67\colorlet{tblevenrowbgcolor}{white} % Background color for even rows (headers not included)
Alexander Levin4acf5d32009-08-24 18:08:00 +000068
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000069\usepackage{fancyhdr}
70\usepackage{graphicx}
71\usepackage{verbatim}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000072\usepackage{makeidx}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000073\usepackage{fancyvrb}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000074\usepackage{color}
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000075\ifpdfoutput{\usepackage{booktabs}}%
76 {\newcommand{%
77 \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}%
78 }
Martin Arverd3d3e342006-03-15 10:56:14 +000079\usepackage{longtable}
Martin Arver7d6810c2006-03-31 11:50:33 +000080\usepackage{url}
81\urlstyle{sf}
Martin Arver9be37f32006-03-31 13:29:27 +000082\usepackage{marvosym}
Dominik Riebeling6ea22822007-01-07 17:10:44 +000083\usepackage{rotating}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000084
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000085% pdf output: try pdf first, then png and jpg as file format
86% html output: try png first, then jpg. Ignore pdf files
87% this only applies if no file extension is given!
88\ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}%
89 {\DeclareGraphicsExtensions{.png,.jpg}}
90
Martin Arver6d5d7342006-03-30 22:03:46 +000091% fancy header style adjustments
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000092\fancyhead{}
93\fancyfoot{}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000094\fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
Martin Arver6d5d7342006-03-30 22:03:46 +000095\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000096\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000097\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000098\fancypagestyle{plain}{}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000099
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000100\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
101\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
102\setlength{\headheight}{18.5pt}
103\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +0000104
Alex Parker7550c9d2009-08-29 18:28:50 +0000105\ifpdfoutput{%
Alexander Levinb783c062009-08-29 22:29:22 +0000106 \renewcommand{\toprule}{\specialrule{\heavyrulewidth}{\abovetopsep}{0pt}}
107 \renewcommand{\midrule}{\specialrule{\lightrulewidth}{0pt}{\belowrulesep}}
Alex Parker7550c9d2009-08-29 18:28:50 +0000108 }{}
Alexander Levin876cce12009-08-29 21:38:49 +0000109\newcommand{\tblhdrstrut}{\rule[-1.3ex]{0mm}{4.0ex}}
110
Alex Parker7550c9d2009-08-29 18:28:50 +0000111
Martin Arver47ea9062006-06-07 12:15:46 +0000112%% \newenvironment{example}
113%% {\stepcounter{example}\paragraph{Example \theexample:}}
114%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000115
Martin Arver47ea9062006-06-07 12:15:46 +0000116%% \bigskip
117%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +0000118
Martin Arvercbc55992006-03-30 15:54:47 +0000119% found on the internet, posting by Donald Arseneau
120% I may as well include my robust expandable definions, which can be
121% used in \edef or \write where the \def would not be executed:
122%
123% \if\blank --- checks if parameter is blank (Spaces count as blank)
124% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
125% \if\nil --- checks if parameter is null (spaces are NOT null)
126% use \if\given{ } ... \else ... \fi etc.
127%
128{\catcode`\!=8 % funny catcode so ! will be a delimiter
129\catcode`\Q=3 % funny catcode so Q will be a delimiter
130\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
131\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
132\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
133\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
134\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
135}
136
Dominik Riebelinga2c6b672008-09-23 20:27:39 +0000137% environment for setting the changelog.
138\newenvironment{changelog}%
139 {\renewcommand{\labelitemi}{$\star$}\setitemize{noitemsep,topsep=0pt}%
140 \begin{itemize}}%
141 {\end{itemize}}
142
143
Alexander Levin87b2ad142010-05-20 16:20:58 +0000144\newcommand{\dapdisplaysize}{\dapdisplaywidth$\times$\dapdisplayheight$\times$\dapdisplaydepth}
145\newcommand{\genericimg}{\dapdisplaywidth x\dapdisplayheight x\dapdisplaydepth}
146
Martin Arvercbc55992006-03-30 15:54:47 +0000147% add screenshot image.
148% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000149% By using the 'H' (HERE) placement, the screenshots are placed where
150% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000151% Note: use this only for screenshots!
152% Note: leave caption empty to supress it.
153\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000154 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000155 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000156 \IfFileExists{#1-\genericimg-\specimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000157 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000158 \typeout{Note: device specific image used}}
159 {\IfFileExists{#1-\genericimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000160 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000161 {\IfFileExists{#1}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000162 {\includegraphics[width=\screenshotsize]{#1}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000163 \typeout{Warning: deprecated plain image name used}}%
164 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
165 \color{red}{\textbf{WARNING!} Image not found}%
166 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000167 }
168 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000169 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000170 \caption{#2}}\fi
171 \end{center}
172 \end{figure}
173}
Martin Arver0da41d82006-03-24 11:53:07 +0000174
Martin Arver9be37f32006-03-31 13:29:27 +0000175% command to display a note.
176% Usage: \note{text of your note}
177% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000178\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000179\newcommand{\note}[1]{
Alexander Levin04afc132010-05-08 11:56:28 +0000180 \ifinner\else\vspace{1ex}\par\noindent\fi
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000181 \textbf{Note:}\ %
Alexander Levin04afc132010-05-08 11:56:28 +0000182 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\vspace{1ex}\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000183}}
184{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000185
186% command to display a warning.
187% Usage: \warn{text of your warning}
188% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000189\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000190\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000191 \ifinner\else\par\noindent\fi
192 \textbf{Warning:\ }%
193 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000194}}
195{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000196
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000197% command to mark a text block as intended especially for blind people
198% Usage: \blind{text}
199\ifpdfoutput{
Alexander Levin942e4272010-06-28 22:39:45 +0000200\newcommand{\blind}[1]{\mbox{}\marginpar{\raisebox{-1ex}{\Huge{\ForwardToEnd}}}#1}
201}
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000202{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
203
Martin Arverf6db3682006-04-26 11:06:45 +0000204% make table floats use "H" (as for screenshots) as default positioning
205\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000206% change defaults for floats on a page as we have a lot of small images
207\setcounter{topnumber}{3} % default: 2
208\setcounter{bottomnumber}{2} % default: 1
209\setcounter{totalnumber}{5} % default: 3
210
Dominik Riebeling8c177222006-04-03 22:45:01 +0000211
Alexander Levinfb87e892009-08-24 21:22:18 +0000212% Environment for typesetting tables in a consistent way. The header has
213% a darker background; rows are white and light gray (alternating). Top,
214% middle and bottom rules are automatically set.
215%
216% Params:
217% #1 -- table width
218% #2 -- column specification (as used in the package tabularx)
219% #3 -- contents of the header row. The number of items must
220% match the number of specs in #2
221% #4 -- caption (optional). If used then this must be inside a floating
222% environment, e.g. table
223% #5 -- label (optional)
224%
225% Example:
226% \begin{rbtabular}{0.9\textwidth}{lX}{Col1 & Col2}{}{}
227% A1 & A2\\
228% B1 & B2\\
229% C1 & C2\\
230% \end{rbtabular}
231%
232\newenvironment{rbtabular}[5]{%
Alex Parker17e62882009-08-24 22:03:30 +0000233 \rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
Alexander Levinfb87e892009-08-24 21:22:18 +0000234 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
235 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
Alex Parker7550c9d2009-08-29 18:28:50 +0000236 \bottomrule
Alexander Levinfb87e892009-08-24 21:22:18 +0000237 \SavedEndTab%
238 \if\given{#4}\caption{#4}\fi%
239 \if\given{#5}\label{#5}\fi%
240 \endcenter%
241 }
242 \center
Alex Parker7550c9d2009-08-29 18:28:50 +0000243 \tabularx{#1}{#2}\toprule\rowcolor{tblhdrbgcolor}
Alexander Levin876cce12009-08-29 21:38:49 +0000244 \tblhdrstrut#3\\\midrule
Alexander Levinfb87e892009-08-24 21:22:18 +0000245}{%
246 \endtabularx
247}
248
Alexander Levin67f25a42010-07-02 18:54:09 +0000249\newcommand{\tabnlindent}{\newline\mbox{ }\mbox{ }}
Alex Parker60c04742009-06-20 19:17:06 +0000250
251
Dominik Riebeling8c177222006-04-03 22:45:01 +0000252
Dominik Riebeling36a31332006-04-09 21:22:42 +0000253% command to set the default table heading for button lists
Alexander Levin876cce12009-08-29 21:38:49 +0000254\newcommand{\taghead}{\tblhdrstrut\textbf{Tag} & \textbf{Description} \\\midrule}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000255
256% environment intended to be used with tag maps (for wps)
Alexander Levin05e3aad2009-06-20 22:15:49 +0000257% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{tagmap}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000258% Note: this automatically sets the table lines.
259% Note: you *need* to terminate the last line with a linebreak \\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000260% Cheers for the usenet helping me building this up :)
Alexander Levin4c105b62010-03-07 22:12:16 +0000261\newenvironment{tagmap}{%
Alex Parkerdaede5e2009-08-24 22:12:45 +0000262\rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000263 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
264 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
Alex Parker7550c9d2009-08-29 18:28:50 +0000265 \bottomrule
Dominik Riebeling36a31332006-04-09 21:22:42 +0000266 \SavedEndTab%
Dominik Riebeling36a31332006-04-09 21:22:42 +0000267 \endcenter%
268 }
269 \center
Alexander Levin67f25a42010-07-02 18:54:09 +0000270\tabularx{\textwidth}{Xp{.7\textwidth}}\toprule\rowcolor{tblhdrbgcolor} % here is the table width defined
Dominik Riebeling36a31332006-04-09 21:22:42 +0000271 \taghead
272}{%
273 \endtabularx
274}
275
Dominik Riebelingcee8f012008-12-01 21:21:42 +0000276% When creating HTML, use the soul package.
277% This produces much nicer HTML code (textsc results in each character being
278% put in a separate <span>).
279\ifpdfoutput{\newcommand{\caps}[1]{\textsc{#1}}}{\usepackage{soul}}
280\newcommand{\setting}[1]{\caps{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000281
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000282\newcommand{\config}[1]{\texttt{#1}}
283
Dominik Riebeling40afbd22007-01-02 20:50:03 +0000284% set link to download server
285% Usage: \download{bootloader/bootloader-ipodnano.ipod}
286% gets expanded to
287% "http://download.rockbox.org/bootloader/bootloader-ipodnano.ipod"
288\newcommand{\download}[1]{\url{http://download.rockbox.org/#1}}
289
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000290% set link to the wiki.
291% Usage: \wikilink{WebHome}
292% with "WebHome" being the wiki page name
Dominik Riebeling7255bdb2007-09-24 22:39:24 +0000293\newcommand{\wikibaseurl}{http://www.rockbox.org/wiki/}
294\ifpdfoutput{\newcommand{\wikiicon}{\Pointinghand}}
295 {\newcommand{\wikiicon}{}}
296\newcommand{\wikilink}[1]{\wikiicon{}\href{\wikibaseurl#1}{#1}}
297%\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/wiki/#1}}
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000298
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000299% define environment "code" based on fancyvrb.
300% use it to set code the user should type / see on his screen.
301% Note: the first 4 characters of each line will be stripped,
302% requiring everything to be indendet by exactly _4_ spaces!
303% This is intended to make the LaTeX sources more readable.
304% Note: when using the code environment you need to use optv instead of opt!
305\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebeling6ea22822007-01-07 17:10:44 +0000306 {framerule=0.4pt, framesep=1ex,frame=lines,%numbers=left,stepnumber=5,%
307 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000308 label=\textnormal{\textsc{Code}},%
309 commandchars=\\\{\}%
310 }
311
Martin Arver47ea9062006-06-07 12:15:46 +0000312% define environment "example" based on fancyvrb.
313% use it to set example code the user should type / see on his screen.
314% Note: the first 4 characters of each line will be stripped,
315% requiring everything to be indendet by exactly _4_ spaces!
316% This is intended to make the LaTeX sources more readable.
317% Note: when using the example environment you need to use optv instead of opt!
318\DefineVerbatimEnvironment{example}{Verbatim}%
319 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Dominik Riebeling6ea22822007-01-07 17:10:44 +0000320 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000321 label=\textnormal{\textsc{Example}},%
322 commandchars=\\\{\}%
323 }
324
Alexander Levinf2589542010-03-27 13:14:14 +0000325% Use the nopt command to exclude a certain defined feature from a section
Martin Arver1dbb2d22006-06-07 20:01:27 +0000326% Example:
327% \nopt{ondio}{This text will be excluded for ondios}
Alexander Levinf2589542010-03-27 13:14:14 +0000328\makeatletter
329\newcommand*\nopt[1]{\if\Opl@notlisted{#1}\expandafter\@firstofone
330 \else \expandafter\@gobble \fi}
331\makeatother
Martin Arver7a473132006-07-31 12:21:57 +0000332
Martin Arver26c6e7b2006-08-01 11:57:38 +0000333% Use the reference to handle get a flexible reference command
334% usage \reference{ref_section}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +0000335\ifpdfoutput{%
Martin Arver26c6e7b2006-08-01 11:57:38 +0000336 \newcommand{\reference}[1]{%
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000337 section~\ref{#1} (page~\pageref{#1})%
Martin Arver7a473132006-07-31 12:21:57 +0000338}}
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000339{\newcommand{\reference}[1]{section~\ref{#1}}}
Dominik Riebeling5eb1e152006-08-07 20:46:26 +0000340
341% special HTML output adjustments
342\ifpdfoutput{}{\setlength{\parindent}{0mm}}
343\ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000344
Dominik Riebelingf6b4b912006-08-24 15:09:34 +0000345\newcommand{\btnfnt}[1]{\textbf{#1}}
Dominik Riebelinga9a5c352006-10-05 16:47:17 +0000346%\hfuzz=2pt
347
348% generate index
349\usepackage{makeidx}
350\makeindex
Alex Parker60c04742009-06-20 19:17:06 +0000351
Alex Parker7550c9d2009-08-29 18:28:50 +0000352
Alex Parker60c04742009-06-20 19:17:06 +0000353% command to set the default table heading for button lists
Alex Parker7550c9d2009-08-29 18:28:50 +0000354\newcommand{\btnhead}{\textbf{Key} \opt{HAVEREMOTEKEYMAP}{%
355 & \textbf{Remote Key}} & \textbf{Action} \\\midrule}
Alex Parker60c04742009-06-20 19:17:06 +0000356% environment intended to be used with button maps
Alexander Levin97365802010-05-20 17:38:38 +0000357% usage: \begin{btnmap} Button & ButtonAction \\ \end{btnmap}
Alex Parker60c04742009-06-20 19:17:06 +0000358% Note: this automatically sets the table lines.
359% Note: you *need* to terminate the last line with a linebreak \\
Alex Parker60c04742009-06-20 19:17:06 +0000360% Cheers for the usenet helping me building this up :)
361
Alex Parker931ff0b2009-06-20 22:00:47 +0000362% tabularx is set to be either two or three columns wide depending on whether
Alex Parkerc5d38572009-06-29 18:33:44 +0000363% HAVEREMOTEKEYMAP is defined in the platform file for the target in question.
Alex Parker931ff0b2009-06-20 22:00:47 +0000364% If it is, then every button table has three columns of the form
Alex Parker60c04742009-06-20 19:17:06 +0000365% Main Unit Key & Remote Key & Description \\
Alex Parker60c04742009-06-20 19:17:06 +0000366
Alexander Levin97365802010-05-20 17:38:38 +0000367\newenvironment{btnmap}{%
Alex Parkerdaede5e2009-08-24 22:12:45 +0000368 \rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
Alex Parker60c04742009-06-20 19:17:06 +0000369 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
370 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
Alex Parker7550c9d2009-08-29 18:28:50 +0000371 \bottomrule
Alex Parker60c04742009-06-20 19:17:06 +0000372 \SavedEndTab%
Alexander Levin97365802010-05-20 17:38:38 +0000373 \endcenter\vspace{2ex}%
Alex Parker60c04742009-06-20 19:17:06 +0000374 }
Alexander Levin97365802010-05-20 17:38:38 +0000375 \vspace{2ex}\center
Alex Parkerc5d38572009-06-29 18:33:44 +0000376 \opt{HAVEREMOTEKEYMAP}{
Alex Parker931ff0b2009-06-20 22:00:47 +0000377 % here is the table width defined for 3 columns
Alex Parker7550c9d2009-08-29 18:28:50 +0000378 \tabularx{.95\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule\rowcolor{tblhdrbgcolor}
Alex Parker931ff0b2009-06-20 22:00:47 +0000379 }
Alex Parkerc5d38572009-06-29 18:33:44 +0000380 \nopt{HAVEREMOTEKEYMAP}{
Alex Parker931ff0b2009-06-20 22:00:47 +0000381 % here is the table width defined for 2 columns
Alex Parker7550c9d2009-08-29 18:28:50 +0000382 \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule\rowcolor{tblhdrbgcolor}
Alex Parker931ff0b2009-06-20 22:00:47 +0000383 }
Alexander Levin876cce12009-08-29 21:38:49 +0000384 \tblhdrstrut\btnhead
Alex Parker60c04742009-06-20 19:17:06 +0000385}{%
386 \endtabularx
387}