summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/rcs-multi/example.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/rcs-multi/example.tex')
-rw-r--r--Master/texmf-dist/source/latex/rcs-multi/example.tex162
1 files changed, 162 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/rcs-multi/example.tex b/Master/texmf-dist/source/latex/rcs-multi/example.tex
new file mode 100644
index 00000000000..827d7949b4a
--- /dev/null
+++ b/Master/texmf-dist/source/latex/rcs-multi/example.tex
@@ -0,0 +1,162 @@
+\documentclass[12pt]{report}
+\usepackage{rcs-multi}
+% Version control information:
+\rcsid{$Id: example.tex,v 1.2 2009/03/23 19:07:46 martin Exp martin $}
+% or, alternatively, with full path:
+\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example.tex,v 1.2 2009/03/23 19:07:46 martin Exp martin $}
+
+% Other keywords can be read using:
+\rcskwsave{$Author: martin $}
+\rcskwsave{$Date: 2009/03/23 19:07:46 $}
+\rcskwsave{$Name: $}
+% The `Log' keyword is not supported.
+\rcskwsave{$Locker: martin $}
+\rcskwsave{$RCSfile: example.tex,v $}
+\rcskwsave{$Revision: 1.2 $}
+\rcskwsave{$Source: /home/martin/src/latex/rcs-multi/dev/example.tex,v $}
+\rcskwsave{$State: Exp $}
+% Their values can be typeset using \rcskw{Author}, \rcskw{Date}, etc.
+
+\usepackage{hyperref}
+%\usepackage{url}
+
+\usepackage{fancyhdr}
+\renewcommand{\headrulewidth}{0.4pt}
+\renewcommand{\footrulewidth}{0.4pt}
+\setlength{\headheight}{14.5pt}
+% This will display the last changed date and revision of the current chapter.
+% Change to `\rcsdate -- \rcsrev' if you like to have the document revision.
+\newcommand{\rcsfooter}{Last Changed: \rcsfiledate -- r\rcsfilerev}
+
+\pdfinfo{%
+ /CreationDate (D:\rcspdfdate)
+}
+
+\rcsRegisterAuthor{johnd}{John Doe}
+\rcsRegisterAuthor{maryd}{Mary Doe}
+\rcsRegisterAuthor{martin}{Martin S.}
+\rcsRegisterRevision{1.2}{Version~1}
+
+
+%% The two 'filecontents' environments are used to produce two example chapters.
+%% Normally they are separated files from the beginning but they are packed into
+%% this main file to only have one example TeX file in the CTAN ZIP file.
+\begin{filecontents}{example_chap1.tex}
+% Version control information:
+\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example_chap1.tex,v 1.3 2009/03/23 19:20:18 martin Exp $}
+
+\chapter{Example Chapter 1}
+
+\section*{Version}
+\subsection*{This chapter}
+% \url is needed because there is an underscore in the name
+% The package 'underscore' seems not to work properly, so the 'hyperref'
+% package is used which is not the best solution. Avoid underscore in LaTeX filenames.
+Filename: \rcsnolinkurl{\rcsfilename}\\*
+URL: \url{\rcsfileurl}\\*
+% Something like \href{\rcskw{HeadURL}}{Download} works also!
+\textbf{Last change}\\*
+Revision: \rcsfilerev\\*
+Date: \rcsfiledate\\*
+Year: \rcsfileyear\\*
+Time: \rcsfilehour:\rcsfileminute:\rcsfilesecond\\*
+Author: \rcsfileauthor\\*
+
+\enlargethispage{\baselineskip}
+\subsection*{Whole document}
+Main Filename: \rcsnolinkurl{\rcsmainfilename}\\*
+Main URL: \url{\rcsmainurl}\\*
+\textbf{Last change}\\*
+Filename: \rcsnolinkurl{\rcsname}\\*
+URL: \url{\rcsurl}\\*
+Revision: \rcsrev\\*
+Date: \rcsdate\\*
+Year: \rcsyear\\*
+Time: \rcshour:\rcsminute:\rcssecond\\*
+Author: \rcsauthor\\*
+% [...]
+
+\section{Tests}
+\rcsRegisterRevision{2.1}{Test}
+
+Registered author name: \rcsFullAuthor{\rcsfileauthor}\\*
+Registered revision name: \rcsFullRevision{\rcsfilerev}\\*
+Registered author name (*): \rcsFullAuthor*{\rcsfileauthor}\\*
+Registered revision name (*): \rcsFullRevision*{\rcsfilerev}\\*
+
+\subsubsection*{Behaviour if value is not registered:}
+Not registered user name: \rcsFullAuthor{someusername}\\*
+Not registered revision name: \rcsFullRevision{1.4}\\*
+Not registered user name (*): \rcsFullAuthor*{someusername}\\*
+Not registered revision name (*): \rcsFullRevision*{1.4}\\*
+
+
+\end{filecontents}
+
+\begin{filecontents}{example_chap2.tex}
+% Version control information:
+\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example_chap2.tex,v 1.2 2009/03/23 19:10:56 martin Exp martin $}
+
+\chapter{Example Chapter 2}
+
+\section*{Version}
+\subsection*{This chapter}
+% \url is needed because there is an underscore in the name
+% The package 'underscore' seems not to work properly, so the 'hyperref'
+% package is used which is not the best solution. Avoid underscore in LaTeX filenames.
+Filename: \rcsnolinkurl{\rcsfilename}\\
+URL: \url{\rcsfileurl}\\
+% Something like \href{\rcskw{HeadURL}}{Download} works also!
+\textbf{Last change}\\
+Revision: \rcsfilerev\\
+Date: \rcsfiledate\\
+Year: \rcsfileyear\\
+Time: \rcsfilehour:\rcsfileminute:\rcsfilesecond\\
+Author: \rcsfileauthor\\
+
+\enlargethispage{\baselineskip}
+\subsection*{Whole document}
+Main Filename: \rcsnolinkurl{\rcsmainfilename}\\
+Main URL: \url{\rcsmainurl}\\
+\textbf{Last change}\\
+Filename: \rcsnolinkurl{\rcsname}\\
+URL: \url{\rcsurl}\\
+Revision: \rcsrev\\
+Date: \rcsdate\\
+Year: \rcsyear\\
+Time: \rcshour:\rcsminute:\rcssecond\\
+Author: \rcsauthor
+\end{filecontents}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\listfiles
+\begin{document}
+
+\begin{titlepage}
+ \hbox{}
+ \pdfbookmark{Title Page}{titlepage}
+ \vspace{8ex}
+ {\huge Title\par}
+ \vspace{2ex}
+ {\large \noindent This is an example document for the \texttt{rcs-multi}
+ package. Please also look at the LaTeX source code of this
+ document.}
+ \vfill
+ \flushleft\sffamily
+ Version control information:\\
+ Head Filename: \rcsnolinkurl{\rcsmainfilename}\\
+ Head URL: \rcsnolinkurl{\rcsmainfileurl}\\
+ Last changed file (name): \rcsnolinkurl{\rcsname}\\
+ Last changed file (URL): \rcsnolinkurl{\rcsurl}\\
+ Last changed date: \rcsdate\\
+ Last changes revision: \rcsrev\\
+ Version: \rcsFullRevision*{\rcsrev}\\
+ Last changed by: \rcsFullAuthor*{\rcsauthor}\\
+\end{titlepage}
+
+% Include chapters
+\include{example_chap1}
+\include{example_chap2}
+%\include{example_chap3}
+
+\end{document}