blob: 4e2ec7ec79cc71bf36678935651298e594222bde [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 Riebelingcee8f012008-12-01 21:21:42 +000024% This manual used to use Palatino as font. This caused issues with small caps
25% (textsc), so do not use that font as default one anymore.
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000026
Martin Arverec60a052006-03-29 18:40:42 +000027\usepackage{tabularx}
Nils Wallméniusc687b302006-04-02 13:50:01 +000028\usepackage{multirow}
Dominik Riebelingb074b222006-06-05 10:08:54 +000029\usepackage{multicol}
Martin Arver0da41d82006-03-24 11:53:07 +000030
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000031\usepackage{float}
32\floatstyle{ruled}
33
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000034\usepackage{hyperref}
Dominik Riebelinga2c6b672008-09-23 20:27:39 +000035\usepackage{enumitem}
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000036
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000037\usepackage{optional}
38
Alex Parker7dfec972009-08-23 22:23:33 +000039\usepackage[table]{xcolor}
40
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000041\input{platform/\platform.tex}
Nils Wallménius22a5c602008-02-13 16:40:57 +000042\input{features.tex}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000043
Martin Arver4c981062006-06-07 18:48:56 +000044\newcommand{\playername}{\playerman\ \playerlongtype}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000045
Dominik Riebelingc0068bb2006-04-08 21:00:22 +000046\hypersetup{% add some values to the pdf properties
47 colorlinks = true,
48 pdfstartview = FitV,
49 linkcolor = blue,
50 citecolor = blue,
51 urlcolor = blue,
52 pdftitle = {Rockbox user manual},
53 pdfauthor = {The Rockbox Team},
54 pdfsubject = {Rockbox user manual for \playername}
55}
56
Martin Arver47ea9062006-06-07 12:15:46 +000057\newcommand{\fname}[1]{\texttt{#1}}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000058\newcommand{\tabeltc}[1]{{\centering #1 \par}}
59\newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}}
60
Martin Arvera0cdee02006-03-31 12:25:22 +000061\newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}}
62
Alexander Levin4acf5d32009-08-24 18:08:00 +000063% Colors used to typeset table headers and alternating table rows
64\colorlet{tblhdrbgcolor}{gray!60} % Background color for headers
Alexander Levinfb87e892009-08-24 21:22:18 +000065\colorlet{tbloddrowbgcolor}{white} % Background color for odd rows (headers not included)
66\colorlet{tblevenrowbgcolor}{gray!30} % Background color for even rows (headers not included)
Alexander Levin4acf5d32009-08-24 18:08:00 +000067
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000068\usepackage{fancyhdr}
69\usepackage{graphicx}
70\usepackage{verbatim}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000071\usepackage{makeidx}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000072\usepackage{fancyvrb}
73\usepackage{enumerate}
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}
Martin Arver1dbb2d22006-06-07 20:01:27 +000083\usepackage{ifthen}
Dominik Riebeling6ea22822007-01-07 17:10:44 +000084\usepackage{rotating}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000085
Dominik Riebeling1d16d4a2006-09-17 20:34:10 +000086% pdf output: try pdf first, then png and jpg as file format
87% html output: try png first, then jpg. Ignore pdf files
88% this only applies if no file extension is given!
89\ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}%
90 {\DeclareGraphicsExtensions{.png,.jpg}}
91
Martin Arver6d5d7342006-03-30 22:03:46 +000092% fancy header style adjustments
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000093\fancyhead{}
94\fancyfoot{}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000095\fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}}
Martin Arver6d5d7342006-03-30 22:03:46 +000096\fancyhead[R]{\iffloatpage{}{\thepage}}
Martin Arver6c9f3152006-06-05 16:31:34 +000097\fancyfoot[L]{\textsc{The Rockbox manual}}
Dominik Riebelingc7bb9492006-06-13 16:39:07 +000098\fancyfoot[R]{\textsc{\playerman{} \playertype}}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +000099\fancypagestyle{plain}{}
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000100
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000101\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
102\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
103\setlength{\headheight}{18.5pt}
104\newcounter{example}[chapter]
Martin Arver0da41d82006-03-24 11:53:07 +0000105
Martin Arver47ea9062006-06-07 12:15:46 +0000106%% \newenvironment{example}
107%% {\stepcounter{example}\paragraph{Example \theexample:}}
108%% {\hfill$\Box$
Christi Scarboroughd68d7c02006-02-06 07:25:25 +0000109
Martin Arver47ea9062006-06-07 12:15:46 +0000110%% \bigskip
111%% \noindent}
Martin Arver0da41d82006-03-24 11:53:07 +0000112
Martin Arvercbc55992006-03-30 15:54:47 +0000113% found on the internet, posting by Donald Arseneau
114% I may as well include my robust expandable definions, which can be
115% used in \edef or \write where the \def would not be executed:
116%
117% \if\blank --- checks if parameter is blank (Spaces count as blank)
118% \if\given --- checks if parameter is not blank: like \if\blank{#1}\else
119% \if\nil --- checks if parameter is null (spaces are NOT null)
120% use \if\given{ } ... \else ... \fi etc.
121%
122{\catcode`\!=8 % funny catcode so ! will be a delimiter
123\catcode`\Q=3 % funny catcode so Q will be a delimiter
124\long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!}
125\long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces
126\long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null
127\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
128\long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above
129}
130
Dominik Riebelinga2c6b672008-09-23 20:27:39 +0000131% environment for setting the changelog.
132\newenvironment{changelog}%
133 {\renewcommand{\labelitemi}{$\star$}\setitemize{noitemsep,topsep=0pt}%
134 \begin{itemize}}%
135 {\end{itemize}}
136
137
Martin Arvercbc55992006-03-30 15:54:47 +0000138% add screenshot image.
139% Usage: \screenshot{filename}{caption}{label}
Martin Arverf6db3682006-04-26 11:06:45 +0000140% By using the 'H' (HERE) placement, the screenshots are placed where
141% we want them.
Martin Arvercbc55992006-03-30 15:54:47 +0000142% Note: use this only for screenshots!
143% Note: leave caption empty to supress it.
144\newcommand{\screenshot}[3]{
Martin Arverf6db3682006-04-26 11:06:45 +0000145 \begin{figure}[H]
Martin Arvercbc55992006-03-30 15:54:47 +0000146 \begin{center}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000147 \IfFileExists{#1-\genericimg-\specimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000148 {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000149 \typeout{Note: device specific image used}}
150 {\IfFileExists{#1-\genericimg.png}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000151 {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000152 {\IfFileExists{#1}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000153 {\includegraphics[width=\screenshotsize]{#1}
Dominik Riebeling5be45092006-06-04 11:20:06 +0000154 \typeout{Warning: deprecated plain image name used}}%
155 {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
156 \color{red}{\textbf{WARNING!} Image not found}%
157 }
Dominik Riebeling2cf5abb2006-04-02 17:29:44 +0000158 }
159 }
Dominik Riebelinge5a2b692006-04-01 19:16:12 +0000160 \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
Martin Arvercbc55992006-03-30 15:54:47 +0000161 \caption{#2}}\fi
162 \end{center}
163 \end{figure}
164}
Martin Arver0da41d82006-03-24 11:53:07 +0000165
Martin Arver9be37f32006-03-31 13:29:27 +0000166% command to display a note.
167% Usage: \note{text of your note}
168% Note: do NOT use \textbf or similar to emphasize text, use \emph!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000169\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000170\newcommand{\note}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000171 \ifinner\else\par\noindent\fi
172 \textbf{Note:}\ %
173 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000174}}
175{\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}}
Martin Arver9be37f32006-03-31 13:29:27 +0000176
177% command to display a warning.
178% Usage: \warn{text of your warning}
179% Note: do NOT use \textbf or similar to emphasize text!
Dominik Riebeling6424c502006-07-17 19:10:31 +0000180\ifpdfoutput{
Martin Arver9be37f32006-03-31 13:29:27 +0000181\newcommand{\warn}[1]{
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000182 \ifinner\else\par\noindent\fi
183 \textbf{Warning:\ }%
184 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi%
Dominik Riebeling6424c502006-07-17 19:10:31 +0000185}}
186{\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}}
Dominik Riebelingdf91a9b2006-04-01 15:35:30 +0000187
Dominik Riebeling4ccc2ce2006-07-19 16:06:37 +0000188% command to mark a text block as intended especially for blind people
189% Usage: \blind{text}
190\ifpdfoutput{
191\newcommand{\blind}[1]{
192 \ifinner\else\par\noindent\fi
193 \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\ForwardToEnd}}#1\par\fi%
194}}
195{\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}}
196
Martin Arverf6db3682006-04-26 11:06:45 +0000197% make table floats use "H" (as for screenshots) as default positioning
198\makeatletter\renewcommand{\fps@table}{H}\makeatother
Dominik Riebeling38385a52006-04-03 18:14:25 +0000199% change defaults for floats on a page as we have a lot of small images
200\setcounter{topnumber}{3} % default: 2
201\setcounter{bottomnumber}{2} % default: 1
202\setcounter{totalnumber}{5} % default: 3
203
Dominik Riebeling8c177222006-04-03 22:45:01 +0000204
Alexander Levinfb87e892009-08-24 21:22:18 +0000205% Environment for typesetting tables in a consistent way. The header has
206% a darker background; rows are white and light gray (alternating). Top,
207% middle and bottom rules are automatically set.
208%
209% Params:
210% #1 -- table width
211% #2 -- column specification (as used in the package tabularx)
212% #3 -- contents of the header row. The number of items must
213% match the number of specs in #2
214% #4 -- caption (optional). If used then this must be inside a floating
215% environment, e.g. table
216% #5 -- label (optional)
217%
218% Example:
219% \begin{rbtabular}{0.9\textwidth}{lX}{Col1 & Col2}{}{}
220% A1 & A2\\
221% B1 & B2\\
222% C1 & C2\\
223% \end{rbtabular}
224%
225\newenvironment{rbtabular}[5]{%
226 \rowcolors{2}{tblevenrowbgcolor}{tbloddrowbgcolor}
227 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
228 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
229 \bottomrule
230 \SavedEndTab%
231 \if\given{#4}\caption{#4}\fi%
232 \if\given{#5}\label{#5}\fi%
233 \endcenter%
234 }
235 \center
236 \tabularx{#1}{#2}\toprule\rowcolor{tblhdrbgcolor}
237 #3\\\midrule
238}{%
239 \endtabularx
240}
241
Alex Parker60c04742009-06-20 19:17:06 +0000242
243
Dominik Riebeling8c177222006-04-03 22:45:01 +0000244
Dominik Riebeling36a31332006-04-09 21:22:42 +0000245% command to set the default table heading for button lists
246\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule}
247
248% environment intended to be used with tag maps (for wps)
Alexander Levin05e3aad2009-06-20 22:15:49 +0000249% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{tagmap}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000250% Note: this automatically sets the table lines.
251% Note: you *need* to terminate the last line with a linebreak \\
252% Note: you still need to enclose this with \begin{table} / \end{table}
253% Cheers for the usenet helping me building this up :)
254\newenvironment{tagmap}[2]{%
Alexander Levinfb87e892009-08-24 21:22:18 +0000255\rowcolors{1}{tblevenrowbgcolor}{tbloddrowbgcolor}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000256 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
257 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
258 \bottomrule
259 \SavedEndTab%
260 \if\given{#1}\caption{#1}\fi%
261 \if\given{#2}\label{#2}\fi%
262 \endcenter%
263 }
264 \center
265\tabularx{\textwidth}{lX}\toprule % here is the table width defined
266 \taghead
267}{%
268 \endtabularx
269}
270
Dominik Riebelingcee8f012008-12-01 21:21:42 +0000271% When creating HTML, use the soul package.
272% This produces much nicer HTML code (textsc results in each character being
273% put in a separate <span>).
274\ifpdfoutput{\newcommand{\caps}[1]{\textsc{#1}}}{\usepackage{soul}}
275\newcommand{\setting}[1]{\caps{#1}}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000276
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000277\newcommand{\config}[1]{\texttt{#1}}
278
Dominik Riebeling40afbd22007-01-02 20:50:03 +0000279% set link to download server
280% Usage: \download{bootloader/bootloader-ipodnano.ipod}
281% gets expanded to
282% "http://download.rockbox.org/bootloader/bootloader-ipodnano.ipod"
283\newcommand{\download}[1]{\url{http://download.rockbox.org/#1}}
284
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000285% set link to the wiki.
286% Usage: \wikilink{WebHome}
287% with "WebHome" being the wiki page name
Dominik Riebeling7255bdb2007-09-24 22:39:24 +0000288\newcommand{\wikibaseurl}{http://www.rockbox.org/wiki/}
289\ifpdfoutput{\newcommand{\wikiicon}{\Pointinghand}}
290 {\newcommand{\wikiicon}{}}
291\newcommand{\wikilink}[1]{\wikiicon{}\href{\wikibaseurl#1}{#1}}
292%\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/wiki/#1}}
Dominik Riebeling0f661ab2006-05-28 15:49:17 +0000293
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000294% define environment "code" based on fancyvrb.
295% use it to set code the user should type / see on his screen.
296% Note: the first 4 characters of each line will be stripped,
297% requiring everything to be indendet by exactly _4_ spaces!
298% This is intended to make the LaTeX sources more readable.
299% Note: when using the code environment you need to use optv instead of opt!
300\DefineVerbatimEnvironment{code}{Verbatim}%
Dominik Riebeling6ea22822007-01-07 17:10:44 +0000301 {framerule=0.4pt, framesep=1ex,frame=lines,%numbers=left,stepnumber=5,%
302 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
Dominik Riebeling89a2a282006-06-06 17:42:27 +0000303 label=\textnormal{\textsc{Code}},%
304 commandchars=\\\{\}%
305 }
306
Martin Arver47ea9062006-06-07 12:15:46 +0000307% define environment "example" based on fancyvrb.
308% use it to set example code the user should type / see on his screen.
309% Note: the first 4 characters of each line will be stripped,
310% requiring everything to be indendet by exactly _4_ spaces!
311% This is intended to make the LaTeX sources more readable.
312% Note: when using the example environment you need to use optv instead of opt!
313\DefineVerbatimEnvironment{example}{Verbatim}%
314 {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,%
Dominik Riebeling6ea22822007-01-07 17:10:44 +0000315 gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,%
Martin Arver47ea9062006-06-07 12:15:46 +0000316 label=\textnormal{\textsc{Example}},%
317 commandchars=\\\{\}%
318 }
319
Martin Arver1dbb2d22006-06-07 20:01:27 +0000320% Use the nopt command to exclude a certain defined feature from a sectio
321% Example:
322% \nopt{ondio}{This text will be excluded for ondios}
323\newcommand{\optnvalue}{0}
324 \newcommand{\nopt}[2]{%
325 \renewcommand{\optnvalue}{0}\opt{#1}{\renewcommand{\optnvalue}{1}}%
Dominik Riebelingeef96942007-04-07 22:48:11 +0000326 \ifthenelse{\optnvalue > 0}{}{#2}%
Martin Arver1dbb2d22006-06-07 20:01:27 +0000327 }
Martin Arver7a473132006-07-31 12:21:57 +0000328
Martin Arver26c6e7b2006-08-01 11:57:38 +0000329% Use the reference to handle get a flexible reference command
330% usage \reference{ref_section}
Dominik Riebelingc9bb1522006-08-13 18:55:59 +0000331\ifpdfoutput{%
Martin Arver26c6e7b2006-08-01 11:57:38 +0000332 \newcommand{\reference}[1]{%
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000333 section~\ref{#1} (page~\pageref{#1})%
Martin Arver7a473132006-07-31 12:21:57 +0000334}}
Dominik Riebelingd0a12a72006-08-22 16:34:41 +0000335{\newcommand{\reference}[1]{section~\ref{#1}}}
Dominik Riebeling5eb1e152006-08-07 20:46:26 +0000336
337% special HTML output adjustments
338\ifpdfoutput{}{\setlength{\parindent}{0mm}}
339\ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}}
Dominik Riebelingf83f9202006-08-18 14:32:15 +0000340
Dominik Riebelingf6b4b912006-08-24 15:09:34 +0000341\newcommand{\btnfnt}[1]{\textbf{#1}}
Dominik Riebelinga9a5c352006-10-05 16:47:17 +0000342%\hfuzz=2pt
343
344% generate index
345\usepackage{makeidx}
346\makeindex
Alex Parker60c04742009-06-20 19:17:06 +0000347
348
349% command to set the default table heading for button lists
Alex Parkerc5d38572009-06-29 18:33:44 +0000350\newcommand{\btnhead}{\textbf{Key} \opt{HAVEREMOTEKEYMAP}{%
Alex Parker60c04742009-06-20 19:17:06 +0000351 & \textbf{Remote Key}} & \textbf{Action} \\\midrule}
352% environment intended to be used with button maps
353% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
354% Note: this automatically sets the table lines.
355% Note: you *need* to terminate the last line with a linebreak \\
356% Note: you still need to enclose this with \begin{table} / \end{table}
357% Cheers for the usenet helping me building this up :)
358
Alex Parker931ff0b2009-06-20 22:00:47 +0000359% tabularx is set to be either two or three columns wide depending on whether
Alex Parkerc5d38572009-06-29 18:33:44 +0000360% HAVEREMOTEKEYMAP is defined in the platform file for the target in question.
Alex Parker931ff0b2009-06-20 22:00:47 +0000361% If it is, then every button table has three columns of the form
Alex Parker60c04742009-06-20 19:17:06 +0000362% Main Unit Key & Remote Key & Description \\
Alex Parker60c04742009-06-20 19:17:06 +0000363
Alex Parker60c04742009-06-20 19:17:06 +0000364\newenvironment{btnmap}[2]{%
Alexander Levinfb87e892009-08-24 21:22:18 +0000365 \rowcolors{1}{tblevenrowbgcolor}{tbloddrowbgcolor}
Alex Parker60c04742009-06-20 19:17:06 +0000366 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
367 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
368 \bottomrule
369 \SavedEndTab%
Alex Parker931ff0b2009-06-20 22:00:47 +0000370 \if\given{#1}\caption{#1}\fi%
371 \if\given{#2}\label{#2}\fi%
372 \endcenter%
Alex Parker60c04742009-06-20 19:17:06 +0000373 }
374 \center
Alex Parkerc5d38572009-06-29 18:33:44 +0000375 \opt{HAVEREMOTEKEYMAP}{
Alex Parker931ff0b2009-06-20 22:00:47 +0000376 % here is the table width defined for 3 columns
Alex Parker7dfec972009-08-23 22:23:33 +0000377 \tabularx{.95\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule
Alex Parker931ff0b2009-06-20 22:00:47 +0000378 }
Alex Parkerc5d38572009-06-29 18:33:44 +0000379 \nopt{HAVEREMOTEKEYMAP}{
Alex Parker931ff0b2009-06-20 22:00:47 +0000380 % here is the table width defined for 2 columns
381 \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule
382 }
Alex Parker60c04742009-06-20 19:17:06 +0000383 \btnhead
384}{%
385 \endtabularx
386}