File: main.sty

package info (click to toggle)
whizzytex 1.3.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,132 kB
  • ctags: 472
  • sloc: lisp: 3,297; sh: 1,522; makefile: 259
file content (43 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download | duplicates (4)
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
\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
   }
  {}