Biblatex-apa :如果同一作者有多個作品,則用破折號替換作者姓名

Biblatex-apa :如果同一作者有多個作品,則用破折號替換作者姓名

這裡使用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}

MWE參考書目

相關內容