mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
Revert r37092. The fix was wrong.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37127 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
858680fee4
commit
8c61911270
@ -20,8 +20,7 @@ namespace lyx {
|
|||||||
|
|
||||||
OutputParams::OutputParams(Encoding const * enc)
|
OutputParams::OutputParams(Encoding const * enc)
|
||||||
: flavor(LATEX), math_flavor(NotApplicable), nice(false), moving_arg(false),
|
: flavor(LATEX), math_flavor(NotApplicable), nice(false), moving_arg(false),
|
||||||
inulemcmd(false), inTitle(false), didTitle(false), local_font(0),
|
inulemcmd(false), local_font(0), master_language(0), encoding(enc),
|
||||||
master_language(0), encoding(enc),
|
|
||||||
free_spacing(false), use_babel(false), use_polyglossia(false),
|
free_spacing(false), use_babel(false), use_polyglossia(false),
|
||||||
use_indices(false), use_japanese(false), linelen(0), depth(0),
|
use_indices(false), use_japanese(false), linelen(0), depth(0),
|
||||||
exportdata(new ExportData),
|
exportdata(new ExportData),
|
||||||
|
@ -99,14 +99,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
mutable bool inulemcmd;
|
mutable bool inulemcmd;
|
||||||
|
|
||||||
/** Whether we are in the process of outputting title information.
|
|
||||||
*/
|
|
||||||
mutable bool inTitle;
|
|
||||||
|
|
||||||
/** Whether we have arleady output \maketitle or whatever.
|
|
||||||
*/
|
|
||||||
mutable bool didTitle;
|
|
||||||
|
|
||||||
/** the font at the point where the inset is
|
/** the font at the point where the inset is
|
||||||
*/
|
*/
|
||||||
Font const * local_font;
|
Font const * local_font;
|
||||||
|
@ -978,6 +978,9 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
pit_type pit = runparams.par_begin;
|
pit_type pit = runparams.par_begin;
|
||||||
// lastpit is for the language check after the loop.
|
// lastpit is for the language check after the loop.
|
||||||
pit_type lastpit = pit;
|
pit_type lastpit = pit;
|
||||||
|
// variables used in the loop:
|
||||||
|
bool was_title = false;
|
||||||
|
bool already_title = false;
|
||||||
DocumentClass const & tclass = bparams.documentClass();
|
DocumentClass const & tclass = bparams.documentClass();
|
||||||
|
|
||||||
for (; pit < runparams.par_end; ++pit) {
|
for (; pit < runparams.par_end; ++pit) {
|
||||||
@ -990,12 +993,12 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
tclass.plainLayout() : par->layout();
|
tclass.plainLayout() : par->layout();
|
||||||
|
|
||||||
if (layout.intitle) {
|
if (layout.intitle) {
|
||||||
if (runparams.didTitle) {
|
if (already_title) {
|
||||||
LYXERR0("Error in latexParagraphs: You"
|
LYXERR0("Error in latexParagraphs: You"
|
||||||
" should not mix title layouts"
|
" should not mix title layouts"
|
||||||
" with normal ones.");
|
" with normal ones.");
|
||||||
} else if (!runparams.inTitle) {
|
} else if (!was_title) {
|
||||||
runparams.inTitle = true;
|
was_title = true;
|
||||||
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
||||||
os << "\\begin{"
|
os << "\\begin{"
|
||||||
<< from_ascii(tclass.titlename())
|
<< from_ascii(tclass.titlename())
|
||||||
@ -1003,7 +1006,7 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (runparams.inTitle && !runparams.didTitle) {
|
} else if (was_title && !already_title) {
|
||||||
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
||||||
os << "\\end{" << from_ascii(tclass.titlename())
|
os << "\\end{" << from_ascii(tclass.titlename())
|
||||||
<< "}\n";
|
<< "}\n";
|
||||||
@ -1013,8 +1016,8 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
runparams.didTitle = true;
|
already_title = true;
|
||||||
runparams.inTitle = false;
|
was_title = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1040,7 +1043,7 @@ void latexParagraphs(Buffer const & buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// It might be that we only have a title in this document
|
// It might be that we only have a title in this document
|
||||||
if (runparams.inTitle && !runparams.didTitle) {
|
if (was_title && !already_title) {
|
||||||
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
if (tclass.titletype() == TITLE_ENVIRONMENT) {
|
||||||
os << "\\end{" << from_ascii(tclass.titlename())
|
os << "\\end{" << from_ascii(tclass.titlename())
|
||||||
<< "}\n";
|
<< "}\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user