When I use biblatex package with option [backend=biber] I have no bibliography printed at all. If I run biber.exe over my file manually, then everything works fine.

My question is: How can I set up TeXworks, so it uses biber.exe when needed (i.e. I would like to havepdflatex + makeindex + biber typesetting)? I did not find any manual regarding the case. If there is such manual, could anybody point me out to it?

@percusse I guess the point is the MiKTeX adds 'pdfLaTeX + MakeIndex + BibTeX' to the 'Typeset' menu of TeXworks.
–
Joseph Wright♦Sep 1 '12 at 17:54

@percusse MiKTeX isn't an editor, it's a TeX distribution on Windows. It includes the command texify which runs (pdf)LaTeX, BibTeX and MakeIndex in a single command.
–
Joseph Wright♦Sep 1 '12 at 18:01

MikTeX is a project. It includes TeXWorks, and adds pdfLaTeX + MakeIndex + BibTeX typesetting. When I use this typesetting in connection to backend=biber option of biblatex, then the bibliography is not printed until manual run of biber.exe over my file. How shall I "tell" TeXWorks to run biber automatically when needed?
–
OleksandrSep 1 '12 at 18:04

@JosephWright I don't know what I'm saying nevermind. I was thinking about TeXnicCenter for some reason,
–
percusseSep 1 '12 at 18:06

4

texify needs to have a update to be able to process biber instead of bibtex. But you can build a batch file calling pdflatex, biber etc. Then you can add the call of this batch in TeXworks, for example pdfLaTeX+Makeindex+biber.
–
KurtSep 1 '12 at 19:12

4 Answers
4

Every document has its own requirements regarding the compilation. As you wrote you need pdflatex, makeindex and biber. My recommended tool allows the setting of the compilation out of the tex file. The tool is named arara

The suggested order of execution could lead to incorrect results. makeindex should be called after the result of biber has been compiled by (pdf)LaTeX, and in general one should not run makeindex after the first run of LaTeX (e.g., the table of contents should be longer than 1 page.
–
GuidoNov 15 '12 at 21:12

@Guido: In general I agree with you. In your case we need two draft runs before and after makeindex.
–
Marco DanielNov 16 '12 at 15:53

Compiling a *TeX document can be involved - for example, if you wish to produce an index you have to run something more but the simple pdflatex, bibtex, pdflatex (or biber in your case). Therefore, I chose eventually to use latexmk which takes care of all this automatically - so far it didn't let down!

I'm not familiar with the windows setting, but I guess you could set the editor to use latexmk for the compilation of a document.

In the pdflatex + makeindex + bibtex-typesetting-configuration that you describe, TeXworks relies on texify. You can tell texify to run biber instead of bibtex via the environment variable BIBTEX (texify documentation).

Normally you can set the Variable here:
Control Panel --> System --> Advanced system settings --> Advanced --> Environment Variables --> New.
However, I would not recommend doing that, as it will break any legacy project you might be using with bibtex.

Instead, I'd recommand setting up a Batch-File:

@set BIBTEX=biber
@texify %*

Then you set up a new typesetting in TeXworks. It should get the same Arguments as the pdflatex + makeindex + bibtex-Typesetting and the Batch-File as a command.

But there is another caveat: With texify might not reliably detect that it needs to re-run after biber changed things. You can re-run the whole thing manually, when in doubt. There is also this workaround that relies on inserting some code into your main TeX-File.

As you can see, this seems to be quite experimental the other solutions with different tools or editors might be more easy.

Now open the typesetting editor of TeXworks and add a new setting. Name it appropriate (e.g. "pdfLatex+Biber") and give the path to your batchfile (.../miktex/bin/pdflatex+biber.bat). Add two arguments: $fullname and $basename.

That's it, works fine for me and I think, the solution can be adopted to other situations, where more/other programs have to be involved in the typesetting process.

BTW Why did you set all commands into one line? Put them into 3 lines and the code is far better readable.
–
SperavirNov 13 '12 at 21:21

Thanks for mention the fact about the main MiKTeX tree :-) I didn't had that in mind... Formatting: I didn't found an explanation for setting up Biber with MiKTeX anywhere on the web, and when I was happy with my solution I didn't care about the formatting. But you're right, and I changed the code above :-)
–
benne08Nov 15 '12 at 16:47