Context & context)
{
Layout const * newlayout = 0;
- // store the current selectlanguage to be used after \foreignlanguage
- string selectlang;
// Store the latest bibliographystyle (needed for bibtex inset)
string bibliographystyle;
bool const use_natbib = used_packages.find("natbib") != used_packages.end();
else
simple = false;
} else
- paramtext += p.get_token().asString();
+ paramtext += p.get_token().cs();
} else {
- paramtext += p.get_token().asString();
+ paramtext += p.get_token().cs();
simple = false;
}
}
}
else if (t.cs() == "caption") {
+ // FIXME: this should get some cleanup. All
+ // the \begin_layout:s are output by the
+ // Context class!
p.skip_spaces();
context.check_layout(os);
p.skip_spaces();
begin_inset(os, "Caption\n\n");
- os << "\\begin_layout Standard";
+ os << "\\begin_layout "
+ << to_utf8(context.textclass.defaultLayout().name())
+ << '\n';
if (p.next_token().character() == '[') {
p.get_token(); // eat '['
begin_inset(os, "OptArg\n");
else if (t.cs() == "listof") {
p.skip_spaces(true);
- string const name = p.get_token().asString();
+ string const name = p.get_token().cs();
if (context.textclass.floats().typeExist(name)) {
context.check_layout(os);
begin_inset(os, "FloatList ");
// save the language for the case that a
// \foreignlanguage is used
- //FIXME: this is wrong, the language should
- // be saved in the context. (JMarc)
- selectlang = subst(p.verbatim_item(), "\n", " ");
- os << "\\lang " << selectlang << "\n";
+ context.font.language = subst(p.verbatim_item(), "\n", " ");
+ os << "\\lang " << context.font.language << "\n";
}
else if (t.cs() == "foreignlanguage") {
// has to be parsed (like for \textsf, for
// example).
// set back to last selectlanguage
- os << "\n\\lang " << selectlang << "\n";
+ os << "\n\\lang " << context.font.language << "\n";
}
else if (t.cs() == "inputencoding") {