[OS X TeX] outline

Alan Munn amunn at msu.edu
Sun Aug 2 23:38:14 CEST 2009


At 4:04 PM -0500 8/2/09, Wayne Richter wrote:
>On Sun, 2 Aug 2009, Claus Gerhardt wrote:
>
>>Proofs can be switched on/off by first defining and using the commands
>>
>>\newcommand{\bp}{\begin{proof}}
>>\newcommand{\ep}{\end{proof}}
>>
>>and later commenting or uncommenting
>>
>>\renewcommand{\bp}{\begin{comment}}
>>\renewcommand{\ep}{\end{comment}}
>>
>>Claus
>>
>>
>>On Jul 31, 2009, at 17:15, Wayne Richter wrote:
>>
>>>Is there a convenient way to get a PDF file from a math latex file that
>>>prints just: Definitions;
>>>            statement of Theorems, Lemmas, etc;
>>>            (perhaps) Remarks (some flexibility would be nice)
>>>
>>>  but no Proofs or general exposition?
>>>
>>>It is possible to comment everything unwanted out,
>>>but there must be an easier way. Is there a package or
>>>some other convenient way of doing this? Perhaps within a table of 
>>>contents package?
>>>
>>>Thanks,
>>>
>>>Wayne Richter
>
>Thanks for the suggestion. When I typeset in latex the following
>
>\documentclass{amsart}
>\usepackage{verbatim}
>\newcommand{\bp}{\begin{proof}}
>\newcommand{\ep}{\end{proof}}
>%\renewcommand{\bp}{\begin{comment}}
>%\renewcommand{\ep}{\end{comment}}
>\begin{document}
>\bp
>  0=1
>\ep
>help
>\end{document}
>
>it works fine, but when I typeset in latex
>
>\documentclass{amsart}
>\usepackage{verbatim}
>\newcommand{\bp}{\begin{proof}}
>\newcommand{\ep}{\end{proof}}
>\renewcommand{\bp}{\begin{comment}}
>\renewcommand{\ep}{\end{comment}}
>\begin{document}
>\bp
>  0=1
>\ep
>help
>\end{document}
>
>it doesn't. I get in the test console the message
>
>[snip]
>
>(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfons/umsb.fd))
>Runaway argument?
>! File ended while scanning use of \next.
><inserted text>
>         \par
><*> test.tex
>
>?
>
>I get a similar error message when I try just
>
>\documentclass{amsart}
>\usepackage{verbatim}
>\newcommand{\bp}{\begin{comment}}
>\newcommand{\ep}{\end{comment}}
>\begin{document}
>\bp
>  0=1
>\ep
>help
>\end{document}
>
>and also a similar error message when I try to define the corresponding
>  new environment for "proof".
>
>Is there some problem with the relationship between the verbatim.sty
>package and the ams classes? Or am I just doing something wrong?
>It seems that the \begin{comment} part is okay, but the
>\end{comment} part is causing the problem.
>
>Wayne

This has nothing to do with the ams classes. It is because the 
comment environment doesn't expand any commands between the 
\begin{comment} and \end{comment} and throws away everything else. 
So you can't simply replace \begin{comment} and \end{comment} with 
\bp \ep, as Claus suggested, because the \ep never gets interpreted. 
You really need to use the actual \begin{comment} \end{comment} 
commands.

Of course, this doesn't really help to solve your original problem.

Alan


-- 
Alan Munn						amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages		Tel. 
	517-355-7491
Michigan State University, East Lansing MI 48824 USA	Fax	517-432-2736



More information about the macostex-archives mailing list