Great,
This is very nice.
This is something which is perfect to include in the software itself.
In the export dialog, a checkbox can be added with the choice whether
or not you want the comments to be included in the text/dvi/pdf/... If
so, the proposed piece of code is to be injected into the preamble,
and comments included. If unchecked: the old fashion way ;-)
Regards,
Brecht
On 12/12/06, Dominik Waßenhoven <[EMAIL PROTECTED]> wrote:
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.-
--
Brecht Wyseur
Katholieke Universiteit Leuven tel. +32 16 32 11 29
Dept. Electrical Engineering-ESAT / COSIC fax. +32 16 32 19 69
Kasteelpark Arenberg 10, B-3001 Leuven-Heverlee, BELGIUM office 02.20
[EMAIL PROTECTED]
http://homes.esat.kuleuven.be/~bwyseur
P=NP if (P=0 or N=1)
GPG Pub key: https://homes.esat.kuleuven.be/~bwyseur/pubkey
GPG Fingerprint: 890C 7C0B F1D9 597E F205 87C8 B716 D7D3 20F8 353F