From: nico@cs.ruu.nl (Nico Verwer)
Newsgroups: comp.text.tex
Subject: customizing \newtheorem with newthm.sty
Summary: This used to be rmthm.sty
Keywords: LaTeX, \newtheorem, style file
Date: 27 Jan 93 13:12:38 GMT
Organization: Utrecht University, Dept. of Computer Science

A long time ago, I posted the rmthm.sty file, to typeset bodies of
environments defined with \newtheorem in roman font.
Since then, several other options have been added, and rmthm.sty has
been renamed into newthm.sty.
Documentation is contained in the file.
*** Archive administrators: Please replace rmthm.sty by this file. ***

--------------- 8< ------------------------------
%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "Nico Verwer",
%%%     version         = "1.3",
%%%     date            = "27 January 1993",
%%%     filename        = "newthm.sty",
%%%     address         = "Dept. of Computer Science
%%%                        Rijksuniversiteit te Utrecht
%%%                        P.O. box 80.089
%%%                        3508 TB Utrecht
%%%                        the Netherlands",
%%%     telephone       = "+31 30 533921",
%%%     FAX             = "+31 30 513791",
%%%     email           = "nico@cs.ruu.nl (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX, theorems",
%%%     supported       = "yes",
%%%     docstring       = "LaTeX document-style option for customizing
%%%                        theorem-like environments.
%%%                        Successor of rmthm.sty.",
%%%  }
%%% ====================================================================
% How to customize the theorem-like environments that you define with
% \newtheorem (LaTeX book p. 58).
% 1. \renewcommand{\theoremstyle}{...}
%    Changes the style in which your \newtheorems are typeset.
%    Default is \rm (\it in LaTeX).
% 2. \renewcommand{\theoremopening}[2]{...}
%    \renewcommand{\namedtheoremopening}[3]{...}
%    The first variant defines the opening of the theorem.
%    Its arguments are #1 : theorem label, #2 : number.
%    The second variant defines the opening in the presence of an
%    optional argument (like \begin{guess}[Fermat]).
%    Its arguments are #1 : theorem label, #2 : number, #3 : name.
%    Defaults are as in the LaTeX book. 
% 3. \renewcommand{\theoremclosing}{...}
%    Specifies an end-of-theorem marker.
%    Default is a box flushed right.
% 4. \newtheorem{thm}[nonumthm]{Thm}
%    Defines Thm to be a theorem-like environment that is not numbered.

% Don't load twice.
\ifx\theoremstyle\undefined\else\endinput\fi

\def\@begintheorem#1#2{\theoremstyle
                       \trivlist\item[\theoremopening{#1}{#2}]}
\def\@opargbegintheorem#1#2#3{\theoremstyle 
                       \trivlist\item[\namedtheoremopening{#1}{#2}{#3}]}
\def\@endtheorem{\nopagebreak\theoremclosing\endtrivlist}

% Defaults:
\def\theoremstyle{\rm}
\def\theoremopening#1#2{\hskip\labelsep{\bf #1\ #2}}
\def\namedtheoremopening#1#2#3{\hskip\labelsep{\bf #1\ #2\ (#3)}}
\def\theoremclosing{\ifvmode\vbox{$\Box$}\else\newline$\Box$\par\fi}

\newtheorem{nonumthm}{\relax}
\renewcommand{\thenonumthm}{\relax}

\endinput
--------------- 8< ------------------------------
Newsgroups: comp.text.tex