Dominik Riebeling | 40afbd2 | 2007-01-02 20:50:03 +0000 | [diff] [blame] | 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 | % __________ __ ___. |
| 3 | % Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | % Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | % Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | % Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | % \/ \/ \/ \/ \/ |
| 8 | % - M A N U A L - |
| 9 | % |
| 10 | % $Id$ |
| 11 | % |
| 12 | % Copyright (C) 2006 The Rockbox Manual Team |
| 13 | % |
| 14 | % All files in this archive are subject to the GNU Free Documentation License |
Marianne Arnold | b2f7c61 | 2007-12-14 02:03:58 +0000 | [diff] [blame] | 15 | % See the file COPYING-MANUAL in the source tree docs/ directory for full license |
Dominik Riebeling | 40afbd2 | 2007-01-02 20:50:03 +0000 | [diff] [blame] | 16 | % agreement. |
| 17 | % |
| 18 | % Contributors are listed in the file docs/CREDITS-MANUAL |
| 19 | % |
| 20 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 21 | |
Dominik Riebeling | 0ab97b7 | 2011-04-11 22:09:44 +0000 | [diff] [blame] | 22 | \documentclass[a4paper,11pt,hyphens]{scrreprt} |
Dominik Riebeling | 892fd0a | 2011-02-27 16:31:59 +0000 | [diff] [blame] | 23 | \usepackage[utf8]{inputenx} |
Dominik Riebeling | 48832cd | 2010-06-05 13:55:36 +0000 | [diff] [blame] | 24 | \usepackage[T1]{fontenc} |
Dominik Riebeling | 892fd0a | 2011-02-27 16:31:59 +0000 | [diff] [blame] | 25 | % load ix-utf8enc.dfu to get additional characters from the inputenx package. |
| 26 | \makeatletter\input{ix-utf8enc.dfu}\makeatother |
Dominik Riebeling | cee8f01 | 2008-12-01 21:21:42 +0000 | [diff] [blame] | 27 | % This manual used to use Palatino as font. This caused issues with small caps |
| 28 | % (textsc), so do not use that font as default one anymore. |
Dominik Riebeling | 8f8f9a5 | 2011-04-21 21:52:27 +0000 | [diff] [blame] | 29 | % Use Latin Modern instead which improves searchability of the PDF output. |
| 30 | \usepackage{lmodern} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 31 | |
Martin Arver | ec60a05 | 2006-03-29 18:40:42 +0000 | [diff] [blame] | 32 | \usepackage{tabularx} |
Nils Wallménius | c687b30 | 2006-04-02 13:50:01 +0000 | [diff] [blame] | 33 | \usepackage{multirow} |
Dominik Riebeling | b074b22 | 2006-06-05 10:08:54 +0000 | [diff] [blame] | 34 | \usepackage{multicol} |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 35 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 36 | \usepackage{float} |
| 37 | \floatstyle{ruled} |
| 38 | |
Dominik Riebeling | c0068bb | 2006-04-08 21:00:22 +0000 | [diff] [blame] | 39 | \usepackage{hyperref} |
Dominik Riebeling | a2c6b67 | 2008-09-23 20:27:39 +0000 | [diff] [blame] | 40 | \usepackage{enumitem} |
Dominik Riebeling | c0068bb | 2006-04-08 21:00:22 +0000 | [diff] [blame] | 41 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 42 | \usepackage{optional} |
| 43 | |
Alex Parker | 7dfec97 | 2009-08-23 22:23:33 +0000 | [diff] [blame] | 44 | \usepackage[table]{xcolor} |
| 45 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 46 | \input{platform/\platform.tex} |
Nils Wallménius | 22a5c60 | 2008-02-13 16:40:57 +0000 | [diff] [blame] | 47 | \input{features.tex} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 48 | |
Martin Arver | 4c98106 | 2006-06-07 18:48:56 +0000 | [diff] [blame] | 49 | \newcommand{\playername}{\playerman\ \playerlongtype} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 50 | |
Dominik Riebeling | c0068bb | 2006-04-08 21:00:22 +0000 | [diff] [blame] | 51 | \hypersetup{% add some values to the pdf properties |
| 52 | colorlinks = true, |
| 53 | pdfstartview = FitV, |
| 54 | linkcolor = blue, |
| 55 | citecolor = blue, |
| 56 | urlcolor = blue, |
| 57 | pdftitle = {Rockbox user manual}, |
| 58 | pdfauthor = {The Rockbox Team}, |
| 59 | pdfsubject = {Rockbox user manual for \playername} |
| 60 | } |
| 61 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 62 | \newcommand{\fname}[1]{\texttt{#1}} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 63 | \newcommand{\tabeltc}[1]{{\centering #1 \par}} |
| 64 | \newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}} |
| 65 | |
Martin Arver | a0cdee0 | 2006-03-31 12:25:22 +0000 | [diff] [blame] | 66 | \newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}} |
| 67 | |
Alexander Levin | 4acf5d3 | 2009-08-24 18:08:00 +0000 | [diff] [blame] | 68 | % Colors used to typeset table headers and alternating table rows |
Alex Parker | 73bac43 | 2009-08-24 22:50:45 +0000 | [diff] [blame] | 69 | \colorlet{tblhdrbgcolor}{blue!30} % Background color for headers |
| 70 | \colorlet{tbloddrowbgcolor}{blue!10} % Background color for odd rows (headers not included) |
| 71 | \colorlet{tblevenrowbgcolor}{white} % Background color for even rows (headers not included) |
Alexander Levin | 4acf5d3 | 2009-08-24 18:08:00 +0000 | [diff] [blame] | 72 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 73 | \usepackage{fancyhdr} |
| 74 | \usepackage{graphicx} |
| 75 | \usepackage{verbatim} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 76 | \usepackage{makeidx} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 77 | \usepackage{fancyvrb} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 78 | \usepackage{color} |
Dominik Riebeling | 1d16d4a | 2006-09-17 20:34:10 +0000 | [diff] [blame] | 79 | \ifpdfoutput{\usepackage{booktabs}}% |
| 80 | {\newcommand{% |
| 81 | \toprule}{}\newcommand{\midrule}{\hline}\newcommand{\bottomrule}{}% |
| 82 | } |
Martin Arver | d3d3e34 | 2006-03-15 10:56:14 +0000 | [diff] [blame] | 83 | \usepackage{longtable} |
Martin Arver | 7d6810c | 2006-03-31 11:50:33 +0000 | [diff] [blame] | 84 | \usepackage{url} |
| 85 | \urlstyle{sf} |
Dominik Riebeling | 0ab97b7 | 2011-04-11 22:09:44 +0000 | [diff] [blame] | 86 | \Urlmuskip = 0mu plus 1mu |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 87 | \usepackage{marvosym} |
Dominik Riebeling | 6ea2282 | 2007-01-07 17:10:44 +0000 | [diff] [blame] | 88 | \usepackage{rotating} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 89 | |
Dominik Riebeling | 1d16d4a | 2006-09-17 20:34:10 +0000 | [diff] [blame] | 90 | % pdf output: try pdf first, then png and jpg as file format |
| 91 | % html output: try png first, then jpg. Ignore pdf files |
| 92 | % this only applies if no file extension is given! |
| 93 | \ifpdfoutput{\DeclareGraphicsExtensions{.pdf,.png,.jpg}}% |
| 94 | {\DeclareGraphicsExtensions{.png,.jpg}} |
| 95 | |
Martin Arver | 6d5d734 | 2006-03-30 22:03:46 +0000 | [diff] [blame] | 96 | % fancy header style adjustments |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 97 | \fancyhead{} |
| 98 | \fancyfoot{} |
Dominik Riebeling | c9bb152 | 2006-08-13 18:55:59 +0000 | [diff] [blame] | 99 | \fancyhead[L]{{\nouppercase{\textsc{\leftmark}}}} |
Martin Arver | 6d5d734 | 2006-03-30 22:03:46 +0000 | [diff] [blame] | 100 | \fancyhead[R]{\iffloatpage{}{\thepage}} |
Dominik Riebeling | edaeb19 | 2011-06-19 09:41:09 +0000 | [diff] [blame] | 101 | \fancyfoot[L]{\textsc{The Rockbox manual} {\scriptsize(version \buildversion)}} |
Dominik Riebeling | c7bb949 | 2006-06-13 16:39:07 +0000 | [diff] [blame] | 102 | \fancyfoot[R]{\textsc{\playerman{} \playertype}} |
Dominik Riebeling | c9bb152 | 2006-08-13 18:55:59 +0000 | [diff] [blame] | 103 | \fancypagestyle{plain}{} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 104 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 105 | \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}} |
| 106 | \renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}} |
| 107 | \setlength{\headheight}{18.5pt} |
| 108 | \newcounter{example}[chapter] |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 109 | |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 110 | \ifpdfoutput{% |
Alexander Levin | b783c06 | 2009-08-29 22:29:22 +0000 | [diff] [blame] | 111 | \renewcommand{\toprule}{\specialrule{\heavyrulewidth}{\abovetopsep}{0pt}} |
| 112 | \renewcommand{\midrule}{\specialrule{\lightrulewidth}{0pt}{\belowrulesep}} |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 113 | }{} |
Alexander Levin | 876cce1 | 2009-08-29 21:38:49 +0000 | [diff] [blame] | 114 | \newcommand{\tblhdrstrut}{\rule[-1.3ex]{0mm}{4.0ex}} |
| 115 | |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 116 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 117 | %% \newenvironment{example} |
| 118 | %% {\stepcounter{example}\paragraph{Example \theexample:}} |
| 119 | %% {\hfill$\Box$ |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 120 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 121 | %% \bigskip |
| 122 | %% \noindent} |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 123 | |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 124 | % found on the internet, posting by Donald Arseneau |
| 125 | % I may as well include my robust expandable definions, which can be |
| 126 | % used in \edef or \write where the \def would not be executed: |
| 127 | % |
| 128 | % \if\blank --- checks if parameter is blank (Spaces count as blank) |
| 129 | % \if\given --- checks if parameter is not blank: like \if\blank{#1}\else |
| 130 | % \if\nil --- checks if parameter is null (spaces are NOT null) |
| 131 | % use \if\given{ } ... \else ... \fi etc. |
| 132 | % |
| 133 | {\catcode`\!=8 % funny catcode so ! will be a delimiter |
| 134 | \catcode`\Q=3 % funny catcode so Q will be a delimiter |
| 135 | \long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!} |
| 136 | \long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces |
| 137 | \long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null |
| 138 | \long\gdef\IfN@Ught#1 #2!{\blank{#2}} |
| 139 | \long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above |
| 140 | } |
| 141 | |
Dominik Riebeling | a2c6b67 | 2008-09-23 20:27:39 +0000 | [diff] [blame] | 142 | % environment for setting the changelog. |
| 143 | \newenvironment{changelog}% |
| 144 | {\renewcommand{\labelitemi}{$\star$}\setitemize{noitemsep,topsep=0pt}% |
| 145 | \begin{itemize}}% |
| 146 | {\end{itemize}} |
| 147 | |
| 148 | |
Alexander Levin | 87b2ad14 | 2010-05-20 16:20:58 +0000 | [diff] [blame] | 149 | \newcommand{\dapdisplaysize}{\dapdisplaywidth$\times$\dapdisplayheight$\times$\dapdisplaydepth} |
| 150 | \newcommand{\genericimg}{\dapdisplaywidth x\dapdisplayheight x\dapdisplaydepth} |
| 151 | |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 152 | % add screenshot image. |
| 153 | % Usage: \screenshot{filename}{caption}{label} |
Martin Arver | f6db368 | 2006-04-26 11:06:45 +0000 | [diff] [blame] | 154 | % By using the 'H' (HERE) placement, the screenshots are placed where |
| 155 | % we want them. |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 156 | % Note: use this only for screenshots! |
| 157 | % Note: leave caption empty to supress it. |
Marianne Arnold | e39d9af | 2010-07-17 16:49:31 +0000 | [diff] [blame] | 158 | % Resulting file names in the source should consist of up to 3 parts |
| 159 | % "filename-\genericimg-[\specimg|\seriesimg]" (the third is optional) |
| 160 | % filename is specified by the use of this macro in the tex file |
| 161 | % \genericimg will be generated using the display's resolution (see above) |
| 162 | % \specimg or \seriesimg are possible options set in the platform files |
| 163 | % Files will be used in the following order: 1.filename contains \specimg part |
| 164 | % 2. filename contains \seriesimg part, 3. filename without the third part |
Marianne Arnold | c2273cf | 2010-07-18 14:34:54 +0000 | [diff] [blame] | 165 | |
| 166 | % set seriesimg if it isn't defined in the platform file to not break manuals |
| 167 | \ifdefined\seriesimg |
| 168 | \else |
| 169 | \newcommand{\seriesimg}{\specimg} |
| 170 | \fi |
| 171 | |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 172 | \newcommand{\screenshot}[3]{ |
Martin Arver | f6db368 | 2006-04-26 11:06:45 +0000 | [diff] [blame] | 173 | \begin{figure}[H] |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 174 | \begin{center} |
Dominik Riebeling | 5be4509 | 2006-06-04 11:20:06 +0000 | [diff] [blame] | 175 | \IfFileExists{#1-\genericimg-\specimg.png} |
Dominik Riebeling | f83f920 | 2006-08-18 14:32:15 +0000 | [diff] [blame] | 176 | {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png} |
Dominik Riebeling | 5be4509 | 2006-06-04 11:20:06 +0000 | [diff] [blame] | 177 | \typeout{Note: device specific image used}} |
Marianne Arnold | e39d9af | 2010-07-17 16:49:31 +0000 | [diff] [blame] | 178 | {\IfFileExists{#1-\genericimg-\seriesimg.png} |
| 179 | {\includegraphics[width=\screenshotsize]{#1-\genericimg-\seriesimg.png} |
| 180 | \typeout{Note: series specific image used}} |
| 181 | {\IfFileExists{#1-\genericimg.png} |
| 182 | {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}} |
| 183 | {\IfFileExists{#1} |
| 184 | {\includegraphics[width=\screenshotsize]{#1} |
| 185 | \typeout{Warning: deprecated plain image name used}}% |
| 186 | {\typeout{Missing image: #1 (\genericimg) (\specimg)}% |
| 187 | \color{red}{\textbf{WARNING!} Image not found}% |
Dominik Riebeling | 5be4509 | 2006-06-04 11:20:06 +0000 | [diff] [blame] | 188 | } |
Dominik Riebeling | 2cf5abb | 2006-04-02 17:29:44 +0000 | [diff] [blame] | 189 | } |
| 190 | } |
Marianne Arnold | e39d9af | 2010-07-17 16:49:31 +0000 | [diff] [blame] | 191 | } |
Dominik Riebeling | e5a2b69 | 2006-04-01 19:16:12 +0000 | [diff] [blame] | 192 | \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{% |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 193 | \caption{#2}}\fi |
| 194 | \end{center} |
| 195 | \end{figure} |
| 196 | } |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 197 | |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 198 | % command to display a note. |
| 199 | % Usage: \note{text of your note} |
| 200 | % Note: do NOT use \textbf or similar to emphasize text, use \emph! |
Dominik Riebeling | 6424c50 | 2006-07-17 19:10:31 +0000 | [diff] [blame] | 201 | \ifpdfoutput{ |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 202 | \newcommand{\note}[1]{ |
Alexander Levin | 04afc13 | 2010-05-08 11:56:28 +0000 | [diff] [blame] | 203 | \ifinner\else\vspace{1ex}\par\noindent\fi |
Dominik Riebeling | df91a9b | 2006-04-01 15:35:30 +0000 | [diff] [blame] | 204 | \textbf{Note:}\ % |
Alexander Levin | 04afc13 | 2010-05-08 11:56:28 +0000 | [diff] [blame] | 205 | \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\vspace{1ex}\fi% |
Dominik Riebeling | 6424c50 | 2006-07-17 19:10:31 +0000 | [diff] [blame] | 206 | }} |
| 207 | {\newcommand{\note}[1]{\ifinner\else\par\noindent\fi\textbf{Note:{} }#1\par}} |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 208 | |
| 209 | % command to display a warning. |
| 210 | % Usage: \warn{text of your warning} |
| 211 | % Note: do NOT use \textbf or similar to emphasize text! |
Dominik Riebeling | 6424c50 | 2006-07-17 19:10:31 +0000 | [diff] [blame] | 212 | \ifpdfoutput{ |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 213 | \newcommand{\warn}[1]{ |
Dominik Riebeling | df91a9b | 2006-04-01 15:35:30 +0000 | [diff] [blame] | 214 | \ifinner\else\par\noindent\fi |
| 215 | \textbf{Warning:\ }% |
| 216 | \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi% |
Dominik Riebeling | 6424c50 | 2006-07-17 19:10:31 +0000 | [diff] [blame] | 217 | }} |
| 218 | {\newcommand{\warn}[1]{\ifinner\else\par\noindent\fi\textbf{Warning:{} }#1}} |
Dominik Riebeling | df91a9b | 2006-04-01 15:35:30 +0000 | [diff] [blame] | 219 | |
Dominik Riebeling | 4ccc2ce | 2006-07-19 16:06:37 +0000 | [diff] [blame] | 220 | % command to mark a text block as intended especially for blind people |
| 221 | % Usage: \blind{text} |
| 222 | \ifpdfoutput{ |
Alexander Levin | 942e427 | 2010-06-28 22:39:45 +0000 | [diff] [blame] | 223 | \newcommand{\blind}[1]{\mbox{}\marginpar{\raisebox{-1ex}{\Huge{\ForwardToEnd}}}#1} |
| 224 | } |
Dominik Riebeling | 4ccc2ce | 2006-07-19 16:06:37 +0000 | [diff] [blame] | 225 | {\newcommand{\blind}[1]{\ifinner\else\par\noindent\fi#1}} |
| 226 | |
Martin Arver | f6db368 | 2006-04-26 11:06:45 +0000 | [diff] [blame] | 227 | % make table floats use "H" (as for screenshots) as default positioning |
| 228 | \makeatletter\renewcommand{\fps@table}{H}\makeatother |
Dominik Riebeling | 38385a5 | 2006-04-03 18:14:25 +0000 | [diff] [blame] | 229 | % change defaults for floats on a page as we have a lot of small images |
| 230 | \setcounter{topnumber}{3} % default: 2 |
| 231 | \setcounter{bottomnumber}{2} % default: 1 |
| 232 | \setcounter{totalnumber}{5} % default: 3 |
| 233 | |
Dominik Riebeling | 8c17722 | 2006-04-03 22:45:01 +0000 | [diff] [blame] | 234 | |
Alexander Levin | fb87e89 | 2009-08-24 21:22:18 +0000 | [diff] [blame] | 235 | % Environment for typesetting tables in a consistent way. The header has |
| 236 | % a darker background; rows are white and light gray (alternating). Top, |
| 237 | % middle and bottom rules are automatically set. |
| 238 | % |
| 239 | % Params: |
| 240 | % #1 -- table width |
| 241 | % #2 -- column specification (as used in the package tabularx) |
| 242 | % #3 -- contents of the header row. The number of items must |
| 243 | % match the number of specs in #2 |
| 244 | % #4 -- caption (optional). If used then this must be inside a floating |
| 245 | % environment, e.g. table |
| 246 | % #5 -- label (optional) |
| 247 | % |
| 248 | % Example: |
| 249 | % \begin{rbtabular}{0.9\textwidth}{lX}{Col1 & Col2}{}{} |
| 250 | % A1 & A2\\ |
| 251 | % B1 & B2\\ |
| 252 | % C1 & C2\\ |
| 253 | % \end{rbtabular} |
| 254 | % |
| 255 | \newenvironment{rbtabular}[5]{% |
Alex Parker | 17e6288 | 2009-08-24 22:03:30 +0000 | [diff] [blame] | 256 | \rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor} |
Alexander Levin | fb87e89 | 2009-08-24 21:22:18 +0000 | [diff] [blame] | 257 | \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname |
| 258 | \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 259 | \bottomrule |
Alexander Levin | fb87e89 | 2009-08-24 21:22:18 +0000 | [diff] [blame] | 260 | \SavedEndTab% |
| 261 | \if\given{#4}\caption{#4}\fi% |
| 262 | \if\given{#5}\label{#5}\fi% |
| 263 | \endcenter% |
| 264 | } |
| 265 | \center |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 266 | \tabularx{#1}{#2}\toprule\rowcolor{tblhdrbgcolor} |
Alexander Levin | 876cce1 | 2009-08-29 21:38:49 +0000 | [diff] [blame] | 267 | \tblhdrstrut#3\\\midrule |
Alexander Levin | fb87e89 | 2009-08-24 21:22:18 +0000 | [diff] [blame] | 268 | }{% |
| 269 | \endtabularx |
| 270 | } |
| 271 | |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 272 | \newcommand{\tabnlindent}{\newline\mbox{ }\mbox{ }} |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 273 | |
| 274 | |
Dominik Riebeling | 8c17722 | 2006-04-03 22:45:01 +0000 | [diff] [blame] | 275 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 276 | % command to set the default table heading for button lists |
Alexander Levin | 876cce1 | 2009-08-29 21:38:49 +0000 | [diff] [blame] | 277 | \newcommand{\taghead}{\tblhdrstrut\textbf{Tag} & \textbf{Description} \\\midrule} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 278 | |
| 279 | % environment intended to be used with tag maps (for wps) |
Alexander Levin | 05e3aad | 2009-06-20 22:15:49 +0000 | [diff] [blame] | 280 | % usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{tagmap} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 281 | % Note: this automatically sets the table lines. |
| 282 | % Note: you *need* to terminate the last line with a linebreak \\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 283 | % Cheers for the usenet helping me building this up :) |
Alexander Levin | 4c105b6 | 2010-03-07 22:12:16 +0000 | [diff] [blame] | 284 | \newenvironment{tagmap}{% |
Alex Parker | daede5e | 2009-08-24 22:12:45 +0000 | [diff] [blame] | 285 | \rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 286 | \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname |
| 287 | \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 288 | \bottomrule |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 289 | \SavedEndTab% |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 290 | \endcenter% |
| 291 | } |
| 292 | \center |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 293 | \tabularx{\textwidth}{Xp{.7\textwidth}}\toprule\rowcolor{tblhdrbgcolor} % here is the table width defined |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 294 | \taghead |
| 295 | }{% |
| 296 | \endtabularx |
| 297 | } |
| 298 | |
Dominik Riebeling | cee8f01 | 2008-12-01 21:21:42 +0000 | [diff] [blame] | 299 | % When creating HTML, use the soul package. |
| 300 | % This produces much nicer HTML code (textsc results in each character being |
| 301 | % put in a separate <span>). |
| 302 | \ifpdfoutput{\newcommand{\caps}[1]{\textsc{#1}}}{\usepackage{soul}} |
| 303 | \newcommand{\setting}[1]{\caps{#1}} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 304 | |
Dominik Riebeling | 0f661ab | 2006-05-28 15:49:17 +0000 | [diff] [blame] | 305 | \newcommand{\config}[1]{\texttt{#1}} |
| 306 | |
Dominik Riebeling | 40afbd2 | 2007-01-02 20:50:03 +0000 | [diff] [blame] | 307 | % set link to download server |
| 308 | % Usage: \download{bootloader/bootloader-ipodnano.ipod} |
| 309 | % gets expanded to |
| 310 | % "http://download.rockbox.org/bootloader/bootloader-ipodnano.ipod" |
| 311 | \newcommand{\download}[1]{\url{http://download.rockbox.org/#1}} |
| 312 | |
Dominik Riebeling | 0f661ab | 2006-05-28 15:49:17 +0000 | [diff] [blame] | 313 | % set link to the wiki. |
| 314 | % Usage: \wikilink{WebHome} |
| 315 | % with "WebHome" being the wiki page name |
Dominik Riebeling | 7255bdb | 2007-09-24 22:39:24 +0000 | [diff] [blame] | 316 | \newcommand{\wikibaseurl}{http://www.rockbox.org/wiki/} |
| 317 | \ifpdfoutput{\newcommand{\wikiicon}{\Pointinghand}} |
| 318 | {\newcommand{\wikiicon}{}} |
| 319 | \newcommand{\wikilink}[1]{\wikiicon{}\href{\wikibaseurl#1}{#1}} |
| 320 | %\newcommand{\wikilink}[1]{\url{http://www.rockbox.org/wiki/#1}} |
Dominik Riebeling | 0f661ab | 2006-05-28 15:49:17 +0000 | [diff] [blame] | 321 | |
Dominik Riebeling | 89a2a28 | 2006-06-06 17:42:27 +0000 | [diff] [blame] | 322 | % define environment "code" based on fancyvrb. |
| 323 | % use it to set code the user should type / see on his screen. |
| 324 | % Note: the first 4 characters of each line will be stripped, |
| 325 | % requiring everything to be indendet by exactly _4_ spaces! |
| 326 | % This is intended to make the LaTeX sources more readable. |
| 327 | % Note: when using the code environment you need to use optv instead of opt! |
| 328 | \DefineVerbatimEnvironment{code}{Verbatim}% |
Dominik Riebeling | 6ea2282 | 2007-01-07 17:10:44 +0000 | [diff] [blame] | 329 | {framerule=0.4pt, framesep=1ex,frame=lines,%numbers=left,stepnumber=5,% |
| 330 | gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,% |
Dominik Riebeling | 89a2a28 | 2006-06-06 17:42:27 +0000 | [diff] [blame] | 331 | label=\textnormal{\textsc{Code}},% |
| 332 | commandchars=\\\{\}% |
| 333 | } |
| 334 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 335 | % define environment "example" based on fancyvrb. |
| 336 | % use it to set example code the user should type / see on his screen. |
| 337 | % Note: the first 4 characters of each line will be stripped, |
| 338 | % requiring everything to be indendet by exactly _4_ spaces! |
| 339 | % This is intended to make the LaTeX sources more readable. |
| 340 | % Note: when using the example environment you need to use optv instead of opt! |
| 341 | \DefineVerbatimEnvironment{example}{Verbatim}% |
| 342 | {commentchar=!,framerule=0.4pt, framesep=1ex,frame=lines,% |
Dominik Riebeling | 6ea2282 | 2007-01-07 17:10:44 +0000 | [diff] [blame] | 343 | gobble=4,fontsize=\footnotesize,xleftmargin=10pt,xrightmargin=10pt,% |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 344 | label=\textnormal{\textsc{Example}},% |
| 345 | commandchars=\\\{\}% |
| 346 | } |
| 347 | |
Alexander Levin | f258954 | 2010-03-27 13:14:14 +0000 | [diff] [blame] | 348 | % Use the nopt command to exclude a certain defined feature from a section |
Martin Arver | 1dbb2d2 | 2006-06-07 20:01:27 +0000 | [diff] [blame] | 349 | % Example: |
| 350 | % \nopt{ondio}{This text will be excluded for ondios} |
Alexander Levin | f258954 | 2010-03-27 13:14:14 +0000 | [diff] [blame] | 351 | \makeatletter |
| 352 | \newcommand*\nopt[1]{\if\Opl@notlisted{#1}\expandafter\@firstofone |
| 353 | \else \expandafter\@gobble \fi} |
| 354 | \makeatother |
Martin Arver | 7a47313 | 2006-07-31 12:21:57 +0000 | [diff] [blame] | 355 | |
Martin Arver | 26c6e7b | 2006-08-01 11:57:38 +0000 | [diff] [blame] | 356 | % Use the reference to handle get a flexible reference command |
| 357 | % usage \reference{ref_section} |
Dominik Riebeling | c9bb152 | 2006-08-13 18:55:59 +0000 | [diff] [blame] | 358 | \ifpdfoutput{% |
Martin Arver | 26c6e7b | 2006-08-01 11:57:38 +0000 | [diff] [blame] | 359 | \newcommand{\reference}[1]{% |
Dominik Riebeling | d0a12a7 | 2006-08-22 16:34:41 +0000 | [diff] [blame] | 360 | section~\ref{#1} (page~\pageref{#1})% |
Martin Arver | 7a47313 | 2006-07-31 12:21:57 +0000 | [diff] [blame] | 361 | }} |
Dominik Riebeling | d0a12a7 | 2006-08-22 16:34:41 +0000 | [diff] [blame] | 362 | {\newcommand{\reference}[1]{section~\ref{#1}}} |
Dominik Riebeling | 5eb1e15 | 2006-08-07 20:46:26 +0000 | [diff] [blame] | 363 | |
| 364 | % special HTML output adjustments |
| 365 | \ifpdfoutput{}{\setlength{\parindent}{0mm}} |
| 366 | \ifpdfoutput{}{\renewcommand{\Forward}[1]{$\triangleright${}#1}} |
Dominik Riebeling | f83f920 | 2006-08-18 14:32:15 +0000 | [diff] [blame] | 367 | |
Dominik Riebeling | f6b4b91 | 2006-08-24 15:09:34 +0000 | [diff] [blame] | 368 | \newcommand{\btnfnt}[1]{\textbf{#1}} |
Dominik Riebeling | a9a5c35 | 2006-10-05 16:47:17 +0000 | [diff] [blame] | 369 | %\hfuzz=2pt |
| 370 | |
| 371 | % generate index |
| 372 | \usepackage{makeidx} |
| 373 | \makeindex |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 374 | |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 375 | |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 376 | % command to set the default table heading for button lists |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 377 | \newcommand{\btnhead}{\textbf{Key} \opt{HAVEREMOTEKEYMAP}{% |
| 378 | & \textbf{Remote Key}} & \textbf{Action} \\\midrule} |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 379 | % environment intended to be used with button maps |
Alexander Levin | 9736580 | 2010-05-20 17:38:38 +0000 | [diff] [blame] | 380 | % usage: \begin{btnmap} Button & ButtonAction \\ \end{btnmap} |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 381 | % Note: this automatically sets the table lines. |
| 382 | % Note: you *need* to terminate the last line with a linebreak \\ |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 383 | % Cheers for the usenet helping me building this up :) |
| 384 | |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 385 | % tabularx is set to be either two or three columns wide depending on whether |
Alex Parker | c5d3857 | 2009-06-29 18:33:44 +0000 | [diff] [blame] | 386 | % HAVEREMOTEKEYMAP is defined in the platform file for the target in question. |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 387 | % If it is, then every button table has three columns of the form |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 388 | % Main Unit Key & Remote Key & Description \\ |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 389 | |
Alexander Levin | 9736580 | 2010-05-20 17:38:38 +0000 | [diff] [blame] | 390 | \newenvironment{btnmap}{% |
Alex Parker | daede5e | 2009-08-24 22:12:45 +0000 | [diff] [blame] | 391 | \rowcolors{2}{tbloddrowbgcolor}{tblevenrowbgcolor} |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 392 | \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname |
| 393 | \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 394 | \bottomrule |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 395 | \SavedEndTab% |
Alexander Levin | 9736580 | 2010-05-20 17:38:38 +0000 | [diff] [blame] | 396 | \endcenter\vspace{2ex}% |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 397 | } |
Alexander Levin | 9736580 | 2010-05-20 17:38:38 +0000 | [diff] [blame] | 398 | \vspace{2ex}\center |
Alex Parker | c5d3857 | 2009-06-29 18:33:44 +0000 | [diff] [blame] | 399 | \opt{HAVEREMOTEKEYMAP}{ |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 400 | % here is the table width defined for 3 columns |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 401 | \tabularx{.95\textwidth}{>{\raggedright\arraybackslash}p{.2\textwidth}>{\raggedright\arraybackslash}p{.2\textwidth}X}\toprule\rowcolor{tblhdrbgcolor} |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 402 | } |
Alex Parker | c5d3857 | 2009-06-29 18:33:44 +0000 | [diff] [blame] | 403 | \nopt{HAVEREMOTEKEYMAP}{ |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 404 | % here is the table width defined for 2 columns |
Alex Parker | 7550c9d | 2009-08-29 18:28:50 +0000 | [diff] [blame] | 405 | \tabularx{.75\textwidth}{>{\raggedright\arraybackslash}p{.22\textwidth}X}\toprule\rowcolor{tblhdrbgcolor} |
Alex Parker | 931ff0b | 2009-06-20 22:00:47 +0000 | [diff] [blame] | 406 | } |
Alexander Levin | 876cce1 | 2009-08-29 21:38:49 +0000 | [diff] [blame] | 407 | \tblhdrstrut\btnhead |
Alex Parker | 60c0474 | 2009-06-20 19:17:06 +0000 | [diff] [blame] | 408 | }{% |
| 409 | \endtabularx |
| 410 | } |