mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-06 09:37:31 +00:00
tex2lyx/text.cpp: fix bug 20
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24673 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b62752ad14
commit
2b69b18cdd
@ -809,7 +809,9 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
// they are commands not environments. They are furthermore switches that
|
// they are commands not environments. They are furthermore switches that
|
||||||
// can be ended by another switches, but also by commands like \footnote or
|
// can be ended by another switches, but also by commands like \footnote or
|
||||||
// \parbox. So the only safe way is to leave them untouched.
|
// \parbox. So the only safe way is to leave them untouched.
|
||||||
else if (name == "center" || name == "flushleft" || name == "flushright") {
|
else if (name == "center" || name == "flushleft" || name == "flushright" ||
|
||||||
|
name == "singlespace" || name == "onehalfspace" ||
|
||||||
|
name == "doublespace" || name == "spacing") {
|
||||||
eat_whitespace(p, os, parent_context, false);
|
eat_whitespace(p, os, parent_context, false);
|
||||||
// We must begin a new paragraph if not already done
|
// We must begin a new paragraph if not already done
|
||||||
if (! parent_context.atParagraphStart()) {
|
if (! parent_context.atParagraphStart()) {
|
||||||
@ -822,6 +824,14 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
parent_context.add_extra_stuff("\\align right\n");
|
parent_context.add_extra_stuff("\\align right\n");
|
||||||
else if (name == "center")
|
else if (name == "center")
|
||||||
parent_context.add_extra_stuff("\\align center\n");
|
parent_context.add_extra_stuff("\\align center\n");
|
||||||
|
else if (name == "singlespace")
|
||||||
|
parent_context.add_extra_stuff("\\paragraph_spacing single\n");
|
||||||
|
else if (name == "onehalfspace")
|
||||||
|
parent_context.add_extra_stuff("\\paragraph_spacing onehalf\n");
|
||||||
|
else if (name == "doublespace")
|
||||||
|
parent_context.add_extra_stuff("\\paragraph_spacing double\n");
|
||||||
|
else if (name == "spacing")
|
||||||
|
parent_context.add_extra_stuff("\\paragraph_spacing other " + p.verbatim_item() + "\n");
|
||||||
parse_text(p, os, FLAG_END, outer, parent_context);
|
parse_text(p, os, FLAG_END, outer, parent_context);
|
||||||
// Just in case the environment is empty
|
// Just in case the environment is empty
|
||||||
parent_context.extra_stuff.erase();
|
parent_context.extra_stuff.erase();
|
||||||
|
Loading…
Reference in New Issue
Block a user