我想按以下格式格式化参考书目中的日期:
Greenwade, G. D. (19 Februari 2015). The Comprehensive Tex Archive Network (CTAN).
TUGBoat, 14 (3), 342–351
但我最终还是得出这样的结论:
Greenwade, G. D. (2015). The Comprehensive Tex Archive Network (CTAN).
TUGBoat, 14 (3), 342–351
我怎样才能覆盖这个行为?
梅威瑟:
\documentclass{article}
\usepackage[dutch]{babel}
\usepackage[
backend=biber,
style=apa, % <-- I need this APA format in the text
dateabbrev=false
]{biblatex}
\title{A bibLaTeX example}
\addbibresource{sample.bib} %Imports bibliography file
% default bibliography environment (from biblatex.sty)
\defbibenvironment{bibliography}
{\list{}{%
\leftmargin\bibhang
\itemindent-\leftmargin
\itemsep\bibitemsep
\parsep\bibparsep}}
{\endlist}
{\item}
% 'numeric' bibliography environment (from numeric.bbx)
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\setlength\bibitemsep{1.5\itemsep}%
\addtolength{\leftmargin}{-\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}%
{\endlist}
{\item}
\begin{document}
\section{First section}
Items that are cited: \textit{The \LaTeX\ Companion} book \parencite{latexcompanion} together with Einstein's journal paper \parencite{einstein} and Dirac's book \cite{dirac}---which are physics-related items. Next, citing two of Knuth's books: \textit{Fundamental Algorithms} \parencite{knuth-fa} and \textit{The Art of Computer Programming} \parencite{knuth-acp}.
\medskip
\nocite{*}
\printbibliography[title=TITLE]
\end{document}
sample.bib
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
keywords = "physics"
}
@book{dirac,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {physics}
}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The \LaTeX\ Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
keywords = "latex"
}
@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords = "latex,knuth"
}
@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords = "knuth,programming"
}
@book{knuth-acp,
author = "Donald E. Knuth",
publisher = "Addison-Wesley",
title = "The Art of Computer Programming",
series = "Four volumes",
year = "1968",
note = "Seven volumes planned",
keywords = "knuth,programming"
}
@article{ctan,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
date = {2015-02-19},
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
keywords = "latex"
}
答案1
我通过改变来修复它:
\usepackage[backend=biber, style=apa]{biblatex}
到:
\usepackage[backend=biber, style=apa, labeldate=comp]{biblatex}
并使用我自己的风格覆盖默认的检索和参数:
\DefineBibliographyStrings{dutch}{
retrieved = {Geraadpleegd op},
from = {van},
}
并在文件中使用正确的日期格式.bib
,这要归功于@moewe:
@online{kmm,
title = {Kotlin Multiplatform},
author = {JetBrains},
date = {2023-02-14},
url = {https://kotlinlang.org/docs/multiplatform.html},
urldate = {2023-02-14},
}
结果如下: