Go to page:

Search help:

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

ExportWithCommentsIncluded

Categories: Comments
<< Correcting split Subversion keywords | Page list | >>

How to Switch Printing of Comments On and Off

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.

\RequirePackage{colortbl, tabularx}
\@ifundefined{comment}{}% do nothing if the comment environment is not defined
  {% redefine the comment environment if it is defined
   \renewenvironment{comment}
    {% replaces \begin{comment}
     \par\medskip\noindent
     \tabularx{\textwidth}{|>{\columncolor[gray]{0.9}}X|}
     \hline
     \emph{\textbf{Comment:}}% You can use any other text instead of "Comment:" or leave it
    }
    {% replaces \end{comment}
     \endtabularx\hrule\par\medskip
    }
  }%

This code will print your comments inside a grayed box with the italicized label "Comment:" on the first line.

If you don't want the comments to be printed, just put % signs in front of each line of the code.

Comments

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2007-03-01 18:00 CET