summaryrefslogtreecommitdiff
path: root/manual/preamble.tex
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2006-04-03 22:45:01 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2006-04-03 22:45:01 +0000
commit8c177221b31d9b86aa286092ede463a1c5f0a4b4 (patch)
tree885e5749966e3c4e7e29ef86222b299f29a0f4d6 /manual/preamble.tex
parentc42c971d6c2e466d6a9de971aa759460346dc704 (diff)
downloadrockbox-8c177221b31d9b86aa286092ede463a1c5f0a4b4.tar.gz
rockbox-8c177221b31d9b86aa286092ede463a1c5f0a4b4.zip
Added environment to unify button mapping tables. Adjust plugins to use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9475 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'manual/preamble.tex')
-rw-r--r--manual/preamble.tex25
1 files changed, 25 insertions, 0 deletions
diff --git a/manual/preamble.tex b/manual/preamble.tex
index bc69194b54..76fef710e0 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -138,3 +138,28 @@
138\setcounter{bottomnumber}{2} % default: 1 138\setcounter{bottomnumber}{2} % default: 1
139\setcounter{totalnumber}{5} % default: 3 139\setcounter{totalnumber}{5} % default: 3
140 140
141% command to set the default table heading for button lists
142\newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule}
143
144% environment intended to be used with button maps
145% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
146% Note: this automatically sets the table lines.
147% Note: you *need* to terminate the last line with a linebreak \\
148% Note: you still need to enclose this with \begin{table} / \end{table}
149% Cheers for the usenet helping me building this up :)
150\newenvironment{btnmap}[2]{%
151 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
152 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
153 \bottomrule
154 \SavedEndTab%
155 \if\given{#1}\caption{#1}\fi%
156 \if\given{#2}\label{#2}\fi%
157 \endcenter%
158 }
159 \center
160\tabularx{.75\textwidth}{lX}\toprule % here is the table width defined
161 \btnhead
162}{%
163 \endtabularx
164}
165