Skip to content
Permalink
Browse files
added more packages
  • Loading branch information
Robin Schneider committed Sep 23, 2012
1 parent c2463e8 commit 1b6cb46337c516e3042d94956e7bf4f097822a47
@@ -0,0 +1,48 @@
\ProvidesClass{BusinessCardRS}[2012/08/15 v0.2 business card class by Robin Schneider]

\LoadClass{scrartcl}
\RequirePackage{
babel,
graphicx,
xcolor,
telprint
}
\RequirePackage[utf8]{inputenc} %% Schriftkodierung
\RequirePackage[T1]{fontenc}
\definecolor{uni}{gray}{.4}
\RequirePackage[zw32010,crossmark]{ticket}
\input{/home/rsadmin/Dokumente/LaTeX/input-document/eigene-angaben}

\renewcommand{\ticketdefault}{%
%\put( 45, 5){\includegraphics[width=38mm,origin=bl]{tux-logo}}
\put( 5, 15){\color{uni}\line(1,0){36}}
\put( 7, 11){\small \AuFirma}
\put( 7, 7){\small \AuStrasse}
\put( 7, 3){\small \AuPLZ ~\AuOrt}
\put( 7, 24){\small Tel:}
% \put( 7, 20){\small Fax:}
}

\newcommand{\@name}{\AuName}
\newcommand{\@jobtitle}{\AuArbeit}
\newcommand{\@phone}{\AuPhone}
%\newcommand{\@fax}{Ihre Faxnummer}
\newcommand{\@email}{\AuMail}
\newcommand{\name}[1]{\renewcommand{\@name}{#1}}
\newcommand{\jobtitle}[1]{\renewcommand{\@jobtitle}{#1}}
\newcommand{\phone}[1]{\renewcommand{\@phone}{#1}}
%\newcommand{\fax}[1]{\renewcommand{\@fax}{#1}}
\newcommand{\email}[1]{\renewcommand{\@email}{#1}}

\newcounter{numcards}
\newcommand{\printcards}[1][10]{%
\setcounter{numcards}{0}
\whiledo{\value{numcards}<#1}{%
\ticket{\put(6,40){\bfseries\LARGE\@name}
\put(7,34){\@jobtitle}
\put(14,24){\small\@phone}
% \put(14,20){\small\@fax}
\put( 7,20){\small\@email}}
\stepcounter{numcards}}}
\renewcommand{\familydefault}{\sfdefault}
\endinput
@@ -0,0 +1,168 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{declareDocumentVariablesRS}
[2012/08/24 v1.00 packages for declaring document variables by Robin Schneider]
\newcommand{\Typesetter}{\href{https://ypid.wordpress.com/}{Robin Schneider}\xspace}

\RequirePackage{
xifthen,
IfconstructsRS,
timeRS,
xspace,
ccicons,
}

\newcommand{\choosedefaultlicense}{\SetLICENSE{CreativeCommons/by-nc-sa}{0}}

\newcommand{\LICENSE}{} %% The command must exist
\newcommand{\LICENSEname}{} %% The command must exist
\newcommand{\SetLICENSE}[3][]{
\newcounter{LICENSEadd}
\setcounter{LICENSEadd}{#3}
\renewcommand{\LICENSE}{#2}
\ifthenelse{\isempty{#1}}{
\ifthenelse{\equal{#2}{CreativeCommons/by-nc-sa}}{
\renewcommand{\LICENSEname}{Creative Commons BY-NC-SA}
}{
\PackageError{declareDocumentVariablesRS}{Unknown parameter}%
{The parameter "#2" is unknown}
}
}{ \renewcommand{\LICENSEname}{#1}
}
}
\newcommand{\licenseadd}{\IfCounterOne{LICENSEadd}{ größtenteils\xspace}{\xspace}}

%\newboolean{licensetext}
%\setboolean{licensetext}{true}
\newboolean{licenseNameDate}
\setboolean{licenseNameDate}{true}

\newcommand{\printlicense}{%
\ifthenelse{\equal{\LICENSE}{}}{}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/license/\LICENSE}}%
}

\newcommand{\printlicenseicons}{%
\ifthenelse{\equal{\LICENSE}{CreativeCommons/by-nc-nd}}{%
\ccbyncndeu%
}{%
\ifthenelse{\equal{\LICENSE}{CreativeCommons/by-nc-sa}}{%
\ccbyncsaeu%
}{%
% \PackageError{docExtensionsRS}{printlicenseicons}%
% {something went wrong}%
% Falls %\choosedefaultlicense
}%
}%
\xspace%
}

\newcommand{\printshortlicense}{%
\ifthenelse{\equal{\LICENSE}{}}{\textdiscount}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/license/\LICENSE-url}}%
}

\newcommand{\printshortlicensename}{%
\ifthenelse{\equal{\LICENSE}{}}{Keine}%
{\ifthenelse{\equal{\LICENSEname}{}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/license/\LICENSE-name}}%
{\LICENSEname}}%
}



\newcommand{\SetTITEL}[1]{\newcommand{\TITEL}{#1\xspace}}
\newcommand{\SUBJECT}{}
\newcommand{\SetSUBJECT}[1]{\renewcommand{\SUBJECT}{#1\xspace}}

\newcommand{\URL}{}
\newcommand{\SetURL}[1]{\renewcommand{\URL}{#1}}
\newcommand{\printURLshort}{\ifthenelse{\equal{\URL}{}}{}{\url{\URL}\xspace}}
\newcommand{\printURLlong}[1][3cm]{%
\ifthenelse{\equal{\URL}{}}{}{%
\immediate\write18{qrencode -s 1 -m 0 -o /tmp/\jobname-qr.png "\URL"}%
\newlength{\hURLlongtextsize}%
\iflandscape%
{\setlength{\hURLlongtextsize}{21.5cm}}% %% landscape
{\setlength{\hURLlongtextsize}{12.5cm}}% %% no landscape
\begin{center}%
\ifthenelse{\lengthtest{\textwidth > 815pt}} %% für lernator.de-Statistiken
{\hspace{1.5cm}}{}
\begin{minipage}{#1}%
\href{\URL}{\includegraphics[width=#1]{/tmp/\jobname-qr.png}}%
\end{minipage}%
\hfill
\begin{minipage}{\hURLlongtextsize}%
Dieses Dokument \ifgitversion{liegt in Version \printversion{} vor.\\
Die aktuelle Version }{}ist als PDF Datei unter \printURLshort abrufbar.
\printURLlongextension%
\end{minipage}%
\ifthenelse{\lengthtest{\textwidth > 815pt}} %% für lernator.de-Statistiken
{\hspace{1.5cm}~}{}
\end{center}%
}%
}

\newboolean{@ifCREATEDATE}
\newcommand{\SetCREATEDATE}[7][]{
\ifthenelse{\equal{#1}{usecurrent}}{
\newcommand{\CREATEDYEAR}{\the\year}
\newcommand{\CREATEDMONTH}{\the\month}
\newcommand{\CREATEDDAY}{\the\day}
\newcommand{\CREATEDHOUR}{\the\currenthour}
\newcommand{\CREATEDMINUTE}{\the\currentminute}
\newcommand{\CREATEDSECOND}{\the\currentsecond}
\newcommand{\CREATEDATE}{\pdfdate}
\setboolean{@ifCREATEDATE}{false}
}{
\newcommand{\CREATEDYEAR}{#2}
\newcommand{\CREATEDMONTH}{#3}
\newcommand{\CREATEDDAY}{#4}
\newcommand{\CREATEDHOUR}{#5}
\newcommand{\CREATEDMINUTE}{#6}
\newcommand{\CREATEDSECOND}{#7}

\newcommand{\CREATEDATE}{\CREATEDYEAR\CREATEDMONTH\CREATEDDAY%
\CREATEDHOUR\CREATEDMINUTE\CREATEDSECOND}
\setboolean{@ifCREATEDATE}{true}
}
}

\newcommand{\SetAUTHOR}[2]{
\newcounter{Author@ChosenNumber} %% Sets the pdfcreator to \Typesetter
\setcounter{Author@ChosenNumber}{#1}%% if #1 == 4
\threeIF{#1}{\newcommand{\AUTHOR}{\Typesetter}}
{\newcommand{\AUTHOR}{\input{/home/rsadmin/.userinfo/name-fake}\xspace}}
{\newcommand{\AUTHOR}{Name nicht Definiert\xspace}}
{\newcommand{\AUTHOR}{#2\xspace}} %% if #1 == 4
}

\newcommand{\SetABGABEDATUM}[5]{
\newcommand{\ReleaseDateName}{Abgabedatum}
\newcounter{ReleaseDate@ChosenNumber}
\setcounter{ReleaseDate@ChosenNumber}{#1}
\sixIF{#1}{ %% if #1 == 1
\newcommand{\ABGABEDATUM}{\today}
}{ %% if #1 == 2
\newcommand{\ABGABEDATUM}{vorgelegt am: \printdate{#4.#3.#2}}
\newcommand{\ABGABETag}{#4}
\newcommand{\ABGABEMonat}{#3}
\newcommand{\ABGABEJahr}{#2}
}{ %% if #1 == 3
\newcounter{ReleaseDate@DaysUntilDate}
\setcounter{ReleaseDate@DaysUntilDate}{#5}
\newcommand{\ABGABEDATUM}{vorgelegt am: \dateNday{#5}}
}{ %% if #1 == 4
\newcommand{\ABGABEDATUM}{\printdate{#4.#3.#2}}
\newcommand{\ABGABETag}{#4}
\newcommand{\ABGABEMonat}{#3}
\newcommand{\ABGABEJahr}{#2}
}{ %% if #1 == 5
\newcounter{ReleaseDate@DaysUntilDate}
\setcounter{ReleaseDate@DaysUntilDate}{#5}
\newcommand{\ABGABEDATUM}{\dateNday{#5}}
}{ %% if #1 == 6
\newcommand{\ABGABEDATUM}{\dateN{\CREATEDYEAR}{\CREATEDMONTH}{\CREATEDDAY}{#5}}
}{\PackageError{\@currname}{Unknown parameter}}
}

\endinput
@@ -75,8 +75,6 @@
%\RequirePackage{linenoWorkaroundRS}
%% Erzeugt Fehler und wird nur noch temporär eingebunden

\let\fancynumprintcount\fnumprintc
\let\fancynumprintstr\fnumprint
%% Sprachdefinition laden
\RequirePackage{fnumprint} %% fnumprint@language
\RequirePackage{IfconstructsRS}
@@ -92,4 +90,7 @@
}
}}

\let\fancynumprintcount\fnumprintc
\let\fancynumprintstr\fnumprint

\endinput
@@ -0,0 +1,148 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{docExtensionsRS}
[2012/01/28 v1.00 Erweiterung der Funktionen von Robin Schneider]

\RequirePackage{
declareDocumentVariablesRS,
pdflscape,
sourcefiletable,
}

\attachfilesetup{%
author={Robin Schneider},
mimetype={application/x-tex},
subject={Dies ist eine der Quelldateien aus denen dieses Dokument erzeugt wurde},
% description={},
}

\newcommand{\printendsignature}[1][]{%
{ \Centering%
\ifthenelse{\( \equal{#1}{with-typesetter} \OR \equal{\value{Author@ChosenNumber}}{4} \) \AND
\( \NOT \equal{#1}{without-typesetter} \)}{%
\Language@SignatureTextWithTypesetter{}
}{%
\Language@SignatureText{}
}%
\Language@SignatureTeX
\Language@SignatureOS%
\ifthenelse{\isnamedefined{setkomavar}}{}{% scrlttr2
\setcounter{vorstatpage}{\value{page}}%
\setcounter{tablesvorstat}{\value{table}}%
} \\}}

\newcommand{\PrintDefaultTitlepage}{\input{/home/rsadmin/Dokumente/LaTeX/input-document/titelpages/maketitle}}


\RequirePackage{readgitRS}
\RequirePackage[width=28em,roundnessr=0.5]{progressbar}
\newcommand{\Statistiken}{%
\Calcprogresspromille%
\vfill%
\ifthenelse{\isundefined\chapter}%
{\pdfbookmark[1]{Statistiken}{statistics}\section*{Statistiken}}%
{\pdfbookmark[0]{Statistiken}{statistics}\chapter*{Statistiken}}%
\ifthenelse{\isundefined\chapter}%
{\pdfbookmark[2]{Metainformationen}{metainformationen}\subsection*{Metainformationen}}%
{\pdfbookmark[1]{Metainformationen}{metainformationen}\section*{Metainformationen}}%
\input{/home/rsadmin/Dokumente/LaTeX/input-document/def-stat-commands}%
\fiveIF{\value{ReleaseDate@ChosenNumber}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/Statistiken-1}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/Statistiken-2}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/Statistiken-3}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/Statistiken-2}}%
{\input{/home/rsadmin/Dokumente/LaTeX/input-document/Statistiken-3}}%
{}%
\ifmyprogressdef{%
\hfil Um das Ganze bildlich darzustellen~\dots \\
Status:~\progressbar{\myprogresskomma} (verstrichene Zeit) \\}{}
}

\newcommand{\Siehe}[1]{Siehe \autoref{#1} \enquote{\nameref{#1}} \vpageref{#1}\xspace}
\newcommand{\siehe}[1]{siehe \autoref{#1} \enquote{\nameref{#1}} \vpageref{#1}\xspace}
%\newcommand{\namepageref}[1]{\nameref{#1} \vpageref{#1}\xspace}
%\newcommand{\printfullref}[1]{\ref{#1} \nameref{#1} \vpageref{#1}\xspace}

\newcommand{\pagediffValue}[2]{%
\vrefpagenum\firstnum{#1}%
\vrefpagenum\secondnum{#2}%
\ifthenelse{\equal{\secondnum}{}}{
\PackageError{docExtensionsRS}{pagediffValue}
{something is wrong}
}{
\setcounter{tmp}{\secondnum-\firstnum+1}
}
}

%\newcommand{\backfootnote}{%% Erzeugt eine falsche Verlinkung mit hyperref
%\addtocounter{footnote}{-1}\footnotemark}

\newcommand{\footnoteremember}[2]{%
\footnote{#1\label{foot:#2}}%
}
\newcommand{\footnoterecall}[1]{%
\ifthenelse{\equal{\value{page}}{\getpagerefnumber{foot:#1}}}{%
\hyperref[foot:#1]{\footnotemark[\getrefnumber{foot:#1}]}%
}{%
\PackageWarning{docExtensionsRS}%
{footnoterecall: The ref page is not equal than the label page}%
}%
}
%% Kann beim erneuten Kompilieren eine falsche Warnung erzeugen,
%% weil das Label noch auf einer anderen Seite ist.
%% Die Warnung wird im Paket footmisc weggelassen. \footref

\newcommand{\sectionStar}[2]{%
\section*{#1}%
\pdfbookmark[1]{#1}{#2}%
}

\newboolean{saveprivacy}
\setboolean{saveprivacy}{true}
%% true not all statistics; is default (privat, privacy)
%% false all statistics
\newcommand{\printgitstatlandscape}[1]{%
\ifthenelse{\boolean{saveprivacy}}{}{ %% if false
\oneIF{#1}{\subsubsection*{Produktivste Tageszeit (Tabelle)?}
\pdfbookmark[3]{Produktivste Tageszeit (Tabelle)?}{hour_of_day_table}}{}%
\hspace{-2cm}%
\input{files/git/stats/latex/hour_of_day}%
%
\oneIF{#1}{\subsubsection*{Produktivste Tageszeit und Wochentag (Tabelle)?}%
\pdfbookmark[3]{Produktivste Tageszeit und Wochentag (Tabelle)?}{hour_of_week_table}}{}%
\input{files/git/stats/latex/hour_of_week}%
}
%
\oneIF{#1}{\subsubsection*{Aktivität in den letzten 32 Wochen (Anzahl der commits)?}%
\pdfbookmark[3]{Aktivität in den letzten 32 Wochen?}{weekly_activity_dia}}{}%
\input{files/git/stats/latex/weekly_activity}%
}

\newcommand{\printgitstat}[1]{%
\ifthenelse{\boolean{saveprivacy}}{}{ %% if false
\oneIF{#1}{\subsubsection*{Produktivste Tageszeit?}%
\pdfbookmark[3]{Produktivste Tageszeit?}{hour_of_day}}{}%
\includegraphics[width=14cm]{files/git/stats/hour_of_day-crop}%
%
\oneIF{#1}{\subsubsection*{Produktivster Wochentag?}
\pdfbookmark[3]{Produktivster Wochentag?}{day_of_week}}{}%
\includegraphics[width=14cm]{files/git/stats/day_of_week-crop}%
}
%
\oneIF{#1}{\subsubsection*{Produktivster Monat?}%
\pdfbookmark[3]{Produktivster Monat?}{month_of_year}}{}%
\includegraphics[width=14cm]{files/git/stats/month_of_year-crop}%
%
\oneIF{#1}{\subsubsection*{Quellcode Zeilen?}%
\pdfbookmark[3]{Quellcode Zeilen?}{lines_of_code}}{}%
\includegraphics[width=14cm]{files/git/stats/lines_of_code-crop}%
%
\oneIF{#1}{\subsubsection*{Dateitypen?}%
\pdfbookmark[3]{Dateitypen?}{dateitypen}}{}%
\begin{center}%
\input{files/git/stats/latex/files-extensions}%
\end{center}%
}

\newcounter{sectionsV}

\endinput

0 comments on commit 1b6cb46

Please sign in to comment.