Fix bug 2768 (inset comment eats space after it)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2006-08-15 15:22:30 +00:00
parent f98a856568
commit 4d7fc5b6a9
3 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2006-03-11 Bo Peng <ben.bob@gmail.com>
* insetnote.C: fix bug 2768 (comment/note eats space after it)
2006-07-12 Martin Vermeer <martin.vermeer@hut.fi> 2006-07-12 Martin Vermeer <martin.vermeer@hut.fi>
* insettabular.C (metrics): fix width of insets inside tabular * insettabular.C (metrics): fix width of insets inside tabular

View File

@ -249,7 +249,20 @@ int InsetNote::latex(Buffer const & buf, ostream & os,
ostringstream ss; ostringstream ss;
ss << "%\n\\begin{" << type << "}\n"; ss << "%\n\\begin{" << type << "}\n";
InsetText::latex(buf, ss, runparams); InsetText::latex(buf, ss, runparams);
ss << "%\n\\end{" << type << "}\n"; 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(); string const str = ss.str();
os << str; os << str;

View File

@ -52,6 +52,8 @@ What's new
- Render greyed out notes correctly in output (bug 2723) - Render greyed out notes correctly in output (bug 2723)
- Fix bug 2768 (inset comment/note eats space after it)
* User Interface: * User Interface:
- Fix crash when using next-inset-toggle (Ctrl+I) inside mathed; make - Fix crash when using next-inset-toggle (Ctrl+I) inside mathed; make