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.

Lines 782–790 happen only if 〈env〉 is not yet defined or gets redefined:<br />

Line 782: (from latex.ltx) make 〈env〉 use the counter 〈use ctr〉.<br />

Lines 783–789 similar to lines 771–777 of \@nthm.<br />

Lines 790–792 define \mkheader@〈env〉 to set the style parameters of the<br />

header and set the header (by \@thm):<br />

\mkheader@〈env〉==\setparms@〈env〉\@thm{〈env〉}{〈use ctr〉}{〈output name〉}.<br />

(\setparms@〈env〉 is defined when \@newtheorem{〈env〉}is carried out).<br />

Line 793: (from latex.ltx): \end〈env〉 calls \@endtheorem.<br />

\@xnthm \@xnthm is called by \@nthm if the numbering is relative to some structuring<br />

level.<br />

794 \gdef\@xnthm#1#2[#3]{%<br />

795 \ifthm@tempif<br />

796 \expandafter\@ifundefined{c@#1}%<br />

797 {\@definecounter{#1}}{}%<br />

798 \@newctr{#1}[#3]%<br />

799 \expandafter\xdef\csname the#1\endcsname{%<br />

800 \expandafter\noexpand\csname the#3\endcsname \@thmcountersep<br />

801 {\noexpand\csname\the\theoremnumbering\endcsname{#1}}}%<br />

802 \expandafter\gdef\csname mkheader@#1\endcsname<br />

803 {\csname setparms@#1\endcsname<br />

804 \@thm{#1}{#1}{#2}}%<br />

805 \global\@na<strong>med</strong>ef{end#1}{\@endtheorem}\fi}<br />

Arguments:<br />

〈env〉:=#1 is the (internal) environment name to be defined (transmitted<br />

from \@newtheorem).<br />

〈output name〉:=#2 is its keyword to be used in the output,<br />

〈level〉:=#3 is the structuring level relative to which 〈env〉 has to be numbered<br />

(both read from the L ATEX source).<br />

Lines 796–805 happen only if 〈env〉 is not yet defined or gets redefined:<br />

Lines 796, 797: in not yet defined, define 〈env〉- counter (otherwise, 〈env〉 is<br />

redefined).<br />

Line 799: (from latex.ltx): define the counter for 〈env〉 and add 〈level〉 to its<br />

reset-triggers.<br />

Lines 800, 801: define \the〈env〉 to be the command sequence<br />

\the〈level〉\@thmcountersep〈numbering〉{〈env〉} ,<br />

where 〈numbering〉 is the value of \theoremnumbering when \@xnthm<br />

(and thus, \newtheorem{〈env〉}) is called.<br />

Lines 802–804: define \mkheader@〈env〉 to set the style parameters of the<br />

header and set the header (by \@thm):<br />

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

63

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

Saved successfully!

Ooh no, something went wrong!