1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-06-26 11:09:04 +00:00

updated main.tex

This commit is contained in:
chhan11 2017-05-23 10:00:36 +02:00
parent ece2df93e8
commit c8b4282bad

View file

@ -21,6 +21,7 @@
\usepackage{varwidth} \usepackage{varwidth}
\usepackage{enumitem} \usepackage{enumitem}
\geometry{a4paper,margin=4em}
% Define color % Define color
\definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegreen}{rgb}{0,0.6,0}
@ -53,7 +54,6 @@
% to the file main.tex % to the file main.tex
\graphicspath{{img/}{figures/}} \graphicspath{{img/}{figures/}}
% Custom commands
% Usage: \pic[<pct-of-columnwidth>]{<path-to-file>} % Usage: \pic[<pct-of-columnwidth>]{<path-to-file>}
\newcommand{\pic}[2][50]{ \newcommand{\pic}[2][50]{
\begin{center} \begin{center}
@ -61,8 +61,9 @@
\includegraphics[width=0.#1\columnwidth]{#2} \includegraphics[width=0.#1\columnwidth]{#2}
\end{center} \end{center}
} }
% Usage: \fig{<path-to-file>}{<label>}{<caption>} % Usage: \fig{<path-to-file>}{<label>}{<caption>}
\newcommand{\fig}[3]{ \newcommand{\fig}[4]{
\begin{figure}[h] \begin{figure}[h]
\centering \centering
\includegraphics[width=0.95\columnwidth]{#1} \includegraphics[width=0.95\columnwidth]{#1}
@ -71,6 +72,16 @@
\end{figure} \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]{% \newcommand{\notice}[2]{%
\shadowbox{% \shadowbox{%
\begin{varwidth}{0.85\linewidth} \begin{varwidth}{0.85\linewidth}
@ -85,14 +96,7 @@
% 1. Low-quality JPG % 1. Low-quality JPG
% 2. Med-quality PNG % 2. Med-quality PNG
% 3. High-quality PDF % 3. High-quality PDF
\DeclareGraphicsExtensions{.jpg,.png,.pdf} \DeclareGraphicsExtensions{.jpg,.png,.pdf,.svg}
% Package Params
\geometry{a4paper,margin=4em}
%\setlength{\parindent}{4em}
%\setlength{\parskip}{1em}
%\renewcommand{\baselinestretch}{2.0}
% Define fancy header and footer % Define fancy header and footer
\pagestyle{fancy} \pagestyle{fancy}
@ -112,6 +116,8 @@
\setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm} \setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm}
\setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm} \setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm}
\setlength{\headheight}{15pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % %
% BEGIN DOCUMENT % % BEGIN DOCUMENT %
@ -129,6 +135,8 @@
\tableofcontents \tableofcontents
%\setlength{\parindent}{4em}
% Define length between paragrahps % Define length between paragrahps
\setlength{\parskip}{0.35em} \setlength{\parskip}{0.35em}