Martin Arver | 3622c93 | 2006-03-29 18:48:52 +0000 | [diff] [blame] | 1 | \documentclass[a4paper,11pt]{scrreprt} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 2 | \usepackage[latin1]{inputenc} |
Martin Arver | 8bedb5c | 2006-03-22 23:26:30 +0000 | [diff] [blame] | 3 | \usepackage{palatino} |
Martin Arver | 35dcf90 | 2006-03-08 17:58:11 +0000 | [diff] [blame] | 4 | %\renewcommand{\familydefault}{\sfdefault} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 5 | |
Martin Arver | ec60a05 | 2006-03-29 18:40:42 +0000 | [diff] [blame] | 6 | \usepackage{tabularx} |
Nils Wallménius | c687b30 | 2006-04-02 13:50:01 +0000 | [diff] [blame] | 7 | \usepackage{multirow} |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 8 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 9 | \usepackage{float} |
| 10 | \floatstyle{ruled} |
| 11 | |
Dominik Riebeling | c0068bb | 2006-04-08 21:00:22 +0000 | [diff] [blame] | 12 | \usepackage{hyperref} |
| 13 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 14 | \usepackage{xspace} |
| 15 | \usepackage{optional} |
| 16 | |
| 17 | \input{platform/\platform.tex} |
| 18 | |
Martin Arver | 63c8bb2 | 2006-03-21 10:28:35 +0000 | [diff] [blame] | 19 | \newcommand{\playername}{\playerman\ \playertype} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 20 | |
Dominik Riebeling | c0068bb | 2006-04-08 21:00:22 +0000 | [diff] [blame] | 21 | \hypersetup{% add some values to the pdf properties |
| 22 | colorlinks = true, |
| 23 | pdfstartview = FitV, |
| 24 | linkcolor = blue, |
| 25 | citecolor = blue, |
| 26 | urlcolor = blue, |
| 27 | pdftitle = {Rockbox user manual}, |
| 28 | pdfauthor = {The Rockbox Team}, |
| 29 | pdfsubject = {Rockbox user manual for \playername} |
| 30 | } |
| 31 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 32 | \newcommand{\fname}[1]{\textbf{#1}} |
| 33 | \newcommand{\tabeltc}[1]{{\centering #1 \par}} |
| 34 | \newcommand{\tabelth}[1]{{\centering \textbf{\textit{#1}} \par}} |
| 35 | |
Martin Arver | a0cdee0 | 2006-03-31 12:25:22 +0000 | [diff] [blame] | 36 | \newcommand{\fixme}[1]{\textbf{\textcolor{red}{#1}}} |
| 37 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 38 | \usepackage{fancyhdr} |
| 39 | \usepackage{graphicx} |
| 40 | \usepackage{verbatim} |
| 41 | \usepackage{lscape} |
| 42 | \usepackage{makeidx} |
| 43 | \usepackage{amsmath} |
| 44 | \usepackage{amssymb} |
| 45 | \usepackage{fancyvrb} |
| 46 | \usepackage{enumerate} |
| 47 | \usepackage{subfigure} |
| 48 | \usepackage{color} |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 49 | \usepackage{booktabs} |
Martin Arver | d3d3e34 | 2006-03-15 10:56:14 +0000 | [diff] [blame] | 50 | \usepackage{longtable} |
Martin Arver | 7d6810c | 2006-03-31 11:50:33 +0000 | [diff] [blame] | 51 | \usepackage{url} |
| 52 | \urlstyle{sf} |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 53 | \usepackage{marvosym} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 54 | |
Dominik Riebeling | 009aeab | 2006-04-03 21:29:47 +0000 | [diff] [blame] | 55 | % new \ifpdf to check if running in pdf mode. Helps for html generation. |
| 56 | \newif\ifpdf\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi |
| 57 | |
| 58 | % mark this ad draft version (only for pdflatex) -- comment this out at release |
| 59 | \ifpdf |
| 60 | \usepackage{pdfdraftcopy} |
| 61 | \draftstring{DRAFT VERSION} |
| 62 | % \draftangle{45} |
| 63 | \fi |
| 64 | |
Martin Arver | 6d5d734 | 2006-03-30 22:03:46 +0000 | [diff] [blame] | 65 | % fancy header style adjustments |
| 66 | %\renewcommand{\chaptermark}[1]{\markboth{#1}{}} |
| 67 | %\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} |
| 68 | \renewcommand{\rightmark}[1]{\thechapter\ } |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 69 | \fancyhead{} |
| 70 | \fancyfoot{} |
Martin Arver | 6d5d734 | 2006-03-30 22:03:46 +0000 | [diff] [blame] | 71 | \fancyhead[L]{{\textsc{\leftmark}}} |
| 72 | \fancyhead[R]{\iffloatpage{}{\thepage}} |
| 73 | \fancyfoot[L]{\textsc{Rockbox users manual}} |
| 74 | \fancyfoot[R]{\textsc{\playername}} |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 75 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 76 | \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}} |
| 77 | \renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}} |
| 78 | \setlength{\headheight}{18.5pt} |
| 79 | \newcounter{example}[chapter] |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 80 | |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 81 | \newenvironment{example} |
| 82 | {\stepcounter{example}\paragraph{Example \theexample:}} |
| 83 | {\hfill$\Box$ |
| 84 | |
| 85 | \bigskip |
| 86 | \noindent} |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 87 | |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 88 | % found on the internet, posting by Donald Arseneau |
| 89 | % I may as well include my robust expandable definions, which can be |
| 90 | % used in \edef or \write where the \def would not be executed: |
| 91 | % |
| 92 | % \if\blank --- checks if parameter is blank (Spaces count as blank) |
| 93 | % \if\given --- checks if parameter is not blank: like \if\blank{#1}\else |
| 94 | % \if\nil --- checks if parameter is null (spaces are NOT null) |
| 95 | % use \if\given{ } ... \else ... \fi etc. |
| 96 | % |
| 97 | {\catcode`\!=8 % funny catcode so ! will be a delimiter |
| 98 | \catcode`\Q=3 % funny catcode so Q will be a delimiter |
| 99 | \long\gdef\given#1{88\fi\Ifbl@nk#1QQQ\empty!} |
| 100 | \long\gdef\blank#1{88\fi\Ifbl@nk#1QQ..!}% if null or spaces |
| 101 | \long\gdef\nil#1{\IfN@Ught#1* {#1}!}% if null |
| 102 | \long\gdef\IfN@Ught#1 #2!{\blank{#2}} |
| 103 | \long\gdef\Ifbl@nk#1#2Q#3!{\ifx#3}% same as above |
| 104 | } |
| 105 | |
| 106 | % add screenshot image. |
| 107 | % Usage: \screenshot{filename}{caption}{label} |
| 108 | % Note: use this only for screenshots! |
| 109 | % Note: leave caption empty to supress it. |
| 110 | \newcommand{\screenshot}[3]{ |
| 111 | \begin{figure}[!ht] |
| 112 | \begin{center} |
Dominik Riebeling | 2cf5abb | 2006-04-02 17:29:44 +0000 | [diff] [blame] | 113 | \IfFileExists{#1-\genericimg.png} |
| 114 | {\includegraphics[width=4cm]{#1-\genericimg.png}} |
| 115 | {\IfFileExists{#1} |
| 116 | {\includegraphics[width=4cm]{#1} |
| 117 | \typeout{Warning: deprecated plain image name used}}% |
| 118 | {\typeout{Missing image: #1 (\genericimg)}% |
| 119 | \color{red}{\textbf{WARNING!} Image not found}% |
| 120 | } |
| 121 | } |
Dominik Riebeling | e5a2b69 | 2006-04-01 19:16:12 +0000 | [diff] [blame] | 122 | \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{% |
Martin Arver | cbc5599 | 2006-03-30 15:54:47 +0000 | [diff] [blame] | 123 | \caption{#2}}\fi |
| 124 | \end{center} |
| 125 | \end{figure} |
| 126 | } |
Martin Arver | 0da41d8 | 2006-03-24 11:53:07 +0000 | [diff] [blame] | 127 | |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 128 | % command to display a note. |
| 129 | % Usage: \note{text of your note} |
| 130 | % Note: do NOT use \textbf or similar to emphasize text, use \emph! |
| 131 | \newcommand{\note}[1]{ |
Dominik Riebeling | df91a9b | 2006-04-01 15:35:30 +0000 | [diff] [blame] | 132 | \ifinner\else\par\noindent\fi |
| 133 | \textbf{Note:}\ % |
| 134 | \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Writinghand}}#1\par\fi% |
Martin Arver | 9be37f3 | 2006-03-31 13:29:27 +0000 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | % command to display a warning. |
| 138 | % Usage: \warn{text of your warning} |
| 139 | % Note: do NOT use \textbf or similar to emphasize text! |
| 140 | \newcommand{\warn}[1]{ |
Dominik Riebeling | df91a9b | 2006-04-01 15:35:30 +0000 | [diff] [blame] | 141 | \ifinner\else\par\noindent\fi |
| 142 | \textbf{Warning:\ }% |
| 143 | \ifinner#1\else\marginpar{\raisebox{-6pt}{\Huge\Stopsign}}#1\par\fi% |
| 144 | } |
| 145 | |
Dominik Riebeling | 38385a5 | 2006-04-03 18:14:25 +0000 | [diff] [blame] | 146 | % make table floats use "!htb" as default positioning |
| 147 | \makeatletter\renewcommand{\fps@table}{!htb}\makeatother |
| 148 | % change defaults for floats on a page as we have a lot of small images |
| 149 | \setcounter{topnumber}{3} % default: 2 |
| 150 | \setcounter{bottomnumber}{2} % default: 1 |
| 151 | \setcounter{totalnumber}{5} % default: 3 |
| 152 | |
Dominik Riebeling | 8c17722 | 2006-04-03 22:45:01 +0000 | [diff] [blame] | 153 | % command to set the default table heading for button lists |
| 154 | \newcommand{\btnhead}{\textbf{Key} & \textbf{Action} \\\midrule} |
| 155 | |
| 156 | % environment intended to be used with button maps |
| 157 | % usage: \begin{btnmap}{caption}{label} Button & ButtonAction \\ \end{btnmap} |
| 158 | % Note: this automatically sets the table lines. |
| 159 | % Note: you *need* to terminate the last line with a linebreak \\ |
| 160 | % Note: you still need to enclose this with \begin{table} / \end{table} |
| 161 | % Cheers for the usenet helping me building this up :) |
| 162 | \newenvironment{btnmap}[2]{% |
| 163 | \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname |
| 164 | \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% |
| 165 | \bottomrule |
| 166 | \SavedEndTab% |
| 167 | \if\given{#1}\caption{#1}\fi% |
| 168 | \if\given{#2}\label{#2}\fi% |
| 169 | \endcenter% |
| 170 | } |
| 171 | \center |
| 172 | \tabularx{.75\textwidth}{lX}\toprule % here is the table width defined |
| 173 | \btnhead |
| 174 | }{% |
| 175 | \endtabularx |
| 176 | } |
| 177 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 178 | % command to set the default table heading for button lists |
| 179 | \newcommand{\taghead}{\textbf{Tag} & \textbf{Description} \\\midrule} |
| 180 | |
| 181 | % environment intended to be used with tag maps (for wps) |
| 182 | % usage: \begin{tagmap}{caption}{label} Tag & Description \\ \end{btnmap} |
| 183 | % Note: this automatically sets the table lines. |
| 184 | % Note: you *need* to terminate the last line with a linebreak \\ |
| 185 | % Note: you still need to enclose this with \begin{table} / \end{table} |
| 186 | % Cheers for the usenet helping me building this up :) |
| 187 | \newenvironment{tagmap}[2]{% |
| 188 | \expandafter\let\expandafter\SavedEndTab\csname endtabular*\endcsname |
| 189 | \expandafter\renewcommand\expandafter*\csname endtabular*\endcsname{% |
| 190 | \bottomrule |
| 191 | \SavedEndTab% |
| 192 | \if\given{#1}\caption{#1}\fi% |
| 193 | \if\given{#2}\label{#2}\fi% |
| 194 | \endcenter% |
| 195 | } |
| 196 | \center |
| 197 | \tabularx{\textwidth}{lX}\toprule % here is the table width defined |
| 198 | \taghead |
| 199 | }{% |
| 200 | \endtabularx |
| 201 | } |
| 202 | |
| 203 | |