# Was given .bbl file from website and need to generate pdf

As the title says, I was given a reference list in the form of a .bbl file from a website, and I would like to generate a pdf from this. I've been googling for an hour but maybe I'm missing something. From what I understand, you create a .tex file, and use \bibliography{*name_of_file*} but this doesn't work. I've also tried just pasting the contents of the .bbl file into the bibliography which also doesn't work.

Could someone give me a step by step guide on how to do this?

• \input{name_of_bbl.bbl} should work if the .bbl was generated for BibTeX-based bibliographies (i.e. not for biblatex) and you load the necessary support packages (if any, that may include natbib, apacite, jurabib, ... and will depend on the .bst file that was used to produce the .bbl). Instead of \input{filename.bbl} you can also just past the contents of the file directly into the .tex document. Mar 4, 2019 at 17:28
• Welcome to TeX SX! I suppose you should put it in the same directory as your main file, and compile the latter (provoded it has the same name). Mar 4, 2019 at 17:30
• Please provide more information about your document setup. E.g., does the bbl file contain exactly the references you wish to cite in the body of the document? Or does the file contain either fewer or more entries than are being cited? You wrote, "I was given a reference list in the form of a .bbl file from a website". Do you know how the bbl file was generated? E.g., which bibliography style was employed, and which citation management package (if any) was employed? Still another issue: do you intend to generate either numeric-style or authoryear-style citation call-outs?
– Mico
Mar 4, 2019 at 18:14

You did not gave us your *.bbl file and you did not name the web site you got the file so I have to guess. Please next question add all relevant information to make it easier for us to help you!

Let us say the *.bbl you got is:

\providecommand{\latin}[1]{#1}
\makeatletter
\providecommand{\doi}
{\begingroup\let\do\@makeother\dospecials
\catcode\{=1 \catcode\}=2 \doi@aux}
\providecommand{\doi@aux}[1]{\endgroup\texttt{#1}}
\makeatother
\providecommand*\mcitethebibliography{\thebibliography}
\csname @ifundefined\endcsname{endmcitethebibliography}
{\let\endmcitethebibliography\endthebibliography}{}
\begin{mcitethebibliography}{4}
\providecommand*\natexlab[1]{#1}
\providecommand*\mciteSetBstSublistMode[1]{}
\providecommand*\mciteSetBstMaxWidthForm[2]{}
{\def\EndOfBibitem{\unskip.}}
{\let\EndOfBibitem\relax}
\providecommand*\mciteSetBstMidEndSepPunct[3]{}
\providecommand*\mciteSetBstSublistLabelBeginEnd[3]{}
\providecommand*\EndOfBibitem{}
\mciteSetBstSublistMode{f}
\mciteSetBstMaxWidthForm{subitem}{(\alph{mcitesubitemcount})}
\mciteSetBstSublistLabelBeginEnd
{\mcitemaxwidthsubitemform\space}
{\relax}
{\relax}

\bibitem[Goossens \latin{et~al.}(1994)Goossens, Mittelbach, and
Samarin]{Goossens}
Goossens,~M.; Mittelbach,~F.; Samarin,~A. \emph{The LaTeX Companion}, 1st ed.;
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
Adams,~D. \emph{The Restaurant at the End of the Universe}; The Hitchhiker's
Guide to the Galaxy; Pan Macmillan, 1980\relax
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Editor \latin{et~al.}(2015)Editor, Editor2, and Editor3]{test}
Editor,~F., Editor2,~S., Editor3,~T., Eds. \emph{Test to show the effect};
Publisher, 2015\relax
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Feynman(1969)]{feynman}
Feynman,~R.~P. Very High-Energy Collisions of Hadrons. \emph{Phys. Rev. Lett.}
\textbf{1969}, \emph{23}, 1415--1417\relax
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\end{mcitethebibliography}


To be able to use it in your tex code you need to know how it was produced. Therefore let us have a look to the following MWE (completed with a bib file and commands to produce the bibliography, resulting in the *.bbl shown above):

\begin{filecontents*}{testbib.bib}
@Book{Goossens,
author    = {Goossens, Michel and Mittelbach, Frank and
Samarin, Alexander},
title     = {The LaTeX Companion},
edition   = {1},
year      = {1994},
}
title     = {The Restaurant at the End of the Universe},
series    = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year      = {1980},
}
article{einstein,
author  = {Albert Einstein},
title   = {{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]},
journal = {Annalen der Physik},
volume  = {322},
number  = {10},
pages   = {891--921},
year    = {1905},
DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
@article{Ross2006,
title     = {Treating the right patient at the right time:
author    = {Ross, H and Howlett, J and Arnold, J Malcolm O and
Liu, P and O’Neill, BJ and Brophy, JM and Simpson, CS and
Sholdice, MM and Knudtson, M and Ross, DB and others},
journal   = {Canadian journal of Cardiology},
volume    = {22},
number    = {9},
pages     = {749--754},
year      = {2006},
publisher = {Elsevier},
}
@article{Heidenreich2013,
title     = {Forecasting the impact of heart failure in the
United States a policy statement from the American Heart Association},
author    = {Heidenreich, Paul A and Albert, Nancy M and
Allen, Larry A and Bluemke, David A and Butler, Javed and
Fonarow, Gregg C and Ikonomidis, John S and Khavjou, Olga
and Konstam, Marvin A and Maddox, Thomas M and others},
journal   = {Circulation: Heart Failure},
volume    = {6},
number    = {3},
pages     = {606--619},
year      = {2013},
publisher = {Am Heart Assoc},
}
@book{mschinLearning,
author    = {Tom M. Mitchell},
title     = {Machine learning},
publisher = {Mac Gew Hill},
year      = 1997,
volume    = 4,
series    = 10,
edition   = 3,
month     = 7,
note      = {An optional note},
isbn      = {0071154671},
}
@misc{mozart:KV183,
title   = {Sinfonie g-Moll},
year    = {1773},
note    = {New K{\"o}chelverzeichnis Nr. 183, old version Nr. 25;
Erster Satz: Allegro con brio, Zweiter Satz: Andante,
Dritter Satz: Menuetto, Vierter Satz: Allegro},
}
\end{filecontents*}

\documentclass[10pt,a4paper]{article}

\usepackage{showframe}  % to visualise the typing area and margins
\usepackage{hyperref}   % better urls

\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{unsrt} % <===========================================
\bibliography{testbib}

\end{document}


Package filecontents here is only used to have tex code and bib file together in a compilable MWE, you need not to use filecontents!

To be able to use the file testbib.bbl now you need the following tex code (please see that \cite commands are needed and the bibliographystyle used to create the *.bbl file):

\documentclass[10pt,a4paper]{article}

\usepackage{showframe}  % to visualise the typing area and margins
\usepackage{hyperref}   % better urls

\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{unsrt} % <===========================================
\input{testbib.bbl} % <=================================================

\end{document}


With \input{testbib.bbl} the bibliography is included in the document at that place you have \input{testbib.bbl}:

At last please compare the result above with the result of the code with *.bib file:

Welcome to TeX.SX!

Create a document and name it "main.tex" with these contents:

\documentclass{article}
\usepackage{natbib}

\begin{document}
\nocite{*}
\bibliographystyle{apalike}
%unsrt: Style with unsorted citations [1] [2]
%plain: [1] [2] etc but shorted
%apalike: Author year style
%agsm: Harvard style
\bibliography{references}
\end{document}


Then run:

pdflatex main
bibtex main
pdflatex main


and pdflatex main

This will generate a document with your bibliography printed in your selected style.

Feel free to use geometry like:

\usepackege[top=1in,bottom=1.2in,left=1in,right=1.5in]{geometry}


(add this command with your the margins you like to have in your preamble -for example just below \documentclass command-)

or to remove page numbers buy using:

 \pagestyle{empty}


somewhere after \documentclass command.

EDIT:

Sorry... Just show you have a bbl file and not a bib... deleting my answer but leaving it for some minutes in order to see it and decide if you want to use your bib (if any) file instead and have access to the style at any time.... A bib file can give several styles of references... A bbl is just a specific output of a bib file and thus is less usable... So, if you have (or can get) a bib, try this method instead.