tex2lyx: backport fix for bug #8210

This commit is contained in:
Uwe Stöhr 2012-06-30 03:40:40 +02:00
parent 530c2ca7a3
commit 2eb4a46d0b
3 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,8 @@ public:
///
std::string notefontcolor() const { return h_notefontcolor; }
///
std::string language() const { return h_language; }
///
std::string use_indices() const { return h_use_indices; }
///
bool indentParagraphs() const;

View File

@ -681,6 +681,10 @@ bool tex2lyx(idocstream & is, ostream & os, string encoding)
active_environments.push_back("document");
Context context(true, textclass);
stringstream ss;
// store the document language in the context to be able to handle the
// commands like \foreignlanguage and \textenglish etc.
context.font.language = preamble.language();
// parse the main text
parse_text(p, ss, FLAG_END, true, context);
if (Context::empty)
// Empty document body. LyX needs at least one paragraph.

View File

@ -84,6 +84,7 @@ What's new
* TEX2LYX
- Fix bug that language change was not recognized (bug 8210).
* ADVANCED FIND AND REPLACE