Prettify the output of InsetSeparator.

If a separator inset is used after an environment with NextNoIndent
set to false, a blank line was already output. So, avoid outputting
another blank line or an odd looking line with only a '%' character
(as the previous blank line provides already a visual separation).
This commit is contained in:
Enrico Forestieri 2014-05-18 23:02:24 +02:00
parent ee9ff6cb0c
commit 1ad3f809a4

View File

@ -139,16 +139,19 @@ ColorCode InsetSeparator::ColorName() const
void InsetSeparator::latex(otexstream & os, OutputParams const &) const
{
switch (params_.kind) {
case InsetSeparatorParams::PLAIN:
os << breakln << "%\n";
break;
case InsetSeparatorParams::PARBREAK:
os << breakln << "\n";
break;
default:
os << breakln << "%\n";
break;
// Do nothing if a paragraph break was just output
if (!os.afterParbreak()) {
switch (params_.kind) {
case InsetSeparatorParams::PLAIN:
os << breakln << "%\n";
break;
case InsetSeparatorParams::PARBREAK:
os << breakln << "\n";
break;
default:
os << breakln << "%\n";
break;
}
}
}