Stefano Franchi schrieb:


On 12 Dec, 2006, at 11:03 AM, Dominik Waßenhoven wrote:
"If you want to be able to switch between printing and not printing your comments, you could use LyX's comment environment and add the following code to your preamble. [...] If you don't want the comments to be printed, just put % signs in front of the code. Note that this does not work if you have no comment in your document."

Nice corrections and nice description, Dominik! I'll integrate and post to the wiki.

Thanks. I just tested a little bit and came around the problem of a document without a comment. The following should work even then:

\RequirePackage{colortbl,tabularx}
\ifundefined{comment}{}{%
\renewenvironment{comment}{%
  \par\medskip\noindent
  \tabularx{\textwidth}{|>{\columncolor[gray]{0.9}}X|}
  \hline
  \emph{Comment:}
  }{%
  \endtabularx\hrule\par\medskip
  }
}

Of course you still have to comment out the passage if you *dont* want to have the comments included in the output...

Regards,
Dominik.-

Reply via email to