MA0301/exam_template_graphics/main.tex

109 lines
1.7 KiB
TeX

\documentclass[12pt]{article}
\usepackage{ntnu}
\usepackage{ntnu-math}
\usepackage{ntnu-code}
\author{TODO: STUDENTNUMMER}
\title{Exam v2021}
\usetikzlibrary{automata, positioning, arrows.meta}
\newcommand{\I}{{\Huge\textbf{I}}}
\newcommand{\II}{{\Huge\textbf{I\!I}}}
\newcommand{\III}{{\Huge\textbf{I\!I\!I}}}
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{(\arabic{enumii})}
\renewcommand{\theenumiii}{\alph{enumiii})}
\usepackage{listings}
\newcommand{\listFile}[1]{
\lstinputlisting
[ frame=single,
basicstyle=\small,
breaklines
]
{graphics/src/#1.txt}
}
\newcommand{\verbatimDiagram}[1]{
\subsection{#1}
\listFile{#1}
\includeDiagram{graphics/#1.tex}
\break{}
}
\newcommand{\verbatimInput}[1]{
\subsection{#1}
\listFile{#1}
\input{graphics/#1.tex}
\break{}
}
\begin{document}
\ntnuTitle{}
\break{}
\tableofcontents
\newpage{}
\I \\
\II \\
\III
\section{Propositional Logic}
\verbatimInput{truthtable}
\section{Sets}
\section{Relations}
\verbatimInput{proveEquivalence}
\verbatimInput{provePoset}
\verbatimDiagram{equivalenceDiagram}
\verbatimDiagram{hasse}
\verbatimDiagram{hasseDiagramByDivisibility}
\section{Combinatorics}
\verbatimInput{inclusionExclusion}
\section{Graph theory}
\verbatimDiagram{undirectedGraph}
\verbatimDiagram{directedGraph}
\verbatimDiagram{complete6}
\verbatimDiagram{adjacency}
\verbatimInput{undirectedGraphToMatrix}
\verbatimDiagram{directedFromMatrix}
\verbatimInput{kruskals}
\section{Finite state automata}
\verbatimDiagram{automata}
\section{Raw python}
\verbatimInput{python}
\end{document}