5

This question already has an answer here:

I am trying to merge my tex and bib files into one for a journal submission. Somebody suggested to use the bbl file. I am using texmaker / miktex, and bibtex.

I have no idea as to how to actually create bbl file from bib. All the links I found on this website / google don't actually explicitly explain, step by step, how to do this. And I mean step-by-step (since my knowledge of latex / computing generally is next to nothing). For example, I see instructions "compile"... And I don't know what this means (as to what key on my keyboard I should be pressing).

Thank you.

marked as duplicate by user36296, Mike Renfro, CarLaTeX, Stefan Pinnow, Andrew Feb 1 '17 at 6:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Well regarding "compile" that will be very dependent. If you're using a program designed specifically for writing LaTeX, such as Texmaker (I know you are) it might have a button and/or a keyboard shortcut. But many people use a command line and you can too. What this is called and how to get to it will very from Operating System to Operating System, but if you're using Windows I think it's still called "command prompt". There you would type an instruction. That's the how, what it means in TeX terms is basically turning your LaTeX code into a document – Au101 Feb 1 '17 at 0:35
  • Yes...The problem is, I still can't see any guide as to how to obtain the bbl file. For example this post: tex.stackexchange.com/questions/324034/… explains what it is, but not how to obtain and actually find it.@Au101 – Alex Feb 1 '17 at 0:40
  • I know how to run the normal sequence latex, bibtex, latex, etc. That's not a problem. The problem is knowing how and when the bbl file actually appears, and where to find it @Au101 – Alex Feb 1 '17 at 0:45
  • 1
    The .bbl file will be in your working directory after you've run bibtex. Open it, copy the contents into a thebibliography environment in the place where you had \bibliographystyle{<style>}\bibliography{<bibfile>}. – cfr Feb 1 '17 at 0:48
4

Suppose that we have the following document:

\documentclass{article}
\begin{document}
\cite{article-crossref} and \cite{article-full}.
\bibliographystyle{plain}
\bibliography{xampl}
\end{document}

Now, we compile in the usual way, using our editor of choice or on the command line or whatever. We make sure that everything is properly resolved and defined, running the compilation sequence multiple times if needed. (Compilation is just running e.g. pdflatex -> bibtex -> pdflatex -> pdflatex.)

stage 1

Now, to prepare the file for journal submission, we open the .bbl file, which will be in the working directory, by default, or wherever you've asked for generated files to go.

Here's mine:

\newcommand{\noopsort}[1]{} \newcommand{\printfirst}[2]{#1}
  \newcommand{\singleletter}[1]{#1} \newcommand{\switchargs}[2]{#2#1}
\begin{thebibliography}{1}

\bibitem{article-crossref}
L[eslie]~A. Aamport.
\newblock The gnats and gnus document preparation system.
\newblock {\em \mbox{G-Animal's} Journal}, 41(7):73+, July 1986.
\newblock This is a cross-referencing ARTICLE entry.

\bibitem{article-full}
L[eslie]~A. Aamport.
\newblock The gnats and gnus document preparation system.
\newblock {\em \mbox{G-Animal's} Journal}, 41(7):73+, July 1986.
\newblock This is a full ARTICLE entry.

\end{thebibliography}

We copy this into our original .tex file at the point where we issued the \bibliographystyle and bibliography commands:

\documentclass{article}
\begin{document}
\cite{article-crossref} and \cite{article-full}.
\newcommand{\noopsort}[1]{} \newcommand{\printfirst}[2]{#1}
  \newcommand{\singleletter}[1]{#1} \newcommand{\switchargs}[2]{#2#1}
\begin{thebibliography}{1}

\bibitem{article-crossref}
L[eslie]~A. Aamport.
\newblock The gnats and gnus document preparation system.
\newblock {\em \mbox{G-Animal's} Journal}, 41(7):73+, July 1986.
\newblock This is a cross-referencing ARTICLE entry.

\bibitem{article-full}
L[eslie]~A. Aamport.
\newblock The gnats and gnus document preparation system.
\newblock {\em \mbox{G-Animal's} Journal}, 41(7):73+, July 1986.
\newblock This is a full ARTICLE entry.

\end{thebibliography}
\end{document}

Now clean to remove the generated files, so you are sure you aren't still relying on the external .bbl and re-compile at least twice (pdflatex -> pdflatex) to obtain the same result from just your .tex file.

0

In TeXmaker, a priori, you only have to write

\bibliographystyle{name-of-the-bibstyle}
\bibliography{name-of-the-.bib file}% without the .bib extension

in your .tex file, at the place where you want to have your bibliography, then pdflatex (F6) + bibtex (F11) + pdflatex (twice) on the .tex file. Alternatively you can choose Fast compilation, which will do that automatically for you.

  • I don't think this is the problem. I think the issue is that the OP doesn't know how to eliminate the dependency on the .bib file. Could be mistaken, though, of course. – cfr Feb 1 '17 at 1:00
  • @cfr: it's me who misunderstood. However, if the OP knows about .bib files and .bibtex, he/she would have noticed the creation of a .bbl file, don't you think? – Bernard Feb 1 '17 at 1:09
  • The problem is that Texmaker does not show all file name extensions. The bbl. file was hidden - that was half of my problem@Bernard – Alex Feb 1 '17 at 1:10
  • 3
    That's not a problem of TeXmaker, but of Windows configuration. It's always better to ask showing file extensions (I believe they're hidden by default). – Bernard Feb 1 '17 at 1:13
  • OS X tends to hide file extensions, too, if I remember correctly. (Perhaps I'm imagining it.) It certainly presents the underlying file-system in deeply misleading ways in Finder. Anyway, how often do you examine the contents of the working directory with a fine-tooth comb? If you know that is where it will be, you'll look. But if you don't know to look there, but believe it is something you need to create in some different way, then you won't know where to begin. – cfr Feb 1 '17 at 1:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.