我有一个小问题。对于大学论文,我们应该使用 APA 引用格式,但我们的一位教授希望对 APA 格式进行一些细微的修改(他称这种格式为 APA+),当涉及到在线资源时:
他要求以下风格:
EUR-Lex。(2017 年)。民主赤字 - EU-LEX。摘自https://eur-lex.europa.eu/summary/glossary/democratic_deficit.html于2018年3月16日。
但是,当我使用默认的 APA 样式时,引用如下所示:
EUR-Lex。(2017 年)。民主赤字 - EU-LEX。检索日期:2018 年 3 月 16 日,摘自https://eur-lex.europa.eu/summary/glossary/democratic_deficit.html
我需要以某种方式改变“url”和“urldate”的顺序和前缀,但我已经查看了很多问题和文章,却找不到适合该特定情况的任何内容。
这是我的乳胶代码:
\documentclass{scrartcl}
\usepackage[british]{babel}
\usepackage[style=apa, backend=biber, dateabbrev=false, urldate=long] {biblatex}
\usepackage{csquotes}
% used to remove the 'th' in the british date format
\DefineBibliographyExtras{british}{
% d-m-y format for long dates
\protected\def\mkbibdatelong#1#2#3{%
\iffieldundef{#3}
{}
{\stripzeros{\thefield{#3}}%
\iffieldundef{#2}{}{\nobreakspace}}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#1}{}{\space}}%
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}%
}
\bibliography{new.bib}
\begin{document}
ping.\parencite{EUR-LexDemocraticDeficitEULEXs.d.}
\printbibliography
\end{document}
这是 bib 文件:
@online{EUR-LexDemocraticDeficitEULEXs.d.,
title = {Democratic {{Deficit}} - {{EU}}-{{LEX}}},
url = {https://eur-lex.europa.eu/summary/glossary/democratic_deficit.html},
urldate = {2018-03-16},
year = {2017},
author = {{EUR-Lex}},
}
如果您有任何想法我将十分感激!
答案1
我们“只是”需要重新定义一下 bibmacro url+urldate
。由于 APA 对 URL 有一些特殊的想法,所以这个宏已经不那么短了。不幸的是,“APA+”并没有真正使它变得更短或更简单。然后,如果条目以 结尾的 URL,我们需要一些技巧来恢复句点urldate
。
\documentclass{scrartcl}
\usepackage[british]{babel}
\usepackage[style=apa, backend=biber, dateabbrev=false, urldate=long] {biblatex}
\usepackage{csquotes}
\DefineBibliographyExtras{british}{%
\protected\def\mkbibdatelong#1#2#3{%
\iffieldundef{#3}
{}
{\stripzeros{\thefield{#3}}%
\iffieldundef{#2}{}{\nobreakspace}}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#1}{}{\space}}%
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}}
\DefineBibliographyStrings{british}{urlseen = {on}}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}~#1}
\renewbibmacro*{url+urldate}{%
\ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}}
{}
{\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}}
{}
{\printtext{\bibcpstring{abstract}}\addspace}%
\iffieldequalstr{entrysubtype}{{DVD}}
{\printtext{\bibstring{available}}}
{\printtext{\bibstring{retrieved}}}%
\setunit{\addspace}%
\printtext{\bibstring{from}}%
\setunit*{\addspace}%
\printfield{urldescription}%
\setunit*{\addcolon\addspace}%
\printfield{url}%
\printfield{abstractloc}%
\printfield{abstracturl}%
\setunit{\addspace}%
\iffieldundef{urlyear}
{}
{\printtext{\printurldate}}}}
\usepackage{xpatch}
\xpatchbibdriver{online}
{\iffieldundef{url}{}{\renewcommand*{\finentrypunct}{\relax}}}
{\ifboolexpr{not test {\iffieldundef{url}} and test {\iffieldundef{urlyear}}}{\renewcommand*{\finentrypunct}{\relax}}{}}
{}{}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{EUR-LexDemocraticDeficitEULEXs.d.,
title = {Democratic {{Deficit}} - {{EU}}-{{LEX}}},
url = {https://eur-lex.europa.eu/summary/glossary/democratic_deficit.html},
urldate = {2018-03-16},
year = {2017},
author = {{EUR-Lex}},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
ping.\parencite{EUR-LexDemocraticDeficitEULEXs.d.,worman,sigfridsson}
\printbibliography
\end{document}