How to obtain and use the .bbl file in my tex document for ArXiv submission?
Start with an new directory. Copy your file mwe.tex
and mwe.bib
inside it.
File mwe.bib
:
@Book{Goossens,
author = {Goossens, Michel and Mittelbach, Frank and
Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994},
}
@Book{adams,
title = {The Restaurant at the End of the Universe},
author = {Douglas Adams},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980},
}
File mwe.tex
:
\documentclass[10pt,a4paper]{article}
\usepackage{hyperref} % for better urls
\begin{document}
This is text with \cite{Goossens} and \cite{adams}.
\nocite{*} % to test all bib entrys
\bibliographystyle{unsrt}
\bibliography{mwe} % file mwe.bib
\end{document}
The trick is to run first pdflatex mwe.tex
, suppose your tex code is mwe.tex
. Then you will see more files in the directory, important is the new file mwe.auc
, containing several informations, for example the used (cited) bib entrys.
Now run (second) bibtex mwe
. Check the directory again. BiBTeX builds a new file, mwe.bbl
and mwe.blg
. In mwe.blg
is the log file for the bibtex run, in mwe.bbl
is that file you need for submitting.
Resulting file mwe.bbl
:
\begin{thebibliography}{1}
\bibitem{Goossens}
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
\newblock {\em The LaTeX Companion}.
\newblock Addison-Wesley, 1 edition, 1994.
\bibitem{adams}
Douglas Adams.
\newblock {\em The Restaurant at the End of the Universe}.
\newblock The Hitchhiker's Guide to the Galaxy. Pan Macmillan, 1980.
\end{thebibliography}
Now run (third) pdflatex mwe.tex
twice to get a correct page numbering and ...
Now copy your file mwe.tex
to mwe-arxiv.tex
and delete the usage of bibtex
to create the bibliography.
Insert instead the content of the mwe.bbl
file.
New file mwe-arxiv.tex
with included mwe.bbl
:
\documentclass[10pt,a4paper]{article}
\usepackage{hyperref} % for better urls
\begin{document}
This is text with \cite{Goossens} and \cite{adams}.
\nocite{*} % to test all bib entrys
%\bibliographystyle{unsrt} % <======================== not longer needed!
%\bibliography{\jobname} % <========================== not longer needed!
\begin{thebibliography}{1} % <================================== mwe.bbl
\bibitem{Goossens}
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
\newblock {\em The LaTeX Companion}.
\newblock Addison-Wesley, 1 edition, 1994.
\bibitem{adams}
Douglas Adams.
\newblock {\em The Restaurant at the End of the Universe}.
\newblock The Hitchhiker's Guide to the Galaxy. Pan Macmillan, 1980.
\end{thebibliography} % <======================================= mwe.bbl
\end{document}
Now you have only to submit this new file mwe-arxiv.tex
...
Or just use \input{mwe.bbl}
(but please see I do not know if that is allowed by arxiv) but now see you have to submit two files (mwe-arxiv.tex
and mwe.bbl
).
New file mwe-arxiv-input.tex
with \input
ed mwe.bbl
:
\documentclass[10pt,a4paper]{article}
\usepackage{hyperref} % for better urls
\begin{document}
This is text with \cite{Goossens} and \cite{adams}.
\nocite{*} % to test all bib entrys
%\bibliographystyle{unsrt} % <======================== not longer needed!
%\bibliography{\jobname} % <========================== not longer needed!
\input{mwe.bbl} % <============================================= mwe.bbl
\end{document}
If you're using overleaf, you can simply click on the "Submission" Icon and select the "Arxiv" option, it will give you all the files you need.