Quantcast
Channel: Active questions tagged subfiles - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 129

biblatex and subfiles: New type of previously reported error

0
0

Let me start off by saying that I am aware that variants of this question have been asked many times before (at least in 1, 2, 3, 4, 5, 6, 7, 8), yet despite trying all of the solutions I've read, my error persists.

I recently updated a great deal of my software, so I strongly suspect that one of those updates triggered this problem as everything was working fine beforehand.

Current software: macOS Ventura 13.1, TexLive 2022, all packages up to date via TexLive Utility. Problem persists across both VS Code + LaTeX Workshop (my usual editor) and the default TexShop. Let me know if I can provide any further details.

MWE and Steps to Reproduce

File hierarchy:

main.texmain.bib--> chapter1.tex

Contents of main.tex:

\documentclass{report}\usepackage{biblatex}\addbibresource{main.bib}\usepackage{subfiles}\begin{document}This citation works: \textcite{bib:Book}.\subfile{Chapter1/chapter1.tex}\end{document}

Contents of main.bib:

@book{bib:Book,    author = {John Smith},    title  = {A Book},    year   = {2023}}

Contents of chapter1.tex:

\documentclass[../main.tex]{subfiles}\begin{document}This one only works in the main document: \textcite{bib:Book}.\end{document}

Run pdflatex -> biber -> pdflatex (x2) (or the default latexmk) on main.tex, and then chapter1.tex. Both citations render fine in main.tex; the one citation in the subfile renders as "bib:Bookempty citation." Additional errors include "Citation 'bib:Book' on page 1 undefined" and "There were undefined references." Even the log says "ERROR - Cannot find 'main.bib'!" after compilation.

Note that the error does not persist if I move chapter1.tex to the same directory as main.tex. Indeed, it appears as if subfiles is not adjusting the relative .bib path for the subfile, that is, the subfile is looking for main.bib in its folder instead of the root folder.

Is this a bug in a new update? Is there something I'm missing? Preferably, I'd rather not put a copy of main.bib in every folder :)

Any and all thoughts welcome, thanks in advance!

Last note: My GF just encountered an analogous issue. She is using subfiles + graphicx and has now had to put her External Images folder in both the root directory and the subfiles directory to be able to input images in both places. She did not update all of her software this morning, and her issue is likewise reproducible across both VS Code and TexShop (OS X Catalina 10.15.5), so I am at a loss.


Viewing all articles
Browse latest Browse all 129

Latest Images

Trending Articles





Latest Images