mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
* src/paragraph.C (corrected_env, endTeXParams):
- writeout \begin and \end alignment tags on their own lines (bug 3010). (patch from Gregor Gorjanc and me). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16164 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7c184e5426
commit
a0534e02c1
@ -736,7 +736,10 @@ string const corrected_env(string const & suffix, string const & env,
|
||||
output += correction(env);
|
||||
else
|
||||
output += env;
|
||||
return output + "}";
|
||||
output += "}";
|
||||
if (suffix == "\\begin")
|
||||
output += "\n";
|
||||
return output;
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
@ -837,24 +840,24 @@ int Paragraph::endTeXParParams(BufferParams const & bparams,
|
||||
case LYX_ALIGN_LEFT: {
|
||||
string output;
|
||||
if (getParLanguage(bparams)->babel() != "hebrew")
|
||||
output = corrected_env("\\par\\end", "flushleft", ownerCode());
|
||||
output = corrected_env("\n\\par\\end", "flushleft", ownerCode());
|
||||
else
|
||||
output = corrected_env("\\par\\end", "flushright", ownerCode());
|
||||
output = corrected_env("\n\\par\\end", "flushright", ownerCode());
|
||||
os << from_ascii(output);
|
||||
column += output.size();
|
||||
break;
|
||||
} case LYX_ALIGN_RIGHT: {
|
||||
string output;
|
||||
if (getParLanguage(bparams)->babel() != "hebrew")
|
||||
output = corrected_env("\\par\\end", "flushright", ownerCode());
|
||||
output = corrected_env("\n\\par\\end", "flushright", ownerCode());
|
||||
else
|
||||
output = corrected_env("\\par\\end", "flushleft", ownerCode());
|
||||
output = corrected_env("\n\\par\\end", "flushleft", ownerCode());
|
||||
os << from_ascii(output);
|
||||
column += output.size();
|
||||
break;
|
||||
} case LYX_ALIGN_CENTER: {
|
||||
string output;
|
||||
output = corrected_env("\\par\\end", "center", ownerCode());
|
||||
output = corrected_env("\n\\par\\end", "center", ownerCode());
|
||||
os << from_ascii(output);
|
||||
column += output.size();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user