1 #\DeclareLyXModule{Standard Theorems}
2 #\DeclareCategory{Maths}
4 #Defines some theorem environments for use with non-AMS classes. By default,
5 #the theorems are numbered consecutively throughout the document. This can be
6 #changed by loading one of the 'Theorems (Numbered by ...)' modules.
8 #Excludes: theorems-ams | theorems-ams-bytype | theorems-bytype
10 # Author: Richard Kimberly Heck <rikiheck@lyx.org>
11 # Edited sep '22 by Udi Fogiel <udifoglle@gmail.com>
21 Input theorems-proof-std.inc
25 \def\lyx@reverse@two#1#2{#2#1}
27 \def\lyx@definition{definition}
28 \def\lyx@remark{remark}
29 \newcommand\theoremstyle[1]{%
31 \ifx\lyx@style\lyx@plain
32 \def\lyx@headfont{\bfseries}%
33 \def\lyx@bodyfont{\itshape}%
35 \ifx\lyx@style\lyx@definition
36 \def\lyx@headfont{\bfseries}%
37 \def\lyx@bodyfont{\upshape}%
39 \ifx\lyx@style\lyx@remark
40 \def\lyx@headfont{\itshape}%
41 \def\lyx@bodyfont{\upshape}%
47 \@begintheorem{\normalfont\csname lyx@\@firstoftwo#2@headfont\endcsname \@secondoftwo#2}{\begingroup\upshape\csname the#1\endcsname\endgroup.}\normalfont\csname lyx@\@firstoftwo#2@bodyfont\endcsname\ignorespaces
50 \@opargbegintheorem{\normalfont{\csname lyx@\@firstoftwo#2@headfont\endcsname \@secondoftwo#2}}{\begingroup\csname lyx@\@firstoftwo#2@headfont\endcsname\upshape\csname the#1\endcsname\endgroup}{#3\lyx@reverse@two{\begingroup\normalfont\csname lyx@\@firstoftwo#2@headfont\endcsname.\endgroup}}\normalfont\csname lyx@\@firstoftwo#2@bodyfont\endcsname\ignorespaces
52 \def\lyx@othm#1[#2]#3{\@othm{#1}[#2]{{#1}{#3}}}
53 \def\lyx@nthm#1#2{\@ifnextchar[{\@xnthm{#1}{{#1}{#2}}}{\@ynthm{#1}{{#1}{#2}}}}
54 \renewcommand\newtheorem[1]{%
55 \expandafter\let\csname lyx@#1@headfont\expandafter\endcsname\lyx@headfont
56 \expandafter\let\csname lyx@#1@bodyfont\expandafter\endcsname\lyx@bodyfont
57 \@ifnextchar[{\lyx@othm{#1}}{\lyx@nthm{#1}}}
58 \newcommand\lyx@starred@newtheorem[2]{\newtheorem{#1}{#2}\expandafter\def\csname the#1\endcsname{\unskip}}
59 \newcommand\lyx@reg@newtheorem[2]{\newtheorem{#1}[thm]{#2}}
60 \newcommand\lyx@newtheorem{\@ifstar{\lyx@starred@newtheorem}{\lyx@reg@newtheorem}}
62 \newtheorem{thm}{\protect\theoremname}