Skip to content
Snippets Groups Projects
config.tex 3.18 KiB
Newer Older
  • Learn to ignore specific revisions
  • % abbreviations for names:
    
    \if@german
    	\renewcommand{\abstractname}{Abstract} % Abstract
    	\renewcaptionname{ngerman}{\figurename}{Abb.} %Figure
    	\renewcaptionname{ngerman}{\tablename}{Tab.} %Table
    \else
    	\renewcaptionname{english}{\figurename}{Fig.} %Figure
    	\renewcaptionname{english}{\tablename}{Tab.} %Table
    \fi
    
    Jan Wille's avatar
    Jan Wille committed
    
    
    % center all floats:
    
    Jan Wille's avatar
    Jan Wille committed
    \ifx\KOMAScriptVersion\undefined\else % check if KOMA is used
    	\g@addto@macro\@floatboxreset\centering % center all floats
    	\setcapwidth[c]{0.8\textwidth} % center all captions
    
    Jan Wille's avatar
    Jan Wille committed
    	%\setcapwidth[l]{0.8\textwidth} % leftalign all captions
    
    Jan Wille's avatar
    Jan Wille committed
    \fi
    
    % Meta Data for the PDF file using values from personal.tex:
    \@ifpackageloaded{hyperref}{
    	\hypersetup{
    		pdfinfo={
    			Title={\@title},
    			Author={\@author},
    			Subject={\@subject},
    			Keywords={\@keywords}
    		}
    	}
    }{}%
    
    % configs for optional packages:
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{biblatex}{
    	\ExecuteBibliographyOptions{
    		bibwarn=true,
    
    Jan Wille's avatar
    Jan Wille committed
    		url=true,
    
    Jan Wille's avatar
    Jan Wille committed
    		isbn=false,
    	}
    
    }{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{siunitx}{
    
    Jan Wille's avatar
    Jan Wille committed
    	\if@german % if german
    		\sisetup{output-decimal-marker={,}} % use comma as dezimal
    
    Jan Wille's avatar
    Jan Wille committed
    	\fi
    
    Jan Wille's avatar
    Jan Wille committed
    	\sisetup{
    		tight-spacing=true,
    		per-mode=symbol,
    		scientific-notation=engineering,
    
    Jan Wille's avatar
    Jan Wille committed
    		% exponent-to-prefix, % use this instead of sci-notatio
    		round-mode = places, % round numbers
    		round-precision = 3, % to 3 places
    
    Jan Wille's avatar
    Jan Wille committed
    	}
    
    }{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{listings}{
    	\lstset{
    		commentstyle=\color{gray},
    		keywordstyle=\color{red},
    		stringstyle=\color{blue},
    		showstringspaces=false,
    
    Jan Wille's avatar
    Jan Wille committed
    		basicstyle=\ttfamily,
    
    Jan Wille's avatar
    Jan Wille committed
    		tabsize=4,
    
    		literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1,
    		escapeinside={(*@}{@*)},
    
    Jan Wille's avatar
    Jan Wille committed
    	}
    
    }{}%
    
    \@ifpackageloaded{enumitem}{
    
    	\usepackage{amssymb}
    
    	\newlist{checklist}{itemize}{2}
    	\setlist[checklist]{label=$\square$}
    }{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{csvsimple}{
    	\csvstyle{every csv}{separator=semicolon}
    
    }{}%
    
    \@ifpackageloaded{circuitikz}{
    
    	\ctikzset{
    		font=\footnotesize,
    		bipole annotation style/.style={font=\tiny ,inner sep=1pt},
    	}
    
    }{}%
    
    \@ifpackageloaded{pgfplots}{
    	\usepgfplotslibrary{fillbetween} % mark areas under or between graphs
    
    Jan Wille's avatar
    Jan Wille committed
    	\usetikzlibrary{patterns} % for using pattern in plots
    
    Jan Wille's avatar
    Jan Wille committed
    	\if@german
    		\pgfplotsset{/pgf/number format/use comma}
    	\fi
    
    	\pgfplotsset{
    		compat=1.16,
    		/pgf/number format/read comma as period,
    		every tick label/.append style={font=\tiny},
    		every axis legend/.append style={font=\footnotesize},
    		MyPlots/.style = {		% Style für alle Plots
    			width=.6\textwidth,
    			grid=major,												% Gitter für haupt Ticks
    
    Jan Wille's avatar
    Jan Wille committed
    			grid style={dashed,gray!50},							% Hintergrund Gitter
    			legend pos=outer north east,							% Position der Legende
    
    			FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100},  	% Format 1
    			FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, 		% Format 2
    			FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3
    			FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, 	% Format 4
    			FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5
    
    Jan Wille's avatar
    Jan Wille committed
    			errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken
    
    							error mark options={mark size=1pt,rotate=90}},
    		}
    	}
    
    }{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{pgfplotstable}{
    
    	\pgfplotstableset{
    		col sep=semicolon, % global seperator for csv files
    	}
    
    }{}%