0

I have a big .bbl file which I cannot easily convert to a .bib.

Inside a new .tex file, I would like to use (cite) only few entries of the .bbl file with the help of \cite command and the label (present in the bbl).

Is it possible?

Precision: In fact, I have 300+ .tex file which contain each some references (called with \cite). There was a .bib at the origin but I have only access to the .bbl now. The .bbl contains several hundred of reference; this is why it is not really an option to copy/paste the references needed.

Here is a sample of the .bbl

\begin{thebibliography}{396}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\expandafter\ifx\csname url\endcsname\relax
  \def\url#1{\texttt{#1}}\fi
\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi
\input{babelbst.tex}
\newcommand{\Capitalize}[1]{\uppercase{#1}}
\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}


\bibitem[{Bruns(1888)}]{BruH1888}
Bruns, H.
\newblock {\"Uber die Integrale des Vielk\"orper-Problems}.
\newblock \emph{Acta mathematica} 11,  1888, 25--96.


\bibitem[{G\'erard \bbletal{}(1972)G\'erard, Reeb \bbletal{}}]{PaiP1972a}
G\'erard, R., Reeb, G., \bbland{} Sec, A., \bbleds{}.
\newblock \emph{{{\OE}uvres de Paul Painlev\'e, Volume 1}}.
\newblock Paris: CNRS, 1972.

\bibitem[{G\'erard \bbletal{}(1974)G\'erard, Reeb \bbletal{}}]{PaiP1974}
---.
\newblock \emph{{{\OE}uvres de Paul Painlev\'e, Volume 2}}.
\newblock Paris: CNRS, 1974.

\bibitem[{G\'erard \bbletal{}(1975)G\'erard, Reeb \bbletal{}}]{PaiP1975}
---.
\newblock \emph{{{\OE}uvres de Paul Painlev\'e, Volume 3: \'Equations
  diff\'erentielles du second ordre}}.
\newblock Paris: CNRS, 1975.
.
.
.
\end{thebibliography}
ppr
  • 8,994
  • You have not given much information, But in most bbl markup you should be able to simply delete the entries that you do not use. It is unusual to have a .bbl file not generated by bibtex, is there really no .bib source available? (hand written bibliographies have no reason to use that .bbl extension.) – David Carlisle Mar 28 '19 at 17:17
  • Are you using biblatex as suggested by the tags? It would be possibly to some limited degree to make use of a pre-existing .bbl file (assuming refcontexts and refsections match), but that is very fragile and crucially relies on the .bbl version matching with your biblatex version. Since the .bbl may contain additional (variable) information not present in the .bib (for disambiguation, mainly) it can not be guaranteed that things will look alright when you only select a subset of the entries and ignore the rest. – moewe Mar 28 '19 at 20:55
  • It would help if you could share more details about your .bbl file, your general setup and what you have in mind. – moewe Mar 28 '19 at 20:55
  • This .bbl file was created by BibTeX for standard thebibliography inclusion and is therefore completely incompatible with biblatex. Do you want to use it with biblatex? – moewe Mar 28 '19 at 21:09
  • @DavidCarlisle Sorry for the lack of informations. I updated my question. Deleting unused entries is not a option because of the number of total entries. – ppr Mar 28 '19 at 21:09
  • @moewe In fact, I plan at the end to use pandoc to convert the tex file to html pages. Sorry for the missleading "biblatex" tag, I was thinking maybe biblatex offers a solution. – ppr Mar 28 '19 at 21:12
  • A LaTeX-based solution seems tricky. thebibliography is basically a list and \bibitem is \item. You would have to tell LaTeX to skip certain items based on their key. I'm not aware of a simple way to do that in the normal set-up. It might be easier to write a script to pre-process the .bbl file and throw out all keys you don't need. This is still potentially problematic if you have two works "Smith 2000a" and "Smith 2000b" and throw out "Smit 2000a", then only "Smith 2000b" will remain, but then it should become "Smith 2000"... – moewe Mar 28 '19 at 21:21
  • 1
    I would have thought it would be a simple job to just use an editor or perl or whatever, just run latex without the bbl file so latex writes the citation keys to the aux file (which is what bibtex would use) then just extract that list of entries from the bbl file. – David Carlisle Mar 28 '19 at 22:16

0 Answers0