141

Suppose that I moved from BibTeX to biblatex. With BibTeX I just copied the content of .bbl file into final version of my paper before submitting it to a journal. What should I do at same stage having .bbl file produced by biblatex? It is of quite different format.

1

5 Answers 5

24

This is a well-known problem, but a little workaround has recently been created: CTAN, GitLab

Usage

In preamble, after the biblatex package is loaded via \usepackage[...]{biblatex}:

\usepackage{biblatex2bibitem}

At the very end of document:

\printbibitembibliography

The desired bibitems will be written directly to the PDF file.

When it's time to switch to bibitems (e.g. before sending the paper to the journal), just copy them to your .tex file, remove biblatex commands and load cite package.

See also

3
  • By "removing biblatex commands" I mean that you should remove at least: \usepackage[...]{biblatex}, \addbibresource, \printbibliography and \printbibitembibliography, as well as other biblatex-specific commands.
    – NickKolok
    Jul 29, 2020 at 14:02
  • However, there can be problems if your biblatex style uses footcites or non-numeric references, e.g. "see [SAg92]". If you really encounter severe problems wit this, plese don't hesitate to open an issue.
    – NickKolok
    Jul 29, 2020 at 14:05
  • Sounded good, but beware: this is quite the hack. long citation keys get cut off on the pdf page, urls are not formatted like urls, any other formatting of references is also lost. @NickKolok is literally suggesting cutting-and-pasting from a PDF back into a .tex source file. This did NOT give me a workable solution to the problem. Though it may be worthwhile to start you off if you're resigned to hand-editng anyways. The world is still ridiculous! Thanks, Nick, for this effort.
    – CPBL
    Jun 13, 2021 at 21:23
82

it is also possible, but not so easy as with bibtex. When you finished your document write into the preamble after the already existing biblatex definition:

\documentclass{...}
...
\usepackage[style=numeric-verb]{biblatex}% change it for your needs 
\bibliography{examples}
%-------------- start insert modified commands ------------------
\makeatletter
\def\blx@bblfile@biber{%
  \blx@secinit
  \begingroup
  \blx@bblstart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% copy here the contents of the created bbl file
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \blx@bblend
  \endgroup
  \csnumgdef{blx@labelnumber@\the\c@refsection}{0}}
\makeatother
%-------------- end insert modified commands ------------------
...
\begin{document}
...
\printbibliography
\end{document}

the only difference is that \printbibliography now takes the contents of the bib not from the external file but from the inserted bbl contents.

If you run bibtex instead of biber (btw: biber is the better choice) then you have to use it in this way:

\usepackage[...,backend=bibtex]{biblatex}
....
\def\blx@bblfile@bibtex{% instead of ...\blx@bblfile@@biber
  \blx@secinit
  \begingroup
  \blx@bblstart
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %
    %% copy here the contents of the created bbl file
    %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \blx@bblend
  \endgroup
  \csnumgdef{blx@labelnumber@\the\c@refsection}{0}%
  \iftoggle{blx@reencode}{\blx@reencode}{}}

Pay attention that you do not insert the last line of the bblfile which is the command \endinput. This one should be deleted or commented with a preceding %.

17
  • 2
    Is there any reason this wouldn't be acceptable by a journal? If not, the "accepted" answer is a bit misleading..
    – naught101
    Apr 30, 2012 at 1:31
  • 2
    @naught101 See my edit concerning 'other' support. There is no guarantee that biblatex, the necessary support packages or indeed the e-TeX extensions will be available.
    – Joseph Wright
    Jul 12, 2012 at 13:24
  • 5
    @JosephWright: how depressing. I know technology doesn't always keep up with science, but it'd be nice to think science could keep up with technology...
    – naught101
    Jul 13, 2012 at 2:25
  • 12
    To answer my own comment, some journals (Looking at you, AGU) expressly forbid the usage of \def outside their provided style files: % PLEASE DO NOT USE YOUR OWN MACROS % DO NOT USE \newcommand, \renewcommand, or \def.. So even this solution does not work. Horrible.
    – naught101
    Nov 14, 2012 at 4:51
  • 4
    Can people post as comments the name of the publisher and whether or not they accepted the result of doing what this answer says? Specifically, I want to know if ACM accepts this. Jun 5, 2014 at 22:17
74

For journal submission, I'm afraid my answer would be 'do not use biblatex'. The bibliography is generated at the LaTeX end by biblatex, and so it is not possible to 'paste in the formatted result'. Most journals want you to either do this or use their own BibTeX style, so biblatex is a bad choice. (This is a shame, but unless/until the journals update their workflows that is how it is.)


One point to note in particular is that you cannot be sure of the package or engine availability on journal systems. For example, the American Chemical Society do not have the e-TeX extensions available on their servers (at the time of writing). These were finalised in 1999, so the time lag is significant. biblatex requires e-TeX, so it would be impossible to use if for a submission to the ACS.


A second area to bear in mind is journal work flows. Depending on the journal, your LaTeX source may be converted into some other format for publishing. To do that, the publisher may use additional data written to the .bbl file (for example the data repeated in an XML 'comment') or some form of .bbl parser to convert the bibliography. That will not work with biblatex unless they have set up their workflow to deal with it.

17
  • 16
    sadly for users, this is correct on both counts -- dependence by journal publishers on established production systems (which change only glacially), and their support of biblatex-specific styles. bibtex has been problematic for ams for a long time, and an alternative, amsrefs, was first distributed in 2001. (biblatex first appeared in about 2006.) unfortunately, amsrefs isn't supported by (most?) other journal publishers, so there's no common format in which to build a personal database. Jul 12, 2012 at 14:02
  • 4
    I would add to @barbarabeeton's comment a particular example where biblatex is inconsistent with journal publishers. All APS and AIP journals (journals on physics) requires for a submitted article to be compiled with RevTeX class. RevTeX loads natbib package which is inconsistent with biblatex. Jan 14, 2014 at 3:25
  • 7
    Sorry, this is not "until journals ..." but rather "until biblatex ..." As a journal typesetter, I have other problems than dealing with a system like biblatex that is complicated to setup. So if biblatex isn't able to provide a standalone .bbl file, I am rejecting it. The same is true for instance for TikZ: People simply have to externalize their figures.
    – yo'
    Mar 16, 2015 at 17:28
  • 10
    @yo' Sorry to be blunt, but as a taxpayer and author I have to wonder what (academic) publishers do with all the money if they can't (be bothered to) keep up to date with technology even at the glacial pace the TeX ecosphere is moving. Biblatex is five years old now; surely there's been enough slack for a developer month or so to implement support for it during that time period.
    – Raphael
    Sep 17, 2015 at 22:04
  • 5
    @Raphael, for individual users who like to keep up with the latest software, five years is a long time. For an organization that has to customize software and internal procedures involving many people, dealing with constraints and desiderata that go well beyond the use of a single software package (e.g. publishing in multiple formats), five years is not so long. As an individual user, I develop habits and standard software configurations or customizations that "break" when I follow advice that demands that I use the latest version of a package. (Advice for developers: First do no harm.)
    – Mars
    Jan 16, 2016 at 21:38
19

I have spent some time on submitting through Springer's "Editorial manager", this may work for other submissions too. Although the latex system of the journal must not be too old.

Basically there are three problems that I have run into.

  1. Match .bbl file with biblatex version. Just now "Editorial manager" uses texlive-2015, but my .bbl file is produced with texlive-2016 so "Editorial manager" biblatex version does not match my biber version. Solution: submit the biblatex style files.

  2. Have "Editorial manager" accept the file extensions of the biblatex style files. "Editorial manager" forces most of the biblatex style files to be Supplementary material, and as such it is not available at compilation time. Solution: use the filecontents package to generate the biblatex style files from a .sty file.

  3. "Editorial manager" does not accept the .bbl file anyway. I have noticed that any comments added at the beginning of the file makes biblatex think biber did not produce the file, and refuse to use it. Perhaps Editorial manager adds something, I do not know. Solution: use the filecontents package to generate the .bbl file.

To this end, I wrote a Python program to generate the needed .sty file, the below program assumes your .bbl file is named Manuscript.bbl:

#! /usr/bin/env python
from os import path

# Author: Jan-AAke Larsson <jan-ake.larsson@liu.se>

f=open("biblatex-files.sty","w")
f.write("""% File containing the needed environment for biblatex
% 
% Included here to bypass Editorial Manager heavy-handed file classification
% 
% The .bbl file needs to be included too, probably Editorial Manager adds
% a LaTeX comment header that makes biblatex think biber did not produce it 

% Enable overwriting files
\\RequirePackage{filecontents}


""")

for i in ["Manuscript.bbl",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/blx-dm.def",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/blx-compat.def",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.def",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/bbx/standard.bbx",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.cfg",
    "/usr/share/texlive/texmf-dist/tex/latex/biblatex/lbx/english.lbx"]:
    f.write("\\begin{filecontents*}{"+path.basename(i)+"}\n")
    g=open(i)
    for j in g.readlines():
        f.write(j)
    g.close()
    f.write("\\end{filecontents*}\n\n\n")
f.close()

This generates biblatex-files.sty that you can include in your submission instead of the .bbl file. The biblatex style files I found by doing grep latex/biblatex Manuscript.log, you may need to include other files if you use a different biblatex style than me. Of course, you need put the following in your preamble.

\usepackage{biblatex-files.sty}

In my submission there are now only two manuscript files: Manuscript.tex and biblatex-files.sty, and a collection of figures.

A final hint: a recurring problem in all this is that "Editorial manager" only returns the log file if LaTeX fails completely, otherwise an incomplete manuscript PDF. So there is no way to know what went wrong if there are warnings only and an incomplete PDF. If you run into problems and need to know the cause, I recommend putting the following in the preamble, this will include the LaTeX log at the end of your PDF. Do not OK this PDF in the submission system, though. :)

\usepackage{fancyvrb}
\AtEndDocument{\VerbatimInput{Manuscript.log}}
10
  • What do you then write in the Manuscript.tex file to make use of Manuscript.bbl? (Apologies if this is documented in general somewhere)
    – McDuffin
    Mar 7, 2019 at 17:51
  • To get this to work I found I also had to add the "Manuscript.bib" file to the list of those added via filecontents (perhaps there is a better way)
    – McDuffin
    Mar 7, 2019 at 18:13
  • 1
    The "Manuscript.bib" file contains the citation database, while "Manuscript.bbl" contains the print-ready citations relevant for the current manuscript. The bbl file is generated via "biber", and this should be done on your local machine. You usually do not want to include your entire database. If you include the "Manuscript.bib" file there is a very real risk that the publisher uses "bibtex" and not "biber", and that may not be what you want. The above code includes "Manuscript.bbl" and not "Manuscript.bib" for precisely this reason. Mar 8, 2019 at 16:10
  • Thanks, my query was how you make use of the bbl file. For instance "\addbibresource{Manuscript.bbl}" does not appear to work (and I cannot find any entry in the biblatex documentation for how to directly load a .bbl file)
    – McDuffin
    Mar 9, 2019 at 17:12
  • 1
    The workflow is as follows: You include the .bib file using \addbibresource{Manuscript.bib}. When you run latex, it gathers information in Manuscript.aux on what entries in the database are actually referenced in the manuscript. You then run biber to produce print-ready citations for these entries in Manuscript.bbl. You then run latex a second time which then automatically uses Manuscript.bbl in the \printbibliography call. The \addbibresouce{Manuscript.bib} call causes \printbibliography to use Manuscript.bbl Mar 14, 2019 at 13:08
0

I fought with this myself for quite a bit, so I thought others might benefit:

IF the journal/repository actually runs biber (e.g. via latexmk) when compiling the document, then there is another simple option available (which is probably also the intended one):

  1. Compile the original document as usual, using also biber. This gives you a file "article.bcf".
  2. Create a .bib file containing only the cited references:

      biber --output-format=bibtex article.bcf 
    

    The outputfile should be named "article_biber.bib".

  3. Enter "article_biber.bib" as a bibresource instead of your full library in "article.tex".
  4. Send "article_biber.bib" along with the other files to the journal.

Note that biber version 2.9 is known to have a bug with the above output option. This is fixed in biber version 2.10. The binaries can be found here.

Biblatex has been around for quite a while now and has become somewhat established, so I think it is reasonable to ask of the journals/repositories to be able to handle it.

2
  • Note that bbl files are temporary and have never been intended to be embedded directly into the document. Using them as a replacement for bib.files is therefore susceptible to version conflicts and results in all kinds of other issues.
    – user510186
    Jun 4, 2019 at 21:57
  • 1
    However, pasting the bbl file (from bibtex) into the final tex document is the official (and least painful compared to other options, of which I fail to recollect any in the moment) way of doing it for some journals. Basically, they have no bibtex on their servers at all. Jun 4, 2019 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.