Dear all, Attached patch is far away from elegant, but it works. Comments are welcome, especially if you have a better way to make space at the beginning of a line significant other than \hspace{0in}.
Cheers, Bo Index: src/insets/insetnote.C =================================================================== --- src/insets/insetnote.C (revision 14481) +++ src/insets/insetnote.C (working copy) @@ -266,6 +266,19 @@ ss << "%\n\\begin{" << type << "}\n"; InsetText::latex(buf, ss, runparams); ss << "%\n\\end{" << type << "}\n"; + // the space after the comment in 'a[comment] b' will be eaten by the + // comment environment since the space before b is ignored with the + // following latex output: + // + // a% + // \begin{comment} + // comment% + // \end{comment} + // b + // + // Adding \vspace{0in} before ' b' fixes this. + if (params_.type == InsetNoteParams::Comment) + ss << "\\hspace{0in}"; string const str = ss.str(); os << str;