% LaTeXplate v1.0.5
% https://github.com/Steeven9/LaTeXplate
\documentclass[11pt]{scrartcl}
\newcommand*\student[1]{\newcommand{\thestudent}{{#1}}}
\newcommand*\shortstudent[1]{\newcommand{\theshortstudent}{{#1}}}
\newcommand*\course[1]{\newcommand{\thecourse}{{#1}}}
\newcommand*\courseshort[1]{\newcommand{\thecourseshort}{{#1}}}
\newcommand*\assnumber[1]{\newcommand{\theassnumber}{{#1}}}
\setcounter{secnumdepth}{4}
%----------------------------------------------------------------------------------------
% STUDENT AND COURSE INFO - //TODO EDIT HERE!
%----------------------------------------------------------------------------------------
\student{Stefano Taillefert}
\course{Course name}
\courseshort{CN}
\assnumber{1}
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Use 8-bit encoding
\usepackage[sc]{mathpazo}
\usepackage{caption, subcaption}
\usepackage[hidelinks]{hyperref}
\usepackage{inconsolata}
\usepackage[svgnames,table]{xcolor}
\usepackage{booktabs}
\usepackage{boldline}
\usepackage{soul}
\usepackage[english]{babel} % English language hyphenation
\usepackage{amssymb}
\usepackage{amsmath} % Math packages
\usepackage{listings} % Code listings, with syntax highlighting
\usepackage{graphicx} % Required for inserting images
\usepackage{float}
\usepackage{courier} % Sets font for listing as Courier.
\usepackage{listings, xcolor}
\usepackage[htt]{hyphenat} % hyphenate texttt blocks
\lstset{
tabsize = 2, %% set tab space width
showstringspaces = false, %% prevent space marking in strings, string is defined as the text that is generally printed directly to the console
numbers = left, %% display line numbers on the left
commentstyle = \color{green}, %% set comment color
keywordstyle = \color{blue}, %% set keyword color
stringstyle = \color{red}, %% set string color
rulecolor = \color{black}, %% set frame color to avoid being affected by text color
basicstyle = \small \ttfamily , %% set listing font and size
breaklines = true, %% enable line breaking
numberstyle = \tiny,
}
% Make texttt line-break
\renewcommand{\texttt}[1]{%
\begingroup
\ttfamily
\begingroup\lccode`~=`/\lowercase{\endgroup\def~}{/\discretionary{}{}{}}%
\begingroup\lccode`~=`[\lowercase{\endgroup\def~}{[\discretionary{}{}{}}%
\begingroup\lccode`~=`.\lowercase{\endgroup\def~}{.\discretionary{}{}{}}%
\catcode`/=\active\catcode`[=\active\catcode`.=\active
\scantokens{#1\noexpand}%
\endgroup
}
%----------------------------------------------------------------------------------------
% DOCUMENT MARGINS
%----------------------------------------------------------------------------------------
\usepackage{geometry} % For page dimensions and margins
\geometry{
paper=a4paper,
total={170mm,257mm},
left=18mm,
top=20mm,
right=18mm,
}
\setlength\parindent{0pt}
%----------------------------------------------------------------------------------------
% UNKNOWN MAGIC SAUCE
%----------------------------------------------------------------------------------------
\definecolor{bp-blue} {RGB}{ 2, 103, 193}
\definecolor{bp-green}{RGB}{ 35, 150, 127}
\definecolor{bp-grey} {RGB}{145, 129, 117}
\lstdefinestyle{bpstyle}{
literate={*}{*}1
}\lstset{
basicstyle=\ttfamily,
breaklines=true,
captionpos=b,
columns=fullflexible,
commentstyle=\color{bp-grey},
mathescape=true,
% numbers=left,
numbersep=10pt,
showstringspaces=false,
stringstyle=\color{bp-green},
keywordstyle=\color{red},
style=bpstyle
}
\lstloadlanguages{java}
\lstdefinestyle{bpstyle}{
literate={*}{*}1
}
\lstset{
style=bpstyle
}
%----------------------------------------------------------------------------------------
% HEADERS AND FOOTERS
%----------------------------------------------------------------------------------------
\usepackage[
automark,
autooneside=false,
headsepline
]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\thestudent} % Left header
\ohead{\thecourseshort\ assignment \theassnumber} % Right header
\ofoot*{\pagemark} % Right footer
%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------
\title{
\vspace{-2.8cm}
\begin{figure}[H]
\hspace{-1cm}
\includegraphics[width=65mm]{usi-inf-logo.png}
\end{figure}
\vspace{-0.2cm}
\normalfont\large
\textsc{\thecourse}\\
\vspace{0.1cm}
\rule{\linewidth}{0.5pt}\\
\vspace{0.4cm}
{\huge Assignment \theassnumber}\\
\vspace{0.2cm}
\rule{\linewidth}{0.5pt}\\
\vspace{-0.1cm}
}
\author{\LARGE \thestudent}
\date{\normalsize\today}
\begin{document}
\maketitle
%----------------------------------------------------------------------------------------
%% SOME USEFUL SNIPPETS
%----------------------------------------------------------------------------------------
% single image
% \begin{figure}[H]
% \centering
% \includegraphics[width=0.9\textwidth]{asd.jpg}
% \caption{Asd}
% \label{fig:asd}
% \end{figure}
% two images side by side
% \begin{figure}[H]
% \centering
% \begin{subfigure}{0.45\textwidth}
% \includegraphics[width=0.9\textwidth]{asd.jpg}
% \caption{Asd}
% \end{subfigure}
% \begin{subfigure}{0.45\textwidth}
% \includegraphics[width=0.9\textwidth]{asd.jpg}
% \caption{Asd}
% \end{subfigure}
% \caption{Asd}
% \label{fig:asd}
% \end{figure}
% code snippet (make sure to change the language if needed!)
% add numbers=none to the options to remove line numbers
% \begin{lstlisting}[language=Python]
% # Doing stuff
% random_seed = 69420
% file_path = 'values.csv'
% def func():
% return None
% \end{lstlisting}
% table (centered)
% \begin{center}
% \begin{tabular}{|l|c|c|}
% \hline
% Value & Attribute & Significance \\
% \hline
% something & negative & none \\
% \hline
% \end{tabular}
% \end{center}
%----------------------------------------------------------------------------------------
%% DOCUMENT - //TODO EDIT HERE!
%----------------------------------------------------------------------------------------
\section{Introduction}
Bla bla some text
\newpage
\section{Content}
Bla bla other text
\end{document}

PDF Preview
Create an account to compile and preview