22.07.2013 Views

ntheorem.pdf. - Mirrors.med.harvard.edu

ntheorem.pdf. - Mirrors.med.harvard.edu

ntheorem.pdf. - Mirrors.med.harvard.edu

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• \@endparenv: does \addvspace\@topsepadd.<br />

In <strong>ntheorem</strong>, \〈env〉is used instead of a common \@begi<strong>ntheorem</strong> (defined<br />

by \newtheorem in Lines 711–713, 714–716) that call \mkheader@〈env〉.<br />

The actual definition of \mkheader@〈env〉 is done in \@othm, \@xnthm, or<br />

\@ynthmas\mkheader@〈env〉==\setparms@〈env〉\@thm{...}{...}{...}.<br />

Amongst this, \@thm{...}{...}{...}, whose code is given next,<br />

• generatestheactualoutputofthetheoremheader(via\@xthm/\@begi<strong>ntheorem</strong><br />

or\@ythm/\@opargbegi<strong>ntheorem</strong>)where\@begi<strong>ntheorem</strong>and\@opargbegi<strong>ntheorem</strong><br />

are redefined by <strong>ntheorem</strong>:<br />

• \@begi<strong>ntheorem</strong>and\@opargbegi<strong>ntheorem</strong>donot containthe\trivlist<br />

command, but only set the \item (internally \@item that adds space<br />

\@topsep-\parskip).<br />

• the \trivlist command itself is contained in \@thm, recall that as described<br />

above, it is not concerned with skips at all.<br />

⇒ \@thm has to set \@topsep := 〈value〉+\parskip for the space above the<br />

theorem.<br />

• \end〈env〉is defined in \@othm, \@xnthm, or \@ynthm as \@endtheorem<br />

which is defined in Lines 95 (thmmarks active) and 858 (thmmarks off).<br />

• \@endtheorem with thmmarks on calls <strong>ntheorem</strong>’s \@endtrivlist (Line<br />

11) which calls \@endparenv.<br />

• \@endtheorem with thmmarks off calls the original \endtrivlist which<br />

calls the original \@endtrivlist which calls \@endparenv.<br />

⇒ \@topsepadd is used for the vertical space after the theorem as usual.<br />

Handling Instances of Theorem-Environments.<br />

\@thm \@thm is called by \@〈env〉 (which is defined by \@othm/\@xnthm/\@ynthm).<br />

816 \gdef\@thm#1#2#3{%<br />

817 \if@thmmarks<br />

818 \stepcounter{end\InTheoType ctr}%<br />

819 \fi<br />

820 \renewcommand{\InTheoType}{#1}%<br />

821 \if@thmmarks<br />

822 \stepcounter{curr#1ctr}%<br />

823 \setcounter{end#1ctr}{0}%<br />

824 \fi<br />

825 \refstepcounter{#2}%<br />

826 \theorem@prework<br />

827 \trivlist % latex’s \trivlist, calling latex’s \@trivlist unchanged<br />

828 \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist<br />

829 \ifthm@inframe<br />

830 \thm@topsep\theoreminframepreskipamount<br />

831 \thm@topsepadd\theoreminframepostskipamount<br />

65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!