MA0301/exam_template_graphics/main.tex

95 lines
1.5 KiB
TeX

\documentclass[12pt]{article}
\usepackage{ntnu}
\usepackage{ntnu-math}
\author{TODO: STUDENTNUMMER}
\title{Exam v2021}
\usetikzlibrary{automata, positioning, arrows.meta}
\newcommand{\I}{Option 1 is correct}
\newcommand{\II}{Option 2 is correct}
\newcommand{\III}{Option 3 is correct}
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{(\arabic{enumii})}
\renewcommand{\theenumiii}{\alph{enumiii})}
\usepackage{verbatim}
\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{}
\section{Propositional Logic}
\verbatimInput{truthtable}
\section{Sets}
\section{Relations}
\verbatimInput{proveEquivalence}
\verbatimInput{provePoset}
\verbatimDiagram{equivalenceDiagram}
\verbatimDiagram{hasse}
\verbatimDiagram{hasseDiagramByDivisibility}
\section{Graph theory}
\verbatimDiagram{undirectedGraph}
\verbatimDiagram{directedGraph}
\verbatimDiagram{complete6}
\verbatimDiagram{adjacency}
\verbatimInput{undirectedGraphToMatrix}
\verbatimDiagram{directedFromMatrix}
\section{Finite state automata}
\verbatimDiagram{automata}
\end{document}