cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
385 stars 33 forks source link

Cannot make Biber work #378

Closed Tepitus closed 8 months ago

Tepitus commented 8 months ago

I am working with current Flatpak version and would like to get BibLaTeX running with Biber. I compiled the following example code with and without Latexmk option and with XeLaTeX, PdfLaTeX or LuaLaTeX:

\begin{filecontents}{lit.bib}
@book{Foo,
    @Article{Foo,
      author = {Someone},
      title  = {Title},
      year   = {2023}
    }
\end{filecontents}

\documentclass[a4paper,11pt]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{lit.bib}

\begin{document}
    This is a test. \parencite{Foo}
    \printbibliography
\end{document}

I always get the following warnings:

LaTeX Warning: Citation 'Foo' on page 1 undefined on input line 16.
LaTeX Warning: Empty bibliography on input line 17.
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                test
(biblatex)                and rerun LaTeX afterwards.

What do I have to do to get BibLaTeX with Biber backend running?

cvfosammmm commented 8 months ago

There seems to be a problem with your document. But this place is only for directly Setzer-related issues. Maybe you can ask on a LaTeX forum somewhere.

nbehrnd commented 8 months ago

@Tepitus If there were a bibliography file library.bib separate to your main document my_thesis.tex, than the instruction would be \bibliography{library} only -- without the .bib file extension. See for instance installment 12 of learnlatex.org.

Tepitus commented 8 months ago

Oh, sorry for the confusion. Yes, you are right, there was a copying error in my code. It should be:

\begin{filecontents}{lit.bib}
@book{Foo,
  author = {Someone},
  title  = {Title},
  year   = {2023}
}
\end{filecontents}

\documentclass[a4paper,11pt]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{lit.bib}

\begin{document}
    This is a test. \parencite{Foo}
    \printbibliography
\end{document}