TransWikia.com

TeXstudio: how to automate LaTeX biber sequence of compilation

TeX - LaTeX Asked on March 7, 2021

I’m a bit confused about how to configure TeXstudio to use biber. It’s not that I can’t find a way, I’m just wondering what is the intended way, i.e. coming from WinEdt I’m used to that “Build” or “Compile” triggers a latex biber latex latex sequence. But I had to find out that TeXstudio is apparently not configured that way by default. By default, “Build and View” triggers txs:///compile | txs:///view, and compile, according to the manual “calls txs:///pdflatex that calls the actual pdflate[x]“. There is not even a toolbar button to trigger biber. I had to look for it in the menus and set it off manually (or press F11). This makes no sense to me, so I’m wondering if I’m missing something?

Here is what I’ve done: I now have changed the default compiler to trigger latex biber latex latex (or rather: txs:///compile | txs:///bibliography | txs:///compile | txs:///compile | txs:///view, to be precise). But then I noticed the “Repeat contained compilation commands” buttons which kinda seemed a nice idea but didnt really make sense to me, so I turned that off for the default compiler since I want to call it once before biber and twice after biber, which is not possible if it’s set to repeat. So I’m kinda wondering if I’m just not getting the TeXstudio logic or why does it look like it does… It’s so strange.

P.S. Just to clarify: this question is not really about biber. It’s just that I’m using biber. I guess the same questions would arise using bibtex.

Update: I admit that my exact question was not so clear. I guess I am trying to understand how TeXstudio runs the compilation sequence and how it can be customized, i.e. what the logic of the (advanced) configuration options is.

3 Answers

To make TeXStudio, currently version 2.12.2, use biber by default, click

Options > Configure TeXstudio > Build > Default Bibliography > Biber

Then you have to configure the command in options if it isn't set by default.

Options > Configure TeXstudio > Commands > Biber > Choose file > (in Ubuntu 16.10) /usr/local/texlive/2016/bin/x86_64-linux/biber

Pressing F5 should now run your desired sequence.

Answered by hpesoj626 on March 7, 2021

The heuristics behind the "automatically try one more time" is indeed interesting to know. It looks like I found the corresponding parts of code.

The main idea is to check for a specific hard-coded pattern, No file.*.(aux|toc). Moreover, if "check and update bibliography before compiling" checkbox is checked, it also checks for "missing citations" by looking for Citation <...> undefined.

Automatically checking the compilation log is a very nice feature. But it's hard-coded and only supports bibtex. AFAIU, biber support cannot be added by simply modifying corresponding regexps - for example, if I delete all references to a specific article - I won't disapper from the references list, (unless I run full sequence), and I there would be no warnings to "catch".

Answered by Igor on March 7, 2021

I just installed TeXstudio and encountered a similar problem. Let me share the solution, maybe it will help someone. I use Miktex under Windows. I compile with pdfLaTeX, and use BibTeX and Natbib for bibliography.

Problem. After I change the bibliography style (bibliographystyle command) in the .tex document and run "Build & View", the format of bibliography in the .pdf file remains the same (despite "Check and update bibliography before compiling" is ON). Using compile bibliography compile compile sequence for "Build & View" (as suggested by OP) increases the compilation time significantly.

Solution. Following the advice from https://tex.stackexchange.com/a/8792/214965, I added -draftmode argument to the first two compilations. However, this triggered the error "Bibliography not compatible with author-year citations" whenever I changed bibliography style from a one with numbered citations to a one with author-year citations. As a workaround, I preceded the sequence with a command to clean all auxiliary files. The resulted configuration (in the "Build" section) looks as follows.

  • Set the command Precompile = pdflatex.exe -draftmode -synctex=1 -interaction=nonstopmode %.tex. That command was empty in my config but if you do not want to override it, add a custom command instead.
  • Add the custom command clean-files = C:WINDOWSsystem32cmd.exe /C del "?am.aux" "?am.bbl" "?am.blg" "?am.log" "?am.out"
  • Add the custom command compile-full = txs:///clean-files | txs:///pre-compile | txs:///bibliography | txs:///pre-compile | txs:///compile | txs:///view

After that I added txs:///compile-full to the menu and the toolbar in order to use it instead of "Build & view".

Answered by pdp on March 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP