MA0301/exam_template_graphics/main.tex

95 lines
1.5 KiB
TeX
Raw Normal View History

2021-05-10 22:12:44 +02:00
\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})}
2021-05-10 22:31:46 +02:00
\usepackage{verbatim}
2021-05-17 18:39:28 +02:00
\usepackage{listings}
\newcommand{\listFile}[1]{
\lstinputlisting
[ frame=single,
basicstyle=\small,
breaklines
]
{graphics/src/#1.txt}
}
2021-05-10 22:31:46 +02:00
2021-05-11 22:21:15 +02:00
\newcommand{\verbatimDiagram}[1]{
2021-05-17 18:39:28 +02:00
\subsection{#1}
\listFile{#1}
2021-05-10 22:12:44 +02:00
2021-05-11 22:21:15 +02:00
\includeDiagram{graphics/#1.tex}
2021-05-10 22:12:44 +02:00
2021-05-11 22:21:15 +02:00
\break{}
}
2021-05-10 22:31:46 +02:00
2021-05-11 22:21:15 +02:00
\newcommand{\verbatimInput}[1]{
2021-05-17 18:39:28 +02:00
\subsection{#1}
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\listFile{#1}
2021-05-10 22:12:44 +02:00
2021-05-11 22:21:15 +02:00
\input{graphics/#1.tex}
2021-05-10 22:31:46 +02:00
2021-05-11 22:21:15 +02:00
\break{}
}
2021-05-10 22:31:46 +02:00
2021-05-11 22:21:15 +02:00
\begin{document}
2021-05-10 22:12:44 +02:00
2021-05-11 22:21:15 +02:00
\ntnuTitle{}
\break{}
2021-05-10 22:31:46 +02:00
2021-05-11 22:21:15 +02:00
\tableofcontents
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\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}
2021-05-10 22:12:44 +02:00
2021-05-17 18:39:28 +02:00
\verbatimDiagram{directedGraph}
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\verbatimDiagram{complete6}
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\verbatimDiagram{adjacency}
2021-05-10 22:12:44 +02:00
2021-05-17 18:39:28 +02:00
\verbatimInput{undirectedGraphToMatrix}
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\verbatimDiagram{directedFromMatrix}
2021-05-10 22:31:46 +02:00
2021-05-17 18:39:28 +02:00
\section{Finite state automata}
2021-05-10 22:12:44 +02:00
2021-05-17 18:39:28 +02:00
\verbatimDiagram{automata}
2021-05-10 22:12:44 +02:00
\end{document}