150

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.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036

5 Answers5

83

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 %.

  • Interesting approach! – Joseph Wright Feb 27 '11 at 10:18
  • 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 '12 at 01: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 '12 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 '12 at 02:25
  • 1
    @Herbert When trying out your solution I keep getting the message ./file.tex:142: Use of \blx@bbl@verbadd@i doesn't match its definition \blx@bblfile@biber ...2004} \verb {eprint} \verb cond-mat/0407066 \endverb \... l.142 \begin{document} What's wrong? – groovybaby Jul 26 '12 at 02:21
  • I can confirm the problem @groovybaby posted with Biber 1.0 and BibLaTeX 2.0. However, it works if you use input{bib.bbl} after \blx@bblstart instead of copying the contents of the bbl to that place. Maybe Herbert is able to provide a fix for the current versions. – Jörg Jul 26 '12 at 08:28
  • 1
    @Jörg: I tested it with current TeXlive and had no problem, except that I have to delete the \endinput line. –  Oct 29 '12 at 20:09
  • @Herbert I have to check, maybe it's working again with Biber 1.2 – Jörg Oct 29 '12 at 22:41
  • 13
    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 '12 at 04:51
  • It also possible to substitute instead of %% copy here the contents of the created bbl file just the name of bbl file, like this: \InputIfFileExists{bibliographyfilename.bbl}. So you do not need to delete \endinput from .bbl file every time you rerun bibtex (or biber) –  Jan 24 '13 at 08:21
  • 2
    no, that makes no sense when you have to send one TeX source to the publisher who runs only pdflatex and not additional bibtex or biber. And that was the problem here! –  Jan 24 '13 at 13:37
  • 1
    @Herbert I've added a follow-up question as your solution does not work when the bbl includes fields for DOI or URL. See http://tex.stackexchange.com/questions/166518/biblatex-include-bbl-problem-with-verb-field – Jörg Mar 19 '14 at 18:25
  • 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. – Abhishek Anand Jun 05 '14 at 22:17
  • 1
    Just for your information, the new "North-Western European Journal of Mathematics" does accept (and accepts only) biblatex format. A dedicated class, as well as bibliographic and citations styles, are provided (available already with MiKTeX and with TeX Live 2016). – Denis Bitouzé Apr 15 '16 at 14:13
  • 1
    Just to mention that this only works reliably if the local biblatex version and that of the publisher are the same (or at least use the same .bbl file version). In general that can't be assumed, so this is not likely to go through in general. – moewe Sep 22 '18 at 20:57
  • Did you tried it with different versions? –  Sep 23 '18 at 06:01
  • This hasn't worked for me, I couldn't understand why but the bibliography commands seem to be completely ignored at compilation time -- no error, but no references or reference-related stuff in aux file. – Joce Feb 15 '22 at 08:18
75

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.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 17
    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. – barbara beeton Jul 12 '12 at 14:02
  • 1
    This seems like a bad mark against bibLatex... having spent ages digging around in the .cfg to get the format correct for a journal it's very annoying to have to go back to bibtex. Thanks for the post! –  Jul 12 '12 at 10:49
  • 3
    @Ellen Please don't post comments in the answers section. Also it's not biblatex' fault but rather the journals are reluctant to update their styles such that they're compatible with the typesetting TeXnology. – percusse Jul 12 '12 at 10:53
  • 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. – Igor Kotelnikov Jan 14 '14 at 03:25
  • @JosephWright lack of the e-tex extensions could signify that they (still) use y&y tex (certainly i worked with some canadian journals which did). y&y tex used to be a very good choice for a publisher: very robust implementation, very reactive help desk, but (despite my best efforts at persuasion) y&y never did get e-tex. it's moot now, since y&y went out of business; there's an active project resurrecting the distribution, but i don't know about its e-tex . – wasteofspace Sep 05 '14 at 09:52
  • @wasteofspace In the ACS case it's not Y&Y, and indeed is not used for typesetting the journal at all. However, there are a lot of Y&Y and PCTeX users still about I think. – Joseph Wright Sep 05 '14 at 10:30
  • 8
    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 '15 at 17:28
  • 14
    @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 '15 at 22:04
  • 2
    @Raphael You don't understand the issue I think, and I have worded it quite unprecisely. The issue is not only in the setup, but also in the overall compicatedness of the system -- many things can go wrong, and I want to avoid this. And if by "publishers" you mean companies like Springer or Elsevier, well, they are doing a bad job in many ways. If you mean "academic" publishers like AMS or my university, well, you know my point of view and you can ask barbara beeton why AMS uses so outdated TeX distribution ;-) – yo' Sep 17 '15 at 22:08
  • 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 '16 at 21:38
  • 1
    @JosephWright, is this still, now in mid 2016, your recommendation? – Bach Apr 29 '16 at 05:27
  • @yo' What about just allowing users to upload directly as PDF? – Demi Apr 27 '17 at 02:09
  • @Demi Most journals convert to XML and then typeset from that, often using commercial fonts and other 'back ends' than TeX. So in many cases it will be a non-starter. – Joseph Wright Apr 27 '17 at 06:04
  • @Demi Well, that's completely impossible as an option, as there's a lot of processing done (which you likely don't see as an author). Remember for instance that fixing final page numbers is the very last step we do and we can't rely on the authors with this. – yo' Apr 27 '17 at 10:27
  • Ah. So TeX is not actually used. Which means that they can’t just use the upstream version of TeX. – Demi Apr 27 '17 at 16:10
  • @Demi By some publishers, TeX is used, by some it is not. – yo' Apr 27 '17 at 16:26
  • What's funny is that the end results of the vast majority of journal typesetting is inferior to simple, automated TeX+Biber processing, both aesthetically and ergonomically. – pglpm Nov 19 '20 at 12:25
  • 1
    Yeah it's a bit rich for for-profit publishers to behave like this. They are basically bandits, getting rich of off public money and providing nearly no service in return. – relatively Jan 04 '23 at 12:25
34

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

NickKolok
  • 657
  • 1
    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 '20 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 '20 at 14:05
  • 4
    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 '21 at 21:23
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}}
  • 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 07 '19 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 07 '19 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. – Jan-Åke Larsson Mar 08 '19 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 09 '19 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 – Jan-Åke Larsson Mar 14 '19 at 13:08
  • Take my upvote for the verbatim trick! – Oleg Lobachev Jun 04 '19 at 22:01
  • Thx for that great solution. Confirming, upload of tex+sty to Editorialmanager worked for me also with the bibtex backend for biblatex. FYI: bibtex seems to work for me more smoothly together with svjour3.cls style some journals use. – mfg Jan 21 '20 at 19:14
  • I tried this solution, but unfortunately it did not work. The log printed by the verbatiminput command was unfortunately cut short, and I still don't know what the problem is. :( – tomasz Nov 23 '20 at 17:14
  • The .sty file produced output like "LaTeX Warning: File ‘biblatex.sty’ already exists on the system.Not generating it from this source." – tomasz Nov 23 '20 at 17:17
  • Latex is almost always re-run a number of times to deal with citations and cross-references. Does this happen when latex is run the first time or on re-runs? On re-runs it would be natural since the files are already present in the work directory. – Jan-Åke Larsson Dec 17 '20 at 15:15
1

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.

  • 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 04 '19 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. – Oleg Lobachev Jun 04 '19 at 22:03