mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 08:41:46 +00:00
Adapt output to the on-screen representation.
LyX assumes that a standard paragraph following a layout with NextNoIndent==false has to be indented on screen, so output the necessary blank line to make it so also in the output.
This commit is contained in:
parent
f5a246b185
commit
1fa06296b6
@ -198,7 +198,9 @@ static TeXEnvironmentData prepareEnvironment(Buffer const & buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void finishEnvironment(otexstream & os, OutputParams const & runparams,
|
static void finishEnvironment(Buffer const & buf, Text const & text,
|
||||||
|
pit_type nextpit, otexstream & os,
|
||||||
|
OutputParams const & runparams,
|
||||||
TeXEnvironmentData const & data)
|
TeXEnvironmentData const & data)
|
||||||
{
|
{
|
||||||
if (open_encoding_ == CJK && data.cjk_nested) {
|
if (open_encoding_ == CJK && data.cjk_nested) {
|
||||||
@ -227,6 +229,14 @@ static void finishEnvironment(otexstream & os, OutputParams const & runparams,
|
|||||||
os << setEncoding(data.prev_encoding->iconvName());
|
os << setEncoding(data.prev_encoding->iconvName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check whether we should output a blank line after the environment
|
||||||
|
DocumentClass const & tclass = buf.params().documentClass();
|
||||||
|
ParagraphList const & pars = text.paragraphs();
|
||||||
|
bool next_style_is_default = (nextpit >= runparams.par_end) ? false
|
||||||
|
: tclass.isDefaultLayout(pars.constIterator(nextpit)->layout());
|
||||||
|
if (!data.style->nextnoindent && next_style_is_default)
|
||||||
|
os << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -306,7 +316,7 @@ void TeXEnvironment(Buffer const & buf, Text const & text,
|
|||||||
prepareEnvironment(buf, text, par, os, runparams);
|
prepareEnvironment(buf, text, par, os, runparams);
|
||||||
// Recursive call to TeXEnvironment!
|
// Recursive call to TeXEnvironment!
|
||||||
TeXEnvironment(buf, text, runparams, pit, os);
|
TeXEnvironment(buf, text, runparams, pit, os);
|
||||||
finishEnvironment(os, runparams, data);
|
finishEnvironment(buf, text, pit + 1, os, runparams, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pit != runparams.par_end)
|
if (pit != runparams.par_end)
|
||||||
@ -1142,7 +1152,7 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
prepareEnvironment(buf, text, par, os, runparams);
|
prepareEnvironment(buf, text, par, os, runparams);
|
||||||
// pit can be changed in TeXEnvironment.
|
// pit can be changed in TeXEnvironment.
|
||||||
TeXEnvironment(buf, text, runparams, pit, os);
|
TeXEnvironment(buf, text, runparams, pit, os);
|
||||||
finishEnvironment(os, runparams, data);
|
finishEnvironment(buf, text, pit + 1, os, runparams, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pit == runparams.par_end) {
|
if (pit == runparams.par_end) {
|
||||||
|
@ -80,6 +80,8 @@ What's new
|
|||||||
|
|
||||||
- Fix table cell rotation conversion from 2.1 to 2.0 format.
|
- Fix table cell rotation conversion from 2.1 to 2.0 format.
|
||||||
|
|
||||||
|
- Honor the NextNoIndent layout parameter also in the exported output.
|
||||||
|
|
||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user