\newteorem{nazwa środowiska}{tekst nagłówka}\newteorem{nazwa środowiska drugiego}%
[nazwa środowiska]{tekst nagłówka drugiego}\newteorem{nazwa środowiska drugiego}%
{tekst nagłówka drugiego}[section]Dostępne są polecenia zmieniające:
\theoremstyle{style}\theoremheaderfont{font}
\theorembodyfont{font}
\theorempreskimamount
\theorempostskimamount
Przykład
Poniższe polecenia definiujące nowe środowiska i ich cechy muszą znaleźć
się w preambule dokumentu (między poleceniem \documentclass...,
a \begin{document}).
Licznikiem środowiska Def jest licznik środowiska The, a licznik środowiska Lem jest zależny od licznika środowiska The.
\theoremstyle{plain} \newtheorem{Cor}{Corollary}
\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\normalfont\slshape}
\theoremstyle{break} \newtheorem{Exa}{Example}
\theoremstyle{changebreak} \newtheorem{The}{Theorem}
\theoremstyle{marginbreak} \newtheorem{Lem}{Lemma}[The]
\theoremstyle{change} \newtheorem{Def}[The]{Definition}
\theoremstyle{margin} \newtheorem{Rem}{Remark}
\theoremstyle{nonumber} \newtheorem{uwaga}{Uwaga !}
\begin{Cor}
This is a sentence typeset in the theorem environment Cor.
\end{Cor}
\begin{Exa}
This is a sentence typeset in the theorem environment Exa.
\end{Exa}
\begin{The}
This is a sentence typeset in the theorem environment The.
\end{The}
\begin{Lem}
This is a sentence typeset in the theorem environment Lem.
\end{Lem}
\begin{Def}[extra text]
This is a sentence typeset in the theorem environment Def.
\end{Def}
\begin{Rem}
This is a sentence typeset in the theorem environment Rem.
\end{Rem}
\begin{uwaga}
This is a sentence typeset in the theorem environment uwaga.
\end{uwaga}
Utworzenie nowego sposobu prezentacji środowiska nie zostało rozwiżane w sposób elegancki; wymaga dopisania następujćej makroinstrukcji (przykład dla środowiska uwaga), gdzie nonumber jest nazwą nowego środowiska (uwaga na znak @)
\gdef\th@nonumber{\normalfont\slshape
\def\@begintheorem##1##2{\item[%
\rlap{\vbox{\hbox{\hskip \labelsep\theorem@headerfont ##1}%
\vskip 1ex%
\hbox{\strut}}}]}%
\def\@opargbegintheorem##1##2##3{%
\item[\rlap{\vbox{\hbox{\hskip \labelsep \theorem@headerfont
##1\ ##2\ (##3)}%
\hbox{\strut}}}]}}
Włodzimierz Macewicz