yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

Support for biber #113

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Biber is a UTF-8 able replacement for Bibtex for use with package biblatex.  
The current system for handling bibliographies doesn't work with the 
combination of these two, since if biblatex is supplied option backend=biber, 
it stops writing bibliography information to .aux and instead writes it to a 
.bcf file.

http://biblatex-biber.sourceforge.net/
http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html

It will need more thinking than I've done to solve the issue (ie. let bibtex 
and biber coexist), but I provide my dirty hack as a starting point.  First of 
all

-----
BIBTEX := biber
-----

and then in the rule for creating .d, after the get-bibs line:

-----
if [ -n $*.bcf ]; then \
    grep datasource $*.bcf | sed -e 's/^[^>]*>//g' \
        -e 's/<.*$$//g' -e '/\.bib$$/!s/$$/.bib/' \
        -e 's!^!$(addprefix $*.,bbl aux aux.make): !' >> $*.d; \
fi; \
-----

This solves the simple case and allows me to return to writing my thesis ;)
I can provide more info / files if needed.

Original issue reported on code.google.com by jaripekk...@gmail.com on 10 Feb 2011 at 7:49

GoogleCodeExporter commented 9 years ago
Interesting.  So, essentially, you just changed BIBTEX to biber, and changed 
$*.aux to $*.bcf?  Does that sum it up correctly?

Original comment by shiblon on 2 Mar 2011 at 8:30

GoogleCodeExporter commented 9 years ago
I'd love for a bit more detail here, not sure how to fit your snippet into the 
makefile and would like to use Biber.

Original comment by jebar...@gmail.com on 20 Mar 2011 at 7:20

GoogleCodeExporter commented 9 years ago
Me, too :)

Original comment by shiblon on 21 Mar 2011 at 2:21

GoogleCodeExporter commented 9 years ago
Thanks, this works. Just do exactly what he described. Put his snippet behind

----
    $(call get-bibs,$*.aux.make,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \
----
this line.

Original comment by tobias.n...@gmail.com on 1 Aug 2011 at 10:39

GoogleCodeExporter commented 9 years ago
OK - before I jump in and make this change, I want to be absolutely sure that I 
understand what is going on (fiddling with bibtex is fraught with peril in the 
makefile, and it is useful to chart a course carefully first).

Let's make sure that I know the facts.

- the bibtex binary is still used, but with a special option backend=biber?  Or 
is there a biber binary?
- Is biber "latex source compatible" with bibtex?  In other words, does it 
still use commands like \bibliography and \bibliographystyle?
- Biber writes bib information into .bcf instead of .aux, but it is exactly the 
same information?

So far so good?

Original comment by shiblon on 3 Aug 2011 at 7:01

GoogleCodeExporter commented 9 years ago
- the bibtex binary is still used, but with a special option backend=biber?  Or 
is > there a biber binary?
Both. There is a biber binary, but one can also use bibtex. In order to use 
biber one has to load the package biblatex with the option backend=biber. Only 
that produces a .bcf file. Without this option, no .bcf file is produced.

- Is biber "latex source compatible" with bibtex?  In other words, does it 
still use commands like \bibliography and \bibliographystyle?
I think some effort has been made to make it backwards compatible, but the 
default is now to use different commands to produce bibliographies (e.g., 
\printbibliograph).

- Biber writes bib information into .bcf instead of .aux, but it is exactly the 
same information?
It does write to .bcf; I doubt that it is the same information, but haven't 
checked.

Original comment by philipp....@gmail.com on 19 Sep 2011 at 5:59

GoogleCodeExporter commented 9 years ago
Wow, it's been a while since I looked at this.

I think that the patch is wrong, too.  The test [ -n $*.bcf ] will *always* be 
true, so the code will *always* execute.  That can't be right.  I think it's 
possible that [ -s '$*.bcf' ] was intended instead, but can't be sure until 
I've had a better explanation of what this code snippet is supposed to do.

Thoughts and explanations welcome.

Original comment by shiblon on 11 Nov 2011 at 7:18

GoogleCodeExporter commented 9 years ago
I'll look into this.

Original comment by Holger.D...@gmail.com on 16 May 2012 at 6:57

GoogleCodeExporter commented 9 years ago
Somehow the biber hack doesn't work for me. It doesn't matter whether I insert 
it as posted originally or the proposed fix by shiblon, I still get the "Please 
(re)run Biber on the file" message without another run being triggered :/

The *.bib files are all listed in the .d file but there doesn't seem to be a 
recognition of undefined references.

Original comment by pinkbunn...@googlemail.com on 11 Sep 2012 at 8:12

GoogleCodeExporter commented 9 years ago
What is strange though is the fact that not even touching one of the bib files 
triggers biber. I still get these, too:
I found no \citation commands---while reading file main.aux
I found no \bibdata command---while reading file main.aux
I found no \bibstyle command---while reading file main.aux

Could this be a problem of 2.2.1-alpha9 or am I just being stupid?

Original comment by pinkbunn...@googlemail.com on 11 Sep 2012 at 9:31

GoogleCodeExporter commented 9 years ago
... [ -s $*.bcf ] ... works fine for me. Since -n .. doesn't make sense, -s 
seems most suitable: the command should not be executed if there is no bcf file 
or an empty file.

As jaripekk..., I'm using the biber command instead of bibtex.

Original comment by jfgr...@gmail.com on 8 Jan 2013 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by Holger.D...@gmail.com on 21 May 2013 at 4:52