-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic_layout.tex
95 lines (82 loc) · 2.34 KB
/
basic_layout.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\documentclass[12pt,a4paper]{article} %set font size to 12pt and use din A4 paper
%function to create global vars, which can be defined by
%\<VARNAME>{<VALUE>} and accessed by \get<VARNAME>
\makeatletter
\newcommand*\DefVar[1]{\@namedef{#1}##1{\global\@namedef{get#1}{##1}}}
\makeatother
%create needed globvars
\DefVar{Title}
\DefVar{AuthorName}
\DefVar{AuthorMatNr}
\DefVar{AuthorMail}
\DefVar{AuthorMailLink}
%set default values
\Title{Your Document Title}
\AuthorName{Your Name}
\AuthorMatNr{}
\AuthorMail{Your eMail address}
%setup some needed vars
\AuthorMailLink{\href{mailto:\getAuthorMail}{\getAuthorMail}}
%include needed packages, set language and document geometry(padding)
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel} %use new german dictionary to warp words
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{hyperref}
\usepackage[usenames,dvipsnames,svgnames,table,colortbl]{xcolor}
\usepackage{colortbl} %colored tables
\usepackage{tabularx} %better tables
\usepackage{siunitx} %si units
\usepackage{subfigure}
\usepackage{float}
\usepackage[german]{fancyref}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
%setup siunit for german documents and geophysics
\sisetup{
quotient-mode = fraction,
fraction-function = \tfrac,
output-decimal-marker = {,},
per-mode = symbol,
group-minimum-digits = 6,
group-separator = \text{~},
exponent-product = \cdot,
output-product = \cdot
}
\DeclareSIUnit\gon{gon}
\DeclareSIUnit\mgon{\milli\gon}
\DeclareSIUnit\px{px}
%set line spacing
\linespread{1.50}
%smooth gray
\definecolor{smoothgray}{HTML}{EEEFFF}
%don't draw ugly boxes around hyperlinks, just display them like normal text
\hypersetup{unicode=true,colorlinks=true,linkcolor=black,filecolor=black,urlcolor=black}
%setup page style
\pagestyle{fancy}
\fancyhead{} \fancyfoot{}
\fancyhf[HL]{
\getAuthorName \\
\footnotesize{\href{mailto:\getAuthorMail}{\getAuthorMail}}
}
\fancyhf[HR]{
\textsc{\getTitle} \\
\footnotesize{}
}
\fancyhf[FL]{
{\footnotesize Matr.Nr.:} $\getAuthorMatNr$
}
\fancyhf[FR]{
\thepage /\pageref{LastPage}
}
\author{
\getAuthorName\\
Matrikelnummer: \textit{\getAuthorMatNr}\\
Email: \textit{\href{mailto:\getAuthorMail}{\getAuthorMail}}\\\\
}
\title{\getTitle}