Paul Smith wrote:

Thanks, Uwe. I did not know about amsthm package. It does nearly what
I want, and what I want is explained in the example below.

See the attached example and the file amsthdoc.dvi on your computer.

regards Uwe
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
\usepackage{amsthm}

\newtheoremstyle{paul}%
 {\topsep} %space above
 {\topsep} %space below
 {\normalfont} %body font
 {} %indent
 {\rmfamily\bfseries} %head font
 {} %point after head
 {\newline} %space/command after heading
 {} %head specification

\theoremstyle{paul}
\newtheorem{exa}{Exercise}

\newcommand{\beg}[2]{\begin{#1}[\textbf{#2}]}
\end_preamble
\language american
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 1
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard


\begin_inset ERT
status Open

\layout Standard

\backslash 
begin{exa}[Zarathustra]
\end_inset 


\layout Standard

See amsthdoc.dvi!
\layout Standard


\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
end{exa}
\end_inset 


\layout Standard


\begin_inset ERT
status Open

\layout Standard

\backslash 
beg{exa}{Zarathustra}
\end_inset 


\layout Standard

See amsthdoc.dvi!
\layout Standard


\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
end{exa}
\end_inset 


\the_end

Reply via email to