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).
void InsetSeparator::latex(otexstream & os, OutputParams const &) 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;
+ }