dan-weiss / apa7-latex-cls-source

Source code for apa7 class
LaTeX Project Public License v1.3c
49 stars 13 forks source link

Renaming bibliography #20

Closed avidseeker closed 3 years ago

avidseeker commented 3 years ago

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 am sure that the problem is with apa7 package. When changing the document class to article, the title changes.

Possible solution based on this discussion:

Change

\AtEndPreamble{%
  \@ifpackageloaded{biblatex}{%  the user has loaded biblatex
    \@ifundefined{def@man}{%
      \defbibheading{bibliography}{\section*{\normalfont\textbf\refname}}%
    }{%
      \defbibheading{bibliography}{\clearpage\section*{\normalfont\textbf\refname}}%
    }
  }{}
}

To:

\AtEndPreamble{%
  \@ifpackageloaded{biblatex}{%  the user has loaded biblatex
    \@ifundefined{def@man}{%
      \defbibheading{bibliography}[\refname]{\section*{\normalfont\textbf{#1}}}%
    }{%
      \defbibheading{bibliography}[\refname]{\clearpage\section*{\normalfont\textbf{#1}}}%
    }
  }{}
}