mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Basic support for biblatex-chicago
This uses a specific wrapper package that must be loaded instead of biblatex. Via "Requires biblatex-chicago", this is now possible. For proper support, a citeengine file needs to be written This commit here could also be backported to stable.
This commit is contained in:
parent
96ca66d664
commit
71737b87f9
@ -285,6 +285,7 @@
|
|||||||
\TestPackage{babel}
|
\TestPackage{babel}
|
||||||
\TestPackage{beamerposter}
|
\TestPackage{beamerposter}
|
||||||
\TestPackage{biblatex}
|
\TestPackage{biblatex}
|
||||||
|
\TestPackage{biblatex-chicago}
|
||||||
\TestPackage{bibtopic}
|
\TestPackage{bibtopic}
|
||||||
\TestPackage{bicaption}
|
\TestPackage{bicaption}
|
||||||
\TestPackage{bidi}
|
\TestPackage{bidi}
|
||||||
|
@ -2348,19 +2348,25 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ... but before biblatex (see #7065)
|
// ... but before biblatex (see #7065)
|
||||||
if (features.mustProvide("biblatex")
|
if ((features.mustProvide("biblatex")
|
||||||
|
|| features.isRequired("biblatex-chicago"))
|
||||||
|
&& !features.isProvided("biblatex-chicago")
|
||||||
&& !features.isProvided("biblatex-natbib")
|
&& !features.isProvided("biblatex-natbib")
|
||||||
&& !features.isProvided("natbib-internal")
|
&& !features.isProvided("natbib-internal")
|
||||||
&& !features.isProvided("natbib")
|
&& !features.isProvided("natbib")
|
||||||
&& !features.isProvided("jurabib")) {
|
&& !features.isProvided("jurabib")) {
|
||||||
|
// The biblatex-chicago package has a differing interface
|
||||||
|
// it uses a wrapper package and loads styles via fixed options
|
||||||
|
bool const chicago = features.isRequired("biblatex-chicago");
|
||||||
string delim = "";
|
string delim = "";
|
||||||
string opts;
|
string opts;
|
||||||
os << "\\usepackage";
|
os << "\\usepackage";
|
||||||
if (!biblatex_bibstyle.empty()
|
if (!biblatex_bibstyle.empty()
|
||||||
&& (biblatex_bibstyle == biblatex_citestyle)) {
|
&& (biblatex_bibstyle == biblatex_citestyle)
|
||||||
|
&& !chicago) {
|
||||||
opts = "style=" + biblatex_bibstyle;
|
opts = "style=" + biblatex_bibstyle;
|
||||||
delim = ",";
|
delim = ",";
|
||||||
} else {
|
} else if (!chicago) {
|
||||||
if (!biblatex_bibstyle.empty()) {
|
if (!biblatex_bibstyle.empty()) {
|
||||||
opts = "bibstyle=" + biblatex_bibstyle;
|
opts = "bibstyle=" + biblatex_bibstyle;
|
||||||
delim = ",";
|
delim = ",";
|
||||||
@ -2392,7 +2398,10 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
|
|||||||
opts += delim + biblio_opts;
|
opts += delim + biblio_opts;
|
||||||
if (!opts.empty())
|
if (!opts.empty())
|
||||||
os << "[" << opts << "]";
|
os << "[" << opts << "]";
|
||||||
os << "{biblatex}\n";
|
if (chicago)
|
||||||
|
os << "{biblatex-chicago}\n";
|
||||||
|
else
|
||||||
|
os << "{biblatex}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user