add skeleton for final exam
authorMart Lubbers <mart@martlubbers.net>
Wed, 18 Jan 2017 19:20:47 +0000 (20:20 +0100)
committerMart Lubbers <mart@martlubbers.net>
Wed, 18 Jan 2017 19:20:47 +0000 (20:20 +0100)
.gitignore
exam2/Makefile [new file with mode: 0644]
exam2/exam.tex [new file with mode: 0644]
exam2/preamble.tex [new file with mode: 0644]
exam2/rutitlepage.sty [new file with mode: 0644]

index debc120..d841b86 100644 (file)
@@ -1,3 +1,5 @@
 *.aux
 *.pdf
 *.log
+*.fmt
+*.mlog
diff --git a/exam2/Makefile b/exam2/Makefile
new file mode 100644 (file)
index 0000000..402955c
--- /dev/null
@@ -0,0 +1,22 @@
+DOC:=exam
+LATEX:=pdflatex
+BIBTEX:=bibtex
+LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape
+
+TEXS:=$(wildcard *.tex)
+
+.PHONY: all
+.SECONDARY: $(DOC).fmt
+
+all: $(DOC).pdf
+
+%.fmt: preamble.tex
+       $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump"
+
+%.pdf: %.tex %.fmt $(TEXS)
+       $(LATEX) $(LATEXFLAGS) $< | tee $(basename $<).mlog
+       grep -qF 'Please rerun LaTeX.' $(basename $<).mlog &&\
+               $(LATEX) $(LATEXFLAGS) $< || true
+
+clean:
+       $(RM) $(addprefix $(DOC).,aux log fmt toc bbl blg mlog run.xml out pdf)
diff --git a/exam2/exam.tex b/exam2/exam.tex
new file mode 100644 (file)
index 0000000..2a00c61
--- /dev/null
@@ -0,0 +1,17 @@
+%&exam
+\begin{document}
+\maketitleru[course={Introduction to Language and Speech Technology}]
+%\begin{enumerate}
+%      % Question 1
+%      \item\input{q1.tex}
+%
+%      \newpage
+%      % Question 2
+%      \item\input{q2.tex}
+%
+%      \newpage
+%      % Question 3
+%      \item\input{q3.tex}
+%\end{enumerate}
+               
+\end{document}
diff --git a/exam2/preamble.tex b/exam2/preamble.tex
new file mode 100644 (file)
index 0000000..a369782
--- /dev/null
@@ -0,0 +1,10 @@
+\documentclass[titlepage,a4paper]{article}
+
+\usepackage{rutitlepage}
+\usepackage{geometry}
+\usepackage{enumitem}
+\usepackage{listings}
+
+\title{Exam}
+\author{Mart Lubbers\\s4109503}
+\date{\today}
diff --git a/exam2/rutitlepage.sty b/exam2/rutitlepage.sty
new file mode 100644 (file)
index 0000000..ab0afc5
--- /dev/null
@@ -0,0 +1,58 @@
+% Radboud University Nijmegen titlepage
+% Author: Mart Lubbers
+% Date: 2016-06-28
+%
+% TODO
+% - Internationalize (dutch logos)
+% - Nice document
+% - Make CTAN ready
+\RequirePackage{graphicx,ifpdf,keyval}
+
+\makeatletter
+\define@key{maketitleru}{course}{\def\@rutitlecourse{#1}}
+\define@key{maketitleru}{institute}{\def\@rutitleinst{#1}}
+\define@key{maketitleru}{authorstext}{\def\@rutitleauthorstext{#1}}
+\define@key{maketitleru}{righttext}{\def\@rutitlerighttext{#1}}
+\define@key{maketitleru}{righttextheader}{\def\@rutitlerighttextheader{#1}}
+\setkeys{maketitleru}{%
+       course={},
+       institute={Radboud University Nijmegen},
+       authorstext={Authors:},
+       righttextheader={},
+       righttext={}
+}      
+\newcommand{\maketitleru}[1][]{
+       \setkeys{maketitleru}{#1}
+       \begin{titlepage}
+               \makeatletter
+               \begin{center}
+                       \textsc{\LARGE\@rutitlecourse}\\[1.5cm]
+                       \ifpdf\includegraphics[height=150pt]{logo.pdf}\\
+                       \else\includegraphics[height=150pt]{logo.eps}\\
+                       \fi
+                       \vspace{0.4cm}
+                       \textsc{\Large\@rutitleinst}\\[1cm]
+                       \hrule
+                       \vspace{0.4cm}
+                       \textbf{\large\@title}\\[0.4cm]
+                       \hrule
+                       \vspace{2cm}
+                       \begin{minipage}[t]{0.45\textwidth}
+                               \begin{flushleft}\large
+                                       \textit{\@rutitleauthorstext}\\
+                                       \@author{}
+                               \end{flushleft}
+                       \end{minipage}
+                       \begin{minipage}[t]{0.45\textwidth}
+                                       \begin{flushright}\large
+                                       \textit{\@rutitlerighttextheader}\\
+                                       \@rutitlerighttext
+                               \end{flushright}
+                       \end{minipage}
+                       \vfill
+                       {\large\@date}
+               \end{center}
+               \makeatother
+       \end{titlepage}
+}
+\makeatother