1

I have two paper outlines in MikTex2.9/TexStudio2.12.22. They both need to be APA formatted. I am having crazy issues with the empty bibliography/citation undefined warnings.

I've updated all my packages with the MikTex console, which didn't clear the problem.

I've deleted the cache directory multiple times, that didn't clear the problem.

The two LaTex files are Morality.tex and Inequality.tex. These files are both in tex subdirectories under the unique top level directories for the respective papers and the same Zotero generated bib file is in both places. Like I said, the documents are both just shells right now. For debugging purposes, I am using the same bib file in both tex subdirectories and the same \autocite in the files.

For Morality.tex the following works properly and generates a bibliography:

\documentclass[stu, 12pt, noextraspace, floatsintext, biblatex, draftall]{apa7}
\usepackage [american]{babel}
%\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
%\DeclareLanguageMapping{american}{american-apa}
\addbibresource{Morality.bib}
%
% A bunch of other \usepackage commands ommited for brevity
%
\begin{document}
    \maketitle
    \section{Introduction}
%
% Text omitted for brevity
%
    \autocite{boxAllModelsAre}
    \printbibliography
\end{document}

The following also works correctly:

\documentclass[stu, 12pt, noextraspace, floatsintext, draftall]{apa7}
\usepackage [american]{babel}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
%\DeclareLanguageMapping{american}{american-apa}
\addbibresource{Morality.bib}
%
% A bunch of other \usepackage commands ommited for brevity
%
\begin{document}
    \maketitle
    \section{Introduction}
%
% Text omitted for brevity
%
    \autocite{boxAllModelsAre}
    \printbibliography
\end{document}

If I remove

sortcites=true,sorting=nyt,

than I get the following from PDFLaTex and Biber doesn't run.:

line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hbox'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hsize'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hss'
line 34: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing `\hss'
line 72: Citation 'boxAllModelsAre' on page 6 undefined
line 73: Empty bibliography
: There were undefined references.
: Please (re)run Biber on the file:(biblatex) Morality(biblatex) and rerun LaTeX afterwards.

On the other file, Inequality.tex, I have not found any combination of commands that works properly. I always get the Empty bibliography error and when Biber does run, it gives me 'Morality.bib' not found.

This is what I get in the log related to loading BibLaTex:

Package biblatex Info: Trying to load bibliography style 'apa'...
Package biblatex Info: ... file 'apa.bbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex-apa\apa.bbx"
File: apa.bbx 2020/04/08 v9.9 APA biblatex references style
Package biblatex Info: Trying to load bibliography style 'standard'...
Package biblatex Info: ... file 'standard.bbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex/bbx\standard.bbx"
File: standard.bbx 2019/12/01 v3.14 biblatex bibliography style (PK/MW)
\c@bbx:relatedcount=\count431
\c@bbx:relatedtotal=\count432
))
Package biblatex Info: Trying to load citation style 'apa'...
Package biblatex Info: ... file 'apa.cbx' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex-apa\apa.cbx"
File: apa.cbx 2020/04/08 v9.9 APA biblatex citation style
Package biblatex Info: Delimiter 'nameyeardelim' in context '' already defined,
 overwriting.
Package biblatex Info: Delimiter 'nameyeardelim' in context 'textcite' already 
defined, overwriting.
Package biblatex Info: Delimiter 'andothersdelim' in context '' already defined
, overwriting.
Package biblatex Info: Redefining '\parencite'.
Package biblatex Info: Redefining '\fullcite'.
Package biblatex Info: Redefining '\citeyear'.
Package biblatex Info: Redefining '\cite'.
Package biblatex Info: Redefining '\footcite'.
Package biblatex Info: Redefining '\textcites'.
Package biblatex Info: Redefining '\cites'.
Package biblatex Info: Redefining '\parencites'.
Package biblatex Info: Redefining '\footcites'.
Package biblatex Info: Redefining '\footcitetexts'.
Package biblatex Info: Redefining '\smartcites'.
Package biblatex Info: Redefining '\textcite'.
Package biblatex Info: Redefining '\citeauthor'.
)
Package biblatex Info: Trying to load configuration file...
Package biblatex Info: ... file 'biblatex.cfg' found.

("C:\Program Files\MiKTeX 2.9\tex/latex/biblatex\biblatex.cfg"
File: biblatex.cfg 
))

Any suggestions?

I'm going to reboot this machine into ArchLinux and try TexStudio under TexLive there. I have that setup, but haven't been able to find an editor color scheme that is readable enough or I'd be there already.

3
  • I have verified that both files behave properly and produce the expected bibliography when compiled with TexStudio on TexLive under ArchLinux. At least that was true once I installed apa7 and set TexStudio to default to biber. Anyway, for right now, I'll plan on editing under Windows, since TexStudio is more readable here, and then I'll reboot into Arch to compile. – GaryScottMartin Apr 23 '20 at 10:29
  • The following is the output from running biber on Inequality.tex: Process started: biber.exe "Inequality" INFO - This is Biber 2.14 INFO - Logfile is 'Inequality.blg' INFO - Reading 'Inequality.bcf' INFO - Found 1 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'Morality.bib' INFO - Globbed data source 'Morality.bib' to Morality.bib INFO - Looking for bibtex format file 'Morality.bib' for section 0 ERROR - Cannot find 'Morality.bib'! INFO - ERRORS: 1 Process exited with error(s) – GaryScottMartin Apr 23 '20 at 10:37
  • 4
    I’m voting to close this question because it was apparently resolved by installing a different TeX distribution. It is no longer possible to reproduce and investigate the error. – moewe Jul 4 '20 at 9:03
0

Now I'm not sure if this was BibLaTex/MikTex issue. It was initially specific to my desktop computer. The files above compiled properly under MikTex/TexStudio on my Windows laptop, as well as under TexLive/TexStudio on ArchLinux on my desktop computer. However, I started having the same problem as I added text to these files on my laptop.

Eventually, I replaced MikTex with TexLive 2020 and TexStudio with Kile on both machines and everything works well in both places. I was already a KDE/Kate fan, I am very happy with Kile, a great user experience.

Not the answer you're looking for? Browse other questions tagged or ask your own question.