11

I'm trying to use bibtool to extract bibliography information from an aux file. I'm using this MWE:

\documentclass[12pt]{article}
\usepackage{filecontents}
\begin{filecontents}{foo.bib}
@Book{dickens,
    author={Charles Dickens},
    title={A Tale of Two Cities},
    year=1859,
    publisher={Chapman and Hall}
  }
\end{filecontents}
\usepackage[style=verbose]{biblatex}
\bibliography{foo}

\begin{document}
\cite{dickens}

\end{document}

When I run:

bibtool -x test.aux -o refs.bib

I get the following errors:

*** BibTool WARNING:  (line 2 in ./test-blx.bib): 23 non-space characters ignored.

*** BibTool WARNING:  (line 9 in ./test-blx.bib): 168 non-space characters ignored.

@Control{biblatex-control,
_^
*** BibTool ERROR:  (line 9 in ./test-blx.bib): Unknown entry type

*** BibTool WARNING: Skiping to next '@'

*** BibTool WARNING:  (line 5 in ./foo.bib): 96 non-space characters ignored.

My test.aux is as follows:

\relax 
\bibstyle{biblatex}
\bibdata{test-blx,foo}
\citation{biblatex-control}
\citation{dickens}
\@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }
\@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }
\@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }
\abx@aux@page{1}{1}

I presume this problem is because this tool has been written for bibtex rather than biblatex. Is there a way to use this tool to extract the information, or is there a way to extract the bibliography information I need?

1
  • 2
    In case you are using biber to generate the bibliography, you might want to checkout the --output-format=bibtex commandline option as described in its manual.
    – michel
    Nov 14, 2013 at 19:51

2 Answers 2

8

Maybe this does not directly address your question but as you are already using biblatex, biber might be an alternative to bibtool as outlined by this answer: https://tex.stackexchange.com/a/145168/84655

If test.tex is your latex document, just run

biber test --output_format bibtex

and you get a file called test_biber.bib with the entries referenced in test.tex.

2
  • This is the much easier solution
    – tomka
    Aug 29, 2016 at 10:40
  • I was just experimenting with this. This outputs a .bib file that renames the year field date and the journal field journaltitle...
    – Seamus
    May 1, 2017 at 10:57
7

I found an answer to this. Change \bibstyle to plain in your .aux file, and delete the \citation{biblatex-control} line. Also delete test-blx.bib from the \bibdata line. bibtool should now be able to read your bibliography as per usual.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .