plk / biblatex-apa

APA style for BibLaTeX
88 stars 48 forks source link

Customize output of APA style #238

Closed bittner closed 3 months ago

bittner commented 3 months ago

My kids need to use a custom APA style for their bibliography at high school. I believe, it's an older version of the current implementation (e.g. in German, "aufgerufen am" should be used for the English "retrieved" on URL references, and references should show only the publication year in braces after the author's name instead of "YYYY, DD. MONTH").

What is the canonical way to apply such customizations, if there is any?

Currently, as we use the texlive/texlive Docker image, we simply sed-replace the appropriate portions in the appropriate style sheet when the CI pipeline runs to build a PDF from the LaTeX document.—Works, but a fragile approach in the long run.

plk commented 3 months ago

I am afraid that the APA style is not very customisable as it's supposed to be APA compliant and some of the requirements are complex enough to make customisation difficult. If you need a variant, I recommend that you just copy the style and modify it as you need.

moewew commented 3 months ago

That all said, the usual way of applying small changes to biblatex styles is not via replacements/changes in the source files, but via code in the document preamble. See for example https://tex.stackexchange.com/q/12806/35864 and specifically https://tex.stackexchange.com/q/137034/35864 on how to change localisation strings (a full example document modifying bibstrings is at https://tex.stackexchange.com/q/67153/35864 or https://tex.stackexchange.com/q/36307/35864).

If you do need to change source files, it is generally recommended to rename the files (which for biblatex styles can mean to rename several files associated with the style) to avoid confusion.

bittner commented 3 months ago

That all said, the usual way of applying small changes to biblatex styles is not via replacements/changes in the source files, but via code in the document preamble.

This was exactly what my question was aimed at. The solution adapted from one of the resources mentioned above:

\DefineBibliographyStrings{ngerman}{%
  retrieved = {aufgerufen am}
}

Thanks for following up! :1st_place_medal:

PsychicBirdy commented 3 months ago

Why not use the precursor to biblatex-apa, that is, biblatex-apa6? https://ctan.org/pkg/biblatex-apa6

bittner commented 3 months ago

Why not use the precursor to biblatex-apa, that is, biblatex-apa6? https://ctan.org/pkg/biblatex-apa6

Because it doesn't match what the school asks for (e.g. "aufgerufen am", "o.D.").

PsychicBirdy commented 3 months ago

My bad. I thought it was closer to what you are looking for than it actually is.