summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-08-26 20:58:49 +0000
committerAlexander Levin <al.le@rockbox.org>2009-08-26 20:58:49 +0000
commit9f64794c70722430d5fdbafd367367c54e2870e1 (patch)
treeb9a0bfe90b7ead5686bbf4c5c9ad79e855d9d5ba
parenta0341df6d59f69ac05de58d12beb1fc06f6f5ace (diff)
downloadrockbox-9f64794c70722430d5fdbafd367367c54e2870e1.tar.gz
rockbox-9f64794c70722430d5fdbafd367367c54e2870e1.tar.bz2
rockbox-9f64794c70722430d5fdbafd367367c54e2870e1.zip
Manual: do filling the table headers with colors in a more official way, so that the spaces defined in booktabs are retained
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22516 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--manual/preamble.tex40
1 files changed, 25 insertions, 15 deletions
diff --git a/manual/preamble.tex b/manual/preamble.tex
index fa2ef73ae8..a9ace76d12 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -65,6 +65,20 @@
\colorlet{tbloddrowbgcolor}{blue!10} % Background color for odd rows (headers not included)
\colorlet{tblevenrowbgcolor}{white} % Background color for even rows (headers not included)
+% We use or own rules to typeset tables since we want the headers to
+% be fully filled with colors
+\newcommand{\rbtoprule}{\specialrule{\heavyrulewidth}{\abovetopsep}{0pt}%
+ \arrayrulecolor{tblhdrbgcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
+ \arrayrulecolor{black}}
+\newcommand{\rbmidrule}{\arrayrulecolor{tblhdrbgcolor}\specialrule{\aboverulesep}{0pt}{0pt}%
+ \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%
+ \arrayrulecolor{tblevenrowbgcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
+ \arrayrulecolor{black}}
+\newcommand{\rbbottomrule}{\specialrule{\heavyrulewidth}{\aboverulesep}{0pt}%
+ \arrayrulecolor{white}\specialrule{\belowbottomsep}{0pt}{0pt}%
+ \arrayrulecolor{black}}
+
+
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{verbatim}
@@ -102,9 +116,6 @@
\setlength{\headheight}{18.5pt}
\newcounter{example}[chapter]
-\setlength{\belowrulesep}{0pt}
-\setlength{\aboverulesep}{0pt}
-
%% \newenvironment{example}
%% {\stepcounter{example}\paragraph{Example \theexample:}}
%% {\hfill$\Box$
@@ -228,15 +239,15 @@
\rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
- \bottomrule
+ \rbbottomrule%
\SavedEndTab%
\if\given{#4}\caption{#4}\fi%
\if\given{#5}\label{#5}\fi%
\endcenter%
}
\center
- \tabularx{#1}{#2}\toprule\rowcolor{tblhdrbgcolor}
- \rule{0pt}{2.9ex}#3\\\midrule
+ \tabularx{#1}{#2}\rbtoprule\rowcolor{tblhdrbgcolor}
+ #3\\\rbmidrule
}{%
\endtabularx
}
@@ -245,7 +256,7 @@
% command to set the default table heading for button lists
-\newcommand{\taghead}{\rule{0pt}{2.9ex}\textbf{Tag} & \textbf{Description} \\\midrule}
+\newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\rbmidrule}
% environment intended to be used with tag maps (for wps)
% usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{tagmap}
@@ -257,14 +268,14 @@
\rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
- \bottomrule
+ \rbbottomrule%
\SavedEndTab%
\if\given{#1}\caption{#1}\fi%
\if\given{#2}\label{#2}\fi%
\endcenter%
}
\center
-\tabularx{\textwidth}{lX}\toprule\rowcolor{tblhdrbgcolor} % here is the table width defined
+\tabularx{\textwidth}{lX}\rbtoprule\rowcolor{tblhdrbgcolor} % here is the table width defined
\taghead
}{%
\endtabularx
@@ -347,10 +358,9 @@
\usepackage{makeidx}
\makeindex
-
% command to set the default table heading for button lists
\newcommand{\btnhead}{\textbf{Key} \opt{HAVEREMOTEKEYMAP}{%
- & \textbf{Remote Key}} & \textbf{Action} \\\midrule}
+ & \textbf{Remote Key}} & \textbf{Action} \\\rbmidrule}
% environment intended to be used with button maps
% usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap}
% Note: this automatically sets the table lines.
@@ -367,7 +377,7 @@
\rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
- \bottomrule
+ \rbbottomrule%
\SavedEndTab%
\if\given{#1}\caption{#1}\fi%
\if\given{#2}\label{#2}\fi%
@@ -376,13 +386,13 @@
\center
\opt{HAVEREMOTEKEYMAP}{
% here is the table width defined for 3 columns
- \tabularx{.95\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule\rowcolor{tblhdrbgcolor}
+ \tabularx{.95\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\rbtoprule\rowcolor{tblhdrbgcolor}
}
\nopt{HAVEREMOTEKEYMAP}{
% here is the table width defined for 2 columns
- \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule\rowcolor{tblhdrbgcolor}
+ \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\rbtoprule\rowcolor{tblhdrbgcolor}
}
- \rule{0pt}{2.9ex}\btnhead
+ \btnhead
}{%
\endtabularx
}