Commit 41ed1024 authored by Alija Sabic's avatar Alija Sabic
Browse files

Cleanup demo.tex, preamble.sty; move advanced, customizable parts to separate...

Cleanup demo.tex, preamble.sty; move advanced, customizable parts to separate custom.sty; create standalone version of title page, declaration, abstract (ger,eng)
parent 1dc893d5
......@@ -10,7 +10,7 @@ $pdf_mode = 1;
$bibtex_use = 2;
$force_mode = 1;
$dependents_list = 1;
$silence_logfile_warnings = 0;
$silence_logfile_warnings = 0; # FIXME: not working proberly, use LaTeX ackage silence
$use_make_for_missing_files = 1;
$out_dir = $builddir;
$deps_file = "$out_dir/$depsfile.deps";
......
......@@ -10,7 +10,7 @@ print_banner = $1$(header)\n==$(rst) $2$1\n$(header)$(rst)\n
ERRS = error
LOG = @echo "$(call print_banner,$(ac),Error Log:$(sc)$1$(rst))\e[1A" && \
grep $(ERRS) $1 -nR -A4 -B4 | fold -sw $(out_length) | \
grep $(ERRS) $1 -nR -A4 -B8 | fold -sw $(out_length) | \
sed --expression='s/--/$(ac)$(header)\n$(header)$(rst)/g' | \
grep --color -E -e '' -e '$(ERRS)' && echo "$(ac)$(header)\n$(header)$(rst)"
......
No preview for this file type
File added
......@@ -16,60 +16,95 @@
% Add acronyms used in images or not used at all by adding to the list
\acuse{FHTW,FG,SI}
\headerpagestyle{empty}
% ----------------------------------------------------------------------------------------------------------------------------
% Title Page
% ----------------------------------------------------------------------------------------------------------------------------
\inserttitle
\cleardoublepage
\setstretch{1.5}
\setcounter{page}{1}
\pagenumbering{roman}
\headerpagestyle{intro}
% ----------------------------------------------------------------------------------------------------------------------------
% Declaration
% ----------------------------------------------------------------------------------------------------------------------------
\input{declaration}
\cleardoublepage
% ----------------------------------------------------------------------------------------------------------------------------
% Kurzfassung
% ----------------------------------------------------------------------------------------------------------------------------
\input{kurzfassung}
\cleardoublepage
% ----------------------------------------------------------------------------------------------------------------------------
% Abstract
% ----------------------------------------------------------------------------------------------------------------------------
\input{abstract}
\cleardoublepage
% \frontmatter
% \headerpagestyle{toc}
% ------------------------------------------------------------------------------------------------------------------------
% Table of Contents
% ------------------------------------------------------------------------------------------------------------------------
\tableofcontents
\cleardoublepage
\setcounter{page}{1}
\pagenumbering{arabic}
\headerpagestyle{content}
% ------------------------------------------------------------------------------------------------------------------------
% Chapter 01
% ------------------------------------------------------------------------------------------------------------------------
\input{chapter01}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Chapter 02
% ------------------------------------------------------------------------------------------------------------------------
\input{chapter02}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Chapter 03
% ------------------------------------------------------------------------------------------------------------------------
\input{chapter03}
\cleardoublepage
\headerpagestyle{toc}
% ------------------------------------------------------------------------------------------------------------------------
% Bibliography/References
% ------------------------------------------------------------------------------------------------------------------------
\renewcommand{\bibname}{References}
\addcontentsline{toc}{chapter}{\bibname}
\bibliography{references}
\insertbibliography{References}{references}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Acronyms
% ------------------------------------------------------------------------------------------------------------------------
\def\acrotitle{List of Acronyms}
\chapter*{\acrotitle} \addcontentsline{toc}{chapter}{\acrotitle}
\printacronyms[heading=none]\vfill\pagebreak
\insertacronyms{List of Acronyms}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Lists of Figures
% ------------------------------------------------------------------------------------------------------------------------
% \renewcommand{\listfigurename}{\listfigurename}
\listoffigures \addcontentsline{toc}{chapter}{\listfigurename}
\inserttof{List of Figures}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Lists of Tables
% ------------------------------------------------------------------------------------------------------------------------
% \renewcommand{\listtablename}{\listtablename}
\listoftables \addcontentsline{toc}{chapter}{\listtablename}
\inserttot{List of Tables}
\cleardoublepage
% ------------------------------------------------------------------------------------------------------------------------
% Lists of Listings
% ------------------------------------------------------------------------------------------------------------------------
\renewcommand{\lstlistlistingname}{List of Listings}
\lstlistoflistings \addcontentsline{toc}{chapter}{\lstlistlistingname}
\inserttol{List of Listings}
% \cleardoublepage
\end{document}
\ No newline at end of file
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{custom}[2018/11/23 Customization]
% --------------------------------------------------------------------------------------------------------------------------------
% Title Page Information
% --------------------------------------------------------------------------------------------------------------------------------
\RequirePackage{datetime}
\makeatletter
\newdateformat{df}{\monthname[\THEMONTH]~\THEDAY, \THEYEAR}
\def\papertype{MASTER THESIS}
\def\degreeprogram{Embedded Systems}
\def\title{Document Title: Longer titles are wrapped and placed in right position automatically}
\def\author{Walter Subject}
\def\studentid{2134657809}
\def\supervisor{Dr. Cal Lightman}
\def\secondsupervisor{Dr. Nicol{\`a}s Rivi{\'e}ra}
\def\location{Vienna}
\makeatother
% --------------------------------------------------------------------------------------------------------------------------------
% Title
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\inserttitle}{
\begin{titlepage}
\input{tw-title}
\end{titlepage}
}
% --------------------------------------------------------------------------------------------------------------------------------
% Header
% --------------------------------------------------------------------------------------------------------------------------------
\RequirePackage{fancyhdr}
\RequirePackage{xifthen}
\setlength{\headheight}{14pt}
% Change chapter, section title in header
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
% Provide different header styles (note: plain required for chapter title)
\newcommand{\headerpagestyle}[1]{
\ifthenelse{\equal{#1}{empty}}{
\pagestyle{empty}
}{}
\ifthenelse{\equal{#1}{intro}}{
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[RO]{\thepage}
}
}{}
\ifthenelse{\equal{#1}{toc}}{
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
}
\pagestyle{fancy}{
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
}
}{}
\ifthenelse{\equal{#1}{content}}{
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\thepage}
}
\pagestyle{fancy}{
\fancyhf{}
\fancyhead[LO]{\nouppercase{\rightmark}}
\fancyhead[RE]{\nouppercase{\leftmark}}
\fancyhead[LE,RO]{\thepage}
}
}{}
}
% --------------------------------------------------------------------------------------------------------------------------------
% Chapter
% --------------------------------------------------------------------------------------------------------------------------------
\RequirePackage{titlesec}
\titleformat
{name=\chapter,numberless} % command
[block] % shape
{\bfseries\raggedright\Huge\vspace{-2em}} % format
{} % label
{0pt} % sep
{\vspace{-1em}} % before-code
{} % after-code
\titleformat
{\chapter} % command
[display] % shape
{\bfseries\raggedleft\fontsize{42}{42}\selectfont} % format
{ % label
\begin{tikzpicture}[overlay]
\node[color=\accentcolor!60,anchor=south east,scale=1.5] at (1.1,0) {\thechapter};
\end{tikzpicture}
}
{0pt} % sep
{\textcolor{\accentcolor!60}} % before-code
{} % after-code
% --------------------------------------------------------------------------------------------------------------------------------
% Bibliography/References
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\insertbibliography}[2]{
\renewcommand{\bibname}{#1}
\addcontentsline{toc}{chapter}{\bibname}
\bibliography{#2}
}
% --------------------------------------------------------------------------------------------------------------------------------
% Acronyms
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\insertacronyms}[1]{
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}
\printacronyms[heading=none]
}
% --------------------------------------------------------------------------------------------------------------------------------
% List of Figures
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\inserttof}[1]{
\renewcommand{\listfigurename}{#1}
\listoffigures
\addcontentsline{toc}{chapter}{\listfigurename}
}
% --------------------------------------------------------------------------------------------------------------------------------
% List of Tables
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\inserttot}[1]{
\renewcommand{\listtablename}{#1}
\listoftables
\addcontentsline{toc}{chapter}{\listtablename}
}
% --------------------------------------------------------------------------------------------------------------------------------
% List of Listings
% --------------------------------------------------------------------------------------------------------------------------------
\newcommand{\inserttol}[1]{
\renewcommand{\lstlistlistingname}{#1}
\lstlistoflistings
\addcontentsline{toc}{chapter}{\lstlistlistingname}
}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{preamble}[2018/12/01 Document Preamble]
% --------------------------------------------------------------------------------------------------------------------------------
% Document definitions
% --------------------------------------------------------------------------------------------------------------------------------
\RequirePackage{custom}
% ----------------------------------------------------------------------------------------------------------------------------
% Input & Font Encoding
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[margin=2.5cm,bottom=3cm]{geometry}
\RequirePackage{setspace}
% ----------------------------------------------------------------------------------------------------------------------------
% Bibliography/References
% Font Style
% ----------------------------------------------------------------------------------------------------------------------------
% Choose between default font families: \rmdefault (roman), \sfdefault (serif), \ttdefault (monospace)
\renewcommand\familydefault{\rmdefault}
% Choose between available fonts: e.g., palatino, helvet, lmodern, kpfonts, libertine, mathpazo
\RequirePackage{palatino}
% ----------------------------------------------------------------------------------------------------------------------------
% Colors
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{xcolor}
\RequirePackage{twcolors}
% Colors
\def\primarycolor{tw-blue}
\def\secondarycolor{tw-green}
\def\accentcolor{tw-gray}
% ----------------------------------------------------------------------------------------------------------------------------
% TikZ
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{tikz}
% ----------------------------------------------------------------------------------------------------------------------------
% \RequirePackage{hyperref}
% Hyperlinks
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{hyperref}
\hypersetup{pdftitle={Demonstration}}
\hypersetup{
colorlinks = true,
anchorcolor = black,
% linkcolor = tw-blue,
linkcolor = black,
citecolor = tw-blue,
urlcolor = tw-blue
}
% \hypersetup{
% colorlinks = false,
% linkbordercolor = tw-green,
% anchorcolor= tw-green,
% citebordercolor = tw-gray!50,
% urlbordercolor = tw-blue,
% }
% ----------------------------------------------------------------------------------------------------------------------------
% Bibliography/References
......@@ -19,20 +69,19 @@
% ----------------------------------------------------------------------------------------------------------------------------
% Equations
% ----------------------------------------------------------------------------------------------------------------------------
\usepackage{amsmath}
\RequirePackage{amsmath}
% ----------------------------------------------------------------------------------------------------------------------------
% Acronyms
% ----------------------------------------------------------------------------------------------------------------------------
% \RequirePackage[hyperref=true]{acro}
\RequirePackage{acro}
\RequirePackage[hyperref=true]{acro}
\RequirePackage{enumitem}
\acsetup{ first-long-format = \itshape }
\acsetup{ list-foreign-format = \itshape\acroenparen }
\acsetup{first-long-format=\itshape}
\acsetup{list-foreign-format=\itshape\acroenparen}
\newlist{acronyms}{description}{1}
\setlist[acronyms]{labelwidth = 5em}
\DeclareAcroListStyle{acrostyle}{list}{ list = acronyms }
\acsetup{ list-style = acrostyle }
\setlist[acronyms]{labelwidth=5em}
\DeclareAcroListStyle{acrostyle}{list}{list=acronyms}
\acsetup{list-style=acrostyle}
\input{acronyms}
% ----------------------------------------------------------------------------------------------------------------------------
......@@ -46,6 +95,10 @@
\RequirePackage[binary-units]{siunitx}
\RequirePackage{xfrac}
\sisetup{quotient-mode=fraction,fraction-function=\sfrac,product-units=single,exponent-product=\times}
\DeclareSIUnit\Byte{\text{byte}}
\DeclareSIUnit\Bytes{\text{bytes}}
\DeclareSIUnit\Bit{\text{bit}}
\DeclareSIUnit\Bits{\text{bits}}
% ----------------------------------------------------------------------------------------------------------------------------
% Tables
......@@ -55,9 +108,30 @@
\RequirePackage{multicol}
% ----------------------------------------------------------------------------------------------------------------------------
% TikZ
% Listings
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{tikz}
\RequirePackage{listings}
\lstloadlanguages{[ISO]C++}
\definecolor{c-violett}{RGB}{120,28,206}
\lstdefinestyle{c} {
language={[ISO]C++},
frame=shadowbox,
framexleftmargin=8mm,
rulesepcolor=\color{\accentcolor!50},
basicstyle=\ttfamily\footnotesize,
commentstyle=\color{\secondarycolor},
stringstyle=\color{ttw-violett},
keywordstyle=\bfseries\color{\primarycolor},
directivestyle=\color{c-violett},
emphstyle=\color{c-violett},
captionpos=b,
numbers=left,
numberstyle=\ttfamily\color{\accentcolor},
tabsize=3,
morekeywords={nullptr},
showlines=true
}
% ----------------------------------------------------------------------------------------------------------------------------
% Miscellaneous
......@@ -66,11 +140,8 @@
\RequirePackage{graphicx}
\RequirePackage{textcomp}
% ----------------------------------------------------------------------------------------------------------------------------
% Colors
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{xcolor}
% TODO: provide examples
% \usepackage{usebib}
% \RequirePackage{usebib}
% \bibinput{references}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{twcolors}[2018/11/23 FHTW Colors]
\RequirePackage{xcolor}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define fhtw ci colors
\definecolor{tw-blue}{RGB}{0, 101, 156}
\definecolor{tw-green}{RGB}{140, 177, 16}
\definecolor{tw-gray}{RGB}{113, 120, 125}
% non-ci, but useful
\definecolor{tw-black}{RGB}{0,0,0}
\definecolor{ttw-blue}{RGB}{28,98,182}
\definecolor{ttw-violett}{RGB}{197,10,140}
\definecolor{ttw-green}{RGB}{128,204,39}
\definecolor{ttw-red}{RGB}{238,49,32}
\definecolor{ttw-gray}{RGB}{100,104,108}
\definecolor{ttw-lightblue}{RGB}{0,173,239}
\definecolor{ttw-lightorange}{RGB}{251,198,7}
\definecolor{ttw-lightgreen}{RGB}{192,223,19}
\definecolor{ttw-yellow}{RGB}{255,242,0}
\definecolor{ttw-darkcyan}{RGB}{0,168,144}
\ No newline at end of file
\documentclass{standalone}
\documentclass[class=book]{standalone}
\usepackage{preamble}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment