summaryrefslogtreecommitdiff
path: root/manual/preamble.tex
diff options
context:
space:
mode:
authorAlex Parker <rockbox@aeparker.com>2009-06-20 22:00:47 +0000
committerAlex Parker <rockbox@aeparker.com>2009-06-20 22:00:47 +0000
commit931ff0b12c9e6d7fe756c9b8f9891f2227686a30 (patch)
tree7ff3ec799b7c7eb220fd0adb45a4bdb4f91f4abe /manual/preamble.tex
parentd48592596fed9d3e88b225ad8a592b90c35fbdcf (diff)
downloadrockbox-931ff0b12c9e6d7fe756c9b8f9891f2227686a30.tar.gz
rockbox-931ff0b12c9e6d7fe756c9b8f9891f2227686a30.zip
Much cleaner version of r21411 - add three column button tables capability to the manual. To use, add remote_keymap to the platform file, then button tables can be used in the form Main Button & Remote Button & Description. If remote_keymap is defined in the platform file but additional buttons are not added to the button tables, then the decription will appear in the remote key column, but the manual should still build. Thanks to bluebrother for pointing out!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21423 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'manual/preamble.tex')
-rw-r--r--manual/preamble.tex42
1 files changed, 11 insertions, 31 deletions
diff --git a/manual/preamble.tex b/manual/preamble.tex
index d54a81f16f..024c1010f0 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -311,50 +311,30 @@
311% Note: you still need to enclose this with \begin{table} / \end{table} 311% Note: you still need to enclose this with \begin{table} / \end{table}
312% Cheers for the usenet helping me building this up :) 312% Cheers for the usenet helping me building this up :)
313 313
314% btnmap is set to be either two or three columns wide depending on whether 314% tabularx is set to be either two or three columns wide depending on whether
315% remote_keymap is defined in the platform file for the target in question. 315% remote_keymap is defined in the platform file for the target in question.
316% If it is, then every button table needs to have three columns of the form 316% If it is, then every button table has three columns of the form
317% Main Unit Key & Remote Key & Description \\ 317% Main Unit Key & Remote Key & Description \\
318% or the manual will fail to build. For some reason, it doesn't seem possible
319% to put the \end{btnmap} in a macro, so leave it as it is in the keymaps.
320 318
321\opt{remote_keymap}{ 319\newenvironment{btnmap}[2]{%
322\newenvironment{btnmap}[3]{%
323 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname 320 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
324 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% 321 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
325 \bottomrule 322 \bottomrule
326 \SavedEndTab% 323 \SavedEndTab%
327 \if\given{#1}\caption{#1}\fi% 324 \if\given{#1}\caption{#1}\fi%
328 \if\given{#2}\caption{#2}\fi% 325 \if\given{#2}\label{#2}\fi%
329 \if\given{#3}\label{#3}\fi%
330 \endcenter% 326 \endcenter%
331 } 327 }
332 \center 328 \center
333 \tabularx{.9\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}X>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule % here is the table width defined 329 \opt{remote_keymap}{
334 \btnhead 330 % here is the table width defined for 3 columns
335}{% 331 \tabularx{.9\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule
336 \endtabularx 332 }
337} 333 \nopt{remote_keymap}{
338\newcommand{\beginbuttonmap}{\begin{btnmap}{}{}{}} 334 % here is the table width defined for 2 columns
339} 335 \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule
340
341\nopt{remote_keymap}{
342\newenvironment{btnmap}[2]{%
343 \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
344 \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
345 \bottomrule
346 \SavedEndTab%
347 \if\given{#1}\caption{#1}\fi%
348 \if\given{#2}\label{#2}\fi%
349 \endcenter%
350 } 336 }
351 \center
352 \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule % here is the table width defined
353 \btnhead 337 \btnhead
354}{% 338}{%
355 \endtabularx 339 \endtabularx
356} 340}
357\newcommand{\beginbuttonmap}{\begin{btnmap}{}{}}
358}
359
360%\newcommand{\closebuttonmap}{\end{btnmap}} \ No newline at end of file