summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/answers/ansexam2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/answers/ansexam2.tex')
-rw-r--r--Master/texmf-dist/doc/latex/answers/ansexam2.tex62
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/answers/ansexam2.tex b/Master/texmf-dist/doc/latex/answers/ansexam2.tex
new file mode 100644
index 00000000000..098efde98f5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/answers/ansexam2.tex
@@ -0,0 +1,62 @@
+%%
+%% This is file `ansexam2.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% answers.dtx (with options: `ex2')
+%%
+\documentclass[12pt,a4paper]{article}
+\usepackage{answers}%\usepackage[nosolutionfiles]{answers}
+\newtheorem{Exc}{Exercise}
+\newenvironment{Ex}{\begin{Exc}\normalfont}{\end{Exc}}
+\Newassociation{solution}{Soln}{test}
+\Newassociation{hint}{Hint}{test}
+\Newassociation{Solution}{sSol}{testtwo}
+\newcommand{\prehint}{~[Hint]}
+\newcommand{\presolution}{~[Solution]}
+\newcommand{\preSolution}{~[Homework]}
+\newcommand{\Opentesthook}[2]%
+ {\Writetofile{#1}{\protect\section{#1: #2}}}
+\renewcommand{\Solnlabel}[1]{\emph{Solution #1}}
+\renewcommand{\Hintlabel}[1]{\emph{Hint #1}}
+\renewcommand{\sSollabel}[1]{\emph{Solution to #1}}
+
+\begin{document}
+ \Opensolutionfile{test}[ans2]{Solutions}
+ \Writetofile{test}{\protect\subsection{Some Solutions}}
+ \Opensolutionfile{testtwo}[ans2x]
+ \Writetofile{testtwo}{%
+ \protect\subsection{Extra Solutions}}
+ \section{Exercises}
+ \begin{Ex}
+ An exercise with a solution.
+ \begin{solution}
+ This is a solution.
+ \relax{}
+ \end{solution}
+ \end{Ex}
+ \begin{Ex}
+ An exercise with a hint and a secret solution.
+ \begin{hint}
+ This is a hint.
+ \end{hint}
+ \begin{Solution}
+ This is a secret solution.
+ \end{Solution}
+ \end{Ex}
+ \begin{Ex}
+ An exercise with a hint.
+ \begin{hint}
+ This is a hint.
+ \end{hint}
+ \end{Ex}
+ \Closesolutionfile{test}
+ \Readsolutionfile{test}
+ \clearpage
+ \Closesolutionfile{testtwo}
+ \Readsolutionfile{testtwo}
+\end{document}
+\endinput
+%%
+%% End of file `ansexam2.tex'.