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