TransWikia.com

Rename Bibliography while using APA7 package

TeX - LaTeX Asked on June 21, 2021

Minimal example:

documentclass[stu]{apa7}

usepackage[
backend=biber,
style=apa,
sortcites=true,
sorting=nyt,
]{biblatex}
shorttitle{Hello}

addbibresource{annot.bib}

begin{document}
nocite{*}
printbibliography[title={New Reference Title}]{}

end{document}

The title of "References" does not change to the new title. I suspect the problem with apa7 package. When changing the document class to article, the title changes.

Question: how to change the bibliography title?

What I tried: set printbibliography[heading=none] then manually add section{new title}. But I want to know the proper way to rename it.

2 Answers

Update

Following https://github.com/dan-weiss/apa7-latex-cls-source/issues/20, version 2.08 and above of apa7.cls no longer hard code the bibliography title and make it possible to use the title argument to printbibliography.


Old answer

apa7.cls hard-codes the bibliography heading as follows

AtEndPreamble{%
  @ifpackageloaded{biblatex}{%  the user has loaded biblatex
    @ifundefined{def@man}{%
      defbibheading{bibliography}{section*{normalfonttextbfrefname}}%
    }{%
      defbibheading{bibliography}{clearpagesection*{normalfonttextbfrefname}}%
    }
  }{}
}

while something like

AtEndPreamble{%
  @ifpackageloaded{biblatex}{%  the user has loaded biblatex
    @ifundefined{def@man}{%
      defbibheading{bibliography}[refname]{section*{normalfonttextbf{#1}}}%
    }{%
      defbibheading{bibliography}[refname]{clearpagesection*{normalfonttextbf{#1}}}%
    }
  }{}
}

might have been slightly more flexible as it would have allowed for the title option of printbibliography to work properly.

You can counter the definition apa7.cls makes as follows (we need to use AtBeginDocument to come in with our definition after apa7.cls' change takes effect), but you may want to notify the author of apa7.cls about this. Maybe they would like to change things so that the title option becomes usable again.

documentclass[stu, american]{apa7}
usepackage{babel}
usepackage{csquotes}
usepackage[
  backend=biber,
  style=apa,
]{biblatex}
shorttitle{Hello}

AtBeginDocument{%
  defbibheading{bibliography}[refname]{clearpagesection*{normalfonttextbf{#1}}}%
}

addbibresource{biblatex-examples.bib}

begin{document}
nocite{*}
lorem
printbibliography[title={New Reference Title}]
end{document}

New Reference Title

Correct answer by moewe on June 21, 2021

The feature to change the title of the References section has been added in apa7.cls version 2.08

printbibliography[title={New Reference Title}]{}

Will now work in an apa7 document without modifications.

Answered by Daniel W on June 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP