此处使用biblatex
包时出现问题!
在authortitle
样式上,当打印同一作者撰写的多部作品时,参考书目中的作者姓名将自动替换为破折号:
然而在apa
风格上(根据 APA 6.25)这些破折号并不显示,并且作者的名字在每个作品前重复出现:
我想保留 APA 格式的引文和参考书目,但使用破折号代替重复的作者姓名。我尝试在文件中搜索答案apa.bbx
,但我对 LaTeX 还不熟悉,不知道从哪里开始。
我忘了提一下我在法语中使用的是 APA 格式,如果值得一提的话。
因此,以下是我现在得到的信息:
\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{polyglossia}
\usepackage[style=apa, dashed=true, doi=false, isbn=false, url=false, backend=biber, sorting=nyt]{biblatex}
\DeclareLanguageMapping{french}{french-apa}
\setmainlanguage{french}
\bibliography{/example.bib}
\begin{document}
\part{Sources}
\printbibliography
\nocite{*}
\end{document}
对于我的 example.bib 文件:
@Misc{breen_yasukuni_2005,
author = {Breen, John},
title = {Yasukuni {Shrine}: {Ritual} and {Memory} {\textbar} {The} {Asia}-{Pacific} {Journal}: {Japan} {Focus}},
date = {2005-06},
journaltitle = {The Asia-Pacific Journal: Japan Focus},
url = {http://apjjf.org/-John-Breen/2060/article.html},
urldate = {2016-10-26},
}
@Book{breen_yasukuni_2007,
title = {Yasukuni, the war dead and the struggle for {Japan}'s past},
publisher = {C. HURST \& CO. PUBLISHERS},
author = {Breen, John},
date = {2007},
}
@Article{breen_resurrecting_2010,
author = {Breen, John},
title = {Resurrecting the {Sacred} {Land} of {Japan}},
volume = {37},
number = {2},
pages = {295--315},
date = {2010},
journaltitle = {Japanese Journal of Religious Studies},
}
@Book{breen_shinto_2000,
title = {Shinto in history: ways of the kami},
publisher = {University of Hawaiʻi Press},
author = {Breen, John and Teeuwen, Mark},
note = {OCLC: 43487317},
date = {2000},
location = {Honolulu},
}
@Book{breen_new_2010,
title = {A new history of {Shinto}},
publisher = {Wiley-Blackwell},
author = {Breen, John and Teeuwen, Mark},
date = {2010},
}
@Book{casanova_public_2011,
title = {Public religions in the modern world},
publisher = {University of Chicago Press},
author = {Casanova, José},
date = {2011},
}
答案1
在参考书目中使用破折号(可能)会使您的文档不再符合 APA 格式,所以请注意。请注意,您的biblatex-apa
软件包似乎已经过时了。
幸运的是,我们需要的一些功能已经在中实现了apa.bbx
,但是我们需要在此基础上添加一些功能。
\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber, dashed=true]{biblatex}
\DeclareLanguageMapping{french}{french-apa}
\addbibresource{biblatex-examples.bib}
\makeatletter
\renewbibmacro*{begrelated}{%
\booltrue{bbx@inset}}
\renewbibmacro*{endrelated}{%
\usebibmacro*{bbx:savehash}}
\newbibmacro*{bbx:dashcheck}[2]{%
\ifboolexpr{
test {\iffieldequals{fullhash}{\bbx@lasthash}}
and
not test \iffirstonpage
and
(
not bool {bbx@inset}
or
test {\iffieldequalstr{entrysetcount}{1}}
)
}
{#1}
{#2}}
\renewbibmacro*{author}{%
\ifnameundef{author}
{\usebibmacro{labeltitle}%
\global\undef\bbx@lasthash}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames[apaauthor][-\value{listtotal}]{author}%
\usebibmacro{bbx:savehash}}%
\setunit*{\addspace}%
\printfield{nameaddon}%
\ifnameundef{with}
{}
{\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}%
\printnames[apaauthor][-\value{listtotal}]{with}}
\setunit*{\addspace}}}%
\newunit\newblock%
\usebibmacro{labelyear+extrayear}}
\renewbibmacro*{editorinauthpos}{%
\global\booltrue{bbx:editorinauthpos}%
\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames[apaauthor][-\value{listtotal}]{editor}}%
\setunit{\addspace}%
\ifnameundef{editor}
{\global\undef\bbx@lasthash}
{\usebibmacro{bbx:savehash}%
\printtext[parens]{\usebibmacro{apaeditorstrg}{editor}}%
% need to clear editor so we don't get an "In" clause later
% But we also need to set a flag to say we did this so we
% don't lose sight of the fact we once had an editor for
% various year placement tests
\clearname{editor}%
\setunit{\adddot\addspace}%
\usebibmacro{labelyear+extrayear}%
\setunit{\adddot\addspace}}}
\makeatother
\begin{document}
\cite{sigfridsson,knuth:ct:d,knuth:ct:c,knuth:ct:a}
\printbibliography
\end{document}