Skip to content
Snippets Groups Projects
stratum0doc.sty 1.34 KiB
Newer Older
%% stratum0doc.sty
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]

\ProvidesPackage{stratum0doc}

%% Package options
\makeatletter
  \DeclareOption{transcript}{%
    \def\@sndsectionmark{TOP}%
    \setcounter{section}{-1}% start with TOP 0 for more geekness
  }
  \DeclareOption{legal}{\def\@sndsectionmark{§}}
  \ExecuteOptions{transcript}
  \ProcessOptions\relax
\makeatother

%% fancyhdr setup
\newcommand{\myfancysetup}[2]{%
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[L]{\sc #1}%
  \fancyhead[R]{\sc #2}%
  \fancyfoot[C]{Seite \thepage\ von \pageref{LastPage}}
  \fancypagestyle{plain}{% for first page
    \renewcommand{\headrulewidth}{0pt}%
    \fancyhf{}%
    \fancyfoot[C]{Seite \thepage\ von \pageref{LastPage}}%
  }
}

%% list bullets, section prefix
\makeatletter
\renewcommand{\labelenumi}{(\arabic{enumi})}
\renewcommand{\labelitemi}{--}
\renewcommand{\thesection}{%
rohieb's avatar
rohieb committed
  \@sndsectionmark\ \@arabic\c@section
rohieb's avatar
rohieb committed
\setcounter{section}{-1} % Hacker fangen ab 0 an zu zählen.
\makeatother

%% votes
\newcommand{\vote}[4]{%
  \marginpar{\footnotesize #1:\\#2~pro, #3~con, #4~neutral}%
}
%% consents without vote
\newcommand{\consent}[1]{%
  \marginpar{\footnotesize #1}%
}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}

%% bootstrapping
\makeatletter
\AtBeginDocument{%
  \let\mytitle\@title%
  \let\mydate\@date%
  \myfancysetup{\mytitle}{\mydate}%
}
\makeatother