Increase tex2lyx output format to 330.

324:     Create newline inset in new syntax
325:     Nothing to do (tex2lyx does not support the japanese language)
326-327: Nothing to do (empty lyx2lyx conversion)
328:     Nothing to do (tex2lyx did never support embedding of files)
329-330: Nothing to do (empty lyx2lyx conversion)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2010-12-27 18:03:26 +00:00
parent 6639d78601
commit 6da25359f0
2 changed files with 12 additions and 5 deletions

View File

@ -114,7 +114,7 @@ extern CommandMap known_math_environments;
///
extern bool noweb_mode;
/// LyX format that is created by tex2lyx
int const LYX_FORMAT = 323;
int const LYX_FORMAT = 330;
/// path of the master .tex file
extern std::string getMasterFilePath();

View File

@ -1168,8 +1168,12 @@ void parse_noweb(Parser & p, ostream & os, Context & context)
// at all.
if (t.cat() == catEscape)
os << subst(t.asInput(), "\\", "\n\\backslash\n");
else
os << subst(t.asInput(), "\n", "\n\\newline\n");
else {
ostringstream oss;
begin_inset(oss, "Newline newline");
end_inset(oss);
os << subst(t.asInput(), "\n", oss.str());
}
// The scrap chunk is ended by an @ at the beginning of a line.
// After the @ the line may contain a comment and/or
// whitespace, but nothing else.
@ -2556,14 +2560,17 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
handle_ert(os, "\\\\*" + p.getOpt(), context);
}
else {
os << "\n\\newline\n";
begin_inset(os, "Newline newline");
end_inset(os);
}
}
else if (t.cs() == "newline"
|| t.cs() == "linebreak") {
context.check_layout(os);
os << "\n\\" << t.cs() << "\n";
begin_inset(os, "Newline ");
os << t.cs();
end_inset(os);
skip_spaces_braces(p);
}