Skip to content

Commit

Permalink
beginning of some qol stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex committed Nov 26, 2021
1 parent b8cf0d5 commit cfcb4ad
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 252 deletions.
49 changes: 30 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
*.aux
*.log
*.out
*.gz
*.toc
*.pdf
*.bcf
*.blg
*.bbl
*.run.xml
*.fls
*.fdb_latexmk
*.synctex.gz
*.synctex(busy)
*.lof
*.xdv
*.alt
*.lot
*.acr
# ignore all
**

!.gitignore
!*.[texbimdatsh]
!*.editorconfig

!.github/
!.github/workflows
!.github/workflows/**

!.vscode/
!.vscode/**

!assets/
!assets/img/
!assets/img/.gitkeep
# uncomment this to check in pictures
# !assets/img/*.[jpng]
!assets/readme/
!assets/readme/*.[jpng]

!build/
!build/template.tex
!build/components/
!build/components/*.tex
!build/components/*.cbx

!build/test/
!build/test/*.[jpngtex]
106 changes: 0 additions & 106 deletions build/components/com.tex

This file was deleted.

46 changes: 46 additions & 0 deletions build/components/commands.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
% hier stehen eigen definierte Befehle die Projektweit verwendet werden können

% dhgefigure -> ...
\DeclareDocumentCommand{\dhgefigure}{O{h} m m m m O{} O{}}
{
\begin{figure}[#1]
\begin{center}
\includegraphics[#3]{#2}
\end{center}
\caption{#4}
\label{#5}

\ifx #6\empty
\else\ifx
#7\empty
\else
{\small \protect \textbf{Quelle:} \cite[#7]{#6}}
\fi
\fi

\end{figure}
}

% new command -> \doubleunderline
\newcommand{\doubleunderline}[1]{
\underline{\underline{#1}}
}

% formatierung der ba teile Autorreferat und Thesenblatt
\newcommand{\baFormat}[2]{
\begin{center}
{\LARGE\bf #1}

\vspace{0.7cm}
{\large\bf\enquote{\CTITLE}}

\vspace{0.5cm}
von \CAUTHOR
\end{center}

\vspace{1.5cm}

{#2}

\cleardoublepage
}
98 changes: 45 additions & 53 deletions build/components/deckblatt.tex
Original file line number Diff line number Diff line change
@@ -1,73 +1,65 @@
% definitions section
% legt den hSpace fest um die Einträge mittig zu platzieren
\def\defaultHSpace{0.45\textwidth}

\newcommand{\markBox}[2]
{
\ifnum#1 = 1
\def\checkboxes{#2 {$\boxtimes$} #2 {$\square$} #2 {$\square$} #2 {$\square$}}
\else\ifnum#1 = 2
\def\checkboxes{#2 {$\square$} #2 {$\boxtimes$} #2 {$\square$} #2 {$\square$}}
\else\ifnum#1 = 3
\def\checkboxes{#2 {$\square$} #2 {$\square$} #2 {$\boxtimes$} #2 {$\square$}}
\else\ifnum#1 = 4
\def\checkboxes{#2 {$\square$} #2 {$\square$} #2 {$\square$} #2 {$\boxtimes$}}
\else
\def\checkboxes{#2 {$\square$} #2 {$\square$} #2 {$\square$} #2 {$\square$}}
\fi\fi\fi\fi

\hspace*{-.5cm}\checkboxes
}

% defines how entries should be displayed
\newcommand{\deckblattEntry}[2] {
\begin{tabular}{rl}
\hspace{\defaultHSpace} & \\ #1: & #2
\end{tabular}
% folgende newline ist notwendig damit die Formatierung angewendet wird

}

% deckblatt struktur
\vspace{\fill}
\maketitle

\if\CARBEIT B

\begin{center}
{\LARGE\bf Bachelorarbeit}

\vspace{0.5cm}vorgelegt am \CDATUM
\end{center}

\vspace{1cm}

\def\BETREUER{Gutachter}
\def\BETREUER{Gutachter} % TODO move out of deckblatt

\else

\begin{tabular}{rcccc}
\hspace{0.45\textwidth} & I & II & III & IV \\
{Projektarbeit Nr.} \markBox{\CARBEIT}{&}
\hspace{\defaultHSpace} & I & II & III & IV \\
{Projektarbeit Nr.} \markBox{\CARBEIT}{&}
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
vorgelegt am: & \CDATUM
\end{tabular}

\def\BETREUER{Betreuer}

\deckblattEntry{vorgelegt am}{\CDATUM}
\def\BETREUER{Betreuer} % TODO move out of deckblatt
\fi

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
von: & \CAUTHOR
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
Matrikelnummer: & \CMATRIKEL
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
DHGE Campus: & \CCAMPUS
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
Studienbereich: & \CBEREICH
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
Studiengang: & \CSTUDIENGANG
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
Kurs: & \CKURS
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
Ausbildungsstätte: & \CBETRIEB
\end{tabular}

\begin{tabular}{rl}
\hspace{0.45\textwidth} & \\
\BETREUER: & \CBETREUER
\end{tabular}
\deckblattEntry{von}{\CAUTHOR}
\deckblattEntry{Matrikelnummer}{\CMATRIKEL}
\deckblattEntry{DHGE Campus}{\CCAMPUS}
\deckblattEntry{Studienbereich}{\CBEREICH}
\deckblattEntry{Studiengang}{\CSTUDIENGANG}
\deckblattEntry{Kurs}{\CKURS}
\deckblattEntry{Ausbildungsstätte}{\CBETRIEB}
\deckblattEntry{\BETREUER}{\CBETREUER}

\vspace*{\fill}

Expand Down
45 changes: 45 additions & 0 deletions build/components/setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,51 @@
\def\input@path{{../}{path1/}}
\makeatother




% definiert eine neue Liste für das Anlagenverzeichnis
\newcommand{\listexamplename}{\vspace*{-20pt}}
\newlistof{anlagen}{alt}{\listexamplename} % TODO das ist defintiv kein example mehr lol

% Befehl welcher ein Item dem Anlagenverzeichnis hinzufügt
\newcommand{\ATA}[1]{%
\def\fig{fig}
\def\tab{tab}

\ifx\fig\typeOfCap
\def\type{\thefigure}
\def\name{Abb.\hspace{8pt}}
\else \ifx\tab\typeOfCap
\def\type{\thetable}
\def\name{Tab.\hspace{10pt}}
\fi
\fi
\setcounter{anlagen}{\type}

% only here because the \type-counter is one lower (later it will count up like normal)
% -> reason... it's called to early but can't called later because of dependencies other types LUL
% works only in the last section of the paper so it should be fine :)
\refstepcounter{anlagen}

\addcontentsline{alt}{anlagen}
{\name\protect\numberline{\theanlagen}\quad#1}\par
}

\newtotcounter{anlagenentries}
\newcommand{\renewFigTabCap} {
% caption ruft jetzt \ATA{} auf welches das jeweilige Objekt zum "Anlageverzeichnis" hinzufügt
\let\oldCap=\caption
\renewcommand{\caption}[1]{\ATA{##1}\oldCap{##1}}

% redefine table and figure -> table and figure set a global variable on the specific value
\let\oldTab=\table
\renewcommand{\table}{\def\typeOfCap{tab}\stepcounter{anlagenentries}\oldTab}

\let\oldFig=\figure
\renewcommand{\figure}{\def\typeOfCap{fig}\stepcounter{anlagenentries}\oldFig}
}

% define the old CAUTHOR variable
\def\CAUTHOR{\CAUTHORVOR\ \CAUTHORNACH}

Expand Down
Loading

0 comments on commit cfcb4ad

Please sign in to comment.