Browse Source

Improve template (more clean and simple to configure)

master
Arthur Poulet 3 years ago
parent
commit
e9e1bb06aa
No known key found for this signature in database GPG Key ID: 86780B13B8B277CB
11 changed files with 171 additions and 135 deletions
  1. +8
    -0
      Makefile
  2. +14
    -0
      README.md
  3. +0
    -0
      appendices/Logo.jpg
  4. +13
    -21
      body.tex
  5. +1
    -0
      body/blablabla.tex
  6. +0
    -1
      glossary.tex
  7. +13
    -1
      header.tex
  8. +89
    -0
      packages.tex
  9. +0
    -1
      report.bib
  10. +12
    -100
      report.tex
  11. +21
    -11
      titlepage.tex

+ 8
- 0
Makefile View File

@@ -7,6 +7,12 @@ build: #build_one build_bib build_index build_two
bibtex $(NAME).aux
makeglossaries $(NAME)
makeindex -s $(NAME).ist -t $(NAME).glg -o $(NAME).gls $(NAME).glo

@echo
@echo
@echo "Glossaries finished. Rebuild latex."
@echo

pdflatex $(NAME).tex
pdflatex $(NAME).tex

@@ -21,9 +27,11 @@ build_index:
makeindex -s $(NAME).ist -t $(NAME).glg -o $(NAME).gls $(NAME).glo

clean:
@rm -vf output/*
@rm -vf *.log *.out *.aux *.pdf
@rm -vf *.bbl *.blg
@rm -vf *.gls* *.glo *.glg *.ist *.acn *.acr *.alg
@rm -vf *.toc
@rm -vf *.gz *.bak

.PHONY: all build build_one clean

+ 14
- 0
README.md View File

@@ -0,0 +1,14 @@
# My LaTeX Template

## Usage

1. Copy the template
2. Change the headers in ``/headers.tex``
3. Write accronyms in ``/report.tex``
4. Write your abstract, body, etc. in ``/body.tex``
5. Write the sources in ``/report.bib``

# About

- Author: Arthur Poulet
- Licence: CC-0

Logo.jpg → appendices/Logo.jpg View File


+ 13
- 21
body.tex View File

@@ -1,27 +1,19 @@
\begin{abstract}
\input{body/abstract.tex}
This document is about \gls{PCRE} and \gls{NIPS} and \gls{NIDS}...
\end{abstract}

\vspace*{2cm}
% \pagebreak
\section{Introduction}
\input{body/introduction.tex}

\pagebreak
%\vspace*{2cm}
% replace \medskip with \columnbreak before \section if needed

\setlength{\columnsep}{1cm}
\begin{multicols*}{2}
\raggedcolumns
\section{Blablabla}
\subsection{Blablabla} \input{body/blablabla.tex} \columnbreak
\subsection{Blablabla} \input{body/blablabla.tex} \columnbreak
\medskip
\section{Introduction}
\input{body/introduction.tex}

\section{Blablabla}
\subsection{Blablabla} \input{body/blablabla.tex} \columnbreak
\subsection{Blablabla} \input{body/blablabla.tex} \columnbreak
\end{multicols*}
\medskip
\section{First thing}
\subsection{Bla bla bla}
\input{body/blablabla.tex}

\pagebreak
%\vspace*{2cm}
\section{Conclusion} \input{body/conclusion.tex}
\medskip
\section{Conclusion}
\paragraph{}
This document shown that ...

+ 1
- 0
body/blablabla.tex View File

@@ -0,0 +1 @@
Blah blah blah

+ 0
- 1
glossary.tex View File

@@ -1,2 +1 @@
\newacronym{NIDS}{NIDS}{Network based Intrusion Detection System}


+ 13
- 1
header.tex View File

@@ -1,5 +1,17 @@
\newcommand{\mytitle}{Snort Intrusion Detection System}
\newcommand{\mytitle}{My LaTeX Template }
\newcommand{\myauthor}{Arthur \textsc{Poulet} \\ agp8@kent.ac.uk, 16909734}
\newcommand{\mysypervisor}{Dr. Perez Delgado Carlos}
\newcommand{\myuniversity}{University of Kent}
\newcommand{\mymajorcoursename}{Msc Computer Security}
\newcommand{\myminorcoursename}{CO8XX - LaTex}

\title{\mytitle}
\author{\myauthor}

%%%%%%%%%% METADATA %%%%%%%%%%
\loadglsentries[main]{glossary}
\makeglossaries
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Horizontal rule

% Configure abstract title
%\renewcommand{\abstractname}{}

+ 89
- 0
packages.tex View File

@@ -0,0 +1,89 @@
%%%%%% PACKAGES %%%%%
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[protrusion=true,expansion=true]{microtype}

%%% Lang / Locale
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

%%% Format
\usepackage{multicol} % multi colums
\usepackage[margin=2.6cm]{geometry} % margin
\usepackage{datetime} % dates formatted
\usepackage{abstract} % abstract

%%% Glossary and references
\usepackage[acronym]{glossaries} % acronyms
\usepackage[hidelinks]{hyperref} % removes ugly colored border arround the links
\usepackage[super]{natbib} % makes the reference as word¹
%\usepackage[comma]{natbib} % makes the reference as word¹
\usepackage{natbib} % references
\usepackage{url} % \url

%%% Code
\usepackage{listings} % embed code
\usepackage{xcolor} % colors with words

%%% Images
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,decorations.pathmorphing,backgrounds,positioning,fit,petri}\usepackage{caption}
\usepackage{xifthen}
\usepackage{capt-of}

%%% Math packages
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{graphicx}
\usepackage{url}

%%% Custom sectioning
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}

%%% Custom headers/footers (fancyhdr package)
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{} % No page header
\fancyfoot[L]{} % Empty
\fancyfoot[C]{} % Empty
\fancyfoot[R]{\thepage\space of \pageref{LastPage}} % Pagenumbering
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt}


%%% Equation and float numbering
\numberwithin{equation}{section} % Equation numbering: section.eq#
\numberwithin{figure}{section} % Figure numbering: section.fig#
\numberwithin{table}{section} % Table numbering: section.tab#

%%% CONFIGURATION
% Configure code embed
\hypersetup{pdfborder={0 0 0}}
\lstdefinestyle{colored}{
belowcaptionskip=1\baselineskip,
breaklines=true,
frame=L,
xleftmargin=\parindent,
language=Ruby,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
numberstyle=\color{red},
keywordstyle=\color{green},
commentstyle=\itshape\color{purple},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstset{escapechar=@,style=colored}

% ...
\usepackage{setspace}

%%% NEW Commands
\newcommand{\inlinecode}{\texttt}
%\newcommand{\italic}[1]{{\em #1}}
%\newcommand{\italicpl}[1]{{\em #1}{\em s}}

%\setcitestyle{authoryear,open={(},close={)}}

+ 0
- 1
report.bib View File

@@ -4,4 +4,3 @@ title = "RP Photonics Encyclopedia, Fibers",
author = "Dr. Rüdiger Paschotta",
year = 2006,
}


+ 12
- 100
report.tex View File

@@ -1,107 +1,16 @@
\documentclass[paper=a4, fontsize=11pt]{scrartcl}

%%%%%% PACKAGES %%%%%
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[protrusion=true,expansion=true]{microtype}

%%% Lang / Locale
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

%%% Format
\usepackage{multicol} % multi colums
\usepackage[margin=2.6cm]{geometry} % margin
\usepackage{datetime} % dates formatted
\usepackage{abstract} % abstract

%%% Glossary and references
\usepackage[acronym]{glossaries} % acronyms
\usepackage[hidelinks]{hyperref} % removes ugly colored border arround the links
\usepackage[super]{natbib} % makes the reference as word¹
\usepackage{natbib} % references
\usepackage{url} % \url

%%% Code
\usepackage{listings} % embed code
\usepackage{xcolor} % colors with words

%%% Images
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,decorations.pathmorphing,backgrounds,positioning,fit,petri}\usepackage{caption}
\usepackage{xifthen}
\usepackage{capt-of}

%%% Math packages
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{graphicx}
\usepackage{url}

%%% Custom sectioning
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}

%%% Custom headers/footers (fancyhdr package)
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{} % No page header
\fancyfoot[L]{} % Empty
\fancyfoot[C]{} % Empty
\fancyfoot[R]{\thepage\space of \pageref{LastPage}} % Pagenumbering
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt}

%%% Equation and float numbering
\numberwithin{equation}{section} % Equationnumbering: section.eq#
\numberwithin{figure}{section} % Figurenumbering: section.fig#
\numberwithin{table}{section} % Tablenumbering: section.tab#

%%% CONFIGURATION
% Configure code embed
\hypersetup{pdfborder={0 0 0}}
\lstdefinestyle{colored}{
belowcaptionskip=1\baselineskip,
breaklines=true,
frame=L,
xleftmargin=\parindent,
language=Ruby,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
numberstyle=\color{red},
keywordstyle=\color{green},
commentstyle=\itshape\color{purple},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstset{escapechar=@,style=colored}

% Configure abstract title
%\renewcommand{\abstractname}{}

% ...
\usepackage{setspace}

% METADATA
\input{packages.tex}
\input{header.tex}
\loadglsentries[main]{glossary}
\makeglossaries
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Horizontal rule

%%% NEW Commands
\newcommand{\inlinecode}{\texttt}
\newcommand{\italic}[1]{{\em #1}}
\newcommand{\italicpl}[1]{{\em #1}{\em s}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
%\input{glossary.tex}
\newacronym{NIDS}{NIDS}{Network based Intrusion Detection System}
\newacronym{NIPS}{NIPS}{Network based Intrusion Prevention System}
\newacronym{PCRE}{PCRE}{Perl Compatible Regular Expressions}
\input{titlepage.tex}

\newpage
@@ -112,7 +21,11 @@ stringstyle=\color{orange},
\newpage
{
\onehalfspacing
\input{body.tex}
\setlength{\columnsep}{1cm}
\begin{multicols*}{2}
\raggedcolumns
\input{body.tex}
\end{multicols*}
}

\newpage
@@ -120,7 +33,6 @@ stringstyle=\color{orange},
\bibliographystyle{agsm}
\bibliography{report}

\newpage
\medskip
\printglossaries



+ 21
- 11
titlepage.tex View File

@@ -1,18 +1,26 @@
\begin{titlepage}

\vspace*{2cm}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here
% Defines a new command for the horizontal lines, change thickness here
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\center % Center everything on the page
\center

% ----------------------------------------------------------------------------------------
% HEADING SECTIONS
% ----------------------------------------------------------------------------------------

% \textsc{\LARGE University of Kent}\\[1.5cm] % Name of your university/college
\includegraphics[width=4cm]{Logo}\\[1cm] % Include a department/university logo - this will
\textsc{\Large Msc Computer Security}\\[0.5cm] % Major heading such as course name
\textsc{\large CO876 - Network Security}\\[0.5cm] % Minor heading such as course title
% Name of your university/college
\textsc{\LARGE \myuniversity}\\[1.5cm]
% Include a department/university logo
%\includegraphics[width=4cm]{appendices/Logo}\\[1cm]
% Major heading such as course name
\textsc{\Large \mymajorcoursename}\\[0.5cm]
% Minor heading such as course title
\textsc{\large \myminorcoursename}\\[0.5cm]

% ----------------------------------------------------------------------------------------
% TITLE SECTION
@@ -29,7 +37,7 @@
% \begin{minipage}{0.4\textwidth}
% \begin{flushleft} \large
% \emph{Author:}\\
% Arthur \textsc{Poulet}\\ % Your name
% \myauthor\\ % Your name
% agp8, 16909734
% \end{flushleft}
% \end{minipage}
@@ -37,25 +45,27 @@
% \begin{minipage}{0.4\textwidth}
% \begin{flushright} \large
% \emph{Supervisor:} \\
% Dr. P. \textsc{Kenny} % Supervisor's Name
% \mysupervisor % Supervisor's Name
% \end{flushright}
% \end{minipage}\\[4cm]

% If you don't want a supervisor, uncomment the two lines below and remove the section above
\Large \emph{Author:}\\
\myauthor \\[3cm] % Your name
\myauthor \\[3cm]

% ----------------------------------------------------------------------------------------
% DATE SECTION
% ----------------------------------------------------------------------------------------

{\large \today}\\[3cm] % Date, change the \today to a set date if you want to be precise
% Date, change the \today to a set date if you want to be precise
{\large \today}\\[3cm]

% ----------------------------------------------------------------------------------------
% LOGO SECTION
% ----------------------------------------------------------------------------------------

% \includegraphics[width=4cm]{Logo}\\[1cm] % Include a department/university logo - this will require the graphicx package
% Include a department/university logo
\includegraphics[width=4cm]{appendices/Logo}\\[1cm]

% ----------------------------------------------------------------------------------------



Loading…
Cancel
Save