我目前正在致力於個性化 Biblatex-DW 風格以滿足我的博士論文需求。到目前為止,我自己解決了一些問題,但當前的問題讓我非常頭痛,因為我不太習慣代碼。
所有類型文件的最終引用樣式應為:
[作者姓氏小寫]([年份]),[不含前綴的頁碼]。
到目前為止我得到了:
[作者姓氏小寫],([年份])[不含前綴的頁碼]。
我填寫了大部分字段,以確保引文中沒有列印不屬於該字段的字段。
這是我對 MWE 的嘗試:
\documentclass[11pt, a4paper]{book}
\usepackage{acronym}
\usepackage[ngerman]{babel}
\usepackage[parfill]{parskip}
\usepackage{csquotes}
\begin{filecontents*}{test.bib}
@misc{bar_zitiertest_2004,
title = {Zitiertest Dokument 2 Autoren},
shorttitle = {Krzttl},
author = {Bär, Gold and Rahmen, Bilder},
date = {2004-05-19},
publisher = {{Verlag}},
url = {www.url.aub},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
langid = {deutsch},
note = {Extra}
}
@mvbook{baum_zitiertest_2006,
title = {Zitiertest Buch 3 Autoren},
shorttitle = {Krzttl},
author = {Baum, Tannen and Zange, Kneif and Kopf, Schafs},
date = {2006-05-19},
edition = {7},
volume = {1},
publisher = {{Verlag}},
location = {{Ort}},
url = {www.url.de},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
isbn = {0815},
langid = {deutsch},
note = {Extra},
number = {55},
pagetotal = {999},
series = {Reihe},
volumes = {2}
}
@incollection{eis_zitiertest_2004,
title = {Zitiertest Buchteil 5 Autoren},
shorttitle = {Krzttl},
booktitle = {Warum Schneemänner keine Heißgetränke zu sich nehmen sollten ...},
author = {Eis, Schoko and Tasse, Kaffee and Salat, Kartoffel and Duck, Donald and Mann, Schnee},
date = {2004-05-19},
edition = {1},
volume = {5},
pages = {999},
publisher = {{Verlag}},
location = {{Ort}},
url = {www.url.aub},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
isbn = {0815},
langid = {deutsch},
note = {Extra},
number = {45},
series = {Reihe},
volumes = {9}
}
\end{filecontents*}
\usepackage[
style=footnote-dw,
annotation=true,
edstringincitations=true,
idembib=false,
library=true,
namefont=smallcaps,
shorthandibid=false,
xref=false,
abbreviate=true,
backref=false,
bibwarn=true,
ibidtracker=false,
idemtracker=false,
isbn=false,
maxnames=3,
natbib=true,
sorting=nyt,
sortlocale=auto,
url=false,
backend=biber
]{biblatex}
\addbibresource{test.bib}
\usepackage[utf8]{inputenc}
\usepackage[LGR, T1]{fontenc}
\usepackage{geometry}
\geometry{margin=3cm}
\renewcommand*{\bibmultinamedelim}{\addsemicolon\space}
\renewcommand*{\citefinalnamedelim}{\addsemicolon\space}
\renewcommand*{\citemultinamedelim}{\addsemicolon\space}
%Last names only in citations:
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{labelname}
%Getting rid of fields/lists/names in citations:
\AtEveryCitekey{\clearfield{abstract}}%
\AtEveryCitekey{\clearfield{afterword}}%
\AtEveryCitekey{\clearfield{annotation}}%
\AtEveryCitekey{\clearfield{annotator}}%
\AtEveryCitekey{\clearfield{annote}}%
\AtEveryCitekey{\clearfield{authortype}}%
\AtEveryCitekey{\clearfield{bookauthor}}%
\AtEveryCitekey{\clearfield{bookpagination}}%
\AtEveryCitekey{\clearfield{booksubtitle}}%
\AtEveryCitekey{\clearfield{booktitle}}%
\AtEveryCitekey{\clearfield{chapter}}%
\AtEveryCitekey{\clearfield{commentator}}%
\AtEveryCitekey{\clearfield{crossref}}%
\AtEveryCitekey{\clearfield{day}}%
\AtEveryCitekey{\clearfield{edition}}%
\AtEveryCitekey{\clearfield{eventtitle}}%
\AtEveryCitekey{\clearfield{howpublished}}%
\AtEveryCitekey{\clearfield{issue}}%
\AtEveryCitekey{\clearfield{journal}}%
\AtEveryCitekey{\clearfield{journaltitle}}%
\AtEveryCitekey{\clearfield{key}}%
\AtEveryCitekey{\clearfield{month}}%
\AtEveryCitekey{\clearfield{note}}%
\AtEveryCitekey{\clearfield{number}}%
\AtEveryCitekey{\clearfield{organization}}%
\AtEveryCitekey{\clearfield{pages}}%
\AtEveryCitekey{\clearfield{publisher}}%
\AtEveryCitekey{\clearfield{school}}%
\AtEveryCitekey{\clearfield{series}}%
\AtEveryCitekey{\clearfield{shorttitle}}%
\AtEveryCitekey{\clearfield{title}}%
\AtEveryCitekey{\clearfield{type}}%
\AtEveryCitekey{\clearfield{url}}%
\AtEveryCitekey{\clearfield{urldate}}%
\AtEveryCitekey{\clearfield{urlyear}}%
\AtEveryCitekey{\clearfield{volume}}%
\AtEveryCitekey{\clearfield{volumes}}%
\AtEveryCitekey{\clearlist{address}}%
\AtEveryCitekey{\clearlist{institution}}%
\AtEveryCitekey{\clearlist{location}}%
\AtEveryCitekey{\clearname{editor}}%
\AtEveryCitekey{\clearname{journal}}%
%Getting rid of >in:<:
\DefineBibliographyStrings{ngerman}{in = {}}
%Putting the date into parens for the citation & undoing it for the bibliography again:
\DeclareFieldFormat{date}{\mkbibparens{#1}}
\AtBeginBibliography{\DeclareFieldFormat{date}{#1}}
%Getting rid of the page prefix:
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand*{\bibpagespunct}{\addcolon\addspace}
\renewcommand{\postnotedelim}{%
\iffieldpages{postnote}{\addspace}{\addspace}}
\begin{document}
Citation nr. 1\cite[19]{bar_zitiertest_2004}\newline
Citation nr. 2\cite[13-56]{baum_zitiertest_2006}\newline
Citation nr. 3\cite[2-3]{eis_zitiertest_2004}
\printbibliography
\end{document}
樂於盡快糾正錯誤並回答問題 - Flo
答案1
footnote-dw
是「詳細」家族的一種風格,在腳註引文中列印完整的參考書目條目。你想要的更多的是作者年的風格。嘗試將詳細風格設為作者年份風格似乎非常複雜,因為這相當於刪除幾乎所有引文資訊。這可能相當麻煩。
最好採用像authoryear
您的引文風格一樣的風格。一般來說,biblatex
允許您選擇不同的bibstyle
和citestyle
值。不幸的是,捆綁的樣式biblatex-dw
不能輕易地與非捆綁中的任意其他樣式組合,因為引文和參考書目樣式之間存在很強的依賴性。所以像這樣的解決方案bibstyle=footnote-dw, citestyle=authoryear,
是行不通的。
如果你想堅持一種biblatex-dw
風格,我認為最簡單的解決方案就是以此authortitle-dw
為基礎,修改其引文命令,使其成為作者年份風格而不是作者標題風格。事實證明,這實際上是可行的,無需太多工作。
我們只需要加載style=authortitle-dw,
我們需要的資訊。和的重新定義應該是不言自明的。我們也進行修改 以使用正確的分隔符號。labeldateparts=true,
biblatex
labeldate
cite:title
cite:title:force
cite:edstringincitations
\documentclass[11pt, a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=authortitle-dw,
sorting=nyt,
labeldateparts=true,
maxnames=3,
%
annotation=true,
edstringincitations=true,
idembib=false,
library=true,
namefont=smallcaps,
shorthandibid=false,
xref=false,
abbreviate=true,
backref=false,
bibwarn=true,
ibidtracker=false,
idemtracker=false,
isbn=false,
natbib=true,
url=false,
]{biblatex}
\DeclareDelimFormat[footcite,smartcite]{nameyeardelim}{\addspace}
\renewbibmacro*{cite:edstringincitations}{%
\ifbool{cbx:edstringincitations}
{\usebibmacro{cite:editorstrg/translatorstrg}}
{}%
\setunit{\printdelim{nameyeardelim}}}
\DeclareFieldFormat{labeldate}{%
\ifbool{cbx:parens}
{#1}
{\mkbibparens{#1}}}
\renewbibmacro*{cite:title}{%
\ifboolexpr{
test {\ifentrytype{review}}
and
not test {\iffieldundef{xref}}
}
{\printtext[review]{\bbx@review{\thefield{xref}}}}
{\printtext[bibhyperref]{\printlabeldateextra}}}
\renewbibmacro*{cite:title:force}{%
\printtext[bibhyperref]{\printlabeldateextra}}
\renewcommand*{\bibmultinamedelim}{\addsemicolon\space}
\renewcommand*{\citemultinamedelim}{\bibmultinamedelim}
\renewcommand*{\citefinalnamedelim}{\citemultinamedelim}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{labelname}
\renewbibmacro*{in:}{}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\renewcommand{\postnotedelim}{\addcomma\space}
\renewcommand*{\bibpagespunct}{\addcolon\addspace}
\begin{filecontents*}{\jobname.bib}
@misc{bar_zitiertest_2004,
title = {Zitiertest Dokument 2 Autoren},
shorttitle = {Krzttl},
author = {Bär, Gold and Rahmen, Bilder},
date = {2004-05-19},
publisher = {Verlag},
url = {www.url.aub},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
langid = {ngerman},
note = {Extra}
}
@mvbook{baum_zitiertest_2006,
title = {Zitiertest Buch 3 Autoren},
shorttitle = {Krzttl},
author = {Baum, Tannen and Zange, Kneif and Kopf, Schafs},
date = {2006-05-19},
edition = {7},
volume = {1},
publisher = {Verlag},
location = {Ort},
url = {www.url.de},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
isbn = {0815},
langid = {ngerman},
note = {Extra},
number = {55},
pagetotal = {999},
series = {Reihe},
volumes = {2}
}
@incollection{eis_zitiertest_2004,
title = {Zitiertest Buchteil 5 Autoren},
shorttitle = {Krzttl},
booktitle = {Warum Schneemänner keine Heißgetränke zu sich nehmen sollten \dots},
author = {Eis, Schoko and Tasse, Kaffee and Salat, Kartoffel
and Duck, Donald and Mann, Schnee},
date = {2004-05-19},
edition = {1},
volume = {5},
pages = {999},
publisher = {Verlag},
location = {Ort},
url = {www.url.aub},
urldate = {2020-01-13},
abstract = {Zusammenfassung},
isbn = {0815},
langid = {ngerman},
note = {Extra},
number = {45},
series = {Reihe},
volumes = {9}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
Citation nr. 1\autocite[19]{bar_zitiertest_2004}
Citation nr. 2\autocite[13-56]{baum_zitiertest_2006}
Citation nr. 3\autocite[2-3]{eis_zitiertest_2004}
\printbibliography
\end{document}