add test example

This commit is contained in:
Mylloon 2024-05-10 00:09:12 +02:00
parent fec0a00b98
commit 79dac60a83
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 159 additions and 0 deletions

5
latex/exam/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*
!.gitignore
!Makefile
!*.tex

19
latex/exam/Makefile Normal file
View file

@ -0,0 +1,19 @@
NAME = test
TEX = $(NAME).tex
SRC = $(TEX)
PDF = $(TEX:.tex=.pdf)
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
QPDF = qpdf --linearize --replace-input
RM = rm -rf
all: $(PDF)
$(PDF): %.pdf: %.tex
$(TEXMK) $<
@$(QPDF) $@ 2>/dev/null |:
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc
clean:
$(RM) $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))

135
latex/exam/test.tex Normal file
View file

@ -0,0 +1,135 @@
\documentclass[a4paper,12pt,addpoints]{exam}
% Font
\usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{microtype}
% Languages
\usepackage[french]{babel}
\frenchsetup{SmallCapsFigTabCaptions=false}
\usepackage{csquotes}
\MakeOuterQuote{"}
% Change page dimensions
% \usepackage[
% a4paper,
% left=20mm,
% top=20mm,
% ]{geometry}
% Code integration
% \usepackage{minted}
% \usemintedstyle{emacs}
% Metadatas
\def\docTitle{TITLE}
\def\authorMail{mailto:place@holder.com}
\def\docSubject{SUBJECT}
\def\docLocation{LOCATION}
\def\docTimeAllocated{1 h 30}
\usepackage[
pdfauthor={\docLocation}, % author metadata
pdftitle={\docTitle}, % title metadata
pdfsubject={\docSubject}, % subject metadata
]{hyperref}
% Style marks
\pointsinrightmargin
% \usepackage{color}
% \colorsolutionboxes
% Style head an foot
\pagestyle{headandfoot}
\runningheadrule
\firstpageheader{\docSubject}{}{\docLocation}
\runningheader{\docSubject}{\docTitle}{\docLocation}
\cfoot{\thepage}
% Show answers
%\printanswers
\begin{document}
% \definecolor{SolutionBoxColor}{gray}{1} % invisible answer area outline
\begin{center}
{\LARGE\bfseries\docTitle} \\
\docTimeAllocated~-- \numpoints~\points
\end{center}
\begin{center}
\parbox{14cm}{\centering
\textbf{Tout document autorisé.} \\
Sauf indication contraire, toute assertion doit être démontrée.}
\end{center}
\begin{tabular}{r@{}p{0.8\textwidth}}
Nom & ~: \hrulefill \\[0.5em]
Prénom & ~: \hrulefill
\end{tabular}
% Additional information
% \vspace{1cm}
% \parbox{14cm}{Nota :
% \begin{itemize}
% \item Faîtes de votre mieux.
% \end{itemize}}
\vspace{1cm}
\begin{questions}
\question
ÉNONCÉ DE L'EXERCICE 1
\begin{parts}
\part[6]
ÉNONCÉ DE LA QUESTION 1
\begin{solutionorbox}[3cm]
RÉPONSE DE LA QUESTION 1
\end{solutionorbox}
\part[2]
ÉNONCÉ DE LA QUESTION 2
\begin{solutionorbox}[3cm]
RÉPONSE DE LA QUESTION 2
\end{solutionorbox}
\end{parts}
\question
ÉNONCÉ DE L'EXERCICE 2
\begin{parts}
\part[3]
ÉNONCÉ DE LA QUESTION 1
\begin{solutionorbox}[4cm]
RÉPONSE DE LA QUESTION 1
\end{solutionorbox}
\part[2]
ÉNONCÉ DE LA QUESTION 2
\begin{solutionorbox}[4cm]
RÉPONSE DE LA QUESTION 2
\end{solutionorbox}
\end{parts}
\question
ÉNONCÉ DE L'EXERCICE 3
\begin{parts}
\part[3]
ÉNONCÉ DE LA QUESTION 1
\begin{solutionorbox}[3cm]
RÉPONSE DE LA QUESTION 1
\end{solutionorbox}
\part[4]
ÉNONCÉ DE LA QUESTION 2
\begin{solutionorbox}[3cm]
RÉPONSE DE LA QUESTION 2
\end{solutionorbox}
\end{parts}
\end{questions}
\begin{center}
Fin de l'examen.
\end{center}
\end{document}