Introduce a new environment 'rbtabular' to make all the tables look the same. See comments in preable.tex. Next step will be to define btnmap and tagmap via this environment.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22503 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alexander Levin 2009-08-24 21:22:18 +00:00
parent 873d266199
commit fb87e89473
12 changed files with 84 additions and 89 deletions

View file

@ -6,7 +6,7 @@
% for the html output. % for the html output.
\ifpdfoutput{\newcommand{\localendhead}{\endhead}}% \ifpdfoutput{\newcommand{\localendhead}{\endhead}}%
{\newcommand{\localendhead}{}} {\newcommand{\localendhead}{}}
\rowcolors{1}{}{tblrowbgcolor} \rowcolors{1}{tblevenrowbgcolor}{tbloddrowbgcolor}
\begin{longtable}{@{}>{\raggedright}p{.35\textwidth}@{}>{\raggedright}p{.4\textwidth}@{}p{.25\textwidth}@{}} \begin{longtable}{@{}>{\raggedright}p{.35\textwidth}@{}>{\raggedright}p{.4\textwidth}@{}p{.25\textwidth}@{}}
\toprule \toprule
\rowcolor{white} \textbf{Setting} & \textbf{Allowed Values} & \textbf{Unit}\\ \rowcolor{white} \textbf{Setting} & \textbf{Allowed Values} & \textbf{Unit}\\

View file

@ -2,11 +2,9 @@
\chapter{File formats} \chapter{File formats}
\section{\label{ref:Supportedfileformats}Supported file formats} \section{\label{ref:Supportedfileformats}Supported file formats}
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{\textwidth}{clp{7em}X}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Icon} & \textbf{File Type} & \textbf{Extension}
\begin{tabularx}{\textwidth}{clp{7em}X}\toprule & \textbf{Action when selected}}{}{}
\textbf{Icon} & \textbf{File Type} & \textbf{Extension}
& \textbf{Action when selected} \\\midrule%
\includegraphics[width=0.37cm]{appendix/images/icon-directory.png} \includegraphics[width=0.37cm]{appendix/images/icon-directory.png}
& Directory & \emph{none} & Enter the directory \\ & Directory & \emph{none} & Enter the directory \\
\includegraphics[width=0.37cm]{appendix/images/icon-audio-file.png} \includegraphics[width=0.37cm]{appendix/images/icon-audio-file.png}
@ -74,18 +72,14 @@
& Game of Life & \fname{.cells} & Show the configuration with the & Game of Life & \fname{.cells} & Show the configuration with the
``Rocklife'' plugin\\} ``Rocklife'' plugin\\}
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}
\opt{swcodec}{ \opt{swcodec}{
\section{\label{ref:Supportedaudioformats}Supported audio formats} \section{\label{ref:Supportedaudioformats}Supported audio formats}
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{\textwidth}{lp{6em}X}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Format} & \textbf{Extension} & \textbf{Notes}}{}{}
\begin{tabularx}{\textwidth}{lp{6em}X}\toprule
\textbf{Format} & \textbf{Extension} & \textbf{Notes} \\\midrule
\multicolumn{2}{c}{\textbf{Lossy codecs}}\\ \multicolumn{2}{c}{\textbf{Lossy codecs}}\\
\midrule \midrule
MPEG audio & \fname{.mp1, .mpa, .mp2, .mp3} & \\ MPEG audio & \fname{.mp1, .mpa, .mp2, .mp3} & \\
@ -127,8 +121,6 @@
NES Sound Format & \fname{.nsf, .nsfe} & \\ NES Sound Format & \fname{.nsf, .nsfe} & \\
SPC700 & \fname{.spc} & \\ SPC700 & \fname{.spc} & \\
Atari SAP & \fname{.sap} & \\ Atari SAP & \fname{.sap} & \\
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}
} }

View file

@ -29,12 +29,8 @@ displays files.
\newline\setting{As digits} disables this algorithm, and causes every digit to \newline\setting{As digits} disables this algorithm, and causes every digit to
be compared separately. The following table demonstrates the two sortings. be compared separately. The following table demonstrates the two sortings.
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{.8\textwidth}{XX}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{As whole numbers} & \textbf{As digits}}{}{}
\begin{tabularx}{.8\textwidth}{XX}
\toprule
\textbf{As whole numbers} & \textbf{As digits}\\
\midrule
03 Jackson.mp3 & 03 Jackson.mp3\\ 03 Jackson.mp3 & 03 Jackson.mp3\\
1 Ring Of Fire.mp3 & 1 Ring Of Fire.mp3\\ 1 Ring Of Fire.mp3 & 1 Ring Of Fire.mp3\\
2 I Walk The Line.mp3 & 10 A Thing Called Love.mp3\\ 2 I Walk The Line.mp3 & 10 A Thing Called Love.mp3\\
@ -42,9 +38,7 @@ displays files.
Episode 1.ogg & Episode 1.ogg\\ Episode 1.ogg & Episode 1.ogg\\
Episode 57.ogg & Episode 233.ogg\\ Episode 57.ogg & Episode 233.ogg\\
Episode 233.ogg & Episode 57.ogg\\ Episode 233.ogg & Episode 57.ogg\\
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}

View file

@ -19,15 +19,13 @@
and the average bitrate changes as follows. and the average bitrate changes as follows.
\begin{table}[h!] \begin{table}[h!]
\begin{center} \begin{rbtabular}{0.75\textwidth}{lX}%
\begin{tabularx}{0.75\textwidth}{lX}\toprule {\emph{Frequency} & \emph{Bitrate} (Kbit/s) -- quality 0$\rightarrow$7}{}{}
\emph{Frequency} & \emph{Bitrate} (Kbit/s) -- quality 0$\rightarrow$7 \\\midrule
44100Hz stereo & 75, 80, 90, 100, 120, 140, 160, 170 \\ 44100Hz stereo & 75, 80, 90, 100, 120, 140, 160, 170 \\
22050Hz stereo & 39, 41, 45, 50, 60, 80, 110, 130 \\ 22050Hz stereo & 39, 41, 45, 50, 60, 80, 110, 130 \\
44100Hz mono & 65, 68, 73, 80, 90, 105, 125, 140 \\ 44100Hz mono & 65, 68, 73, 80, 90, 105, 125, 140 \\
22050Hz mono & 35, 38, 40, 45, 50, 60, 75, 90 \\\bottomrule 22050Hz mono & 35, 38, 40, 45, 50, 60, 75, 90 \\
\end{tabularx} \end{rbtabular}
\end{center}
\end{table} \end{table}
} }

View file

@ -80,10 +80,8 @@ change to customise your listening experience.
Available options are: Available options are:
% %
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{\textwidth}{lX}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Setting} & \textbf{Description}}{}{}
\begin{tabularx}{\textwidth}{lX}\toprule
\textbf{Setting} & \textbf{Description} \\\midrule
Stereo Stereo
& Leave the audio signal unmodified. \\ & Leave the audio signal unmodified. \\
% %
@ -107,9 +105,7 @@ change to customise your listening experience.
to make the singer sound centrally placed, this often (but not to make the singer sound centrally placed, this often (but not
always) has the effect of removing the voice track from a song. This always) has the effect of removing the voice track from a song. This
setting also very often has other undesirable effects on the sound. \\ setting also very often has other undesirable effects on the sound. \\
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}
\section{Stereo Width} \section{Stereo Width}
@ -198,16 +194,12 @@ change to customise your listening experience.
Rockbox uses are: Rockbox uses are:
% %
\begin{table}[h!] \begin{table}[h!]
\begin{center} \begin{rbtabular}{0.5\textwidth}{Xc}{Setting & Value}{}{}
\rowcolors{1}{}{tblrowbgcolor}
\begin{tabular}{@{}lc@{}}\toprule
Setting & Value \\\midrule
MDB Strength & 50dB \\ MDB Strength & 50dB \\
MDB Harmonics & 48\% \\ MDB Harmonics & 48\% \\
MDB Centre Frequency & 60Hz \\ MDB Centre Frequency & 60Hz \\
MDB Shape & 90Hz \\\bottomrule MDB Shape & 90Hz \\
\end{tabular} \end{rbtabular}
\end{center}
\end{table} \end{table}
\end{description} \end{description}

View file

@ -8,10 +8,9 @@ identify which version of the software you need.
The model name is printed on the case. The hard drive size is listed on the The model name is printed on the case. The hard drive size is listed on the
serial number sticker on the back of the unit. serial number sticker on the back of the unit.
\begin{center} \begin{rbtabular}{\textwidth}{llXl}%
\begin{tabularx}{\textwidth}{llXl}\toprule {\textbf{Picture} & \textbf{Disk size} & \textbf{Model Name} & \textbf{Version Name}}%
\label{ref:Jukeboxtypetable} {}{ref:Jukeboxtypetable}
\textbf{Picture} & \textbf{Disk size} & \textbf{Model Name} & \textbf{Version Name} \\\midrule
\begin{minipage}{2.2cm} \begin{minipage}{2.2cm}
\includegraphics[width=2cm]{getting_started/images/archos-studio-small.png} \includegraphics[width=2cm]{getting_started/images/archos-studio-small.png}
\end{minipage} \end{minipage}
@ -48,8 +47,7 @@ serial number sticker on the back of the unit.
\begin{minipage}{2.2cm} \begin{minipage}{2.2cm}
\includegraphics[width=2cm]{getting_started/images/archos-ondiofm-small.png} \includegraphics[width=2cm]{getting_started/images/archos-ondiofm-small.png}
\end{minipage} \end{minipage}
& 128MB (flash) & Ondio 128 FM & ondiofm \\\bottomrule & 128MB (flash) & Ondio 128 FM & ondiofm \\
\end{tabularx} \end{rbtabular}
\end{center}
\note{Rockbox does not run on the Archos Jukebox Multimedia or any \note{Rockbox does not run on the Archos Jukebox Multimedia or any
Archos products other than those mentioned here.} Archos products other than those mentioned here.}

View file

@ -8,19 +8,16 @@ effect, you must catch it with the paddle. Look out for the bad ones.\\
\subsubsection{Special items} \subsubsection{Special items}
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{.75\textwidth}{clX}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Displayed} & \textbf{Name} & \textbf{Description}}{}{}
\begin{tabularx}{.75\textwidth}{clX}\toprule
\textbf{Displayed} & \textbf{Name} & \textbf{Description}\\\midrule
N & Normal & Returns paddle to normal.\\ N & Normal & Returns paddle to normal.\\
D & Die & Ball dies; lose a life.\\ D & Die & Ball dies; lose a life.\\
L & Life & Gain a life.\\ L & Life & Gain a life.\\
F & Fire & Allows you to shoot bricks with paddle.\\ F & Fire & Allows you to shoot bricks with paddle.\\
G & Glue & Ball sticks to paddle each time it hits.\\ G & Glue & Ball sticks to paddle each time it hits.\\
B & Ball & Immediately fires another ball.\\ B & Ball & Immediately fires another ball.\\
FL & Flip & Flip left / right movement.\\\bottomrule FL & Flip & Flip left / right movement.\\
\end{tabularx} \end{rbtabular}
\end{center}
\end{table} \end{table}
\begin{table} \begin{table}

View file

@ -34,10 +34,8 @@ The information panel which displays the current move number may also contain
these markers: \\ these markers: \\
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{\textwidth}{lX}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Mark} & \textbf{Meaning}}{}{}
\begin{tabularx}{\textwidth}{lX}\toprule
\textbf{Mark} & \textbf{Meaning} \\ \midrule
\emph{+ } & There are nodes after the current node in the SGF tree. \\ \emph{+ } & There are nodes after the current node in the SGF tree. \\
\emph{* } & There are sibling variations which can be navigated to using the % \emph{* } & There are sibling variations which can be navigated to using the %
\emph{Next Variation} menu option of the \emph{Context Menu}% \emph{Next Variation} menu option of the \emph{Context Menu}%
@ -53,9 +51,7 @@ these markers: \\
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonRec} button}. \\ \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonRec} button}. \\
\emph{C } & There is a comment at the current node. It can be viewed/edited using \emph{C } & There is a comment at the current node. It can be viewed/edited using
the \emph{Add/Edit Comment} menu option of the \emph{Context Menu}. \\ the \emph{Add/Edit Comment} menu option of the \emph{Context Menu}. \\
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}
\subsubsection{Controls} \subsubsection{Controls}

View file

@ -10,18 +10,14 @@ Pacbox is an emulator of the Pacman arcade machine hardware. It is a port of
To use the emulator to play Pacman, you need a copy of ROMs for To use the emulator to play Pacman, you need a copy of ROMs for
``Midway Pacman''. ``Midway Pacman''.
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{0.8\textwidth}{lX}{\textbf{Filename} & \textbf{MD5 checksum}}{}{}
\rowcolors{1}{}{tblrowbgcolor}
\begin{tabular}{ll}\toprule
\textbf{Filename} & \textbf{MD5 checksum}\\\midrule
pacman.5e & 2791455babaf26e0b396c78d2b45f8f6\\ pacman.5e & 2791455babaf26e0b396c78d2b45f8f6\\
pacman.5f & 9240f35d1d2beee0ff17195653b5e405\\ pacman.5f & 9240f35d1d2beee0ff17195653b5e405\\
pacman.6e & 290aa5eae9e2f63587b5dd5a7da932da\\ pacman.6e & 290aa5eae9e2f63587b5dd5a7da932da\\
pacman.6f & 19a886fcd8b5e88b0ed1b97f9d8659c0\\ pacman.6f & 19a886fcd8b5e88b0ed1b97f9d8659c0\\
pacman.6h & d7cce8bffd9563b133ec17ebbb6373d4\\ pacman.6h & d7cce8bffd9563b133ec17ebbb6373d4\\
pacman.6j & 33c0e197be4c787142af6c3be0d8f6b0\\\bottomrule pacman.6j & 33c0e197be4c787142af6c3be0d8f6b0\\
\end{tabular} \end{rbtabular}
\end{center}
\end{table} \end{table}
These need to be stored in the \fname{/.rockbox/pacman/} directory on your These need to be stored in the \fname{/.rockbox/pacman/} directory on your

View file

@ -39,9 +39,9 @@ Game controls:}
\opt{RECORDER_PAD}{ \opt{RECORDER_PAD}{
\renewcommand{\arraystretch}{1.8} \renewcommand{\arraystretch}{1.8}
\begin{tabularx}{\textwidth}{c X p{3cm} p{3cm} p{3cm}}\toprule \begin{rbtabular}{\textwidth}{c X p{3cm} p{3cm} p{3cm}}%
\textbf{Players} & \textbf{Modes} & \textbf{Player 1} & \textbf{Player 2} {\textbf{Players} & \textbf{Modes} & \textbf{Player 1} & \textbf{Player 2}
& \textbf{Player 3}\\\midrule & \textbf{Player 3}}{}{}
% %
0 & Out of control & \multicolumn{3}{p{9cm}}{With no player taking part in the 0 & Out of control & \multicolumn{3}{p{9cm}}{With no player taking part in the
game all worms are out of control and steered by artificial stupidity.}\\ game all worms are out of control and steered by artificial stupidity.}\\
@ -65,7 +65,7 @@ Game controls:}
& on remote control VOL DOWN: turn left VOL UP: turn & on remote control VOL DOWN: turn left VOL UP: turn
right & on \dap\ \ButtonFTwo: turn left \ButtonFThree: right & on \dap\ \ButtonFTwo: turn left \ButtonFThree:
turn right \\ turn right \\
\end{tabularx} \end{rbtabular}
\renewcommand{\arraystretch}{1.0} \renewcommand{\arraystretch}{1.0}
} }

View file

@ -62,7 +62,8 @@
% Colors used to typeset table headers and alternating table rows % Colors used to typeset table headers and alternating table rows
\colorlet{tblhdrbgcolor}{gray!60} % Background color for headers \colorlet{tblhdrbgcolor}{gray!60} % Background color for headers
\colorlet{tblrowbgcolor}{gray!30} % Background color for rows \colorlet{tbloddrowbgcolor}{white} % Background color for odd rows (headers not included)
\colorlet{tblevenrowbgcolor}{gray!30} % Background color for even rows (headers not included)
\usepackage{fancyhdr} \usepackage{fancyhdr}
\usepackage{graphicx} \usepackage{graphicx}
@ -201,6 +202,43 @@
\setcounter{totalnumber}{5} % default: 3 \setcounter{totalnumber}{5} % default: 3
% Environment for typesetting tables in a consistent way. The header has
% a darker background; rows are white and light gray (alternating). Top,
% middle and bottom rules are automatically set.
%
% Params:
% #1 -- table width
% #2 -- column specification (as used in the package tabularx)
% #3 -- contents of the header row. The number of items must
% match the number of specs in #2
% #4 -- caption (optional). If used then this must be inside a floating
% environment, e.g. table
% #5 -- label (optional)
%
% Example:
% \begin{rbtabular}{0.9\textwidth}{lX}{Col1 & Col2}{}{}
% A1 & A2\\
% B1 & B2\\
% C1 & C2\\
% \end{rbtabular}
%
\newenvironment{rbtabular}[5]{%
\rowcolors{2}{tblevenrowbgcolor}{tbloddrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
\bottomrule
\SavedEndTab%
\if\given{#4}\caption{#4}\fi%
\if\given{#5}\label{#5}\fi%
\endcenter%
}
\center
\tabularx{#1}{#2}\toprule\rowcolor{tblhdrbgcolor}
#3\\\midrule
}{%
\endtabularx
}
@ -214,7 +252,7 @@
% Note: you still need to enclose this with \begin{table} / \end{table} % Note: you still need to enclose this with \begin{table} / \end{table}
% Cheers for the usenet helping me building this up :) % Cheers for the usenet helping me building this up :)
\newenvironment{tagmap}[2]{% \newenvironment{tagmap}[2]{%
\rowcolors{1}{}{tblrowbgcolor} \rowcolors{1}{tblevenrowbgcolor}{tbloddrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
\bottomrule \bottomrule
@ -324,7 +362,7 @@
% Main Unit Key & Remote Key & Description \\ % Main Unit Key & Remote Key & Description \\
\newenvironment{btnmap}[2]{% \newenvironment{btnmap}[2]{%
\rowcolors{1}{}{tblrowbgcolor} \rowcolors{1}{tblevenrowbgcolor}{tbloddrowbgcolor}
\expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname
\expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{%
\bottomrule \bottomrule

View file

@ -113,12 +113,8 @@ to use it just do not do the initial build of the database and do not load it
to RAM.}% to RAM.}%
\begin{table} \begin{table}
\begin{center} \begin{rbtabular}{.75\textwidth}{XXX}%
\rowcolors{1}{}{tblrowbgcolor} {\textbf{Tag} & \textbf{Type} & \textbf{Origin}}{}{}
\begin{tabularx}{.75\textwidth}{XXX}%
\toprule%
\textbf{Tag} & \textbf{Type} & \textbf{Origin} \\
\midrule
filename & string & system \\ filename & string & system \\
album & string & id tag \\ album & string & id tag \\
albumartist & string & id tag \\ albumartist & string & id tag \\
@ -143,7 +139,5 @@ to RAM.}%
length & numeric & system \\ length & numeric & system \\
Lm (track len - min) & numeric & system \\ Lm (track len - min) & numeric & system \\
Ls (track len - sec) & numeric & system \\ Ls (track len - sec) & numeric & system \\
\bottomrule \end{rbtabular}
\end{tabularx}
\end{center}
\end{table} \end{table}