Compare commits

...

4 Commits

@ -1,13 +1,19 @@
---
titel: Pandoc und Markdown für deine Texte
author: Sebastian Preisner
matrikelnr: 900266
studiengang: Technische Informatik
fach: Freizeitgestaltung
aufgabencode: Freiwillige_Arbeit
title: Pandoc und Markdown für deine Texte
author:
name: Sebastian Preisner
email: wbh@calyrium.org
matrikelnr: 900266
studium:
studiengang: Technische Informatike
studiengangnr: 1140
fach: Freizeitgestaltung
aufgabe:
typ: B-Prüfung
code: Freiwillige_Arbeit
date: 08.06.2017
lang: de
toc: true
toc: t
...
# Einführung

Binary file not shown.

@ -36,6 +36,8 @@
\usepackage[subfigure,titles]{tocloft}
\usepackage[pdfpagelabels=true]{hyperref}
\usepackage{helvet}
% Syntax Highligting with colors
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
@ -75,13 +77,14 @@
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\usepackage{listings}
\lstset{basicstyle=\footnotesize, captionpos=b, breaklines=true, showstringspaces=false, tabsize=2, frame=lines, numbers=left, numberstyle=\tiny, xleftmargin=2em, framexleftmargin=2em}
\makeatletter
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{1em}{\hspace{1,5em} Lst. #1}{#2}}
\makeatother
\geometry{a4paper, top=27mm, left=30mm, right=20mm, bottom=35mm, headsep=10mm, footskip=12mm}
\geometry{a4paper, top=27mm, left=20mm, right=40mm, bottom=35mm, headsep=10mm, footskip=12mm} % Vorgabe des 4cm Rand auf der rechten Seiten.
\hypersetup{unicode=false, pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH},
pdftitle={B-Prüfung},
@ -136,7 +139,7 @@
\textbf{Technische Informatike}\\
\vspace*{2cm}
\Huge
\textbf{B-Aufgabe}\\
\textbf{}\\
\vspace*{0.5cm}
\large
Freiwillige\_Arbeit \\
@ -149,6 +152,7 @@
\newcolumntype{x}[1]{>{\raggedleft\arraybackslash\hspace{0pt}}p{#1}}
\begin{tabular}{x{6cm}p{7.5cm}}
\rule{0mm}{5ex}\textbf{Student:} & Sebastian Preisner \\
& wbh@calyrium.org \\
\rule{0mm}{5ex}\textbf{Matrikelnummer:} & 900266 \\
\rule{0mm}{5ex}\textbf{Abgabedatum:} & 08.06.2017 \\
\end{tabular}
@ -342,7 +346,7 @@ benötigten Packeten auseinander zu setzen. Ansonsten ist eine volle
Installation von LaTeX der einfachste Weg.
\begin{Shaded}
\begin{Highlighting}[shell]
\begin{Highlighting}[]
\CommentTok{# Ubuntu, Kubuntu, Mint}
\FunctionTok{sudo}\NormalTok{ apt-get install pandoc}
@ -377,7 +381,7 @@ Hiermit versichere ich, dass ich meine Abschlussarbeit selbständig verfasst und
\begin{minipage}{\linewidth}
\begin{tabular}{p{15em}p{15em}}
Datum: & .......................................................\\
& \centering (Sebastian Preisner)\\
& \centering (true)\\
\end{tabular}
\end{minipage}

@ -6,7 +6,19 @@ Es integriert die Vorlage für B-Prüfungen in den Arbeitsablauf für Pandoc.
## Installation
Kopiere die Vorlage in das Verzeichnis `/user/share/pandoc/data/templates`.
Zur installation kannst du das entweder das Git Repository mithilfe von `git clone ssh://gogs@git.calyrium.org:2244/WBH/pandoc-b_pruefung.git` clonen oder die Datei `b-pruefung.tex` herunterladen. Danach kopierst du die Datei in das Verzeichnis `pandoc/data/templates`.
```
Linux:
sudo cp b-pruefung.tex /usr/share/pandoc/data/templates/wbh.tex
Mac:
Windows:
```
Nun kannst du mit hilfe von `pandoc -s -t wbh.tex -o output.pdf input.md` dein Markdown file in ein PDF mit der gegeben Vorlage umwandeln.
In deinem Projekt fügst du an den anfang folgende Zeilen ein und füllst sie aus:
@ -15,27 +27,38 @@ In deinem Projekt fügst du an den anfang folgende Zeilen ein und füllst sie au
```
---
title: Projektmanagemant für Anfänger
author: Max Mustermann
matrikelnr: XXXXXX
studiengang: Technische Informatike
fach: Einführungsveranstaltung Projektgruppenleiter
aufgabencode: X-TA-B2d-AAGD
date: 08.06.2017
lang: de
---
title:
date:
logo:
author:
name:
email:
matriklnr:
studium:
studiengang:
studiengangnr:
fach:
arbeit:
typ:
code:
tutor: % Not includet now!
...
```
### Variablen
| Variable | Beschreibung | Optional |
| ------------ | ----------------------------------------------------- | -------- |
| title | Titel der Arbeit/B-Prüfung | nein |
| author | Der Uhrheber der Arbeit, in der Regel dein Name | nein |
| matrikelnr | Deine Matrikelnummer | nein |
| studiengang | Dein Studiengang | nein |
| fach | In welchem Fach wird die Prüfung bearbeitet | nein |
| aufgabencode | Der Code befindet sich auf deiner B-Prüfung ganz oben | nein |
| date | Datum der Abgabe | nein |
| lang | Sprache (Standard ist en = Englisch) | ja |
| logo | Der Pfad zum Logo (Standard ./Bilder/logo.png) | ja |
| Variable | Beschreibung | Optional | Wert |
|:-------------|:------------------------------------------------------|:---------|:-------------------|
| title | Titel der Arbeit/B-Prüfung | nein | |
| author | Der Uhrheber der Arbeit, in der Regel dein Name | nein | |
| matrikelnr | Deine Matrikelnummer | nein | |
| studiengang | Dein Studiengang | nein | |
| fach | In welchem Fach wird die Prüfung bearbeitet | nein | |
| aufgabencode | Der Code befindet sich auf deiner B-Prüfung ganz oben | nein | |
| date | Datum der Abgabe | nein | |
| lang | Sprache (Standard ist en = Englisch) | ja | Ländercode z.B. de |
| logo | Der Pfad zum Logo (Standard ./Bilder/logo.png) | ja | Pfad zum Bild |
| toc | Hinzufügen des Inhaltsverzeichnises | ja | true / false |
| abk | Abkürzungsverzeichnis | ja | true /false |
| lot | Verzeichnis der Tabellen | ja | true / false |
| lof | Liste der Figuren/Abbildungen | ja | true / false |

@ -36,6 +36,11 @@
\usepackage[subfigure,titles]{tocloft}
\usepackage[pdfpagelabels=true]{hyperref}
\usepackage{helvet}
% This two Packages are needet for Pandoc Table support. Issue is opened: https://github.com/jgm/pandoc/issues/1023
\usepackage{longtable}
\usepackage{booktabs}
% Syntax Highligting with colors
$if(highlighting-macros)$
$highlighting-macros$
$endif$
@ -43,6 +48,7 @@ $if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
\usepackage{listings}
\lstset{basicstyle=\footnotesize, captionpos=b, breaklines=true, showstringspaces=false, tabsize=2, frame=lines, numbers=left, numberstyle=\tiny, xleftmargin=2em, framexleftmargin=2em}
\makeatletter
@ -52,15 +58,15 @@ $endif$
\geometry{a4paper, top=27mm, left=20mm, right=40mm, bottom=35mm, headsep=10mm, footskip=12mm} % Vorgabe des 4cm Rand auf der rechten Seiten.
\hypersetup{unicode=false, pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH},
pdftitle={B-Prüfung},
pdfauthor={$author$, Matrikelnummer: $matrikelnr$},
pdfsubject={$studiengang$},
pdftitle={$if(title)$$title$$endif$},
pdfauthor={$if(author.name)$$author.name$$endif$, Matrikelnummer: $if(author.matrikelnr)$$author.matrikelnr$$endif$},
pdfsubject={$studium.studiengang$},
pdfcreator={\LaTeX\ with package \flqq hyperref\frqq},
pdfproducer={pdfTeX \the\pdftexversion.\pdftexrevision},
pdfkeywords={B-Prüfung $aufgabencode$},
pdfkeywords={$if(aufgabe.typ)$$aufgabe.typ$$endif$, $if(aufgabe.code)$$aufgabe.code$$endif$ $if(keywords)$ $for(keywords)$$keywords$$sep$, $endfor$ $endif$},
pdfnewwindow=true,
colorlinks=true,linkcolor=black,citecolor=black,filecolor=magenta,urlcolor=black}
\pdfinfo{/CreationDate (D:20170605133321)}
colorlinks=true,linkcolor=black,citecolor=gray,filecolor=magenta,urlcolor=black}
% \pdfinfo{/CreationDate (D:20170605133321)}
\renewcommand{\familydefault}{\sfdefault}
% Pandoc tightlisting
@ -71,14 +77,16 @@ $endif$
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
% Kopf- und Fusszeile
% ----------------------------------------------------------------------------------------------------------
% Kopf und Fußzeile
% ----------------------------------------------------------------------------------------------------------
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\leftmark}{\rightmark}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\thesection\space\contentsname}
\lfoot{\tiny B-Prüfung des Studenten: $author$ (Matrikelnr.: $matrikelnr$) Studiengang: $studiengang$ - Prüfung: $aufgabencode$}
\lfoot{\tiny $if(aufgabe.typ)$$aufgabe.typ$$endif$ des Studenten: $if(author.name)$$author.name$$endif$ (Matrikelnr.: $if(author.matrikelnr)$$author.matrikelnr$$endif$) Studiengang: $studium.studiengang$ - Prüfung: $if(aufgabe.code)$$aufgabe.code$$endif$}
\cfoot{}
\rfoot{\ \linebreak Seite \thepage}
\renewcommand{\headrulewidth}{0.4pt}
@ -104,34 +112,43 @@ $endif$
\vspace*{2cm}
\Large
\textbf{Studiengang:}\\
\textbf{$studiengang$}\\
\textbf{$studium.studiengang$}\\
\vspace*{2cm}
\Huge
\textbf{B-Aufgabe}\\
\textbf{$aufageb.typ$}\\
\vspace*{0.5cm}
$if(title)$\textbf{$title$}$endif$ \\
\vspace*{0.3cm}
\large
$aufgabencode$ \\
$if(aufgabe.code)$$aufgabe.code$$endif$ \\
\vspace*{1cm}
\textbf{$fach$}\\
\textbf{$studium.fach$}\\
\vspace*{2cm}
\vfill
\normalsize
\newcolumntype{x}[1]{>{\raggedleft\arraybackslash\hspace{0pt}}p{#1}}
\begin{tabular}{x{6cm}p{7.5cm}}
\rule{0mm}{5ex}\textbf{Student:} & $author$ \\
\rule{0mm}{5ex}\textbf{Matrikelnummer:} & $matrikelnr$ \\
\rule{0mm}{5ex}\textbf{Student:} & $if(author.name)$$author.name$$endif$
$if(author.email)$ \newline $author.email$ $endif$ \\
\rule{0mm}{5ex}\textbf{Matrikelnummer:} & $if(author.matrikelnr)$$author.matrikelnr$$endif$ \\
\rule{0mm}{5ex}\textbf{Abgabedatum:} & $date$ \\
\end{tabular}
\end{center}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Abstract
% ----------------------------------------------------------------------------------------------------------
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
% ----------------------------------------------------------------------------------------------------------
% Inhalt
% ----------------------------------------------------------------------------------------------------------
$for(include-before)$
$include-before$
@ -143,6 +160,7 @@ $if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
% ----------------------------------------------------------------------------------------------------------
% Verzeichnisse
% ----------------------------------------------------------------------------------------------------------
@ -155,25 +173,26 @@ $endif$
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\singlespacing
\rhead{INHALTSVERZEICHNIS}
\renewcommand{\contentsname}{II Inhaltsverzeichnis}
\renewcommand{\contentsname}{I Inhaltsverzeichnis}
\phantomsection
\addcontentsline{toc}{section}{\texorpdfstring{II \hspace{0.35em}Inhaltsverzeichnis}{Inhaltsverzeichnis}}
\addcontentsline{toc}{section}{\texorpdfstring{I \hspace{0.35em}Inhaltsverzeichnis}{Inhaltsverzeichnis}}
\addtocounter{section}{1}
\tableofcontents
\pagebreak
}
$endif$
$if(lot)$
\rhead{VERZEICHNISSE}
\rhead{TABELLENVERZEICHNIS}
\pagebreak
\listoftables
$endif$
$if(lof)$
% Workaround for the HEADING if you don't use a list of tables
$if(lot)$$else$\rhead{VERZEICHNISSE}$endif$
$if(lot)$$else$\rhead{ABBILDUNGSVERZEICHNIS}$endif$
\listoffigures
\pagebreak
$endif$
$if(abk)$
% ----------------------------------------------------------------------------------------------------------
% Abkürzungen
@ -198,7 +217,7 @@ $endif$
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\subsectionmark}[1]{}
\renewcommand{\subsubsectionmark}[1]{}
\lhead{Lösung der Aufgabe: \thesection}
\lhead{Abschnitt \thesection}
\rhead{} %hier kann die rechte Seite der Kopfzeile editiert werden!
\onehalfspacing
@ -226,6 +245,11 @@ $if(biblatex)$
$endif$
% ----------------------------------------------------------------------------------------------------------
% Erklärung zur selbstständigkeit
% ----------------------------------------------------------------------------------------------------------
$if(insurance)$
\newpage
\thispagestyle{empty}
\begin{center}
@ -242,5 +266,6 @@ Hiermit versichere ich, dass ich meine Abschlussarbeit selbständig verfasst und
& \centering ($author$)\\
\end{tabular}
\end{minipage}
$endif$
\end{document}

Loading…
Cancel
Save