TransWikia.com

Biblatex - customize apa style

TeX - LaTeX Asked on April 14, 2021

I know it is not suggested to mess with the default of the APA style, but I consider a minor change.

I would like to add a colon behind the "In" for @incollection/@inproceeding items. Does anyone know where this "In" is hidden in the apa6-style files, so that I can add a colon? Couldn’t find it.

One Answer

The standard styles have the command intitlepunct for that, but biblatex-apa6 hard-codes the space

newbibmacro*{in}{%
  ifbool{bbx:in}%
    {}%
    {globalbooltrue{bbx:in}%
     bibcpstring{in}setunit{space}}}

You can easily change that (note that we use printunit and not setunit in line with upcoming biblatex changes, see https://github.com/plk/biblatex/issues/943 and https://github.com/plk/biblatex/pull/944)

documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}

usepackage[style=apa6, backend=biber]{biblatex}

addbibresource{biblatex-examples.bib}

renewcommand*{intitlepunct}{addcolonspace}
renewbibmacro*{in}{%
  ifbool{bbx:in}%
    {}%
    {globalbooltrue{bbx:in}%
     bibcpstring{in}%
     printunit{intitlepunct}}}

begin{document}
Lorem autocite{sigfridsson,pines,gaonkar:in,westfahl:space}
printbibliography
end{document}

Gaonkar, D. P. (2001). On alternative modernities. In: D. P. Gaonkar (Ed.), Alternative modernities (pp. 1–23). Durham: Duke University Press.

Correct answer by moewe on April 14, 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