2

The following MWE compiles on Overleaf, but it does not on my local MiKTeX installation. It works without the \newrefsection commands. With them, I get undefined citation warnings as well as the warning "Please (re)run BibTeX on the file(s): (biblatex) minimal1-blx (biblatex) minimal2-blx (biblatex) and rerun LaTeX afterwards." Here, minimal.tex was the file name of the MWE on my machine. How do I run BibLaTeX on those files and how can I automate it so that it works for any number of sections?

\documentclass{beamer}
\usepackage[backend=bibtex, style=authoryear]{biblatex}

\begin{filecontents*}{biblio.bib}
@article{A:2022,
         author = {A},
         title = {xx},
         year = {2022},
         journal = {zz}}
@article{B:2022,
         author = {B},
         title = {yy},
         year = {2022},
         journal = {zz}}
\end{filecontents*}

\addbibresource{biblio.bib}

\begin{document}

\section{First Section}\newrefsection

\begin{frame}
\textcite{A:2022}
\end{frame}

\begin{frame}
\printbibliography[heading=none]
\end{frame}

\section{Second Section}\newrefsection

\begin{frame}
\textcite{B:2022}
\end{frame}

\begin{frame}
\printbibliography[heading=none]
\end{frame}
\end{document}

1 Answer 1

3

How do I run BibLaTeX on those files and

You are using the backend=bibtex option for biblatex. So you have to run bibtex instead of biber, which one normally uses for biblatex. For your document, the compilation sequence should be something like

pdflatex minimal
bibtex minimal1-blx
bibtex minimal2-blx
pdflatex minimal

(I don't think texmaker has predefined commands for this, you'll probably have to manually do this from the command line)

how can I automate it so that it works for any number of sections?

You can compile your document with

latexmk minimal

This will automatically run all the required tools (that's also what overleaf uses to compile your document).

7
  • Ah, Latexmk is what I was looking for. For the other command line noobs reading this, it is available in the Texmaker menu. Commented Jul 10, 2022 at 9:50
  • @S.Olafsson One thing I was wondering: is there a particular reason you use backend=bibtex? Without this, your code would use the much more powerful and modern biber. Commented Jul 10, 2022 at 10:54
  • 1
    @S.Olafsson In particular if you run Biber, you only need to call Biber on one file. See for example tex.stackexchange.com/q/649174/35864. Another reason to use Biber is tex.stackexchange.com/q/649143/35864: You can only use all biblatex features (not only data model customisation, but also full Unicode support) if you use Biber.
    – moewe
    Commented Jul 10, 2022 at 11:37
  • 1
    @S.Olafsson The backend you use with biblatex is not the main factor when it comes to compatibility with classical BibTeX styles. The standard data model is the same whether you use biblatex with Biber or BibTeX. For the most part .bib files for classical BibTeX styles will work OK with biblatex, but you may only be able to use biblatex's potential to the fullest if you optimise your .bib files. ...
    – moewe
    Commented Jul 10, 2022 at 18:06
  • 1
    ... Note that it is not at all the case that all BibTeX styles support the same set of fields with the same meaning. So even when you use only BibTeX (and switch between BibTeX styles only), you may have to tweak entries from time to time. (The classical example is that many of the early BibTeX styles don't support a url field, so there people often use howpublished as workaround.)
    – moewe
    Commented Jul 10, 2022 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .