%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Engineering Calculation Paper
% LaTeX Template
% Version 1.0 (20/1/13)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Dmitry Volynkin (dim_voly@yahoo.com.au)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
% ----------------------------------------------------------------------------------------

\documentclass[11pt,a4paper]{article} % Use A4 paper with a 12pt font size - different paper sizes will require manual recalculation of page margins and border positions
\usepackage{cmbright}
\usepackage{longtable}
\usepackage{booktabs}

\usepackage[longtable]{multirow}
\usepackage{bigstrut}
\usepackage{array}

\usepackage{marginnote} % Required for margin notes
\usepackage{wallpaper} % Required to set each page to have a background
\usepackage{lastpage} % Required to print the total number of pages
\usepackage[left=1.3cm,right=3.6cm,top=1.8cm,bottom=4.0cm,marginparwidth=3.4cm]{geometry} % Adjust page margins
\usepackage{amsmath} % Required for equation customization
\usepackage{amssymb} % Required to include mathematical symbols
\usepackage{xcolor} % Required to specify colors by name

\usepackage[italian]{babel}
\usepackage[nottoc,numbib]{tocbibind}

\usepackage{fancyhdr} % Required to customize headers
\usepackage{subfig}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{placeins}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{backgrounds}

\newcommand{\mcsym}[1]{\multicolumn{1}{c|}{$\boldsymbol{#1}$}}
\newcommand{\mcmrsym}[2]{\multicolumn{1}{c|}{\multirow{#1}{*}{$\boldsymbol{#2}$}}}
\newcommand{\mcmrtinysym}[2]{\multicolumn{1}{c|}{\multirow{#1}{*}{\footnotesize{$\boldsymbol{#2}$}}}}
\newcommand{\mcmrtinyb}[2]{\multicolumn{1}{c|}{\multirow{#1}{*}{\footnotesize{\textbf{#2}}}}}
\newcommand{\mcmrtiny}[2]{\multicolumn{1}{c|}{\multirow{#1}{*}{\footnotesize{#2}}}}
\newcommand{\mcmrsymr}[2]{\multicolumn{1}{r|}{\multirow{#1}{*}{$\boldsymbol{#2}$}}}
\newcommand{\mcudm}[1]{\multicolumn{1}{c|}{\footnotesize{$#1$}}}
\newcommand{\mcmrAR}[2]{\multicolumn{1}{r|}{\multirow{#1}{*}{$#2$}}}
\newcommand{\mcmrAC}[2]{\multicolumn{1}{c|}{\multirow{#1}{*}{$#2$}}}
\newcommand{\mcmrSC}[2]{\multicolumn{1}{|c|}{\multirow{#1}{*}{$#2$}}}

\setlength{\headheight}{80pt} % Increase the size of the header to accommodate meta-information
\pagestyle{fancy}\fancyhf{} % Use the custom header specified below
\renewcommand{\headrulewidth}{0pt} % Remove the default horizontal rule under the header

\setlength{\parindent}{0cm} % Remove paragraph indentation
\newcommand{\tab}{\hspace*{2em}} % Defines a new command for some horizontal space

\newcommand\BackgroundStructure{ % Command to specify the background of each page
\setlength{\unitlength}{1mm} % Set the unit length to millimeters

\setlength\fboxsep{0mm} % Adjusts the distance between the frameboxes and the borderlines
\setlength\fboxrule{0.1mm} % Increase the thickness of the border line
\put(10, 10){\fcolorbox{black}{blue!5}{\framebox(165,247){}}} % Main content box
\put(175, 10){\fcolorbox{black}{blue!5}{\framebox(27,247){}}} % Margin box
\put(10, 262){\fcolorbox{black}{blue!5}{\framebox(192, 25){}}} % Header box
\put(125, 263){\includegraphics[height=19mm,keepaspectratio]{\VAR{logo_path}}} % Logo box - maximum height/width:
}

% ----------------------------------------------------------------------------------------
%	GLOSSARIES INFORMATION
% ----------------------------------------------------------------------------------------

\usepackage[nomain]{glossaries}

%- if glossary
\newglossary*{cls}{Indice dei simboli}
%- include 'template-ita-gloss.tex'
\makeglossaries
%- endif

% ----------------------------------------------------------------------------------------
%	HEADER INFORMATION
% ----------------------------------------------------------------------------------------

\fancyhead[L]{\begin{tabular}{l r | l r} % The header is a table with 4 columns
\textbf{Project} & \VAR{project_brief} & \textbf{Page} & \thepage/\pageref{LastPage} \\ % Project name and page count
\textbf{Module}  & \VAR{module_name}   & \textbf{Date} & \VAR{report_date} \\ % Job number and last updated date
%\textbf{Version} & Design-1A-RC-001 & \textbf{Reviewed} & 2/12/2012 \\ % Version and reviewed date
\textbf{Version} & \VAR{module_version} & \textbf{Time} & \VAR{report_time} \\ % Version and reviewed date
%\textbf{Designer} & John Thomas Smith & \textbf{Reviewer} & James Smith \\ % Designer and reviewer
\textbf{Designer} & \VAR{report_designer} & \textbf{Token} & \VAR{report_token}  \\ % Designer and reviewer
\end{tabular}}

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

\newcommand{\VAR}[1]{}
\newcommand{\BLOCK}[1]{}

\begin{document}

\AddToShipoutPicture{\BackgroundStructure} % Set the background of each page to that specified above in the header information section

% ----------------------------------------------------------------------------------------
%	DOCUMENT CONTENT
% ----------------------------------------------------------------------------------------

\VAR{place_holder}

% ----------------------------------------------------------------------------------------
%- if glossary
\printglossary[type=cls,title={Indice dei simboli},style=longborder,nonumberlist]
%- endif
\end{document}
