BufferParams.cpp: clarify the babel loading logic: treat jurabib the same as hyperref, japanese, and vietnamese

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25707 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-07-18 22:22:17 +00:00
parent 5d6ee61b84
commit ffa15bc301

View File

@ -1226,11 +1226,16 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
texrow.newline();
}
// If we use jurabib, we have to call babel here.
if (use_babel && features.isRequired("jurabib")) {
os << from_ascii(babelCall(language_options.str()))
// If we use hyperref, jurabib, japanese, or vietnamese, we have to call babel here.
if (use_babel
&& (features.isRequired("jurabib")
|| features.isRequired("hyperref")
|| features.isRequired("vietnamese")
|| features.isRequired("japanese") ) ) {
// FIXME UNICODE
os << from_utf8(babelCall(language_options.str()))
<< '\n'
<< from_ascii(features.getBabelOptions());
<< from_utf8(features.getBabelOptions());
texrow.newline();
}
@ -1242,15 +1247,6 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
// Line spacing
lyxpreamble += from_utf8(spacing().writePreamble(tclass.provides("SetSpace")));
// If we use hyperref or japanese or vietnamese, we have to call babel here.
if (use_babel && !features.isRequired("jurabib")
&& (features.isRequired("hyperref") || features.isRequired("vietnamese")
|| features.isRequired("japanese"))) {
// FIXME UNICODE
lyxpreamble += from_utf8(babelCall(language_options.str())) + '\n';
lyxpreamble += from_utf8(features.getBabelOptions());
}
// PDF support.
// * Hyperref manual: "Make sure it comes last of your loaded
// packages, to give it a fighting chance of not being over-written,