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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

is continued with \@flushglue (the actual position is one space after the<br />

text), and then the endmark is placed (by \PotEndMark).<br />

Handling of Endmarks<br />

\@endtheorem-thmmarks \@endtheorem is called for every \end{〈env〉}, where 〈env〉 is a theoremlike<br />

environment. \@endtheorem is extended to organize the placement of<br />

the corresponding end mark (\InTheoTypegives the innermost theorem-like<br />

environment, i.e. the one to be ended):<br />

96 \gdef\@empty{}<br />

97 \gdef\@endtheorem{%<br />

98 \expandafter<br />

99 \ifx\csname\InTheoType Symbol\endcsname\@empty\setendmarkfalse\fi<br />

100 \@endtrivlist<br />

101 {\ifsetendmark<br />

102 \unskip\nobreak\hfill\nobreak\csname\InTheoType Symbol\endcsname<br />

103 \setendmarkfalse \fi}%<br />

104 \ifsetendmark\OrganizeTheoremSymbol\else\global\setendmarktrue\fi<br />

105 \csname\InTheoType @postwork\endcsname<br />

106 }<br />

Lines 98, 99: if the end symbol of the environment 〈env〉 to be closed is<br />

empty, simply no end symbol has to be set (it makes a difference, if<br />

no end symbol is set, or if an empty end symbol is set).<br />

Lines 100, 104: (originally, it calls \endtrivlist):<br />

Lines 100, 102, 103: \@endtrivlist is called to put 〈env〉Symbol at the end<br />

of the line and set setendmark to false if TEX is in a text line and<br />

setendmark is true.<br />

At this point, setendmark is false iff the user has disabled it locally or<br />

the end symbol is empty.<br />

Line 101: the endmark is not set, if setendmark is false.<br />

Line 104: if setendmark is true, the correct placement of the end symbol is<br />

organized, else (ie either setendmarkfalse is set by the user, or the endmark<br />

is already set by \@endtrivlist) reset setendmark to true.<br />

Forfurthercommentssee\@endtrivlistand\OrganizeTheoremSymbol.<br />

The construction in line 102 guarantees that the endmark is put at the end<br />

of the line, even if it is the only letter in this line.<br />

\NoEndMark By \NoEndMark, the automatical setting of an end mark is blocked for the<br />

current environment.<br />

107 \gdef\NoEndMark{\global\setendmarkfalse}<br />

set setendmark to false. It is automatically reset to true after the end of<br />

the current environment.<br />

37

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

Saved successfully!

Ooh no, something went wrong!