This template can be used to produce Lab Guides at Instituto Superior Técnico (IST) of Universidade de Lisboa (UL). The template may be suitable for other similar purposes just changing the logo.
\documentclass[12pt,a4paper]{article}
%
% AUTHOR: Prof. RUI SANTOS CRUZ
%
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{a4wide}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SELECT ONE OF THE FOLLOWING PACKAGES FOR THE LANGUAGE
\usepackage[english]{babel}
% \usepackage[portuges]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{cite}
\usepackage[absolute]{textpos}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{fancyhdr}
\usepackage[table]{xcolor}
\pagestyle{fancy}
\headsep=50pt
\setlength{\headheight}{50pt}
\usepackage{listings}
\lstset{escapeinside={<@}{@>}}
\usepackage{minted}
\definecolor{LightGray}{rgb}{0.95, 0.95, 0.95}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{editorOcher}{rgb}{1, 0.5, 0}
% Clever Referencing of document parts
\usepackage{cleveref}
\lstdefinestyle{commandline} {%
language={[WinXP]command.com},
breaklines=true,
%aboveskip=\baselineskip,
belowskip=\baselineskip,
showstringspaces=false,
backgroundcolor=\color{black},
basicstyle=\small\color{white}\ttfamily
showstringspaces=false,
keywordstyle=\color{cyan}\bfseries,
stringstyle=\color{gray}\ttfamily,
commentstyle=\color{green}\itshape,
moredelim=[s][\color{yellow}\bfseries]{C:}{\>}
}
\lstdefinestyle{Bash} {%
language=bash,
breaklines=true,
belowskip=\baselineskip,
backgroundcolor=\color{LightGray},
showstringspaces=false,
keywordstyle=\color{black}\bfseries,
basicstyle=\small\color{black}\ttfamily,
stringstyle=\color{editorOcher}\ttfamily,
commentstyle=\color{brown}\itshape,
otherkeywords={xcode-select, mkdir,rm},
moredelim=[s][\color{darkblue}]{~$},
literate={~} {$\sim$}{1}
}
\lstdefinestyle{Rubytext} {%
language=Ruby,
breaklines=true,
belowskip=\baselineskip,
basicstyle=\small\ttfamily\color{black},
backgroundcolor=\color{LightGray},
showstringspaces=false,
commentstyle = \ttfamily\color{red},
keywordstyle=\ttfamily\color{blue},
stringstyle=\color{orange}
}
\lstdefinestyle{py} {%
language=python,
literate=%
*{0}{{{\color{red}0}}}1
{1}{{{\color{red}1}}}1
{2}{{{\color{red}2}}}1
{3}{{{\color{red}3}}}1
{4}{{{\color{red}4}}}1
{5}{{{\color{red}5}}}1
{6}{{{\color{red}6}}}1
{7}{{{\color{red}7}}}1
{8}{{{\color{red}8}}}1
{9}{{{\color{red}9}}}1,
basicstyle=\small\ttfamily,
numbers=left,
% numberstyle=\tiny,
% stepnumber=2,
numbersep=5pt,
tabsize=4,
extendedchars=true,
breaklines=true,
keywordstyle=\color{blue}\bfseries,
frame=b,
commentstyle=\color{brown}\itshape,
stringstyle=\color{editorOcher}\ttfamily,
showspaces=false,
showtabs=false,
xleftmargin=17pt,
framexleftmargin=17pt,
framexrightmargin=5pt,
framexbottommargin=4pt,
backgroundcolor=\color{LightGray},
showstringspaces=false,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PLEASE FILL THE ADEQUATE DATA IN THE TABLE REPLACING
% THE VALUES EXEMPLIFIED
\lhead{}
\renewcommand{\arraystretch}{1.1}
\fancyhead[C]{\begin{tabularx}{1.0\textwidth}{|l|X|l|l|}
\hline
% In the following line change Course Name: PPIII, PPB
\textbf{AGISIT 19/20} & \textbf{ASSIGNMENT} & \textbf{Number:} & 1 \\
\hline
% In the following line insert your Name and IST ID
\multicolumn{2}{|l|}{Assignment type (Preparation, Reading, Lab)} & \textbf{Issue Date:} & \today \\
\hline
% In the following line insert the Activity CODE and Title (abridged)
%\textbf{WP n.} (99) & (Subject) & \textbf{Group:} & (99) \\
\multicolumn{2}{|l|}{Title of Assignment} & \textbf{Due Date:} & \today \\
\hline
\multicolumn{2}{|l|}{Author: } & \textbf{Revision:} & 0.0 \\
\hline
\end{tabularx}}
\rhead{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DO NOT CHANGE THIS BLOCK
\begin{document}
\textblockorigin{-18pt}{-2pt}
\begin{textblock*}{10cm}(2cm,1cm)
\includegraphics[width=6cm]{IST_C_RGB_POS-01-CROP.jpg}
\end{textblock*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
The objective of this Lab assignment is to study and to gain a better understanding of something.
\begin{figure}[h]
\centering
\includegraphics[width=0.7\textwidth]{Ansible_env_2.pdf}
\caption{The Webfront Environment}
\label{fig:ansible-webfront}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% YOUR TEXT STARTS HERE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{How to do it?}
One-line code formatting works with minted. For instance, a simple html sample like this:
\mint{html}|<h2>Something <b>here</b></h2>|
can be properly
formatted.
Bla bla.\\
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=LightGray]{bash}
#!/bin/sh
# removes backup files and TeX files
if [ $# -gt 0 ] && [ $1 = "-b" ]
then
shift
backups=false
else
backups=true
fi
...
\end{minted}
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=LightGray]{bash}
$ cd ~/containers/vagrant
$ mkdir jenkins-docker && cd jenkins-docker
$ vagrant init ubuntu/trusty64
$ vagrant up
\end{minted}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% YOUR TEXT ENDS HERE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} % The required last line