summaryrefslogtreecommitdiff
path: root/manual/preamble.tex
diff options
context:
space:
mode:
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