tex2lyx/preamble.cpp, tex2lyx/text.cpp : fix bug 20 also for branch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@24728 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-05-11 14:23:08 +00:00
parent 9c68464165
commit b6205e98bd
3 changed files with 16 additions and 2 deletions

View File

@ -340,6 +340,9 @@ void handle_package(string const & name, string const & opts)
else if (name == "graphicx")
; // ignore this
else if (name == "setspace")
; // ignore this
// activate this first when bug 20 is fixed, otherwise we have a regression
//else if (name == "setspace")
// ; // ignore this

View File

@ -819,7 +819,9 @@ void parse_environment(Parser & p, ostream & os, bool outer,
// Alignment settings
else if (name == "center" || name == "flushleft" || name == "flushright" ||
name == "centering" || name == "raggedright" || name == "raggedleft") {
name == "centering" || name == "raggedright" || name == "raggedleft"
name == "singlespace" || name == "onehalfspace" ||
name == "doublespace" || name == "spacing") {
eat_whitespace(p, os, parent_context, false);
// We must begin a new paragraph if not already done
if (! parent_context.atParagraphStart()) {
@ -832,6 +834,14 @@ void parse_environment(Parser & p, ostream & os, bool outer,
parent_context.add_extra_stuff("\\align right\n");
else
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);
// Just in case the environment is empty ..
parent_context.extra_stuff.erase();

View File

@ -34,7 +34,8 @@ What's new
* DOCUMENT INPUT/OUTPUT
- Paragraph line spacing settings are now imported when importing LaTeX
files (bug 20).
* WINDOWS INSTALLER: