-
Notifications
You must be signed in to change notification settings - Fork 45
/
proposal.sty
169 lines (147 loc) · 5.14 KB
/
proposal.sty
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
\ProvidesPackage{proposal}[2018/02/27]
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage[ngerman, english]{babel}
\usepackage{amsmath}
%\usepackage[hidelinks]{hyperref}
\usepackage{microtype}
\usepackage{csquotes}
\usepackage[headheight = 28pt, tmargin = 70pt, lmargin = 55pt, rmargin = 55pt, bmargin = 70pt]{geometry}
\usepackage[exponent-product = \cdot]{siunitx}
\usepackage{rotating}
\usepackage{helvet}
\usepackage[pagecontinue=false]{pageslts}
\pagenumbering{arabic}
\usepackage{scrlayer-scrpage}
\usepackage{eurosym}
\usepackage{fp}
\usepackage{pgfgantt}
\usepackage{xspace}
\usepackage{verbatim}
\usepackage{longtable}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{standalone}
\pgfplotsset{compat=newest}
\usepackage[backend = biber,
style = numeric, %alphabetic, numeric
firstinits = true,
natbib = true,
url=false,
doi=true,
eprint=true,
isbn=false,
defernumbers=true,
labelnumber,
hyperref = true,
maxbibnames = 10,
sorting=none,%remove this to have things sorted, e.g. use style=alphabetic
]{biblatex}
\renewcommand*{\labelalphaothers}{}
% bibliography (from dfgproposal.cls from https://github.com/klb2/dfg-proposal-template)
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\renewbibmacro*{cite}{%
\printtext[bibhyperref]{%
\printfield{labelprefix}%
\ifcategory{reviewed}
{\printfield{labelnumber}}
{%
\ifcategory{nonreviewed}
{\printfield{labelnumber}}
{%
\printfield{labelnumber}%
\printfield{extraalpha}}}}}
% Here I changed the labelalpha to labelnumber which is generally preferrable I think... who wants this ugly abbreviations of author names and year of publication
%\printfield{labelalpha}%
%\printfield{extraalpha}}}}}
\defbibenvironment{bibliographyNUM}
{\list
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
% necessary changes to make the selected references bold
\AtEveryBibitem{%
\ifcategory{important}%
{\hypersetup{urlcolor=impentry}\bfseries\color{impentry}}%
{}%
}
\AtEveryCitekey{%
\ifcategory{important}%
{\hypersetup{citecolor=impentry}\bfseries\color{impentry}}%
{}%
}
% To also colorize the labels in the bibliography:
\AtBeginBibliography{%
\DeclareFieldFormat{labelnumberwidth}{%
\ifcategory{important}%
{\bfseries\color{impentry}\mkbibbrackets{#1}}%
{\mkbibbrackets{#1}}%
}}
%% von Hurenkindern und Schusterjungen
\clubpenalty = 10000
\widowpenalty = 10000 \displaywidowpenalty = 10000
%% weniger underful hboxes
\tolerance=3000
\emergencystretch=15pt
\hbadness=2000 %% too many underfull hbox warnings
%% keine zwei Trennstriche in untereinanderliegenden Zeilen
\hyphenpenalty 3000
\doublehyphendemerits 50000000
\newcommand{\total}{}
\newcommand{\pagenumtype}{arabic}
\DeclareOption{german}{
\sisetup{locale=DE}
\AtBeginDocument{\selectlanguage{ngerman}}
\renewcommand{\pagemark}{Seite \thepage~von \lastpageref{pagesLTS.\pagenumtype}}
\renewcommand{\total}{Summe}
}
\DeclareOption{english}{
\sisetup{locale=US}
\AtBeginDocument{\selectlanguage{english}}
\renewcommand{\pagemark}{page \thepage~of \lastpageref{pagesLTS.\pagenumtype}}
\renewcommand{\total}{Total}
}
\ExecuteOptions{german}
\ProcessOptions\relax
\ohead*{\pagemark}
\cfoot*{}
\chead{}
\newcommand{\backmatter}{
\clearpage
\pagenumbering{Roman}
\renewcommand{\pagenumtype}{Roman}
}
\KOMAoptions{paper=a4}
\KOMAoption{fontsize}{11pt}
\pagestyle{scrheadings}
\setkomafont{section}{\normalsize}
\setkomafont{subsection}{\normalsize}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\headfont}{\sffamily\footnotesize}
\setlength{\parskip}{0.5em}
\setlength{\parindent}{0em}
\newcommand{\subsubsubsection}[1]{\paragraph{#1} \mbox{} \par}
\setcounter{secnumdepth}{5}
% Ensure that if round-precision is specified, the give number of decimals is printed (necessary for prices in Euro)
\sisetup{round-integer-to-decimal}
% Place this environment in funds section to automatically add up costs using the macro 'position'.
\newenvironment{funds}[1][]
% Define variable funds for calculation. Store argument (description of total) in new command.
{\def\funds{0.00} \newcommand{\totaldescr}{#1}}
% Print total of environment with provided description.
{\rule{\textwidth}{0.5pt} \par \total~\totaldescr \hfill \num[round-mode = places, round-precision = 2]{\funds}\,\euro}
% To be used inside a funds environment. Place text and add given price to totals.
\newcommand{\position}[2]{\par #1 \hfill \num[round-mode = places, round-precision = 2]{#2}\,\euro \FPeval{\funds}{\funds + #2}}
% Same as above but with multiples of a position.
\newcommand{\positionmul}[3]{\par #1 \hfill \num{#3} $\times$ \num[round-mode = places, round-precision = 2]{#2}\,\euro \FPeval{\funds}{\funds + #3*#2}}
% todonotes and a switch for final
\usepackage{ifthen}
\newboolean{finalcompile}