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.

Citavi 3.1 supports biblatex and teamwork – now released

Just a quick note to say that an important Citavi update has been released. The version number is now 3.1. Among the long awaited improvements are support for biblatex and teamwork. Teamwork means that projects saved on a network (and I assume this needs to be LAN) can be worked on by multiple people at the same time. Note, however, that the normal Citavi Pro license only supports read-access to team projects. In order to be able to edit a shared project, you need to upgrade to a Team license.

Cite original year using biblatex

Just a brief note for those who want to include the original year of publication in a citation when using biblatex (e.g. “Weber (1922/1978)” instead of “Weber (1978)”) .

If you are using one of the author-year styles (or author-year-icomp-tt) and biblatex version 0.8 you could easliy do this by including the following in your biblatex.cfg file:

\renewbibmacro*{cite:year+labelyear}{%
\printtext[bibhyperref]{%
\iffieldundef{origyear}{}{\printfield{origyear}\addslash}%   <--- added
\printfield{year}%
\printfield{labelyear}}}

\renewbibmacro*{year+labelyear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\iffieldundef{origyear}{}{\printfield{origyear}\addslash}%   <--- added
\printfield{year}%
\printfield{labelyear}}}}

But things have changed with biblatex 0.9 so that this no longer works. It took me a while to figure out why and so I publish my solution here since I could not find it anywhere on the net.

The reason is that the macros which print the year (in the citation and in the bibliography) have changed. So the additional line that inserts the original year (see above) has to be inserted into two different macros:


\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{%
\iffieldundef{origyear}{}{\printfield{origyear}\addslash}%   <--- added
\printfield{labelyear}%
\printfield{extrayear}}}}

\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\iffieldundef{origyear}{}{\printfield{origyear}\addslash}%  <--- added
\printdateextra}}}

Just add this into your biblatex.cfg file and look at the results. – If the original year still doesn’t show up, then you probably have to update your bib-file: the field origyear is no longer supported by biblatex (though it is still used internally). It is now called origdate (see release notes).  So what you have to do is simply replace all instances of “origyear” by “origdate”. Now it should work fine!

P.S. If you want to sort the titles in the bibliography according to the original year rather than the year of the used edition, just add sortyear = {1922} to each entry in your bib-file which has an origdate entry (of course “1922” stands for whatever the original year is).