plk / biblatex-apa

APA style for BibLaTeX
88 stars 48 forks source link

Duplicate note in InProceedings #229

Closed iipr closed 6 months ago

iipr commented 6 months ago

Hello. I am facing a problem with biblatex 3.14 when using InProceedings. The note field appears twice in the references list: once after the title, and once again at the end, before the backref.

The reason why I am using biblatex v3.14 version is to match the latest biber version I managed to install (2.14), as described in the biblatex manual. I am not sure if it makes any difference to biblatex-apa. The biblatex-apa version that the system has should be 9.5. The biblatex package is loaded with the following options: \usepackage[backend=biber, style=apa, natbib=true, backref=true]{biblatex}.

I tried to check the code a bit, and I realized that the title macro contains the addinfo2 macro, which contains \printfield{note}. On the other hand, looking at \DeclareBibliographyDriver{inproceedings}{ [...] }, it contains both title and again the \printfield{note}. Could this be causing the behavior I described? If I understood, the same should also happen in other entries such as dataset, report and thesis.

As a workaround, I removed the following two lines from apa.bbx file:

\newunit\newblock
\printfield{note}%

Then, the note appears only once as expected. Would this change break anthing else?

Many thanks in advance for the support and guidance.

plk commented 6 months ago

9.5 is quite old - I suspect that this has been fixed in later versions. If you remove that line from the inproceedings driver, it's unlikely to impact anything else. Is there a reason you can't install a later biber so you can update everything? (I am the biber maintainer too so perhaps can help in that regard).

iipr commented 6 months ago

Thanks a lot for the quick reply. Indeed, when I was opening the issue I realized that 9.5 is quite old. I should probably upgrade it, but I am afraid of breaking something else in the document I am working on, so I might postpone it for now...

As for biber, I installed it a couple of weeks ago via apt. With this method, version 2.14 was installed (I think because I am on Ubuntu 20.04). When compiling, I got some errors because I had the latest biblatex (v3.19 I think). Then, I read about the manual biber installation using Perl and I spent some time trying to make it happen, but I didn't succeed. I never used Perl before, and I got some errors when trying to install the required Module::Build with cpan, so I ended up downgrading biblatex to 3.14.

plk commented 6 months ago

You don't need to install perl - you can just get a binary for linux from here:

https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/current/binaries/Linux/

people generally only use the raw perl form when there is no binary for their platform.

Another alternative is to get TeX via TexLive instead of indvidual distribution packages since this includes everything, including biber and biblatex and has its own updater.

https://www.tug.org/texlive/

iipr commented 6 months ago

Nice! Thank you for the help. For now, I will stick with what I have since it works. In the (hopefully near) future, I will try upgrading everything with the hints you gave.