我想在同一文档中使用不同的引用样式 - 最好只使用关键字,但使用不同的引用命令也可以。
这本质上这个问题来自 2012 年,没有得到令人满意的答案,但有人提到了 biblatex 2.0。我想既然已经过去了十年,我们现在使用的是 biblatex 3.16,可能会有类似这样的解决方案。
我的具体问题
我想引用第二手资料“作者年份。”,但主要来源“短作者 短标题”。两者都已经有一个与之关联的关键字(分别为“主要”和“次要”),我用它来区分我的参考书目。但坦率地说,我对目前所拥有的东西已经非常不了解,我甚至不知道如何开始设置这样的东西。
我想要的是
我得到了什么
平均能量损失
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{plin.2003,
title = {Briefe: Lateinisch-Deutsch = {{Epistularum}} Libri Decem},
author = {Plinius Caecilius Secundus, Gaius},
editor = {Kasten, Helmut},
date = {2003},
edition = {8. Aufl.},
publisher = {{Artemis \& Winkler}},
location = {{Düsseldorf [u.a.]}},
isbn = {9783050055404},
keywords = {primary},
shorttitle = {Epist.},
shortauthor = {Plin.}
}
@phdthesis{Rae.1991,
author = {{Rae L. M.}},
year = {1991},
title = {A study of the versification of the African carmina Latina epigraphica},
address = {Vancouver},
type = {Diss.},
keywords = {secondary}
}
\end{filecontents}
\usepackage[autocite=footnote,
citestyle=authoryear-comp,
bibstyle=authortitle,
block=space,
isbn=false,
]{biblatex}
\addbibresource{\jobname.bib}
%the following might be irrelevant to the MWE, but it also might not. I put it in, because it's in my orininal file and it might affect things.
\renewcaptionname{ngerman}{\refname}{Bibliographie}
\AtBeginDocument{%
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[article, thesis]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{type}{\mkbibparens{#1}}
\DeclareFieldFormat[article]{pages}{#1}
\renewcommand\multilistdelim{\addslash}
\renewcommand\finallistdelim{\addslash}
\renewcommand\newunitpunct{\addcomma\space}
\renewcommand\labelnamepunct{\adddot\space}
\renewcommand\revsdnamepunct{}
\renewbibmacro*{publisher+location+date}{
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{institution+location+date}{%
\printlist{location}%
\iflistundef{institution}
{\setunit*{\space}}
{\setunit*{\addcolon\space}}%
\printlist{institution}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\usepackage{xpatch}
\xpatchbibdriver{thesis}
{\printfield{type}% replace this
\newunit}
{\printfield{type}% with this
\setunit*{\addspace}}
{}
{}
%===============================
\begin{document}
\footcite{plin.2003}
\footcite{Rae.1991}
\nocite{*}
\printbibheading
\printbibliography[keyword=primary,heading=
subbibliography,%
title={Primary}]
\printbibliography[keyword=secondary,heading=
subbibliography,%
title={Secondary}]
\end{document}
答案1
总体而言,在同一文档中组合不同的引用样式仍然是不可能的。通常,可以通过巧妙的变通方法获得所需的输出。但没有官方界面可以混合样式。
对于您的情况,我建议您使用shorthand
而不是shortauthor
和shorttitle
。该shorthand
字段允许您将特定条目的引用标签“固定”为固定格式。在这种情况下shorthand = {\textsc{Plin.}~Epist.},
会起作用。
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[autocite=footnote,
citestyle=authoryear-comp,
bibstyle=authortitle,
block=space,
isbn=false,
]{biblatex}
\renewcaptionname{ngerman}{\refname}{Bibliographie}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand\revsdnamepunct{}
\renewcommand\newunitpunct{\addcomma\space}
\DeclareDelimFormat[bib]{nametitledelim}{\addperiod\space}
\DeclareDelimFormat{multilistdelim}{\addslash}
\DeclareDelimAlias{finallistdelim}{multilistdelim}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[article, thesis]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{type}{\mkbibparens{#1}}
\DeclareFieldFormat[article]{pages}{#1}
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{institution+location+date}{%
\printlist{location}%
\iflistundef{institution}
{\setunit*{\space}}
{\setunit*{\addcolon\space}}%
\printlist{institution}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\usepackage{xpatch}
\xpatchbibdriver{thesis}
{\printfield{type}% replace this
\newunit}
{\printfield{type}% with this
\setunit*{\addspace}}
{}
{}
\begin{filecontents}{\jobname.bib}
@misc{plin.2003,
title = {Briefe: Lateinisch-Deutsch = {Epistularum} Libri Decem},
author = {Plinius Caecilius Secundus, Gaius},
editor = {Kasten, Helmut},
date = {2003},
edition = {8},
publisher = {Artemis \& Winkler},
location = {Düsseldorf},
isbn = {9783050055404},
keywords = {primary},
shorthand = {\textsc{Plin.}~Epist.},
}
@phdthesis{Rae.1991,
author = {Rae, Lyn MacCrostie},
year = {1991},
title = {A study of the versification of the African carmina Latina epigraphica},
address = {Vancouver},
type = {Diss.},
keywords = {secondary},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Lorem\footcite{plin.2003}
ipsum\footcite{Rae.1991}
\printbibheading
\printbibliography[keyword=primary,heading=
subbibliography,%
title={Primary}]
\printbibliography[keyword=secondary,heading=
subbibliography,%
title={Secondary}]
\end{document}