WinEdt + biblatex + refsection

This little latex/bibtex problem has cost me some hours today and I could not find anything on the net about this. So maybe this is of help to someone (please let me know in the comments).

Note: this is probably only relevant to you if you use both WinEdt and biblatex with reference sections.

Problem:

I cannot get to WinEdt to work with multiple aux-files automatically. – Why do I need more than one aux-file for? – It comes from biblatex when you use the refsection command to create multiple bibliographies. Biblatex then creates one aux file for each section (marked by \begin{refsection} and \end{refsection}), and consequently bibtex will have to run over each of them. Something like this:

pdflatex mydoc.tex
bibtex mydoc1-blx.aux
bibtex mydoc2-blx.aux
pdflatex mydoc.tex
pdflatex mydoc.tex

(The endings .tex and .aux, are not necessary to run the commands but I include them here for clarification)

The problem with the standard configuration of WinEdt seems to be that all the macros which automatically run bibtex between (pdf)latex apparently don’t understand this special demand from biblatex, they probably just follow the scheme:

pdflatex mydoc.tex
bibtex mydoc-blx.aux
pdflatex mydoc.tex
pdflatex mydoc.tex

Or something like this. I’m not really sure whether this explanation is exactly right, but in any case, I did not manage to get WinEdt to run properly on a document with refsections.And if I had understood the core of the problem earlier, it would have saved me some time.

For someone who is good at writing macros for WinEdt, it surely is not a problem to fix this, but I don’t have the time now to go into this. If you have a solution for this or a correction regarding the above, please post it in the comments.

Workaround:

For now, the only workaround for me, at the moment, is the following:

  1. Run pdflatex by clicking the pdflatex icon in WinEdt
  2. Open a command prompt window and run bibtex on the two files (i.e. bibtex mydoc1-blx and bibtex mydoc2-blx where “mydoc” stands for the file name of by main tex-document)
  3. Run pdflatex twice by clicking the pdflatex icon in WinEdt

You can, of course also run pdflatex manually at the command prompt or write a script or fly to the moon, but since bibtex only needs to be run when my references change, this is most convenient to me.

Finally:

I know that it is very much recommended to use biber instead of bibtex when using biblatex and I would like to do that (especially now that both biber and biblatex are finally part of the MikTeX package). But: I did not get biber to run with WinEdt either. The solutions that I found on the web (here and here) did not work for me because they are not for WinEdt 5.5 but even when I tried them out on a trial version of WinEdt 6, they did not work for me. It just comes to my mind that  that might have been related to the use of refsections (i.e. same problem as with bibtex described above). But since the main point of this post is the combination of WinEdt + biblatex + refsections, I won’t go into this.