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.

776 \expandafter\protected@xdef\csname #1Keyword\endcsname<br />

777 {\the\theoremkeyword}%<br />

778 \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}<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 (read from the<br />

L ATEX source).<br />

Lines 771–774: Define \(no)num@addtheoremline〈env〉 to call<br />

\@(no)num@addtheoremline{〈env〉}{〈output name〉}.<br />

Forcommentson\@num@addtheoremlineand\@nonum@addtheoremline<br />

see Section 7.1.9.<br />

Lines 775–777: Define\〈env〉Keyword〈env〉totypeset/output〈output name〉.<br />

(note the similarity with the handling of \theoremsymbol for handling<br />

complex keywords)<br />

Line 778: Accordingtothenextcharacter, call\@xnthm{〈env〉}{〈output name〉}<br />

(if 〈env〉-environments should be numbered relative to some structuring<br />

level) or \@ynthm{〈env〉}{〈output name〉}.<br />

\@othm \@othm is called by \@newtheorem if the environment to be defined uses<br />

another counter.<br />

779 \gdef\@othm#1[#2]#3{%<br />

780 \@ifundefined{c@#2}{\@nocounterr{#2}}%<br />

781 {\ifthm@tempif<br />

782 \global\@na<strong>med</strong>ef{the#1}{\@nameuse{the#2}}%<br />

783 \expandafter\protected@xdef\csname num@addtheoremline#1\endcsname{%<br />

784 \noexpand\@num@addtheoremline{#1}{#3}}%<br />

785 \expandafter\protected@xdef\csname nonum@addtheoremline#1\endcsname{%<br />

786 \noexpand\@nonum@addtheoremline{#1}{#3}}%<br />

787 \theoremkeyword{#3}%<br />

788 \expandafter\protected@xdef\csname #1Keyword\endcsname<br />

789 {\the\theoremkeyword}%<br />

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

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

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

793 \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 />

〈use ctr〉:=#2 is the internal name of the theorem which counter is used,<br />

and<br />

〈output name〉:=#3 is its “name” to be used in the output (both read from<br />

the L ATEX source).<br />

Line 780: if thecounter tobeusedis undefined,goto error, else set\the〈env〉<br />

to use \the〈use ctr〉 and do the following:<br />

62

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

Saved successfully!

Ooh no, something went wrong!