JMarc,

How do you think of this note-eats-blank patch?

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 {} before ' b' fixes this.
+       if  (params_.type == InsetNoteParams::Comment)
+               ss << "{}";

        string const str = ss.str();
        os << str;

Reply via email to