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.

\newtheoremlisttype According to the given documentation, this one can be used to define<br />

new list-types. It’s done by defininig the macro \thm@thml@〈type〉,<br />

whichlocally redefinesthecommands\thm@thmlstart,\thm@@thmlineand<br />

\thm@@thmlend.<br />

964 \def\newtheoremlisttype#1#2#3#4{%<br />

965 \@ifundefined{thm@thml@#1}%<br />

966 {\expandafter\gdef\csname thm@thml@#1\endcsname{%<br />

967 \def\thm@@thmlstart{#2}%<br />

968 \def\thm@@thmline####1####2####3####4{#3}%<br />

969 \def\thm@@thmlend{#4}}%<br />

970 }{\PackageError{\basename}{list type #1 already defined}\@eha}}<br />

\renewtheoremlisttype<br />

971 \def\renewtheoremlisttype#1#2#3#4{%<br />

972 \@ifundefined{thm@thml@#1}%<br />

973 {\PackageError{\basename}{List type #1 not defined}\@ehc}{}%<br />

974 \expandafter\let\csname thm@thml@#1\endcsname\relax<br />

975 \newtheoremlisttype{#1}{#2}{#3}{#4}}<br />

if the list type to be redefined is already defined, make it undefined and<br />

define it.<br />

\thm@definelthm For each theorem-set, we need to initialize two commands:<br />

• how to typeset entries in the list, \l@〈theorem-set〉. it is called for<br />

each theorem when the list is generated.<br />

• how to typeset additional text in the list, \thm@listdo〈theorem-set〉.<br />

It is called, when something is to a list with \addtotheoremfile.<br />

These macros are initially defined by \newtheorem to discard the input by<br />

calling\thm@lgobble@entry(foractualentries)and\thm@lgobble@freetext<br />

(for free text added by the user). These macros must be adapted if a package<br />

uses another format for \contentsline entries in the .aux file (e.g.,<br />

hyperref).<br />

976 \def\thm@definelthm#1{%<br />

977 \expandafter\gdef\csname l@#1\endcsname{\thm@lgobble@entry}%<br />

978 \expandafter\gdef\csname thm@listdo#1\endcsname{\thm@lgobble@freetext}}<br />

\thm@inlistdo When additional text is added to a theorem list via \addtotheoremfile,<br />

thisistypesetbythefollowingismacro. Itsimplydiscardsthefirstargument<br />

and strips of the outer brackets from the second one.<br />

979 \long\def\thm@inlistdo#1#2{#2}%<br />

\listtheorems The following macro provides the user interface:<br />

980 \def\listtheorems#1{\begingroup<br />

981 \c@tocdepth=-2%<br />

982 \def\thm@list{#1}\thm@processlist<br />

983 \endgroup}<br />

72

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

Saved successfully!

Ooh no, something went wrong!