blob: 098efde98f513f9bf87936145b5099423c9a3628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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'.
|