-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacros.tex
executable file
·152 lines (138 loc) · 5.58 KB
/
macros.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
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
%Creates the aau titlepage
\newcommand{\aautitlepage}[3]{%
{
%set up various length
\ifx\titlepageleftcolumnwidth\undefined
\newlength{\titlepageleftcolumnwidth}
\newlength{\titlepagerightcolumnwidth}
\fi
\setlength{\titlepageleftcolumnwidth}{0.5\textwidth-\tabcolsep}
\setlength{\titlepagerightcolumnwidth}{\textwidth-2\tabcolsep-\titlepageleftcolumnwidth}
%create title page
\thispagestyle{empty}
\noindent%
\begin{tabular}{@{}ll@{}}
\parbox{\titlepageleftcolumnwidth}{
\iflanguage{danish}{%
\includegraphics[width=\titlepageleftcolumnwidth]{aau_logo_da.pdf}
}{%
\includegraphics[width=\titlepageleftcolumnwidth]{aau_logo_en.pdf}
}
} &
\parbox{\titlepagerightcolumnwidth}{\raggedleft\sf\small
#2
}\bigskip\\
#1 &
\parbox[t]{\titlepagerightcolumnwidth}{%
\textbf{Abstract:}\smallskip\par
\fbox{\parbox{\titlepagerightcolumnwidth-2\fboxsep-2\fboxrule}{%
#3
}}
}\\
\end{tabular}
\vfill
\vspace{-0.5cm}
\iflanguage{danish}{%
\noindent{\footnotesize\emph{Rapportens indhold er frit tilgængeligt, men offentliggørelse (med kildeangivelse) må kun ske efter aftale med forfatterne.}}
}{%
\noindent{\footnotesize\emph{The content of this report is freely available, but publication (with reference) may only be pursued due to agreement with the author.}}
}
\clearpage
}
}
%Create english project info
\newcommand{\englishprojectinfo}[8]{%
\parbox[t]{\titlepageleftcolumnwidth}{
\textbf{Title:}\\ #1\bigskip\par
\textbf{Theme:}\\ #2\bigskip\par
\textbf{Project Period:}\\ #3\bigskip\par
\textbf{Project Group:}\\ #4\bigskip\par
\textbf{Participant(s):}\\ #5\bigskip\par
\textbf{Supervisor(s):}\\ #6\bigskip\par
\textbf{Copies:} #7\bigskip\par
\textbf{Page Numbers:} Fucking mange!\bigskip\par
\textbf{Date of Completion:}\\ #8
}
}
%Create danish project info
\newcommand{\danishprojectinfo}[8]{%
\parbox[t]{\titlepageleftcolumnwidth}{
\textbf{Title:}\\ #1\bigskip\par
\textbf{Theme:}\\ #2\bigskip\par
\textbf{Project Period:}\\ #3\bigskip\par
\textbf{Project Group:}\\ #4\bigskip\par
\textbf{Participants:}\\ #5\bigskip\par
\textbf{Supervisor:}\\ #6\bigskip\par
\textbf{Copies:} #7\bigskip\par
\textbf{Page Numbers:} ??
\bigskip\par
\textbf{Date of Completion:}\\ #8
}
}
\newcommand{\iic}[0]{I²C }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% An example environment %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\normalfont}
\theoremstyle{break}
\def\theoremframecommand{{\color{aaublue!50}\vrule width 5pt \hspace{5pt}}}
\newshadedtheorem{exa}{Example}[chapter]
\newenvironment{example}[1]{%
\begin{exa}[#1]
}{%
\end{exa}
}
\makeatletter
\newcommand{\ChapterOutsidePart}{%
\def\toclevel@chapter{-1}\def\toclevel@section{0}\def\toclevel@subsection{1}}
\newcommand{\ChapterInsidePart}{%
\def\toclevel@chapter{0}\def\toclevel@section{1}\def\toclevel@subsection{2}}
\makeatother
\usepackage{bookmark}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% USEFULL MACROES %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Units:
\newcommand{\unit}[1]{&& \left[\si{#1}\right]} %\newcommand{\unit}[1]{[\si{#1}]} <<| Use these if you want equations to be
\newcommand{\unitWh}[1]{[\si{#1}]} %\newcommand{\eq}[2]{&&\si{#1} &= \si{#2}&&} <<| centered.. .. will be appear scrambled
\newcommand{\numUnit}[1]{\ \si{#1}&} % | from one equation to the next though..
%Equation: % | and does not work with long equations.. :/
\newcommand{\eq}[2]{\si{#1} &= \si{#2}}
\newcommand{\arw}{&& &\Updownarrow&&}
%Text:
\newcommand{\tx}[1]{\text{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REFERENCES %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Chapter
\newcommand{\chapref}[1]{\emph{Chapter \ref{#1}}} %:\textbf{ \nameref{#1}}}}
%Section
\newcommand{\secref}[1]{\emph{Section \ref{#1}}} %:\textbf{ \nameref{#1}}}}
%subSection
\newcommand{\subsecref}[1]{\emph{Subsection \ref{#1}}} %:\textbf{ \nameref{#1}}}}
%Appendix
\newcommand{\appref}[1]{\emph{Appendix \ref{#1}}} %:\textbf{ \nameref{#1}}}}
%Listings
\newcommand{\coderef}[1]{\emph{Listings: \ref{#1}}}
%Figure:
\newcommand{\figref}[1]{\emph{Figure \ref{#1}}}
%Table:
\newcommand{\tableref}[1]{\emph{Table \ref{#1}}}
%Equations:
%1 equation:
\renewcommand{\eqref}[1]{\emph{Equation (\ref{#1})}}
%2 equations:
\newcommand{\eqrefTwo}[2]{\emph{Equation (\ref{#1})} and \emph{(\ref{#2})}}
%3 equations:
\newcommand{\eqrefThree}[3]{\emph{Equation (\ref{#1})}, \emph{(\ref{#2})} and \emph{(\ref{#3})}}
%4 equations:
\newcommand{\eqrefFour}[4]{\emph{Equation (\ref{#1})}, \emph{(\ref{#2})}, \emph{(\ref{#3})} and \emph{(\ref{#4})}}
%5 equations:
\newcommand{\eqrefFive}[5]{\emph{Equation (\ref{#1})}, \emph{(\ref{#2})}, \emph{(\ref{#3})}, \emph{(\ref{#4})} and \emph{(\ref{#5})}}
%6 equations:
\newcommand{\eqrefSix}[6]{\emph{Equation (\ref{#1})}, \emph{(\ref{#2})}, \emph{(\ref{#3})}, \emph{(\ref{#4})}, \emph{(\ref{#5})} and \emph{(\ref{#6})}}
%7 equations:
\newcommand{\eqrefSeven}[7]{\emph{Equation (\ref{#1})}, \emph{(\ref{#2})}, \emph{(\ref{#3})}, \emph{(\ref{#4})}, \emph{(\ref{#5})}, \emph{(\ref{#6})} and \emph{(\ref{#7})}}