- ss << "%\n\\end{" << type << "}\n";
-
- string const str = ss.str();
- os << str;
- // Return how many newlines we issued.
- return int(lyx::count(str.begin(), str.end(),'\n'));
-}
-
-
-int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
- OutputParams const & runparams) const
-{
- if (params_.type == InsetNoteParams::Note)
- return 0;
-
- ostringstream ss;
+ ss << "\n\\end{" << from_ascii(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.