we need to store the document language from the beginning of the document in the context to be able to handle all kinds of language switch commands
public:
Preamble();
+ ///
+ std::string h_language;
///
std::string inputencoding() const { return h_inputencoding; }
///
std::string h_index_command;
std::string h_inputencoding;
std::string h_justification;
- std::string h_language;
std::string h_language_package;
std::string h_listings_params;
std::string h_maintain_unincluded_children;
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.h_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.