BibTeX, biblatex and biberUse Bibtex for citations, but suppress the bibliography?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
gbm
Posts: 1
Joined: Fri Apr 08, 2011 4:20 pm

Use Bibtex for citations, but suppress the bibliography?

Post by gbm »

I may be being incredibly dense here, or missing something obvious, so apologies in advance if so...

Also I tried searching for a solution on this forum but it turns out that 'bibliography' is a common word and cannot be searched for :|

(begin irrelevant motivations for strange request)
I am writing a thesis which has a single master thesis.bib file, and a main thesis.tex file which uses the 'subfiles' package to include the chapterXX.tex files. The idea is that each subfile is individually compilable; I have got the graphics working and I have also got the references working IF each chapter has a \bibliography command at the bottom. I have a command in the main file to kill these commands so they don't do anything when the main file is compiled; there is never more than 1 active \bibliography command.

The problem is that this produces a 'chapter' bibliography at the end of each chapter if I compile it on its own, which I don't want. If I don't include the \bibliography command then obvious the citations don't work (since no \begin{thebibliography} and \bibitem commands are generated).
(end motivations)


So the question is - how do you get bibtex to do the citations, generate the bibliography, and then prevent it from printing? I thought about hiding it in a \phantom, but I assume this would create a blank page, and I tried various things that in retrospect won't work like changing \begin{thebibliography} in the .bst file to \begin{comment} (with the aid of the verbatim package).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

citizen_of_utopia
Posts: 3
Joined: Wed Apr 06, 2011 10:45 pm

Re: Use Bibtex for citations, but suppress the bibliography?

Post by citizen_of_utopia »

Hello there.

When I wrote my thesis I would write the chapters as stand-alone .tex files, using BibTeX, that would compile. But then would make a copy and cut the preamble, \begin{document}, the BibTex commands and \end{document}, and save it as input_chapter_x.tex. Then in the thesis.tex file I would add

\chapter{Chapter_x}\label{chap:chapter_x}
\input{chapter_x}

So you can change each chapter as you like, checking that it all works, and that BibTeX is working; then just remember to strip of the preamble, \begin{document}, the BibTex commands and \end{document} before making a new input_chapter_x.tex.

It's very simple, just highlight, delete and save as. In fact, the hardest part is to remember to make a new input_chapter_x.tex file; but you'll soon get used to that. And even if you forger, you don't lose anything because it's all saved in chapter_x.tex. You'll just have an out-of-date thesis.pdf until you remember.
Post Reply