0

I am struggling to find a way to generate a bibliography in the APA style while using biblatex with backend=bibtex, not biber (otherwise a bunch of other errors show up). I am using TeXstudio. My code is the following:

%\listfiles
\documentclass[a5paper,10.22pt,twoside,openany]{book}

\usepackage[english]{babel}

\usepackage[a5paper,top=1in,bottom=1.25in]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{bbold} \usepackage{upgreek} \usepackage{csquotes} \usepackage{booktabs}

\usepackage[backend=bibtex,citestyle=authoryear,maxbibnames=99]{biblatex}

\DeclareUnicodeCharacter{2212}{-}

\addbibresource{Bibliography.bib}

\begin{document}

...........................................................

\chapter*{Bibliography}

\printbibliography[ heading=none, heading=bibintoc, heading=subbibliography, title={Scientific books and papers}, keyword=science ]

\printbibliography[ heading=none, heading=bibintoc, heading=subbibliography, title={Legislative texts}, keyword=law ]

\printbibliography[ heading=none, heading=bibintoc, heading=subbibliography , title={Official documents and reports}, keyword=report ]

\printbibliography[ heading=none, heading=bibintoc, heading=subbibliography , title={Websites}, keyword=website ]

\printbibliography[ heading=none, heading=bibintoc, heading=subbibliography , title={Newspaper articles}, keyword=news ]

\thispagestyle{empty} \markboth{}{} \cleardoublepage \thispagestyle{empty}

\end{document}

Does anybody have any ideas on how to modify it to get an APA bibliography? Thank you very much in advance!!

EDIT: If I configure my editor for biber instead of bibtex as suggested in Biblatex with Biber: Configuring my editor to avoid undefined citations, and I use \usepackage[backend=biber,style=apa,citestyle=authoryear,maxbibnames=99]{biblatex}, what I get when compiling is (here, I am calling "test.tex" my main file):
INFO - This is Biber 2.12 INFO - Logfile is 'test.blg' INFO - Reading 'test.bcf' INFO - Found 93 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file 'Bibliography.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'Bibliography.bib' FATAL - Caught signal: SEGV Likely your .bib has a very bad entry which causes libbtparse to crash:

  • 1
    I'm sorry: If you want real APA style with biblatex (as implemented by biblatex-apa's style=apa,) you must use Biber. biblatex-apa will complain if you try and use BibTeX with backend=bibtex, as some of its features will not work with BibTeX. What problems did you have with Biber? – moewe Apr 06 '21 at 15:35
  • Refer to https://tex.stackexchange.com/q/154751/35864 for help with configuring your editor for Biber. If you get errors, have a look at https://tex.stackexchange.com/q/286706/35864 and/or post the .blg and .log files here. Try a small example document like https://gist.github.com/moewew/3de6d1d34d608cac03ae6b148b3756a4 first (this example should be compilable without any change the .bib file loaded there is available and will be found automatically on all systems with biblatex). – moewe Apr 06 '21 at 15:39
  • Thank you for your comment @moewe. I have edited my main question since I had not enough space in the comment, do you have any ideas about how to fix my problem? – alphaville87 Apr 06 '21 at 16:30
  • Please trim your example code to include only code that shows the problem. We don't need to see all the packages you've loaded or all the redefinitions of sections. The \addbibresource command requires the file extension, so you must use \addbibresource{Bibliography.bib}. – Alan Munn Apr 06 '21 at 16:42
  • Thank you @AlanMunn, I've trimmed my code. – alphaville87 Apr 06 '21 at 17:10
  • 1
    Thanks, this is better, but it's clear from the error that you likely have a mal-formed .bib entry. You should not use citestyle=authoryear with the apa style (which is already an author year style). But to diagnose this you will need to either inspect your .bib file manually looking for e.g. missing commas between fields, etc. or selectively comment out citations to find which entry is failing. – Alan Munn Apr 06 '21 at 17:26
  • Any news here? The error message clearly complains about your .bib file, so that is where you should look for the error. If you can't share your .bib file with us, though, we can't really give any more useful hints than: Try binary search (i.e. delete half of your file until you find the problematic entry). – moewe Apr 12 '21 at 20:48

0 Answers0