I know how to use a .bib file to add BibTex and use that in the main document. Is there a way I can include the bib-file in my latex document and not use an external bib-file?


1 Answer 1


I think we have to clear up the terminology here. If you refer to bibtex, you refer to the executable, e.g. bibtex.exe on a windows system. The bib-file on the other hand is your database of entries.

If you want to create a bibliography without using the bibtex executable, you can use the classic


\bibitem{key} John Doe {\em Title and stuff}  2013.


in your document which you can cite with \cite{key} in the text.

If your question is if you can use a bib-file without bibtex. The answer is - no. Technically the answer is yes because you could use the biber executable with the bibaltex package but because biber and bibtex are kind of the same I still say no.

If your question is if you can include the content of your bib file in you main document the answer is - yes.

Use the filecontents environment and paste the content of your bib file in it. LaTeX will then automatically generate a bib file during the compilation. That way you can send a single tex file to a friend and he can compile the document including the bibliography. You still have to use bibtex though.



  • 1
    The filecontents is what I am looking for. Also, please edit my question to improve clarity. Oct 24, 2013 at 0:14
  • 1
    Good, glad I can help. Because the filecontents+bibtex stuff has been asked before, I flagged your question as a possible duplicate.
    – Martin H
    Oct 24, 2013 at 0:22
  • 2
    It should be said that the filecontents package has to be loaded to define the filecontents environment.
    – hdl
    Apr 5, 2016 at 17:04

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