From d1595c136dbc10d6ee153bcb3f3534ca492c5d24 Mon Sep 17 00:00:00 2001
From: Erik Roemmelt <roemmelter63329@th-nuernberg.de>
Date: Wed, 16 Jan 2019 15:12:50 +0100
Subject: [PATCH] Add changes to .gitignore and add latex- .tex/.bib/.sty
 -file.

---
 .gitignore                      |  14 ++++-
 latex-files/defaultPreamble.sty | 102 ++++++++++++++++++++++++++++++++
 latex-files/document.bib        |   8 +++
 latex-files/document.tex        |  48 +++++++++++++++
 4 files changed, 171 insertions(+), 1 deletion(-)
 create mode 100644 latex-files/defaultPreamble.sty
 create mode 100644 latex-files/document.bib
 create mode 100644 latex-files/document.tex

diff --git a/.gitignore b/.gitignore
index dade82f..2d08984 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,16 @@
 
 # brackets-latex compile output folders
 latex-out/
-out/
\ No newline at end of file
+out/
+
+# latex compile output files. Could cause trouble.
+latex-files/*.aux
+latex-files/*.bbl
+latex-files/*.bcf
+latex-files/*.blg
+latex-files/*.dvi
+latex-files/*.log
+latex-files/*.out
+latex-files/*.pdf
+latex-files/*.run.xml
+latex-files/*.toc
\ No newline at end of file
diff --git a/latex-files/defaultPreamble.sty b/latex-files/defaultPreamble.sty
new file mode 100644
index 0000000..58290d3
--- /dev/null
+++ b/latex-files/defaultPreamble.sty
@@ -0,0 +1,102 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%																		%%
+%%							defaultPreamble.sty							%%
+%%																		%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%																		%%
+%%		Setup a preamble for document class: article					%%
+%%		1.Pagesettings: 												%%
+%%			- DIN A4 Paper												%%
+%%			- Margin: Top 	 = 20mm										%%
+%%					  Right  = 20mm										%%
+%%					  Bottom = 30mm										%%
+%%					  Left 	 = 30mm										%%
+%%			- Header Separation = 10mm									%%
+%%			- Footer Separation = 10mm									%%
+%%			- Paragraph Spacing = 1.5 * line height						%%
+%%																		%%
+%%		2.Redefine Pagelayout											%%
+%%			- Remove printed page numbers on page 1+2.					%%
+%%			- Page 1+2 counts for the table of content.					%%
+%%			- Print the page numbering like "Seite" a "von" lastpage 	%%
+%%			  to the right bottom corner.								%%
+%%																		%%
+%%		3.Load Packages 												%%
+%%			- geometry	= Set page settings.							%%
+%%			- setspace	= Set linespacing, prevent math formula			%%
+%%						  streching.									%%
+%%			- lastpage	= Get last page number.							%%
+%%			- fancyhr	= Set header, footer and page layout.			%%
+%%			- babel 	= Set hyphenation rules to [ngerman].			%%
+%%			- inputenc	= Set input encoding to UTF-8 (Umlaute etc.).	%%
+%%			- fontenc	= Set font encoding to 8bit (support <,=,>,").	%%
+%%			- csquotes	= Provide support to use " " in tex-document.	%%
+%%			- helvet	= Set fontfamily to Helvetica (sans serif).		%%
+%%			- xcolor	= Provides support of font colors.				%%
+%%			- hyperref	= Provides support of links (pdf anchor), URL.	%%
+%%			- graphicx	= Provides support to add images.				%%
+%%			- pdfpages	= Provides support to include pdf pages.		%%
+%%			- amsmath	= Provides advanced math typesetting support.	%%
+%%			- amsfonts	= Provides advanced font typesetting support.	%%
+%%			- amssymb	= Provides advanced symbol typesetting support.	%%
+%%			- blindtext	= Provides support to use Lorem Ipsum text.		%%
+%%			- biblatex	= Set biblatex for citation and bibliography	%%
+%%						  with biber as backend and the 				%%
+%%						  bibliography style 'ieee'.					%%
+%%																		%%
+%%		4.Defines New Commands											%%
+%%			- \bibfilename{file.bib}	= Set bib file. 				%%
+%%			- \printbib					= Print bibliography.			%%
+%%																		%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesPackage{defaultPreamble}[2019/01/15 v1.0 DefaultPreamble Package from Erik Roemmelt]%
+\ProcessOptions\relax%
+%%% Packages %%%
+% ___Document___
+\RequirePackage[a4paper, left=30mm, right=20mm, top=20mm, bottom=30mm, headsep=10mm, footskip=10mm]{geometry} % Set page settings
+\RequirePackage[nodisplayskipstretch]{setspace} % Set linespacing and prevent math formula streching
+\setstretch{1.5} % Change typeset line spacing by multiplicator 1.5
+\RequirePackage{lastpage} % Get last page number with \pageref{LastPage}
+\RequirePackage{fancyhdr} % Set header, footer and page layout.
+\pagestyle{fancy} % Set the pagestyle to fancyhdr settings
+%%% Fancyhdr Settings %%%
+\fancyhf{} % Clear all header and footer fields
+\fancyfoot[R]{\ifnum\value{page}<3\relax\else{Seite \thepage \hspace{1pt} von \pageref{LastPage}}\fi} % Set page numbering "n / last" in the right field of footer
+\renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
+\renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
+\fancypagestyle{plain}{% Redefine plain style
+	\fancyhf{} % Clear all header and footer fields
+	\fancyfoot[R]{\ifnum\value{page}<3\relax\else{Seite \thepage \hspace{1pt} von \pageref{LastPage}}\fi} % Set page numbering "n / last" in the right field of footer, skip page numbering on page 1+2
+	\renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
+	\renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
+}%
+% ___Font___
+\RequirePackage[ngerman]{babel} % Changes hyphenation rules
+\RequirePackage[utf8]{inputenc} % Input encoding: Unicode support (Umlaute etc.)
+\RequirePackage[T1]{fontenc}	% Font encoding: (8bit) Accents support (<,=,>,",...)
+\RequirePackage{csquotes}		% Allows to use " " in document.
+\RequirePackage[scaled]{helvet} % Changes fontfamily to Helvetica (sans serif)
+\renewcommand{\familydefault}{\sfdefault} % Changes default font to sans serif
+\RequirePackage[dvipsnames]{xcolor} % Provides font coloring
+% ___Other___
+\RequirePackage[hidelinks]{hyperref} % Add a link to your document
+\RequirePackage{graphicx} % Add pictures to your document 
+\RequirePackage{pdfpages} % Allows to include pdf pages
+\RequirePackage{amsmath} % Advanced math typesetting
+\RequirePackage{amsfonts} % Advanced font typesetting 
+\RequirePackage{amssymb} % Advanced symoblic typesetting
+\RequirePackage{blindtext} % Blindtext, Lorem Ipsum text
+% __Bibliography___
+\RequirePackage[backend=biber,style=ieee]{biblatex} % Use biblatex package
+%%% New Commands %%%
+% Add new command to set file name for *.bib file
+\newcommand*{\@bibfilename}{%
+	\PackageWarning{defaultPreamble}{Bib-File-Name undefined}%
+	NoN%
+}%
+\newcommand{\bibfilename}[1]{\addbibresource{#1}}% Insert the name of the BibLatex file
+% Add new command to print the bibliography
+\newcommand{\printbib}{\printbibliography[heading=bibintoc]}% Insert the name of the BibLatex file
+\endinput % Das ist das Ende von dieser .sty Datei
\ No newline at end of file
diff --git a/latex-files/document.bib b/latex-files/document.bib
new file mode 100644
index 0000000..6e344fb
--- /dev/null
+++ b/latex-files/document.bib
@@ -0,0 +1,8 @@
+@online{id,
+	author = {author},
+	title = {title},
+	month = {01},
+	year = {1990},
+	url = {http://www.google.com},
+	appendum = {Zuletzt besucht am 01.01.1213}
+}
diff --git a/latex-files/document.tex b/latex-files/document.tex
new file mode 100644
index 0000000..1ae5b01
--- /dev/null
+++ b/latex-files/document.tex
@@ -0,0 +1,48 @@
+% ---
+% Preamble
+% ---
+\documentclass[12pt]{article}
+\usepackage{defaultPreamble}
+\bibfilename{document.bib}
+% ---
+% Required for \maketitle{}
+% ---
+\author{Autor Name} 	% The authors name
+\title{Dokument Titel} 	% Titel
+\date{01.01.1200} 		% Beginn des Schreibens 28.12.2018
+% ---
+% Document Body
+% ---
+\begin{document}
+
+% Deckblatt
+%\includepdf[pages=-, scale=0.835, frame=false, pagecommand=\thispagestyle{plain}]{Pdf_Name}
+\maketitle
+\newpage				% Seitenumbruch nach Titelblatt
+
+% Inhaltsverzeichnis
+\tableofcontents
+\newpage				% Seitenumbruch nach Titelblatt
+
+% Beginn Text
+\section{Einleitung} 	% Überschrift
+Einleitende Worte...
+
+\section{Grundlagen}
+asd
+
+\section{Projekte}
+asd
+
+\section{Ergebnisse}
+asd
+
+\section{Zusammenfassung}
+asd
+
+% Literaturverzeichnis
+\newpage				% Seitenumbruch vor Literaturverzeichnis
+\nocite{*}				% Gebe alle Inhalte der *.bib Datei zum Druck frei.
+\printbib				% Drucke die freigegebenen Inhalte ins Literaturverzeichnis.
+
+\end{document}