我想将参考书目和引用样式更改为基于 APA 的样式:
书籍:Menger,C.(1982)。国民经济理论基础。温恩:布劳米勒。
网站:Nakamoto,S.(2009)。比特币:点对点电子现金系统。于 2015 年 2 月 16 日提交,http://bitcoin.org/bitcoin.pdf
口语:Casares,W.(2014)。获得十亿比特币用户,Bitcoin2014大会。如果标题为空,则像 Shrem, C. (2014),Webwinkel Vakdagen。
对于所有三个类别:如果没有给出年份,则用 (zd) 代替年份。
\documentclass[a4paper,dutch]{report}
\usepackage[scaled=.90]{helvet}
\usepackage{courier, csquotes, babel, url}
\usepackage[backend=bibtex,style=apa,citestyle=verbose-ibid,bibstyle=numeric,sorting=nty,defernumbers=true]{biblatex}
\def\UrlBreaks{\do\/\do-}
\addbibresource{main.bib}
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
\let\footcite\footfullcite
\usepackage{xpatch}
\xpatchbibmacro{url+urldate}
{\usebibmacro{urldate}}
{\ifcitation{}{\usebibmacro{urldate}}}
{}
{}
\renewcommand{\newunitpunct}{\addcomma\addspace}
\DeclareBibliographyCategory{websites}
\DeclareBibliographyCategory{spoken}
\DeclareBibliographyCategory{books}
\AtEveryCitekey{%
\ifentrytype{misc}{%
\iffieldundef{howpublished}{%
\addtocategory{websites}{\thefield{entrykey}}%
}{%
\addtocategory{spoken}{\thefield{entrykey}}%
}%
}{%
}%
}
\AtEveryCitekey{%
\ifentrytype{book}{%
\addtocategory{books}{\thefield{entrykey}}%
}{}%
}
\begin{document}
\footcite{menger1} \footcite{shrem3} \footcite{guardian3} \footcite{paper1}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Literatuurlijst}
\chapter*{Literatuurlijst}
\section*{Boeken}
\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=books,heading=none]
\endgroup
\section*{Online artikelen}
\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=websites,heading=none]
\endgroup
\section*{Conferenties}
\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=spoken,heading=none]
\endgroup
\end{document}
main.bib 文件:
%books
@book{menger1,
author = {Menger, C.},
title = {Grunds{\"a}tze der Volkswirtschaftslehre},
publisher = {Braum{\"u}ller},
pubcity = {Wenen},
year = {1982}
}
%spoken
@misc{shrem3,
author = "Shrem, C.",
title = "",
month = jan,
year = "2014",
howpublished = "Webwinkel Vakdagen"
}
@misc{wences1,
author = "Casares, W.",
title = "Getting to a Billion Bitcoin Users",
month = may,
year = "2014",
howpublished = "Bitcoin2014 congres"
}
%websites
@misc{guardian3,
author = {The Guardian},
title = {Cyprus banks remain closed to prevent run on deposits},
url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
year = "2010",
urldate = "2014-11-15"
}
@misc{paper1,
author = {Nakamoto, S.},
title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
url = "http://bitcoin.org/bitcoin.pdf",
year = "2009",
urldate = "2015-02-16"
}
答案1
您正在使用biblatex-apa
,自 4.5 版起需要biber
。这意味着,您有到运行biber
而不是bibtex
(或使用latexmk或者阿拉拉使构建过程自动化)
如果我理解正确的话,您想要关闭sentence case
,可以这样做:
\DeclareFieldFormat{apacase}{#1}
为了设置语言,dutch
您必须相应地设置语言映射:
\DeclareLanguageMapping{dutch}{dutch-apa}
现在,当没有给出日期时,会打印“gd”。如果您愿意,可以通过重新定义字符串将其更改为“zd” nodate
:
\DefineBibliographyStrings{dutch}{%
nodate = {z.d.}
}
您必须修改字符串retrieved
并from
获得所访问 URL 的所需结果:
\DefineBibliographyStrings{dutch}{%
retrieved = {geraadpleegd op},
from = {},
}
还要注意,如果您想使用“卫报”这样的机构作为作者,您必须在其周围加上一对花括号(否则“The”将被解释为名字):
author = {{The Guardian}}
把所有东西放在一起(省略一些装饰代码)看起来会像这样:
\documentclass[a4paper]{report}
\usepackage[dutch]{babel}
\usepackage{csquotes, url}
\usepackage[backend=biber,
citestyle=verbose-ibid,
urldate=short,
style=apa]{biblatex}
\DeclareLanguageMapping{dutch}{dutch-apa}
\NewBibliographyString{retrieved}
\NewBibliographyString{from}
\DefineBibliographyStrings{dutch}{%
nodate = {z.d.},
retrieved = {geraadpleegd op},
from = {},
}
\DeclareFieldFormat{apacase}{#1}
\DeclareBibliographyCategory{websites}
\DeclareBibliographyCategory{spoken}
\DeclareBibliographyCategory{books}
\AtEveryCitekey{%
\ifentrytype{misc}{%
\iffieldundef{howpublished}{%
\addtocategory{websites}{\thefield{entrykey}}%
}{%
\addtocategory{spoken}{\thefield{entrykey}}%
}%
}{%
}%
}
\AtEveryCitekey{%
\ifentrytype{book}{%
\addtocategory{books}{\thefield{entrykey}}%
}{}%
}
\let\footcite\footfullcite
% --- adding the bibliography
\begin{filecontents}{main.bib}
%books
@book{menger1,
author = {Menger, C.},
title = {Grunds{\"a}tze der Volkswirtschaftslehre},
publisher = {Braum{\"u}ller},
location = {Wenen},
year = {1982}
}
%spoken
@misc{shrem3,
author = "Shrem, C.",
month = jan,
year = "2014",
howpublished = "Webwinkel Vakdagen"
}
@misc{wences1,
author = "Casares, W.",
title = "Getting to a Billion Bitcoin Users",
month = may,
year = "2014",
howpublished = "Bitcoin2014 congres"
}
%websites
@misc{guardian3,
author = {{The Guardian}},
title = {Cyprus banks remain closed to prevent run on deposits},
url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
year = "2010",
urldate = "2014-11-15"
}
@misc{paper1,
author = {Nakamoto, S.},
title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
url = "http://bitcoin.org/bitcoin.pdf",
year = "2009",
urldate = "2015-02-16"
}
% nodate variants
%books
@book{menger1nd,
author = {Menger, C.},
title = {Grunds{\"a}tze der Volkswirtschaftslehre},
publisher = {Braum{\"u}ller},
location = {Wenen},
}
%spoken
@misc{shrem3nd,
author = "Shrem, C.",
title = "",
month = jan,
howpublished = "Webwinkel Vakdagen"
}
@misc{wences1nd,
author = "Casares, W.",
title = "Getting to a Billion Bitcoin Users",
howpublished = "Bitcoin2014 congres"
}
%websites
@misc{guardian3nd,
author = {{The Guardian}},
title = {Cyprus banks remain closed to prevent run on deposits},
url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
urldate = "2014-11-15"
}
@misc{paper1nd,
author = {Nakamoto, S.},
title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
url = "http://bitcoin.org/bitcoin.pdf",
urldate = "2015-02-16"
}
\end{filecontents}
\addbibresource{main.bib}
\begin{document}
With year:
a\footcite{menger1} b\footcite{shrem3} c\footcite{guardian3} d\footcite{paper1} e\footcite{wences1}
Without year:
a\footcite{menger1nd} b\footcite{shrem3nd} c\footcite{guardian3nd} d\footcite{paper1nd} e\footcite{wences1nd}
\chapter*{Literatuurlijst}
\addcontentsline{toc}{chapter}{Literatuurlijst}
\section*{Boeken}
\printbibliography[category=books,heading=none]
\section*{Online artikelen}
\printbibliography[category=websites,heading=none]
\section*{Conferenties}
\printbibliography[category=spoken,heading=none]
\end{document}
输出结果如下: