Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing bbls #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JulianGoeltz
Copy link

For tex files that use biblatex with the bibtex backend and refsections, there is a specific .bbl file created for each refsection, see the following MWE:

\documentclass{article}
\usepackage[
    backend=bibtex,
]{biblatex}
\addbibresource{\jobname.bib}

\begin{filecontents}{\jobname.bib}
@book{key1,
  author = {Author, A.},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}
@book{key2,
  author = {Author, B.},
  year = {2002},
  title = {Title2},
  publisher = {Publisher2},
}
\end{filecontents}

\begin{document}

\cite{key1}

\printbibliography

\section*{Supplementary Information}
\begin{refsection}
    \cite{key2}
\printbibliography[heading=subbibliography]
\end{refsection}
\end{document}

Calling this main.tex, compiling produces multiple .bbl files, but arxiv-collector only uses main.bbl:

$ latexmk -pdf main.tex >/dev/null 2>&1
$ ls *.bbl
main1-blx.bbl  main.bbl
$ arxiv-collector main.tex
Building main...
Gathering outputs...
Output in arxiv.tar.gz: 14 files, 143KiB compressed
$ tar -tf arxiv.tar.gz | grep .bbl
main.bbl

This pull requests introduces globbing to find all bbl files, so tar -tf arxiv.tar.gz lists both main.bbl and main1-blx.bbl.

$ arxiv-collector main.tex
Building main...
Gathering outputs...
Output in arxiv.tar.gz: 15 files, 143KiB compressed
$ tar -tf arxiv.tar.gz | grep .bbl
main1-blx.bbl main.bbl

I'm not sure this scenario is one that you want to support, but I had this problem a few times and when looking into the code the solution was clear.

@JulianGoeltz
Copy link
Author

Oh, also thank you so much for this project, it has helped me a lot! I'm also recommending it to everyone who asks ;)

@djsutherland
Copy link
Owner

Sorry for not seeing this earlier! I'd like to look into this slightly more; this code will behave slightly weirdly if you have more than one project in the same directory, which arxiv-collector otherwise handles gracefully. Adding it to my list to look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants