mirror of
https://gitlab.com/netravnen/NetworkLabNotes.git
synced 2024-11-23 19:17:54 +00:00
Updated and restructrued files, with layout seperated to structure.tex
This commit is contained in:
parent
c8b4282bad
commit
bc71224388
36
commands.tex
Normal file
36
commands.tex
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
% Usage: \pic[<pct-of-columnwidth>]{<path-to-file>}
|
||||||
|
\newcommand{\pic}[2][50]{
|
||||||
|
\begin{center}
|
||||||
|
\transparent{0.4}
|
||||||
|
\includegraphics[width=0.#1\columnwidth]{#2}
|
||||||
|
\end{center}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Usage: \fig{<path-to-file>}{<label>}{<caption>}
|
||||||
|
\newcommand{\fig}[4]{
|
||||||
|
\begin{figure}[h]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.95\columnwidth]{#1}
|
||||||
|
\caption{#3}
|
||||||
|
\label{fig:#2}
|
||||||
|
\end{figure}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Usage: \svg{<path-to-file>}{<label>}{<caption>}
|
||||||
|
\newcommand{\svg}[3]{
|
||||||
|
\begin{figure}[h]
|
||||||
|
\centering
|
||||||
|
\includesvg{#1}
|
||||||
|
\caption{#3}
|
||||||
|
\label{fig:#2}
|
||||||
|
\end{figure}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\notice}[2]{%
|
||||||
|
\shadowbox{%
|
||||||
|
\begin{varwidth}{0.85\linewidth}
|
||||||
|
\texttt{\textbf{#1}}\\
|
||||||
|
#2
|
||||||
|
\end{varwidth}
|
||||||
|
}
|
||||||
|
}
|
BIN
img/profilepic/pic1.png
Normal file
BIN
img/profilepic/pic1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
4
layout/color.tex
Normal file
4
layout/color.tex
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
\definecolor{codegreen}{rgb}{0,0.6,0}
|
||||||
|
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
||||||
|
\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
||||||
|
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
119
main.tex
119
main.tex
|
@ -1,122 +1,7 @@
|
||||||
% Declare Document Class
|
% Declare Document Class
|
||||||
\documentclass[a4paper,12pt,twoside,twocolumn]{book}
|
\documentclass[a4paper,12pt,twoside,twocolumn]{book}
|
||||||
|
|
||||||
\setlength{\columnsep}{2em}
|
\input{structure} % Load structure cfg for document
|
||||||
|
|
||||||
% Latex Packages
|
|
||||||
\usepackage[T1]{fontenc}
|
|
||||||
\usepackage[utf8]{inputenc}
|
|
||||||
\usepackage{lmodern}
|
|
||||||
\usepackage{geometry}
|
|
||||||
\usepackage{listings}
|
|
||||||
\usepackage{color}
|
|
||||||
\usepackage{graphicx}
|
|
||||||
\usepackage{float}
|
|
||||||
\usepackage[english]{babel}
|
|
||||||
\usepackage{fancyhdr}
|
|
||||||
\usepackage{wrapfig}
|
|
||||||
\usepackage{array}
|
|
||||||
\usepackage{lipsum}
|
|
||||||
\usepackage{fancybox}
|
|
||||||
\usepackage{varwidth}
|
|
||||||
\usepackage{enumitem}
|
|
||||||
|
|
||||||
\geometry{a4paper,margin=4em}
|
|
||||||
|
|
||||||
% Define color
|
|
||||||
\definecolor{codegreen}{rgb}{0,0.6,0}
|
|
||||||
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
|
||||||
\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
|
||||||
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
|
||||||
|
|
||||||
\lstdefinestyle{mystyle}{
|
|
||||||
backgroundcolor=\color{backcolour},
|
|
||||||
commentstyle=\color{codegreen},
|
|
||||||
keywordstyle=\color{magenta},
|
|
||||||
numberstyle=\tiny\color{codegray},
|
|
||||||
stringstyle=\color{codepurple},
|
|
||||||
basicstyle=\footnotesize,
|
|
||||||
breakatwhitespace=false,
|
|
||||||
breaklines=true,
|
|
||||||
captionpos=b,
|
|
||||||
keepspaces=true,
|
|
||||||
numbers=left,
|
|
||||||
numbersep=5pt,
|
|
||||||
showspaces=false,
|
|
||||||
showstringspaces=false,
|
|
||||||
showtabs=false,
|
|
||||||
tabsize=4
|
|
||||||
}
|
|
||||||
|
|
||||||
\lstset{style=mystyle}
|
|
||||||
|
|
||||||
% Path where images are located relative
|
|
||||||
% to the file main.tex
|
|
||||||
\graphicspath{{img/}{figures/}}
|
|
||||||
|
|
||||||
% Usage: \pic[<pct-of-columnwidth>]{<path-to-file>}
|
|
||||||
\newcommand{\pic}[2][50]{
|
|
||||||
\begin{center}
|
|
||||||
\transparent{0.4}
|
|
||||||
\includegraphics[width=0.#1\columnwidth]{#2}
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Usage: \fig{<path-to-file>}{<label>}{<caption>}
|
|
||||||
\newcommand{\fig}[4]{
|
|
||||||
\begin{figure}[h]
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=0.95\columnwidth]{#1}
|
|
||||||
\caption{#3}
|
|
||||||
\label{fig:#2}
|
|
||||||
\end{figure}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Usage: \svg{<path-to-file>}{<label>}{<caption>}
|
|
||||||
\newcommand{\svg}[3]{
|
|
||||||
\begin{figure}[h]
|
|
||||||
\centering
|
|
||||||
\includesvg{#1}
|
|
||||||
\caption{#3}
|
|
||||||
\label{fig:#2}
|
|
||||||
\end{figure}
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\notice}[2]{%
|
|
||||||
\shadowbox{%
|
|
||||||
\begin{varwidth}{0.85\linewidth}
|
|
||||||
\texttt{\textbf{#1}}\\
|
|
||||||
#2
|
|
||||||
\end{varwidth}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
% In which order to look after images in
|
|
||||||
% declared graphicspath{}'s
|
|
||||||
% 1. Low-quality JPG
|
|
||||||
% 2. Med-quality PNG
|
|
||||||
% 3. High-quality PDF
|
|
||||||
\DeclareGraphicsExtensions{.jpg,.png,.pdf,.svg}
|
|
||||||
|
|
||||||
% Define fancy header and footer
|
|
||||||
\pagestyle{fancy}
|
|
||||||
\fancyhf{}
|
|
||||||
\fancyhead[LE,RO]{ZBC}
|
|
||||||
\fancyhead[RE,LO]{\rightmark}
|
|
||||||
\fancyfoot[CE,CO]{\leftmark}
|
|
||||||
\fancyfoot[LE,RO]{\thepage}
|
|
||||||
|
|
||||||
% width of header and footer rule is by default 0px.
|
|
||||||
\renewcommand{\headrulewidth}{2pt}
|
|
||||||
\renewcommand{\footrulewidth}{1pt}
|
|
||||||
|
|
||||||
% Use the roman numeric system for pagenumbers
|
|
||||||
\pagenumbering{roman}
|
|
||||||
|
|
||||||
\setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm}
|
|
||||||
\setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm}
|
|
||||||
|
|
||||||
\setlength{\headheight}{15pt}
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% %
|
% %
|
||||||
|
@ -130,7 +15,7 @@
|
||||||
\title{r17dinh409}
|
\title{r17dinh409}
|
||||||
\author{Christoffer Hansen <zbcchhan11 at zbc.dk>}
|
\author{Christoffer Hansen <zbcchhan11 at zbc.dk>}
|
||||||
\date{May 22 - June 30, 2017}
|
\date{May 22 - June 30, 2017}
|
||||||
% Make title page contents
|
\titlepic{\includegraphics[width=0.3\textwidth]{profilepic/pic1}}
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
82
structure.tex
Normal file
82
structure.tex
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
% Latex Packages
|
||||||
|
\usepackage{import}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{lmodern}
|
||||||
|
\usepackage{geometry}
|
||||||
|
\usepackage{listings}
|
||||||
|
\usepackage{color}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{float}
|
||||||
|
\usepackage[english]{babel}
|
||||||
|
\usepackage{fancyhdr}
|
||||||
|
\usepackage{wrapfig}
|
||||||
|
\usepackage{array}
|
||||||
|
\usepackage{lipsum}
|
||||||
|
\usepackage{fancybox}
|
||||||
|
\usepackage{varwidth}
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\usepackage{titlepic}
|
||||||
|
|
||||||
|
|
||||||
|
\input{layout/color} % Load user-defined colors. Some which are used when generating source code listings
|
||||||
|
|
||||||
|
|
||||||
|
\geometry{a4paper,margin=4em}
|
||||||
|
|
||||||
|
|
||||||
|
\lstdefinestyle{mystyle}{
|
||||||
|
backgroundcolor=\color{backcolour},
|
||||||
|
commentstyle=\color{codegreen},
|
||||||
|
keywordstyle=\color{magenta},
|
||||||
|
numberstyle=\tiny\color{codegray},
|
||||||
|
stringstyle=\color{codepurple},
|
||||||
|
basicstyle=\footnotesize,
|
||||||
|
breakatwhitespace=false,
|
||||||
|
breaklines=true,
|
||||||
|
captionpos=b,
|
||||||
|
keepspaces=true,
|
||||||
|
numbers=left,
|
||||||
|
numbersep=5pt,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
showtabs=false,
|
||||||
|
tabsize=4
|
||||||
|
}
|
||||||
|
\lstset{style=mystyle}
|
||||||
|
|
||||||
|
% Path where images are located relative
|
||||||
|
% to the file main.tex
|
||||||
|
\graphicspath{{img/}{figures/}}
|
||||||
|
|
||||||
|
|
||||||
|
% In which order to look after images in
|
||||||
|
% declared graphicspath{}'s
|
||||||
|
% 1. Low-quality JPG
|
||||||
|
% 2. Med-quality PNG
|
||||||
|
% 3. High-quality PDF
|
||||||
|
\DeclareGraphicsExtensions{.jpg,.png,.pdf,.svg}
|
||||||
|
|
||||||
|
% Define fancy header and footer
|
||||||
|
\pagestyle{fancy}
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyhead[LE,RO]{ZBC}
|
||||||
|
\fancyhead[RE,LO]{\rightmark}
|
||||||
|
\fancyfoot[CE,CO]{\leftmark}
|
||||||
|
\fancyfoot[LE,RO]{\thepage}
|
||||||
|
|
||||||
|
% width of header and footer rule is by default 0px.
|
||||||
|
\renewcommand{\headrulewidth}{2pt}
|
||||||
|
\renewcommand{\footrulewidth}{1pt}
|
||||||
|
|
||||||
|
% Use the roman numeric system for pagenumbers
|
||||||
|
\pagenumbering{roman}
|
||||||
|
|
||||||
|
\setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm}
|
||||||
|
\setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm}
|
||||||
|
|
||||||
|
\setlength{\headheight}{15pt}
|
||||||
|
\setlength{\columnsep}{2em}
|
||||||
|
|
||||||
|
|
||||||
|
\subimport{./}{commands} % Import user-defined commands
|
Loading…
Reference in a new issue