From: Marian Korosec <kormam13@htl-kaindorf.ac.at>
Date: Wed, 7 Mar 2018 17:14:25 +0000 (+0100)
Subject: C added, Acronyms added
X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=9141aba13aef9c9f3c41e8309decaa4bc6157d61;p=diplomarbeit-mechatronik-vorlage-latex.git

C added, Acronyms added
---

diff --git a/appendix.tex b/appendix.tex
index 6fa028f..cb520f3 100644
--- a/appendix.tex
+++ b/appendix.tex
@@ -16,8 +16,20 @@
 % Anhänge
 \chapter{Zeitaufzeichnung}
 \chapter{Persönlicher Anhang 1}
+
+\markboth{}{}	%end chapter
+
+\bibliography{Literaturverzeichnis}
+\bibliographystyle{jurabib}
+
+\chapter{Abkürzungsverzeichnis}
+\begin{acronym}
+	%Abkürzung hinzufügen: \acro{Kürzel}{Ausgeschrieben}
+	\acro{WLAN}{Wireless Local Area Network}
+	\acro{WWW}{World Wide Web}
+	\acro{uC}[µC]{Mikrocontroller}
+\end{acronym}
+
 \listoffigures
 \listoftables
-\lstlistoflistings
-\bibliography{Literaturverzeichnis}
-\bibliographystyle{jurabib}
\ No newline at end of file
+\lstlistoflistings
\ No newline at end of file
diff --git a/fig/logoMecha.png b/fig/logoMecha.png
new file mode 100644
index 0000000..bc84f68
Binary files /dev/null and b/fig/logoMecha.png differ
diff --git a/inhalt.tex b/inhalt.tex
index 18448d6..637ca8a 100644
--- a/inhalt.tex
+++ b/inhalt.tex
@@ -14,7 +14,7 @@
 \begin{wrapfigure}{r}{0.6\textwidth}
 \vspace{-30pt}
   \begin{center}
-    \includegraphics[width=0.55\textwidth]{logoMecha}
+    \includegraphics[width=0.55\textwidth]{fig/logoMecha}
   \end{center}
   \caption{Bild mit Textumfluss}
   \label{Bild mit Textumfluss}
@@ -24,14 +24,14 @@
 Hier muss Text stehen, sonst wird von unten alles verschoben. Sollte nicht genug Text vorhanden sein muss mit dem \textbackslash{}vspace\{\} Befehl das Format angepasst werden. Mit dem \textbackslash{}vspace\{\} Kommando muss solange herumgspielt werden, bis das Format passt. Sollte nicht genug Platz gebraucht werden, wird der \textbackslash{}wrapfigure\{\} Befehl auch weiter unten alles auf die halbe Seite verringern. Verweisen auf Sections, Bilder, etc. kann mam mit\ref{Bild mit Textumfluss} und \ref{Bild über ganze Seitenbreite} kann man mit dem Befehl \textbackslash{}ref\{\}. Hier ein Verweis auf die Tabellensection \ref{sec:tabelle}.
 
 \begin{figure}[H]
-      \includegraphics[width=1\textwidth]{logoMecha}
+      \includegraphics[width=1\textwidth]{fig/logoMecha}
       \caption{Bild über ganze Seitenbreite}
       \label{Bild über ganze Seitenbreite}
 \end{figure}
 \newpage
 
 \paragraph{Code}\mbox{}\\
-Hier muss Text stehen, sonst wird der Paragraph nicht angezeigt.
+Hier muss Text stehen, sonst wird der Paragraph nicht angezeigt.\footnote{Fußnote mit URL.\\ \url{https://www.htl-mechatronik.at/}, (letzter Zugriff am 7.3.2018)} 
 
 \begin{lstlisting}[style=java,caption=Codebeispiel]
 package u04t;
@@ -102,3 +102,7 @@ Tabelle \ref{Tabellenbeispiel} ist mit einem Onlinegenerator erzeugt, da Tabelle
 \caption{Tabellenbeispiel}
 \label{Tabellenbeispiel}
 \end{table}
+
+\section{Akronyme}
+\label{sec:akronyme}
+Akronyme können mit dem \textbackslash{}ac\{\} Kommando angezeigt werden. Bei diesem Befehl wird eine Abkürzung beim 1. Aufruf so angezeigt: \ac{uC} und danach nur mehr das Kürzel \ac{uC}. Das \ac{WWW} ist unkontrollierbar. Möchte man das Kürzel ausschreiben, verwendet man \textbackslash{}acl\{\}: \acl{WWW}
\ No newline at end of file
diff --git a/listings.tex b/listings.tex
index 4343cf9..2f00dc6 100644
--- a/listings.tex
+++ b/listings.tex
@@ -1,3 +1,15 @@
+%Style for the \inlinecode{}{} command
+%command use: \inlinecode{language}{code} e.g.: \inlinecode{Java}{public static void main()}
+\lstset{
+	backgroundcolor=\color{codeBackGray},
+    showstringspaces=false,
+	keepspaces=true,
+    basicstyle=\fontencoding{T1}\fontfamily{DejaVuSansMono-TLF}\fontseries{m}\selectfont\footnotesize,
+    keywordstyle=\color{blue},
+    commentstyle=\color[grey]{0.6},
+    stringstyle=\color[RGB]{255,150,75}
+}
+
 %Java
 %Model from netbeans
 \definecolor{java_net_comment}{rgb}{0.586,0.586,0.586}
@@ -34,7 +46,55 @@
   stringstyle=\color{java_net_string},     																% string literal style
   tabsize=2,	                   																		% sets default tabsize to 2 spaces
   title=\lstname,                  		 																% show the filename of files included with
-  literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,  											% escape äöüß
+  literate=%
+  {Ö}{{\"O}}1
+  {Ä}{{\"A}}1
+  {Ü}{{\"U}}1
+  {ß}{{\ss}}1
+  {ü}{{\"u}}1
+  {ä}{{\"a}}1
+  {ö}{{\"o}}1																							% escape ÖÄÜßüäö
+}
+
+%C
+%Model from netbeans
+\definecolor{C_net_comment}{rgb}{0.586,0.586,0.586}
+\definecolor{C_net_keyword}{rgb}{0,0,0.898}
+\definecolor{C_net_string}{rgb}{0.805,0.480,0}
+\definecolor{C_net_preprocessor}{rgb}{0,0.597,0}
+\definecolor{codeBackGray}{gray}{0.98}
+
+\lstdefinestyle{C}{ %define c style
+  language=C,                 			% the language of the code
+  backgroundcolor=\color{codeBackGray},   	% choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
+  basicstyle=\fontencoding{T1}\fontfamily{DejaVuSansMono-TLF}\fontseries{m}\selectfont\footnotesize,        		% the size of the fonts that are used for the code
+  breakatwhitespace=false,         		% sets if automatic breaks should only happen at whitespace
+  breaklines=true,                 			% sets automatic line breaking
+  captionpos=b,                    			% sets the caption-position to bottom
+  commentstyle=\color{C_net_comment},    	% comment style
+  escapeinside={(*}{*)},          			% if you want to add LaTeX within your code
+  extendedchars=true,             		 	% lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
+  frame=none,%single,	                   				% adds a frame around the code
+  framexleftmargin=8mm,					%include numbers into the frame
+  keepspaces=true,                			% keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
+  keywordstyle=\color{C_net_keyword},       		% keyword style
+  deletekeywords=          					% if you want to delete keywords from the given language
+ {...}, 
+  otherkeywords={*,...},           		% if you want to add more keywords to the set
+  numbers=left,                    			% where to put the line-numbers; possible values are (none, left, right)
+  numbersep=8pt,                   			% how far the line-numbers are from the code
+  numberstyle=\fontencoding{T1}\fontfamily{DejaVuSansMono-TLF}\fontseries{m}\selectfont\footnotesize,		 % the style that is used for the line-numbers
+  rulecolor=\color{black},         		% if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
+  showspaces=false,                			% show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
+  showstringspaces=false,          		% underline spaces within strings only
+  showtabs=false,                  			% show tabs within strings adding particular underscores
+  stepnumber=1,                    			% the step between two line-numbers. If it's 1, each line will be numbered
+  stringstyle=\color{C_net_string},     		% string literal style
+  tabsize=2,	                   					% sets default tabsize to 2 spaces
+  title=\lstname,                  		 		% show the filename of files included with
+  literate=
+  {\#include}{{{\color{C_net_preprocessor}\#include}}}{8}
+  {\#define}{{{\color{C_net_preprocessor}\#define}}}{7}
 }
 
-\newcommand{\inlinecode}[2]{\colorbox{editorGray}{\lstinline[language=#1]$#2$}}
\ No newline at end of file
+\newcommand{\inlinecode}[2]{\colorbox{editorGray}{\lstinline[language=#1]$#2$}}
diff --git a/logoMecha.png b/logoMecha.png
deleted file mode 100644
index bc84f68..0000000
Binary files a/logoMecha.png and /dev/null differ
diff --git a/main.pdf b/main.pdf
index c6cf070..28b3e89 100644
Binary files a/main.pdf and b/main.pdf differ
diff --git a/main.tex b/main.tex
index 0429c59..ff9ae9b 100644
--- a/main.tex
+++ b/main.tex
@@ -11,8 +11,10 @@ listof=numbered,													%Listingsverzeichnis
 bibliography=totocnumbered,											%Literaturverzeichnis
 ]
 {scrbook}															%Dokumenttyp
-\usepackage[ngerman]{babel}											%Deutsch
-\usepackage[bottom=1in,inner=1in,outer=20mm,top=20mm]{geometry}		%Ganze Seite
+
+\usepackage[bottom=1in,inner=1in,outer=20mm,top=20mm]{geometry}		%Ganze Seite verwenden
+
+% Kopf und Fußzeile
 \usepackage{emptypage}												%Leere Seiten ohne Kopf und Fußzeile
 \usepackage[headsepline]{scrlayer-scrpage}							%Kopf und Fußzeile
 \pagestyle{scrheadings}												%Nummerierung in der Kopfzeile
@@ -21,12 +23,15 @@ bibliography=totocnumbered,											%Literaturverzeichnis
 \ohead[\pagemark]{\pagemark}										%Seitennummerierung
 \lohead{}															%Name auf der ungeraden Seite innen
 \renewcommand*{\chapterpagestyle}{scrheadings}						%Kopf und Fußzeile auf Seiten mit Überschriften anders
+
+%Dokumenteinstellungen und Paketimporte
+\usepackage[ngerman]{babel}											%Deutsch
 \usepackage{graphicx}												%Bilder
-\usepackage{caption}												%Tabellen Listings und Figuren mit beschriftung im Verzeichnissen
+\usepackage{caption}												%Tabellen Listings und Figuren mit Beschriftung in Verzeichnissen
 \usepackage[T1]{fontenc}											%Outputencoding
 \usepackage{float}													%Plazierung von Floats (Bilder Tabellen)
-\usepackage[utf8]{inputenc}											%UTF8
-\usepackage{wrapfig}												%Textumfluss von Bildern, die nicht die ganze Seite Brauchen
+\usepackage[utf8x]{inputenc}										%UTF8 + Sonderzeichen
+\usepackage{wrapfig}												%Textumfluss von Bildern, die nicht die ganze Seite brauchen
 \usepackage{setspace}												%Zeilenabstand
 \usepackage{listings}												%Listings (=Code)
 \usepackage{times}													%Schriftart Times Roman
@@ -37,21 +42,25 @@ bibliography=totocnumbered,											%Literaturverzeichnis
 \usepackage{appendix}												%Anhang Titelseite
 \usepackage{tabularx}												%Bessere Tabellen
 \usepackage{jurabib}												%Zitierung
-\usepackage[bookmarks]{hyperref}									%Automatische Lesezeichen
+\usepackage[printonlyused,withpage]{acronym}						%Für die Verwendung von Akronymen + Verzeichnis - printonlyused: Abkürzung nur im Verzeichnis wenn auch benutzt; withpage: Seite der 1. Verwendung im Verzeichnis anzeigen
 
 \setlength{\parindent}{0em}											%Einrücken
+\setcounter{tocdepth}{5}											%Tiefe der Überschriften
+\setcounter{secnumdepth}{5}											%Nummerierungstiefe der Überschriften
+
+\usepackage[bookmarks]{hyperref}									%Automatische Lesezeichen
 
-\subject{\includegraphics[scale=0.7]{logoMecha.png}}
+\subject{\includegraphics[scale=0.7]{fig/logoMecha}}
 \title{Diplomarbeitvorlage}
-\subtitle{HTBLA Kaindorf an der Sulm\\Grazer Straße 202, A-8430 Kaindorf an der Sulm\\Ausbildungsschwerpunkt Mechatronik und Automatisierungstechnik}
+\subtitle{HTBLA Kaindorf an der Sulm\\
+Grazer Straße 202, A-8430 Kaindorf an der Sulm\\
+Ausbildungsschwerpunkt Mechatronik und Automatisierungstechnik}
 \author{Florian Greistorfer \and Marian Korošec}
 \date{Abgabedatum: 7.3.2018}
 \publishers{Betreut von:\\Dipl.-Ing. Manfred Steiner}
 \begin{document}													%Dokumentbeginn
 \onehalfspace														%Zeilenabstand
 \maketitle															%Titelseite
-\setcounter{tocdepth}{5}											%Tiefe der Überschriften
-\setcounter{secnumdepth}{5}											%Nummerierungstiefe der Überschriften
 \input{listings}
 \input{opening}														%Datei importieren
 \tableofcontents													%Inhaltsverzeichnis
diff --git a/opening.tex b/opening.tex
index e61931b..d999534 100644
--- a/opening.tex
+++ b/opening.tex
@@ -101,7 +101,7 @@ Diese Arbeit wurde in \LaTeX{} verfasst. Diese Art der Dokumentation bietet gege
 \subsection*{Florian Greistorfer}
 \begin{wrapfigure}[10]{l}{0.5\textwidth}
 \begin{center}
-  \includegraphics[width=0.35\textwidth]{logoMecha}
+  \includegraphics[width=0.35\textwidth]{fig/logoMecha}
 \end{center}
 \end{wrapfigure}
 \mbox{}\\
@@ -120,7 +120,7 @@ Marian Korošec
 \subsection*{Marian Korošec}
 \begin{wrapfigure}[10]{l}{0.5\textwidth}
 \begin{center}
-  \includegraphics[width=0.35\textwidth]{LogoMecha}
+  \includegraphics[width=0.35\textwidth]{fig/logoMecha}
 \end{center}
 \end{wrapfigure}
 \mbox{}\\
@@ -139,7 +139,7 @@ Florian Greistorfer
 \subsection*{Thomas Test}
 \begin{wrapfigure}[10]{l}{0.5\textwidth}
 \begin{center}
-  \includegraphics[width=0.35\textwidth]{logoMecha}
+  \includegraphics[width=0.35\textwidth]{fig/logoMecha}
 \end{center}
 \end{wrapfigure}
 \mbox{}\\
@@ -158,7 +158,7 @@ Professor Oak
 \subsection*{Peter Platzhalter}
 \begin{wrapfigure}[10]{l}{0.5\textwidth}
 \begin{center}
-  \includegraphics[width=0.35\textwidth]{LogoMecha}
+  \includegraphics[width=0.35\textwidth]{fig/logoMecha}
 \end{center}
 \end{wrapfigure}
 \mbox{}\\