From 5dfc639106460a2f991f1e6d724744dd2c3218a9 Mon Sep 17 00:00:00 2001
From: niepra01 <rolf.niepraschk@ptb.de>
Date: Tue, 5 Aug 2014 15:46:15 +0200
Subject: [PATCH] erster Versuch zu "arbeitsanweisung"

---
 arbeitsanweisung/test-arbeitsanweisung.tex |  60 +++++++
 arbeitsanweisung/vl-arbeitsanweisung.cls   | 176 +++++++++++++++++++++
 2 files changed, 236 insertions(+)
 create mode 100644 arbeitsanweisung/test-arbeitsanweisung.tex
 create mode 100644 arbeitsanweisung/vl-arbeitsanweisung.cls

diff --git a/arbeitsanweisung/test-arbeitsanweisung.tex b/arbeitsanweisung/test-arbeitsanweisung.tex
new file mode 100644
index 0000000..57993e4
--- /dev/null
+++ b/arbeitsanweisung/test-arbeitsanweisung.tex
@@ -0,0 +1,60 @@
+
+%---------------------------
+\listfiles
+\documentclass[ngerman]{vl-arbeitsanweisung}
+\usepackage{blindtext}
+%\usepackage{showframe}
+
+\Devision{7}
+\Department{7.3}
+\WorkingGroup{Vakuummetrologie}
+\Object{DIR}
+\Edition{03}
+
+\title{Kalibrierung von Vakuummetern im Bereich von \\ 30\,Pa bis
+ 10\textsuperscript{5}\,Pa durch direkten Vergleich mit einem Normal}
+
+\date{2007-05}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\section{Zweck und Geltungsbereich}
+
+\begin{landscape}
+  \section{Begriffe und Abkürzungen}
+  \Huge ABCD \hfill 1234
+  \vfill
+  UVWX  \hfill 1234
+\end{landscape}
+
+\begin{landscape}
+  \section{Räumlichkeiten und Umgebungsbedingungen}
+  \Huge UVWX  \hfill 1234
+  \vfill
+  ABCD  \hfill 1234
+\end{landscape}
+
+\section{Gerätetechnische Gegebenheiten}
+
+\section{Kalibrierverfahren}
+
+\section{Validierung}
+
+\section{Ergebnisse von Vergleichen}
+
+\section{Aufzeichnungs- und Ablagesystem (Aktenordnung)}
+
+\section{Literatur}
+
+\section{Anhang: Messunsicherheitsbudgets für verschiedene Geräte und
+  Beispielkalibrierschein}
+
+% Alle Seiten des Kalibrierscheines
+\includepdf[pages=-,frame,scale=.8,%
+  pagecommand={\thispagestyle{headings}}]{ks-75024_2014.pdf}
+
+\end{document}
+%---------------------------
diff --git a/arbeitsanweisung/vl-arbeitsanweisung.cls b/arbeitsanweisung/vl-arbeitsanweisung.cls
new file mode 100644
index 0000000..1c5b4ed
--- /dev/null
+++ b/arbeitsanweisung/vl-arbeitsanweisung.cls
@@ -0,0 +1,176 @@
+
+\setcounter{errorcontextlines}{100}
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesClass{arbeitsanweisung}
+    [2014/08/05 v0.1a Dokumentenklasse (RN/PTB)]
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\PassOptionsToPackage{paper=a4,pagesize,twoside,headinclude}{typearea}
+
+\LoadClass[%
+,fontsize=12pt% ???
+,headings=normal
+]{scrartcl}
+
+\RequirePackage{babel}
+\RequirePackage{textcomp,pdflscape,picture,trimspaces,url,varwidth}
+\RequirePackage{zref-totpages,graphicx,booktabs,array,tabularx,pdfpages}
+\RequirePackage[manualmark]{scrpage2}
+
+\RequirePackage[babel=once,german=guillemets]{csquotes}
+\defineshorthand{"`}{\openautoquote}
+\defineshorthand{"'}{\closeautoquote}
+
+\let\@tempdimd=\@clnwd
+\let\@tempdime=\@clnht
+\let\@tempdimf=\@dashdim
+
+\newcommand*\ptb@Devision{}
+\newcommand*\ptb@Department{}
+\newcommand*\ptb@WorkingGroup{}
+\newcommand*\ptb@Object{}
+\newcommand*\ptb@Ident{}
+\newcommand*\ptb@Edition{}
+\newcommand*\ptb@Date{}
+
+\newcommand*\Devision[1]{\xdef\ptb@Devision{\trim@spaces{#1}}}
+\newcommand*\Department[1]{\xdef\ptb@Department{\trim@spaces{#1}}}
+\newcommand*\WorkingGroup[1]{\xdef\ptb@WorkingGroup{\trim@spaces{#1}}}
+\newcommand*\Object[1]{\xdef\ptb@Object{\trim@spaces{#1}}}
+\newcommand*\Edition[1]{\xdef\ptb@Edition{\trim@spaces{#1}}}
+
+\RequirePackage[T1]{fontenc}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{lmodern}
+\RequirePackage{tgpagella}
+\RequirePackage{tgheros}
+
+\newcommand*\ptb@firstfoot{}
+\newcommand*\ptb@foot{%
+  \ifnum\c@page=\@ne\ptb@firstf@@t\else\ptb@f@@t\fi
+}
+\newcommand*\ptb@head{%
+  \normalfont\sffamily\bfseries\large
+  PTB\hfill Qualit\"atsmanagement-Arbeitsanweisung\hfill\ptb@Ident
+}
+
+\newcolumntype{C}{>{\centering}X}
+
+\newcommand*\ptb@f@@t{%
+  \begingroup
+  \normalfont\sffamily\tiny\extrarowheight=.3\baselineskip %
+  \arrayrulewidth=.8pt \extratabsurround=0pt %
+  \renewcommand\tabularxcolumn[1]{m{##1}}
+  \begin{tabularx}{\textwidth}[t]{|C|C|C|C|C|} \firsthline
+    Erstellt: \\
+    Abteilung~\ptb@Devision, Fachbereich~\ptb@Department
+  &
+    Ausgabe-Nr.: \\ \ptb@Edition
+  &
+    Datum: \\ \ptb@Date
+  &
+    Kurzbezeichnung: \\ \ptb@Ident
+  &
+    Seite von Seiten \\ \thepage~von \ztotpages
+  \tabularnewline \lasthline
+  \end{tabularx}
+  \endgroup
+}
+
+\newcommand*\ptb@VWD[1]{%
+  \begin{varwidth}{\linewidth}\centering #1\end{varwidth}}
+
+\newcommand*\ptb@firstf@@t{%
+\begingroup
+  \normalfont\sffamily\tiny\extrarowheight=.3\baselineskip %
+  \arrayrulewidth=.8pt \extratabsurround=0pt %
+  \renewcommand\tabularxcolumn[1]{m{##1}}
+  \begin{tabularx}{\textwidth}{|C|C|C|c|c|c|} \firsthline
+    Erstellt: \\
+    Abteilung~\ptb@Devision, Fachbereich~\ptb@Department \\
+    AG~\ptb@WorkingGroup
+  &
+    Geprüft: \\ Leiter~\ptb@Department  \\~
+  &
+    Genehmigt: \\ QMV-\ptb@Devision \\~
+  &
+    \ptb@VWD{Ausgabe-Nr.: \\ \ptb@Edition\\~}
+  &
+    \ptb@VWD{Kurzbezeichnung: \\ \ptb@Ident\\~}
+  &
+    \ptb@VWD{Seite von Seiten \\ \thepage~von \ztotpages\\~}
+  \tabularnewline
+
+  &&&&& \tabularnewline
+  &&&&& \tabularnewline
+
+    am:~\dotfill
+  &
+    am:~\dotfill
+  &
+    am:~\dotfill
+  &
+  && \tabularnewline \lasthline
+  \end{tabularx}
+  \endgroup
+}
+
+\AtBeginDocument{%
+  \edef\ptb@Ident{\ptb@Department-AA-\ptb@Object}%
+  \edef\ptb@Date{\@date}%
+  \date{}%
+}
+
+\RequirePackage[
+% factor=1500
+% ,verbose=true
+,final=true
+% ,letterspace=100
+,babel=true
+]{microtype}
+
+\defpagestyle{headings}%
+{%        Kopf
+  %(OLL,OLD)% Linie
+  {\ptb@head}% Gerade Seiten
+  {\ptb@head}% Ungerade Seiten
+  {% Einseitig
+  }
+  (\textwidth,.8pt)% Linie
+}%
+{%        Fuss
+  %(OLL,OLD)% Linie
+  {\ptb@foot}% Gerade Seiten
+  {\ptb@foot}% Ungerade Seiten
+  {% Einseitig
+  }
+  %(\textwidth,2mm)% Linie
+}
+
+\RequirePackage[%
+headheight=46bp,
+marginparwidth=5mm,
+left=22mm,
+right=16mm,
+textheight=225mm,
+top=35mm,
+headsep=14mm,
+footskip=15mm,
+]{geometry}
+
+\renewcommand*\maketitle[1][1]{%
+  \begingroup
+  \centering \noindent\usekomafont{title} \Large \@title \par
+  \endgroup
+}
+
+\emergencystretch=1em %
+\pagestyle{headings}
+\def\titlepagestyle{headings}
+
+\raggedbottom
+
+\endinput
+%%
+%% End of file `arbeitsanweisung.cls'.
+
-- 
GitLab