Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

ExportWithCommentsIncluded

Categories: Comments
<< | Page list | >>

How to Switch Printing of Comments On and Off

Convert to Greyed Out

There are three comment styles: Comment, Greyedout, and Lyx Note. Lyx Notes are only seen in the Lyx document; they are not printed or exported to Latex. Comments are exported to Latex as Latex comments; they are not printed. Greyedouts are printed as grey text. You can change the colour of the "grey" text in Documents→Settings→Colours.

To print Lyx Notes or Comments you can convert them to Greyedouts.

In LyX >= 1.6.1 you can right click on the heading of an individual comment and change the type to Comment, Greyedout or LyX Note.

In LyX >= 2.0.0 you can convert all notes by pressing Alt-X to get a little command window and running the function

inset-forall Note inset-modify note Note Greyedout

In Lyx 1.6 use the use notes-mutate LyX function instead.

Branches

In LyX >= 1.5, you can useet up a branch in Document>Settings>Branches.

Make Comments Visible

An alternative for LyX < 1.5 is to redefine the Latex comments (just Comment in Lyx) to be visible. 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 2011-10-12 18:58 CEST