[texhax] meddling with the comment environment in latex, article class
Micha Hofri
hofri at WPI.EDU
Wed Nov 21 00:53:24 CET 2007
That's the ticket. I once had a sign that said RTFM. Time for another?
Many thanks for bearing with me,
--Micha Hofri
At 20:54 on 11/20/07 Eduardo M KALINOWSKI sent:
: On Nov 20, 2007 7:55 PM, Micha Hofri <hofri at wpi.edu> wrote:
: >
: > I write many homework assignments for my students that I post twice, The
: > second time with solutions; each problem is followed by its solution.
: >
: > Naturally I want to use the same file for the two postings. My current
: > method: surround the solutions by \begin{comment}...\end{comment} and use
: > a parameter that gets a value 0 (no solutions) or 1 (with solutions),
: > When it is 1 an \ifthenelse kicks in that activates a \renewenvironment,
: > which replaces the comment delimiters by a text like "solution:"
: >
: > Thus when I need to post solutions, the only editing is to change one
: > \newcommand argument from 0 to 1. This works well, but I "lose" the
: > normal use of the comment environment, which I would like to keep.
: >
: > The same parameter is also used to drive changes in headers and markings,
: > so I would like to keep using it. I thought of a new environment, say
: > solution, in which to keep the solutions, and then skip them when my
: > parameter is 0, but I cannot do it with the comment environment (the
: > \end{solution} is not caught..). there is certainly an obvious solution
: > that evades me.
:
: See the documentation for the comment package. You can achieve what
: you currently have in an easier way with \includecomment and
: \excludecomment.
:
More information about the texhax
mailing list