tex2lyx: support for bibtopic

can also go to branch
This commit is contained in:
Uwe Stöhr 2014-11-07 03:29:53 +01:00
parent 471889e0db
commit 73f2b01678
3 changed files with 34 additions and 1 deletions

View File

@ -966,6 +966,9 @@ void Preamble::handle_package(Parser &p, string const & name,
h_cite_engine_type = "authoryear";
}
else if (name == "bibtopic")
h_use_bibtopic = "true";
else if (name == "hyperref")
handle_hyperref(options);

View File

@ -18,7 +18,6 @@ Format LaTeX feature LyX feature
226 nothing (impossible to import) InsetBranch, \branch...\end_branch
226 transformations InsetExternal
228 draft InsetExternal
232 bibtopic InsetBibTeX
254 esint.sty \use_esint
267 XeTeX utf8 encoding
270 \alert, \structure (beamer) layout

View File

@ -1525,6 +1525,37 @@ void parse_environment(Parser & p, ostream & os, bool outer,
preamble.registerAutomaticallyLoadedPackage("color");
}
else if (name == "btSect") {
eat_whitespace(p, os, parent_context, false);
parent_context.check_layout(os);
begin_command_inset(os, "bibtex", "bibtex");
string bibstyle = "plain";
if (p.hasOpt()) {
bibstyle = p.getArg('[', ']');
p.skip_spaces(true);
}
string const bibfile = p.getArg('{', '}');
eat_whitespace(p, os, parent_context, false);
Token t = p.get_token();
if (t.asInput() == "\\btPrintCited") {
p.skip_spaces(true);
os << "btprint " << '"' << "btPrintCited" << '"' << "\n";
}
if (t.asInput() == "\\btPrintNotCited") {
p.skip_spaces(true);
os << "btprint " << '"' << "btPrintNotCited" << '"' << "\n";
}
if (t.asInput() == "\\btPrintAll") {
p.skip_spaces(true);
os << "btprint " << '"' << "btPrintAll" << '"' << "\n";
}
os << "bibfiles " << '"' << bibfile << '"' << "\n";
os << "options " << '"' << bibstyle << '"' << "\n";
parse_text_in_inset(p, os, FLAG_END, outer, parent_context);
end_inset(os);
p.skip_spaces();
}
else if (name == "framed" || name == "shaded") {
eat_whitespace(p, os, parent_context, false);
parse_outer_box(p, os, FLAG_END, outer, parent_context, name, "");