我有以下代码:
\documentclass[11pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[citestyle=bwl-fu, maxcitenames=3, maxbibnames=20, firstinits=true]{biblatex}
\addbibresource{literature.bib}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}} % Authors in small caps in citation and bibliography
\DeclareNameAlias{default}{last-first} % family name, given name
\renewcommand*{\multinamedelim}{\addsemicolon\space} % semicolon between two authors
\DeclareFieldFormat{labelnumberwidth}{Test} % print nothing in the label
\DeclareCiteCommand{\cite} % hyperlink authoryear to bibliography
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\usepackage{hyperref}
\begin{filecontents}{literature.bib}
@article{Mueller.2018,
author = {Müller, Michael and Gerber, Michael and Huber, Klaus},
year = {2018},
title = {{Irgendein Beitrag}},
pages = {781--793},
number = {233},
journal = {{Mühlenzeitschrift}}
}
@book{Junker.2008,
author = {Junker, Hans and Weber, Michael and Zehn, Olaf and Klein, Peter},
year = {2008},
title = {{Energieverbrauch von Mühlen}},
publisher = {Springer},
address = {Berlin}
}
\end{filecontents}
\begin{document}
\chapter{Test-Kapitel}
\cite{Mueller.2018} haben eine Meinung. Aber \cite{Junker.2008} sehen das anders.
\printbibliography[title=Literaturverzeichnis]
\end{document}
但是参考书目中不需要“测试”,我需要作者(年份)作为参考。我想要的是类似这样的内容:
谢谢!
答案1
bwl-fu
只是标准authoryear
样式的一个相当薄的包装,所以我会尝试重新创建它的功能biblatex-ext
,您可以在其中使用该选项introcite
获取参考书目中的引用标签。
您可以在下方找到有关introcite
以下内容的更多信息和大多数其他用途biblatex-ext
文档。
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[
backend=biber,
citestyle=ext-authoryear,
bibstyle=ext-authoryear,
sorting=nyt,
maxcitenames=3, maxbibnames=20,
giveninits=true,
introcite=plain
]{biblatex}
\usepackage{hyperref}
\setlength{\bibitemsep}{\itemsep}
\DeclareInnerCiteDelimsAlias{bbx@introcite}{textcite}
\renewcommand*{\introcitepunct}{\addcolon\\}
\DeclareNameAlias{default}{family-given}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareDelimFormat{multinamedelim}{\addsemicolon\space}
\renewcommand*{\volnumdelim}{}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewcommand*{\publocdelim}{\addcolon\space}
\renewbibmacro*{pubinstorg+location+date}[1]{%
\printlist{#1}%
\setunit*{\publocdelim}%
\printlist{location}%
\setunit*{\locdatedelim}%
\usebibmacro{date}%
\newunit}
\addbibresource{biblatex-examples.bib}
\begin{document}
Schon \textcite{sigfridsson} wussten \dots
Doch nicht alle wollten es wahrhaben \autocite{nussbaum,aksin,companion}
\printbibliography
\end{document}