We can now tell whether a blank line was just output and so can
avoid outputting another one.
runparams.encoding);
wi.canBreakLine(os.canBreakLine());
write(wi);
runparams.encoding);
wi.canBreakLine(os.canBreakLine());
write(wi);
+ // Reset parbreak status after a math inset.
+ os.lastChar(0);
os.canBreakLine(wi.canBreakLine());
int lf = wi.line();
os.canBreakLine(wi.canBreakLine());
int lf = wi.line();
case LATEX_LIST_ENVIRONMENT:
if (nextpar
&& (par.params().depth() < nextpar->params().depth())
case LATEX_LIST_ENVIRONMENT:
if (nextpar
&& (par.params().depth() < nextpar->params().depth())
- && !par.isEnvSeparator(par.size() - 1))
+ && !os.afterParbreak())
pending_newline = true;
break;
case LATEX_ENVIRONMENT: {
pending_newline = true;
break;
case LATEX_ENVIRONMENT: {
default:
// we don't need it for the last paragraph!!!
// or if the last thing is an environment separator
default:
// we don't need it for the last paragraph!!!
// or if the last thing is an environment separator
- if (nextpar && par.size() > 0 && !par.isEnvSeparator(par.size() - 1))
+ if (nextpar && !os.afterParbreak())
pending_newline = true;
}
pending_newline = true;
}
// we don't need a newline for the last paragraph!!!
// Note from JMarc: we will re-add a \n explicitly in
// TeXEnvironment, because it is needed in this case
// we don't need a newline for the last paragraph!!!
// Note from JMarc: we will re-add a \n explicitly in
// TeXEnvironment, because it is needed in this case
- if (nextpar && par.size() > 0 && !par.isEnvSeparator(par.size() - 1)) {
+ if (nextpar && !os.afterParbreak()) {
// Make sure to start a new line
os << breakln;
Layout const & next_layout = nextpar->layout();
// Make sure to start a new line
os << breakln;
Layout const & next_layout = nextpar->layout();