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 63 64
|
\usepackage {hyperref}
\edef\hyper@quote{\string"}
\edef\hyper@sharp{\string#}
\def \softlink #1#2{\special
{html:<A href=\hyper@quote\hyper@sharp#1\hyper@quote>}#2\special
{html:</A>}}
\def \softtarget #1#2{\special
{html:<A name=\hyper@quote#1\hyper@quote>}#2\special
{html:</A>}}
\newtheorem{theorem}{Theorem}
\newtheorem {lemma}{Lemma}
\usepackage {exercise}
\def \pdf@hyperlink {\softlink}
\def \pdf@hypertarget {\softtarget}
\def \@thm #1#2{%
\refstepcounter {#1}
\xdef \ThmName {\@currenvir}%
\xdef \ThmLabel {\@currentlabel}%
\@ifnextchar [{\@ythm {#1}{#2}}{\@xthm{#1}{#2}}%
}
\def \capitalize #1{\uppercase {#1}}
\newanswer {proof}
{\def \theExercise {\ThmName}\def \theQuestion {\ThmLabel}%
\if@answer@later
\if@answer@anchor \AnswerLink{\hbox {(See proof in the Appendix)}}\fi%
\else \def \AnswerName {Proof}\fi
\pdf@hypertarget {Thm-\ThmName.\ThmLabel}{}}
{}
{\trivlist \item [\hskip \labelsep {\underline {Proof}:}]}
{\penalty 100\hfill\rule{2mm}{2mm}\endtrivlist\@doendpe}
{{\ThmName}{\ThmLabel}}
[2]
{\subsection*
{\pdf@hypertarget {Ans-#1.#2}{Proof} of
\pdf@hyperlink {Thm-#1.#2}{\capitalize #1 #2}}%
\nobreak
}
{}
\newcounter{detailsCounter}
\setcounter{detailsCounter}{1}
\newanswer{details}{%
\def\theExercise{Details}%
\def\theQuestion{\thedetailsCounter}%
\if@answer@later
\if@answer@anchor \AnswerLink{\hbox {(See details (\romannumeral\thedetailsCounter) in the Appendix)}}\fi%
\else \def \AnswerName{Details}\fi
\pdf@hypertarget{body/details/\thedetailsCounter}{}%
\addtocounter{detailsCounter}{1}}
{}
{\trivlist \item [\hskip \labelsep {\underline {Proof}:}]}
{\penalty 100\hfill\rule{2mm}{2mm}\endtrivlist\@doendpe}
{{\thepage}{\thedetailsCounter}}
[2]
{\subsection*
{\pdf@hypertarget {Ans-Details.#2}{Details (\romannumeral#2)} of
\pdf@hyperlink {body/details/#2}{page #1}}%
\nobreak
}
{}
|