use_geometry = false;
biblio_style = "plain";
use_bibtopic = false;
+ multibib = string();
use_indices = false;
save_transient_properties = true;
track_changes = false;
biblio_style = lex.getString();
} else if (token == "\\biblio_options") {
lex.eatLine();
- biblio_opts = lex.getString();
+ biblio_opts = trim(lex.getString());
} else if (token == "\\biblatex_bibstyle") {
lex.eatLine();
- biblatex_bibstyle = lex.getString();
+ biblatex_bibstyle = trim(lex.getString());
} else if (token == "\\biblatex_citestyle") {
lex.eatLine();
- biblatex_citestyle = lex.getString();
+ biblatex_citestyle = trim(lex.getString());
} else if (token == "\\use_bibtopic") {
lex >> use_bibtopic;
+ } else if (token == "\\multibib") {
+ lex >> multibib;
} else if (token == "\\use_indices") {
lex >> use_indices;
} else if (token == "\\tracking_changes") {
os << "\n\\biblatex_bibstyle " << biblatex_bibstyle;
if (!biblatex_citestyle.empty())
os << "\n\\biblatex_citestyle " << biblatex_citestyle;
+ if (!multibib.empty())
+ os << "\n\\multibib " << multibib;
os << "\n\\use_bibtopic " << convert<string>(use_bibtopic)
<< "\n\\use_indices " << convert<string>(use_indices)
IndicesList::const_iterator iit = indiceslist().begin();
IndicesList::const_iterator iend = indiceslist().end();
for (; iit != iend; ++iit) {
- pair<docstring, docstring> indexname_latex =
- features.runparams().encoding->latexString(iit->index(),
- features.runparams().dryrun);
- if (!indexname_latex.second.empty()) {
- // issue a warning about omitted characters
- // FIXME: should be passed to the error dialog
- frontend::Alert::warning(_("Uncodable characters"),
- bformat(_("The following characters that are used in an index name are not\n"
- "representable in the current encoding and therefore have been omitted:\n%1$s."),
- indexname_latex.second));
- }
- os << "\\newindex[";
- os << indexname_latex.first;
- os << "]{";
+ os << "\\newindex{";
os << escape(iit->shortcut());
os << "}\n";
}
delim = ",";
}
}
+ if (!multibib.empty()) {
+ opts += delim + "refsection=" + multibib;
+ delim = ",";
+ }
if (bibtexCommand() == "bibtex8"
|| prefixIs(bibtexCommand(), "bibtex8 ")) {
opts += delim + "backend=bibtex8";
// Return document-specific setting if available
if (bibtex_command != "default")
return bibtex_command;
- // For Japanese, return the specific program
- else if (encoding().package() == Encoding::japanese)
- return lyxrc.jbibtex_command;
- // Else return the processor set in prefs
+
+ // If we have "default" in document settings, consult the prefs
+ // 1. Japanese (uses a specific processor)
+ if (encoding().package() == Encoding::japanese) {
+ if (lyxrc.jbibtex_command != "automatic")
+ // Return the specified program, if "automatic" is not set
+ return lyxrc.jbibtex_command;
+ else if (!useBiblatex()) {
+ // With classic BibTeX, return pbibtex, jbibtex, bibtex
+ if (lyxrc.jbibtex_alternatives.find("pbibtex") != lyxrc.jbibtex_alternatives.end())
+ return "pbibtex";
+ if (lyxrc.jbibtex_alternatives.find("jbibtex") != lyxrc.jbibtex_alternatives.end())
+ return "jbibtex";
+ return "bibtex";
+ }
+ }
+ // 2. All other languages
else if (lyxrc.bibtex_command != "automatic")
+ // Return the specified program, if "automatic" is not set
return lyxrc.bibtex_command;
- // Automatic means: find the most suitable for the current cite framework
+
+ // 3. Automatic: find the most suitable for the current cite framework
if (useBiblatex()) {
- // For biblatex, we prefer biber and fall back to bibtex8 and, as last resort, bibtex
+ // For Biblatex, we prefer biber (also for Japanese)
+ // and fall back to bibtex8 and, as last resort, bibtex
if (lyxrc.bibtex_alternatives.find("biber") != lyxrc.bibtex_alternatives.end())
return "biber";
else if (lyxrc.bibtex_alternatives.find("bibtex8") != lyxrc.bibtex_alternatives.end())