Bug 408890 - Livepreview runs BibTeX instead of Biber
Summary: Livepreview runs BibTeX instead of Biber
Status: CONFIRMED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: 2.9.92
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-19 00:37 UTC by abyss
Modified: 2021-04-16 08:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
jscott: corner_case+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description abyss 2019-06-19 00:37:08 UTC
SUMMARY
Some of my source files need Biber to be run after `pdflatex` and some other need BibTeX to be run instead. I would like a way for Kile to detect when to use which for the Live Preview.

STEPS TO REPRODUCE
1. Open a .tex file that uses biblatex the following way:
\usepackage[backend=biber, style=alphabetic]{biblatex}
\addbibresource{Reference.bib}
\begin{document}
...
\printbibliography
\end{document}
2. Enable Live Preview, set it to "Compile documents after saving". Also set Live Preview to use pdflatex by default (in Build-> Live Preview -> PDFLaTeX)
3. Add a citation and save.

OBSERVED RESULT
Kile runs BibTeX automatically after running pdflatex. BibTeX fails with error message:

*****
*****     BibTeX output: 
*****     cd "/tmp/kile-livepreview.HiIqoP"
*****     bibtex notes
*****
This is BibTeX, Version 0.99d (TeX Live 2018/Arch Linux)
The top-level auxiliary file: notes.aux
I found no \citation commands---while reading file notes.aux
I found no \bibdata command---while reading file notes.aux
I found no \bibstyle command---while reading file notes.aux
(There were 3 error messages)

EXPECTED RESULT
Kile detects that the biblatex package is in use and runs Biber instead of BibTeX (or runs both and continues running pdflatex for a second time)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.16.0-1
KDE Frameworks Version: 5.59.0-1
Qt Version: 5.12.4-1

ADDITIONAL INFORMATION
Comment 1 abyss 2019-07-13 01:12:02 UTC
I discovered something that changes the behaviour. The output of `which biber` is  `/usr/bin/vendor_perl/biber`. In the Build settings for Biber, the "Command" section had this full path.
When I change this to simply `biber` instead of the full path, LivePreview works well and the bug disappears. Curiously, the previous setting (having the full path to the executable) was not causing problems when manually running Biber from the menu.
Comment 2 John Scott 2019-12-07 17:58:48 UTC
@abyss Except for the fact that running Biber from the menu doesn't work for me (maybe it was a fluke), I am able to reproduce your issue on 2.9.93.

You're right. It does seem like giving the full path to Biber makes the difference. First I made a healthy LaTeX document like this with all of my settings normal and it was able to build fine:
\documentclass{article}``
\usepackage[backend=biber, style=alphabetic]{biblatex}
\addbibresource{Reference.bib}
\begin{document}
\begin{abstract}

\end{abstract}
Test \cite{whomstever}
\section{One}

\end{document}


After that, I go to the settings and change Biber to its full path, /usr/bin/biber in my case. I go down the Build menu to Reset Auto-Detected Back End, and typing a little more, the live preview still works fine.

If I take out the \cite{} and save, then it breaks as you described. Resetting the auto-detected backend doesn't make a difference. Changing the setting to Biber explicitly makes it work. Switching it to Auto-Detect after that keeps using Biber. But if you try to write \cite{} again, it will switch to BibTeX.

Kile always does the right thing if Biber isn't given as a full path.