| 1 |
%% |
| 2 |
%% This is file `theorem.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% theorem.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% The source is maintained by the LaTeX Project team and bug |
| 12 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 13 |
%% (but please observe conditions on bug reports sent to that address!) |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% Copyright (C) 1993-2026 |
| 17 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 18 |
%% in this file. |
| 19 |
%% |
| 20 |
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. |
| 21 |
%% -------------------------------------------------------------------------- |
| 22 |
%% |
| 23 |
%% It may be distributed and/or modified under the |
| 24 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 25 |
%% of this license or (at your option) any later version. |
| 26 |
%% The latest version of this license is in |
| 27 |
%% https://www.latex-project.org/lppl.txt |
| 28 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 29 |
%% version 2005/12/01 or later. |
| 30 |
%% |
| 31 |
%% This file may only be distributed together with a copy of the LaTeX |
| 32 |
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' |
| 33 |
%% without such generated files. |
| 34 |
%% |
| 35 |
%% The list of all files belonging to the LaTeX `Tools Bundle' is |
| 36 |
%% given in the file `manifest.txt'. |
| 37 |
%% |
| 38 |
%% |
| 39 |
\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)} |
| 40 |
%% |
| 41 |
%% Package `theorem' to use with LaTeX2e |
| 42 |
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved. |
| 43 |
\@ifundefined{theorem@style}{}{\endinput} |
| 44 |
\NeedsTeXFormat{LaTeX2e}[1995/06/01] |
| 45 |
\ProvidesPackage{theorem} |
| 46 |
[\FMithmInfo] |
| 47 |
\gdef\theoremstyle#1{% |
| 48 |
\@ifundefined{th@#1}{\@warning |
| 49 |
{Unknown theoremstyle `#1'. Using `plain'}% |
| 50 |
\theorem@style{plain}}% |
| 51 |
{\theorem@style{#1}}% |
| 52 |
\begingroup |
| 53 |
\csname th@\the\theorem@style \endcsname |
| 54 |
\endgroup} |
| 55 |
\global\let\@begintheorem\relax |
| 56 |
\global\let\@opargbegintheorem\relax |
| 57 |
\newtoks\theorem@style |
| 58 |
\global\theorem@style{plain} |
| 59 |
\gdef\theorembodyfont#1{% |
| 60 |
\def\@tempa{#1}% |
| 61 |
\ifx\@tempa\@empty |
| 62 |
\theorem@bodyfont{}% |
| 63 |
\else |
| 64 |
\theorem@bodyfont{\reset@font#1}% |
| 65 |
\fi |
| 66 |
} |
| 67 |
\newtoks\theorem@bodyfont |
| 68 |
\global\theorem@bodyfont{} |
| 69 |
\gdef\theoremheaderfont#1{\gdef\theorem@headerfont{#1}% |
| 70 |
\gdef\theoremheaderfont##1{% |
| 71 |
\typeout{\string\theoremheaderfont\space should be used |
| 72 |
only once.}}} |
| 73 |
\ifx\upshape\undefined |
| 74 |
\gdef\theorem@headerfont{\bfseries} |
| 75 |
\else \gdef\theorem@headerfont{\normalfont\bfseries}\fi |
| 76 |
\gdef\th@plain{\@input@{thp.sty}} |
| 77 |
\gdef\th@break{\@input@{thb.sty}} |
| 78 |
\gdef\th@marginbreak{\@input@{thmb.sty}} |
| 79 |
\gdef\th@changebreak{\@input@{thcb.sty}} |
| 80 |
\gdef\th@change{\@input@{thc.sty}} |
| 81 |
\gdef\th@margin{\@input@{thm.sty}} |
| 82 |
\gdef\@xnthm#1#2[#3]{\expandafter\@ifdefinable\csname #1\endcsname |
| 83 |
{% |
| 84 |
\@definecounter{#1}\@newctr{#1}[#3]% |
| 85 |
\expandafter\xdef\csname the#1\endcsname |
| 86 |
{\expandafter \noexpand \csname the#3\endcsname |
| 87 |
\@thmcountersep \@thmcounter{#1}}% |
| 88 |
\def\@tempa{\global\@namedef{#1}}% |
| 89 |
\expandafter \@tempa \expandafter{% |
| 90 |
\csname th@\the \theorem@style |
| 91 |
\expandafter \endcsname \the \theorem@bodyfont |
| 92 |
\@thm{#1}{#2}}% |
| 93 |
\global \expandafter \let \csname end#1\endcsname \@endtheorem |
| 94 |
}} |
| 95 |
\gdef\@ynthm#1#2{\expandafter\@ifdefinable\csname #1\endcsname |
| 96 |
{\@definecounter{#1}% |
| 97 |
\expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}% |
| 98 |
\def\@tempa{\global\@namedef{#1}}\expandafter \@tempa |
| 99 |
\expandafter{\csname th@\the \theorem@style \expandafter |
| 100 |
\endcsname \the\theorem@bodyfont \@thm{#1}{#2}}% |
| 101 |
\global \expandafter \let \csname end#1\endcsname \@endtheorem}} |
| 102 |
\gdef\@othm#1[#2]#3{% |
| 103 |
\expandafter\ifx\csname c@#2\endcsname\relax |
| 104 |
\@nocounterr{#2}% |
| 105 |
\else |
| 106 |
\expandafter\@ifdefinable\csname #1\endcsname |
| 107 |
{\expandafter \xdef \csname the#1\endcsname |
| 108 |
{\expandafter \noexpand \csname the#2\endcsname}% |
| 109 |
\def\@tempa{\global\@namedef{#1}}\expandafter \@tempa |
| 110 |
\expandafter{\csname th@\the \theorem@style \expandafter |
| 111 |
\endcsname \the\theorem@bodyfont \@thm{#2}{#3}}% |
| 112 |
\global \expandafter \let \csname end#1\endcsname \@endtheorem}% |
| 113 |
\fi} |
| 114 |
\gdef\@thm#1#2{\refstepcounter{#1}% |
| 115 |
\trivlist |
| 116 |
\@topsep \theorempreskipamount % used by first \item |
| 117 |
\@topsepadd \theorempostskipamount % used by \@endparenv |
| 118 |
\@ifnextchar [% |
| 119 |
{\@ythm{#1}{#2}}% |
| 120 |
{\@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}} |
| 121 |
\global\let\@xthm\relax |
| 122 |
\newskip\theorempreskipamount |
| 123 |
\newskip\theorempostskipamount |
| 124 |
\global\setlength\theorempreskipamount{12pt plus 5pt minus 3pt} |
| 125 |
\global\setlength\theorempostskipamount{8pt plus 3pt minus 1.5pt} |
| 126 |
\global\let\@endtheorem=\endtrivlist |
| 127 |
\@onlypreamble\@xnthm |
| 128 |
\@onlypreamble\@ynthm |
| 129 |
\@onlypreamble\@othm |
| 130 |
\@onlypreamble\newtheorem |
| 131 |
\@onlypreamble\theoremstyle |
| 132 |
\@onlypreamble\theorembodyfont |
| 133 |
\@onlypreamble\theoremheaderfont |
| 134 |
\theoremstyle{plain} |
| 135 |
|
| 136 |
\endinput |
| 137 |
%% |
| 138 |
%% End of file `theorem.sty'. |