I've installed BibTool and it seems to work for e.g. printing a formatted bibliography to the terminal. I'm trying to extract a bibliography from an .aux file from a document compiled with BibLaTeX. As a MWE here's such a document:
\documentclass[12pt, oneside, article, a4paper]{memoir}
\usepackage[backend=biber, natbib, style=authoryear-comp]{biblatex}
\ExecuteBibliographyOptions{alldates=short, language=british, sortcites}
\usepackage{kantlipsum}
\title{BibTool MWE}
\author{Thomas Hodgson}
\date{11 May 2013}
\bibliography{bibtool_mwe}
\begin{document}
\maketitle
\kant
\citet{Melville2007}
\printbibliography
\end{document}
This compiles, and generates a bib tool_mwe.aux file that looks like this:
\relax
\providecommand*{\memsetcounter}[2]{}
\abx@aux@sortscheme{nyt}
\@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@cite{Melville2007}
\abx@aux@page{1}{3}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{References}{3}}
\abx@aux@page{2}{3}
\memsetcounter{lastsheet}{3}
\memsetcounter{lastpage}{3}
And, in case it's necessary here's the .bib file:
@book{Melville2007,
Author = {Melville, Herman},
Booktitle = {Moby-Dick},
Date-Added = {2013-05-12 09:35:11 +0000},
Date-Modified = {2013-05-12 09:37:33 +0000},
Location = {London},
Publisher = {Vintage},
Title = {Moby-Dick},
Year = {2007}}
When I put the following in the command line BibTool produces a blank line, when I leave it with ctrl-D it generates a .bib file, but it's empty.
bibtool -x bibtool_mwe.aux -o test.bib
For a while I thought this was the same problem as this question. I'm using BibLaTeX as well. But I was getting similar error messages only when I got BibTool's syntax one. In any case, my problem couldn't be solved in the way suggested by the answer to that question because my .aux file is different to the one described there.
\citationcommands in the.auxfile and finds none, becausebiblatexwrites\abx@aux@citeinstead of\citation. – egreg May 12 '13 at 10:23citationkeyword is used intex_aux.cin the C source. Maybe it's not so difficult to adapt the program to accept also\abx@aux@cite; however there's no\bibdatain the.auxfile. Probably teaching BibTool to look in the.bcffile is the best thing. It's an XML file, so parsing it shouldn't be so difficult. – egreg May 12 '13 at 13:47biberhas a "tool" mode now which can output .bib instead of .bbl - this allows you to (re)encode, change entries with complex remapping etc. and then output a .bib based on the changes. It's a bit more semantic thanbibtoolas the changes are based on an internal data model instead of the syntax of a raw file. – PLK May 12 '13 at 21:01