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

When in sequence of commands: PdfLaTeX | Biber | PdfLaTeX | PdfLaTeX, Biber does not produce output files #3988

Open
adrian-sica opened this issue Feb 12, 2025 · 11 comments

Comments

@adrian-sica
Copy link

adrian-sica commented Feb 12, 2025

Environment

  • TeXstudio: texstudio-4.8.6-osx-m1.app
  • Qt: Using Qt Version 6.8.2, compiled with Qt 6.8.2
  • OS: macOS 14.7.3 23H417 arm64
  • TeX distribution: TeX 3.141592653 (TeX Live 2024) kpathsea version 6.4.0.

Expected behavior

Creating a User Command (txs:///pdflatex | txs:///biber | txs:///pdflatex | txs:///pdflatex), or even specifying that the default Compiler and Default Bibliography Tool are PdfLaTeX and Biber, respectively. One should expect that the output files of Biber should be created before the next run of PdfLaTeX. However, this is not the case.

Actual behavior

Biber output are never created and the second and third time PdfLaTeX is called, it doesn't properly compile and create the *.pdf

How to reproduce

Run any document that uses Biblatex package, with backend biber. with the following sequence
txs:///pdflatex | txs:///biber | txs:///pdflatex | txs:///pdflatex

My confugration is the following
\usepackage[backend=biber,bibstyle=apa,citestyle=numeric-comp,sorting=none,sortcites=true,block=none]{biblatex}

Extra note

On the other hand, if PdfLaTeX | Biber | PdfLaTeX | PdfLaTeX are run individually, everything works. I believe there should be a time delay or something of that sort to make it work in sequence. But no idea. At the end it's just annoying every single time running them individually for it to work. The sequence, aka user command, simply does not work for this case

Besides... ABSOLUTELY LOVE TEXSTUDIO <3

@sunderme
Copy link
Member

works as expected.
Does biber work when call from tools ? as single cmd ?

Image

@sunderme
Copy link
Member

sunderme commented Feb 12, 2025

that being said, you are aware that he compile command automatically calls the bibliography tool (and biber if that is set to be default biblio tool) ?

@adrian-sica
Copy link
Author

adrian-sica commented Feb 13, 2025

As mentioned before, Biber runs when call as single command from tools. I have no problem running the file if call individual commands in order. The problem for me is that in sequence, automatically it doesn't.
I'm indeed aware that the compile command automatically calls the default bibliography tool (set as biber in my case).
But it is simply not doing so, my messages show:

Process started: pdflatex -synctex=1 -interaction=nonstopmode "main".tex

Process exited with error(s)


Process started: pdflatex -synctex=1 -interaction=nonstopmode "main".tex

Process exited with error(s)

Which showcase that biber is not running. It's the same for my user command or when simply calling the default build & View, which at the end has the same combination of commands as my defined user command.

This issue I don't have with BibTeX, and have noticed the bug for a couple of versions, at least for the last three years (when I switched from exclusively using BibTeX, to Biber). This is for Mac version of texstudio. I cannot say the same for linux or windows

@dbitouze
Copy link
Contributor

Aside remark

You should consider to use latexmk instead of a User Command such as (txs:///pdflatex | txs:///biber | txs:///pdflatex | txs:///pdflatex): properly configured (via a .latexmkrc file), latexmk will run pdflatex and biber if and only if it is necessary.

Here is a minimal .latexmkrc file that will run pdflatex and biber:

$pdf_mode = 1; # compilation with pdflatex
# $pdf_mode = 4; # compilation with lualatex

$biber = 'biber -U %O %B';
$bibtex_use = 1.5;

@sunderme
Copy link
Member

Exited with errors is not a good starting point
Are there real errors in the document ?

have you tried just to use txs compile ? Does that run through

@adrian-sica
Copy link
Author

Aside remark

You should consider to use latexmk instead of a User Command such as (txs:///pdflatex | txs:///biber | txs:///pdflatex | txs:///pdflatex): properly configured (via a .latexmkrc file), latexmk will run pdflatex and biber if and only if it is necessary.

Here is a minimal .latexmkrc file that will run pdflatex and biber:

$pdf_mode = 1; # compilation with pdflatex

$pdf_mode = 4; # compilation with lualatex

$biber = 'biber -U %O %B';
$bibtex_use = 1.5;

Using latexmk did solve the issue, but it's missing to run a last time pdflatex, as the log output is:

numeric.bbx: error: 2: Undefined control sequence. [\abx@bbxid]
numeric.bbx: error: 2: Undefined control sequence. [\abx@bbxid]
main.tex: bad box: 180: Overfull \hbox (1.8798pt too wide) in paragraph
main.tex: warning: : There were undefined references.
main.tex: warning: : Please rerun LaTeX.

However, couldn't make it work with the .latexmkrc file

@adrian-sica
Copy link
Author

Exited with errors is not a good starting point Are there real errors in the document ?

have you tried just to use txs compile ? Does that run through

There are not any real errors in the document, just an overfull warning. The errors that it gets are from the missing bibliography (due to the issue with Biber itself)

@dbitouze
Copy link
Contributor

main.tex: warning: : Please rerun LaTeX.

This is probably a false positive. If you rerun latexmk, it will probably tell you that “All targets (....pdf) are up-to-date”.

However, couldn't make it work with the .latexmkrc file

Could you elaborate what you mean by “couldn't make it work”?

@adrian-sica
Copy link
Author

This is probably a false positive. If you rerun latexmk, it will probably tell you that “All targets (....pdf) are up-to-date”.

Re-running it didn't worked. only running pdflatex directly solved the issue

However, couldn't make it work with the .latexmkrc file

Could you elaborate what you mean by “couldn't make it work”?

I defined the file as suggested and got:

Error: Could not start the command: "/Users/user0/test.latexmkrc"

@dbitouze
Copy link
Contributor

Re-running it didn't worked. only running pdflatex directly solved the issue

Strange!

Could you elaborate what you mean by “couldn't make it work”?

I defined the file as suggested and got:

Error: Could not start the command: "/Users/user0/test.latexmkrc"

I guess there is a misunderstanding: the config file should be .latexmkrc, not test.latexmkrc. Or, if you don't like hidden files (those with a name stating with a dot), just name it latexmkrc. Such a file will be taken in account for all .tex files in the current directory.

See section “CONFIGURATION/INITIALIZATION (RC) FILES” in latexmk's documentation for more details.

@sunderme
Copy link
Member

so, I have rechecked user commands when all auxillary files are deleted and it also works.
So, I don't think txs has a problem.
There is no minimal example to make sure that we check the same thing, so our possibilities have come to an end.

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

No branches or pull requests

3 participants