%%
%% Package for SAMS project documents
%%
\ProvidesPackage{VMeta}
\NeedsTeXFormat{LaTeX2e}\relax
\RequirePackage{boxedminipage}
\RequirePackage{dcm}
\RequirePackage{svninfo}

\def\VM@metadata@block{\begin{Boxed}
    \section*{\VM@changelist@label}
    \begin{tabular}{p{.25\linewidth}p{.74\linewidth}}
      \textit\VM@project@label      & \VM@project \\
      \textit\VM@responsible@label  & \VM@responsible{}\\
      \textit\VM@created@label      & \VM@created{} \\
      \textit\VM@version@label      & \VM@version{} \\
      \textit\VM@docstate@label     & \VM@docstate{}\\
      \textit\VM@revision@label     & \svnInfoRevision{} \\
      \textit\VM@lastchange@label   & \today\\
      \textit\VM@file@label         & \svnInfoFile{} \\
    \end{tabular}
  \end{Boxed}}
%%
%% author and title
%% 

\gdef\VM@version{\mbox{}}\def\VMversion#1{\gdef\VM@version{#1}}
\gdef\VM@created{\mbox{}}\def\VMcreated#1{\gdef\VM@created{#1}}
\gdef\VM@docstate{i.~B.\/}\def\VMdocstate#1{\gdef\VM@docstate{#1}}
% for the responsible, we use the DCM infrastructure
\gdef\VM@responsible{\mbox{}}
\def\VMresponsible#1{\gdef\VM@responsible{\csname dcm@person@#1@name\endcsname}}

\newenvironment{VMchange}[3]%
{\item[\textit{#1}] 
  \hspace*{1cm}  -- \emph{\VM@version@label:} #2 -- 
  \hspace*{1cm} \emph{\VM@contributor@label:} \csname dcm@person@#3@name\endcsname
  \\[1ex]}
{}
\newenvironment{VMchangelist}{\begin{list}{\textit{\textit{29.08.06}}}{}}{\end{list}}

\newenvironment{VMcertified}[4]{\item[\textit{#1}] 
  \hspace*{1cm}  -- \emph{\VM@version@label:} #2 -- 
  \hspace*{1cm} \emph{\VM@certifier@label:} \csname dcm@person@#3@name\endcsname\\ 
  \hspace*{-1cm}\emph{\VM@newstate@label:} \textbf{#4} \\[1ex]}
{}
\newenvironment{VMcertification}
{\section*{\VM@certification@label}\begin{list}{\textit{29.08.06}}{}}{\end{list}}
% the following internal macros can be specialized by 
\providecommand{\VM@contributor@label}{Contributor}
\providecommand{\VM@version@label}{Version}
\providecommand{\VM@certifier@label}{Certifier}
\providecommand{\VM@project@label}{Project}
\providecommand{\VM@responsible@label}{Responsible}
\providecommand{\VM@created@label}{Created}
\providecommand{\VM@docstate@label}{Document State}
\providecommand{\VM@newstate@label}{New State}
\providecommand{\VM@revision@label}{Revision}
\providecommand{\VM@lastchange@label}{Last Change}
\providecommand{\VM@file@label}{File}
\providecommand{\VM@changelist@label}{Change List}
\providecommand{\VM@certification@label}{Certification}

