How do you produce a document with citations (\citep, \citet) working properly in the paper but without a bibliography at the end?

I've come up with one solution that is bad because it breaks my makefile.

latex file.tex
bibtex file
# comment out \bibliography{} command
latex file.tex

Similarly, is there a way to produce the bibliography with no accompanying text? Again, I've come up with a solution: fill an otherwise blank .tex file with \nocite{} commands. However, this is a pain because I have to keep two files synced by hand (and regular expressions to search for \citep{author1, author2} can be a huge pain when there are pagebreaks...).

  • 2
    why are you commenting out the \bibliography{} command? presumably you do have a .bib file, otherwise it makes no sense to have any \cite instructions. once bibtex has created a .bbl file from the .bib file, it doesn't matter whether the cite entries are put into the .aux file again. – barbara beeton Oct 12 '11 at 17:40

Your second request is easy: use \nocite{*}. This will produce a full bibliography, regardless of which bibliography entries are actually cited.

  • 5
    This is a good idea only if your .bib file contains nothing but entries you want in your bibliography. I guess that's so for the OP but thought it worth mentioning for others. It would produce something ridiculous with a common database of entries, for example. – cfr Mar 24 '14 at 0:29
  • The link seems to be broken. – Bach Feb 13 '16 at 15:48

Use the \usepackage{bibentry} and then instead of \bibliography{} use \nobibliography{}.


  • 3
    Welcome to TeX.sx! Thanks for your answer, we're looking forward to your future contributions to this Q&A. – Marco Daniel Nov 7 '13 at 18:09
  • 3
    It didn't work for me in beamer. – 6005 Jan 15 '19 at 22:26
  • Worked for me. Thank you for sharing your answer! – Md Amiruzzaman Mar 27 at 13:34

You can define a savebox and put the \bibliography command inside the savebox.

Here is a small example:




NOTE: If you are using biblatex you don't need such hacks.


In relation to my answer I have a small question. What do you think about a small package which allows the user to print the bibliography or not?

Here my first try:

%% Copyright (C) 2011 by Marco Daniel
\ProvidesPackage{nobibprint}[2011/10/12 v0.1 nobibprint]

Now simple use:





  • 1
    I certainly like the idea of the package, and will give it a shot. I don't think I understand saveboxes; will have to look those up. – keflavich Oct 12 '11 at 21:20
  • Amazing, but I still had to add \bibliographystyle{} before \bibliography{}. Otherwise, this is magical. – hatmatrix Oct 15 '12 at 20:08
  • Great. Just to be clear, the only thing that's needed is: \newsavebox\mytempbib \savebox\mytempbib{\parbox{\textwidth}{\bibliography{test}}} – Bjørn Kjos-Hanssen Sep 22 '14 at 21:24

If you put the \bibliography command in a file, say bibcommand.tex and in the main file you say


<the document>



then a normal compilation will include the bibliography, but commenting out \includeonly{} will omit it.

You can also add the \includeonly{} from the shell

latex "\includeonly{}\input{filename}"

(where your main file is filename.tex) and this may be included in a Makefile, I believe.

  • So \includeonly{} forces the later \include command to be ignored? And using "latex [some latexcommand] filename" prepends the latex command to the file? Both very useful features, thanks. – keflavich Oct 12 '11 at 21:15
  • @Sosi I'd like to acknowledge who first taught me this trick, but it was something I read in comp.text.tex several years ago. – egreg May 9 '13 at 18:03

Simply use biblatex and its natbib compatibility option.




  author = {Author, A.},
  year = {2001},
  title = {Alpha},



Some text \citep{A01}.

% \printbibliography


If you already have a foo.bbl file that you want to pull from (e.g. from another main document), a slight modification from this question works wonders:


Your makefile can empty the *.bbl file. If you want to use Konrad's suggestion to separately compile the bibliography, you can try the following (untested):

file.dvi: file.tex
        latex file
        bibtex file
        mv -f file.bbl references.bbl; touch file.bbl
        latex file
        latex references

where references.tex is the Latex file that invokes \nocite{*}.


I used a sorta hack :)

Compiling only a page range or page selection

this gives info on page selection while making pdf ... I put a \newpage before bibliography and just didn't compile those pages ...


For your first question: "How do you produce a document with citations (\citep, \citet) working properly in the paper but without a bibliography at the end?"

This maybe a dirty solution, but please try adding \vspace*{-200in} right before your \bibliography{} command. I think the whole references then go to somewhere too high to be seen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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