| 1 |
\RequirePackage{atbegshi} |
| 2 |
\documentclass[a4paper,oneside]{scrbook} |
| 3 |
\usepackage[all]{svn-multi}[2010/12/29] |
| 4 |
\svnidlong |
| 5 |
{$HeadURL: svn://server/group_example.tex $} |
| 6 |
{$LastChangedDate: 2000-01-01 01:44:01 +0000 (Main file) $} |
| 7 |
{$LastChangedRevision: 98 $} |
| 8 |
{$LastChangedBy: author3 $} |
| 9 |
|
| 10 |
|
| 11 |
% Pre-declaration of groups to define order in table |
| 12 |
\svngroup{abc} |
| 13 |
\svngroup{def} |
| 14 |
\svngroup{ghi} |
| 15 |
\svngroup{jkl} |
| 16 |
%\svngroup{Images} |
| 17 |
\svngroup{} |
| 18 |
|
| 19 |
% Ignore logo in subfiles and set it explicitly into the main file: |
| 20 |
%\svnexternal{{logo.jpg}}% |
| 21 |
%\svnignoregraphic{logo.jpg} |
| 22 |
|
| 23 |
% Special groups for images and other external files: |
| 24 |
%\svngraphicsgroup{Images} |
| 25 |
%\svnexternalgroup{external} |
| 26 |
|
| 27 |
\let\ifvtex=\relax |
| 28 |
\usepackage{hyperref} |
| 29 |
\usepackage{ifthen} |
| 30 |
\usepackage{listings} |
| 31 |
\lstset{basicstyle=\ttfamily} |
| 32 |
\makeatletter |
| 33 |
% Workaround for listinputlisting |
| 34 |
\newcommand*{\svnlstinputlisting}[2][]{% |
| 35 |
{\let\input\@input\lstinputlisting[#1]{#2}}% |
| 36 |
} |
| 37 |
\makeatother |
| 38 |
\usepackage{booktabs} |
| 39 |
\usepackage{tabularx} |
| 40 |
\usepackage{longtable} |
| 41 |
|
| 42 |
% This is an example document to show the group feature of svn-multi 2.0. |
| 43 |
% Please the notes below. |
| 44 |
|
| 45 |
\makeatletter |
| 46 |
% Version control information table for each chapter |
| 47 |
\newcommand{\chaptervctable}{% |
| 48 |
\par\noindent |
| 49 |
\textbf{Version Control Information for this chapter}\\[\bigskipamount]% |
| 50 |
\begin{tabular}{lp{0.7\textwidth}} |
| 51 |
Chapter URL & \svnnolinkurl{\svnfileurl}\\ |
| 52 |
Chapter File name & \svnnolinkurl{\svnfilefname}\\ |
| 53 |
Last Changed Revision & \svnfilerev\\ |
| 54 |
Last Changed Author & \svnfileauthor\\ |
| 55 |
Last Changed Date & \svnfiledate\\ |
| 56 |
\end{tabular} |
| 57 |
\bigskip |
| 58 |
\par\noindent |
| 59 |
This files contains the following SVN keywords:\\*[-\baselineskip] |
| 60 |
{\let\input\@input |
| 61 |
\svnlstinputlisting[firstline=5,lastline=9]{\currfilepath} |
| 62 |
} |
| 63 |
} |
| 64 |
\makeatother |
| 65 |
|
| 66 |
% This file generates some example sub files from this file to avoid a lot of small |
| 67 |
% example files in the CTAN directory. In real life there would be separate |
| 68 |
% files from the beginning. |
| 69 |
|
| 70 |
\begin{filecontents}{group_example_part1a.tex} |
| 71 |
\svnidlong |
| 72 |
{$HeadURL: svn://server/group_example_part1a.tex $} |
| 73 |
{$LastChangedDate: 2000-01-01 01:00:01 +0000 (Chapter 1a) $} |
| 74 |
{$LastChangedRevision: 101 $} |
| 75 |
{$LastChangedBy: author1 $} |
| 76 |
|
| 77 |
\chapter{Subfile 1a} |
| 78 |
\chaptervctable |
| 79 |
\end{filecontents} |
| 80 |
|
| 81 |
\begin{filecontents}{group_example_part1b.tex} |
| 82 |
\svnidlong |
| 83 |
{$HeadURL: svn://server/group_example_part1b.tex $} |
| 84 |
{$LastChangedDate: 2001-01-01 00:00:01 +0000 (Subfile 1b) $} |
| 85 |
{$LastChangedRevision: 102 $} |
| 86 |
{$LastChangedBy: author2 $} |
| 87 |
|
| 88 |
\chapter{Subfile 1b} |
| 89 |
\chaptervctable |
| 90 |
\end{filecontents} |
| 91 |
|
| 92 |
\begin{filecontents}{group_example_part1c.tex} |
| 93 |
\svnidlong |
| 94 |
{$HeadURL: svn://server/group_example_part1c.tex $} |
| 95 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 1c) $} |
| 96 |
{$LastChangedRevision: 104 $} |
| 97 |
{$LastChangedBy: author3 $} |
| 98 |
|
| 99 |
\chapter{Subfile 1c} |
| 100 |
\chaptervctable |
| 101 |
\end{filecontents} |
| 102 |
|
| 103 |
\begin{filecontents}{group_example_part2a.tex} |
| 104 |
\svnidlong |
| 105 |
{$HeadURL: svn://server/group_example_part2a.tex $} |
| 106 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 2a) $} |
| 107 |
{$LastChangedRevision: 100 $} |
| 108 |
{$LastChangedBy: author1 $} |
| 109 |
|
| 110 |
\chapter{Subfile 2a} |
| 111 |
\chaptervctable |
| 112 |
\end{filecontents} |
| 113 |
|
| 114 |
\begin{filecontents}{group_example_part2b.tex} |
| 115 |
\svnidlong |
| 116 |
{$HeadURL: svn://server/group_example_part2b.tex $} |
| 117 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 2b) $} |
| 118 |
{$LastChangedRevision: 101 $} |
| 119 |
{$LastChangedBy: author1 $} |
| 120 |
|
| 121 |
\chapter{Subfile 2b} |
| 122 |
\chaptervctable |
| 123 |
\end{filecontents} |
| 124 |
|
| 125 |
\begin{filecontents}{group_example_part3a.tex} |
| 126 |
\svnidlong |
| 127 |
{$HeadURL: svn://server/group_example_part3a.tex $} |
| 128 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 3a) $} |
| 129 |
{$LastChangedRevision: 104 $} |
| 130 |
{$LastChangedBy: author3 $} |
| 131 |
|
| 132 |
\chapter{Subfile 3a} |
| 133 |
\chaptervctable |
| 134 |
\end{filecontents} |
| 135 |
|
| 136 |
\begin{filecontents}{group_example_part3b.tex} |
| 137 |
\svnidlong |
| 138 |
{$HeadURL: svn://server/group_example_part3b.tex $} |
| 139 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 3b) $} |
| 140 |
{$LastChangedRevision: 103 $} |
| 141 |
{$LastChangedBy: author2 $} |
| 142 |
|
| 143 |
\chapter{Subfile 3b} |
| 144 |
\chaptervctable |
| 145 |
\end{filecontents} |
| 146 |
|
| 147 |
\begin{filecontents}{group_example_part4a.tex} |
| 148 |
\svnidlong |
| 149 |
{$HeadURL: svn://server/group_example_part4a.tex $} |
| 150 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 4a) $} |
| 151 |
{$LastChangedRevision: 99 $} |
| 152 |
{$LastChangedBy: author3 $} |
| 153 |
|
| 154 |
\chapter{Subfile 4a} |
| 155 |
\chaptervctable |
| 156 |
\input{group_example_part4a_sub1.tex} |
| 157 |
\end{filecontents} |
| 158 |
|
| 159 |
\begin{filecontents}{group_example_part4a_sub1.tex} |
| 160 |
\svnidlong |
| 161 |
{$HeadURL: svn://server/group_example_part4a_sub1.tex $} |
| 162 |
{$LastChangedDate: 2000-01-01 00:00:00 +0000 (SubSubfile 4a-1) $} |
| 163 |
{$LastChangedRevision: 96 $} |
| 164 |
{$LastChangedBy: author2 $} |
| 165 |
|
| 166 |
\section{SubSubfile 4a-1} |
| 167 |
This is a sub file in a sub file. |
| 168 |
\svnexternal{{Makefile}} |
| 169 |
\end{filecontents} |
| 170 |
|
| 171 |
\begin{filecontents}{group_example_part4b.tex} |
| 172 |
\svnidlong |
| 173 |
{$HeadURL: svn://server/group_example_part4b.tex $} |
| 174 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (Subfile 4b) $} |
| 175 |
{$LastChangedRevision: 105 $} |
| 176 |
{$LastChangedBy: author2 $} |
| 177 |
|
| 178 |
\chapter{Subfile 4b} |
| 179 |
\chaptervctable |
| 180 |
\end{filecontents} |
| 181 |
|
| 182 |
\begin{filecontents}{group_example_end.tex} |
| 183 |
\svnidlong |
| 184 |
{$HeadURL: svn://server/group_example_end.tex $} |
| 185 |
{$LastChangedDate: 2000-01-01 00:00:01 +0000 (End) $} |
| 186 |
{$LastChangedRevision: 100 $} |
| 187 |
{$LastChangedBy: author1 $} |
| 188 |
|
| 189 |
\chapter{End credits} |
| 190 |
\chaptervctable |
| 191 |
\end{filecontents} |
| 192 |
|
| 193 |
\begin{filecontents}{group_example_unexpanded.tex} |
| 194 |
\svnidlong |
| 195 |
{$HeadURL$} |
| 196 |
{$LastChangedDate$} |
| 197 |
{$LastChangedRevision$} |
| 198 |
{$LastChangedBy$} |
| 199 |
|
| 200 |
\chapter{File with unexpanded keywords} |
| 201 |
\chaptervctable |
| 202 |
\end{filecontents} |
| 203 |
|
| 204 |
\svnRegisterAuthor{author1}{Andy Author, I.} |
| 205 |
\svnRegisterAuthor{author2}{A. Author, II.} |
| 206 |
\svnRegisterAuthor{author3}{Anthony Author, III.} |
| 207 |
|
| 208 |
% Have VC info on every part page |
| 209 |
\let\origpart=\part |
| 210 |
\def\part{% |
| 211 |
\setpartpreamble{% |
| 212 |
\vspace*{5cm} |
| 213 |
\par\noindent |
| 214 |
\textbf{Version Control Information for this part:}\\[\bigskipamount]% |
| 215 |
\begin{tabular}{lp{0.7\textwidth}} |
| 216 |
URL of latest File & \svnnolinkurl{\svncgurl}\\ |
| 217 |
Name of latest File & \svnnolinkurl{\svncgfname}\\ |
| 218 |
Last Changed Revision & \svncgrev\\ |
| 219 |
Last Changed Author & \svncgauthor\\ |
| 220 |
Last Changed Date & \svncgdate\\ |
| 221 |
\end{tabular} |
| 222 |
}\origpart |
| 223 |
} |
| 224 |
|
| 225 |
\listfiles |
| 226 |
\begin{document} |
| 227 |
|
| 228 |
% Custom titlepage: |
| 229 |
\hbox{}% |
| 230 |
\vfill |
| 231 |
\pdfbookmark{Title Page}{titlepage}% |
| 232 |
{\centering |
| 233 |
\Huge\texttt{svn-multi} v2.0 Keyword Groups Example Document\\ |
| 234 |
\Large Martin Scharrer\\ |
| 235 |
\large 2009/03/01\\ |
| 236 |
}% |
| 237 |
\vfill |
| 238 |
\par\noindent |
| 239 |
This is an example and test document for the group feature of svn-multi 2.0. |
| 240 |
Please note that the revision keywords were generated manually for testing |
| 241 |
purposes. The dates are not consistent with the revisions and contain a debug |
| 242 |
name instead of the date text like `(Sat, January 1 2009)'. This doesn't |
| 243 |
influence the correct functionality of the svn-multi package.\\ |
| 244 |
\bigskip |
| 245 |
{\hbox{}\hfill Happy \TeX ing!}\\ |
| 246 |
\vfill% |
| 247 |
\par\noindent |
| 248 |
{\large Version Control Information for this document:\\[\bigskipamount]}% |
| 249 |
\begin{tabular}{lp{0.7\textwidth}} |
| 250 |
Main URL & \svnnolinkurl{\svnmainurl}\\ |
| 251 |
Main File name & \svnnolinkurl{\svnmainfilename}\\ |
| 252 |
URL of latest file & \svnnolinkurl{\svnurl}\\ |
| 253 |
Name of latest file & \svnnolinkurl{\svnfname}\\ |
| 254 |
Last Changed Revision & \svnrev\\ |
| 255 |
Last Changed Author & \svnauthor\\ |
| 256 |
Last Changed Date & \svndate\\ |
| 257 |
\end{tabular} |
| 258 |
\bigskip\par\noindent |
| 259 |
The main file of this document contains the following SVN |
| 260 |
keywords:\\*[-\baselineskip] |
| 261 |
\svnlstinputlisting[firstline=3,lastline=7]{\currfilepath} |
| 262 |
\thispagestyle{empty} |
| 263 |
\clearpage |
| 264 |
|
| 265 |
% Default in Engish |
| 266 |
\renewcommand{\svnbeforetable}{% |
| 267 |
This is an automatic generated table using the \textbf{\sffamily table} option. |
| 268 |
\bigskip\par\noindent |
| 269 |
} |
| 270 |
\clearpage |
| 271 |
\pdfbookmark{Table of Revisions (1)}{tora}% |
| 272 |
\tableofrevisions |
| 273 |
\clearpage |
| 274 |
|
| 275 |
% Redefined to German |
| 276 |
% Uses booktabs for nicer table |
| 277 |
\renewcommand{\svnbeforetable}{% |
| 278 |
Can be redefined to another format and language: Verstehen Sie Deutsch? |
| 279 |
\bigskip\par\noindent |
| 280 |
} |
| 281 |
\renewenvironment{svntable}{% |
| 282 |
\begin{longtable}{p{6.2cm}rll} |
| 283 |
\toprule |
| 284 |
} |
| 285 |
{% |
| 286 |
\bottomrule |
| 287 |
\end{longtable} |
| 288 |
} |
| 289 |
\renewcommand*\svntablehead{% |
| 290 |
Name & Rev & Autor & Datum \\ |
| 291 |
\midrule[\heavyrulewidth] |
| 292 |
} |
| 293 |
\renewcommand{\svnrevisionsname}{Revisionen} |
| 294 |
\renewcommand{\svntabgroup}[1]{Gruppe `#1'} |
| 295 |
|
| 296 |
% Some highlight examples: |
| 297 |
% Print highest revision bold: |
| 298 |
\renewcommand{\svntabrev}[1]{\ifthenelse{#1=\svnrev}{\textbf{#1}}{#1}} |
| 299 |
% Highlight all dates after the 14th March 2008 12:00:00: |
| 300 |
\renewcommand{\svntabdate}[8]{% |
| 301 |
\ifthenelse{#1#2#3#4>2008031412}{\color{red}\bfseries}{}% |
| 302 |
\small #3.#2.#1\ #4:#5:#6% |
| 303 |
} |
| 304 |
% Mark all files last changed by the last author: |
| 305 |
\renewcommand{\svntabauthor}[1]{% |
| 306 |
\ifthenelse{\equal{#1}{\svnauthor}}{\color{green}}{}% |
| 307 |
\svnFullAuthor{#1}% |
| 308 |
} |
| 309 |
|
| 310 |
% Using \scriptsize and \svnnolinkurl for files and subgroups: |
| 311 |
\renewcommand{\svntabfile}[2]{% |
| 312 |
\addtolength{\leftskip}{#1\medskipamount}% |
| 313 |
Datei `{\scriptsize\svnnolinkurl{#2}}' |
| 314 |
} |
| 315 |
\renewcommand{\svntabsubgroup}[2]{% |
| 316 |
\addtolength{\leftskip}{#1\medskipamount}% |
| 317 |
Untergruppe `{\scriptsize\svnnolinkurl{#2}}'% |
| 318 |
} |
| 319 |
\renewcommand{\svntabglobal}[1]{Gesamtes Dokument} |
| 320 |
|
| 321 |
% Add rule before group rows: |
| 322 |
\renewcommand{\svngrouprow}{\midrule} |
| 323 |
% Add rule and description after global row: |
| 324 |
\renewcommand{\endsvnglobalrow}{\midrule Ohne Gruppe:\\} |
| 325 |
|
| 326 |
\pdfbookmark{Table of Revisions (2)}{torb}% |
| 327 |
\tableofrevisions |
| 328 |
\clearpage |
| 329 |
|
| 330 |
|
| 331 |
\svngroup{abc} |
| 332 |
\part{Abc} |
| 333 |
\input{group_example_part1a} |
| 334 |
\include{group_example_part1b} |
| 335 |
\include{group_example_part1c} |
| 336 |
|
| 337 |
\svngroup{def} |
| 338 |
\part{Def} |
| 339 |
\include{group_example_part2a} |
| 340 |
\include{group_example_part2b} |
| 341 |
|
| 342 |
\svngroup{ghi} |
| 343 |
\part{Ghi} |
| 344 |
\include{group_example_part3a} |
| 345 |
\include{group_example_part3b} |
| 346 |
|
| 347 |
\svngroup{jkl} |
| 348 |
\part{jkl} |
| 349 |
\include{group_example_part4a} |
| 350 |
\include{group_example_part4b} |
| 351 |
|
| 352 |
% The rest doesn't belong to a file group: |
| 353 |
\svngroup{} |
| 354 |
\include{group_example_end} |
| 355 |
\include{group_example_unexpanded} |
| 356 |
|
| 357 |
\chapter*{Reference Examples} |
| 358 |
%To reference e.g.\ keyword from group `abc' use: |
| 359 |
\section*{Group `abc'} |
| 360 |
\svnsetcg{abc} Revision \svncgrev\ from \svncgtoday\ \svncgtime\ done by |
| 361 |
\svnFullAuthor{\svncgauthor}. Latest file is \svnnolinkurl{\svncgfname} (URL: \url{\svncgurl}). |
| 362 |
|
| 363 |
\section*{Subgroup `group\_example\_part3b'} |
| 364 |
\svnsetcg{group_example_part3b} Revision \svncgrev\ from \svncgtoday\ \svncgtime\ done by |
| 365 |
\svnFullAuthor{\svncgauthor}. Latest file is \svnnolinkurl{\svncgfname} (URL: \url{\svncgurl}). |
| 366 |
|
| 367 |
\section*{File `group\_example\_part3b.tex'} |
| 368 |
\svnsetcg{group_example_part3b.tex} Revision \svncgrev\ from \svncgtoday\ \svncgtime\ done by |
| 369 |
\svnFullAuthor{\svncgauthor}. File name and url: \svnnolinkurl{\svncgfname} (URL: \url{\svncgurl}). |
| 370 |
|
| 371 |
|
| 372 |
\end{document} |
| 373 |
|