[comp.text.tex] Printing Bibliographies

jacob@ponder.csci.unt.edu (Tom Jacob) (02/26/91)

I have several bibliographies in BibTeX format.  I would like to use
LaTeX/BibTeX to print out an entire bibliography by itself, not as a
part of a larger document.  I would prefer not to have to list every item
in the bibliography, since a couple of them are quite large.  I guess what
I'd really like to be able to do is type something like

printbib bibtex_file_name

and have a nicely formatted bibliography appear.

Can someone please tell me how to do this?

Thanks,

Tom Jacob
Department of Computer Science
University of North Texas

jacob@ponder.csci.unt.edu

jdm5548@diamond.tamu.edu (James Darrell McCauley) (02/26/91)

In article <1991Feb26.124847.21638@solo.csci.unt.edu>, jacob@ponder.csci.unt.edu (Tom Jacob) writes:
|> I have several bibliographies in BibTeX format.  I would like to use
|> LaTeX/BibTeX to print out an entire bibliography by itself, not as a
|> part of a larger document.  I would prefer not to have to list every item
|> in the bibliography, since a couple of them are quite large.  I guess what
|> I'd really like to be able to do is type something like
|> 
|> printbib bibtex_file_name
|> 
Tom, what you're missing is the \nocite{*}.  This is something that was
added to BibTeX 0.99.  I'm assuming that you're using this version.

EVERYONE READING THIS POST:
  please make note of this on pages 74 and 188 of your LaTeX book.

---cut here
%printbib.tex
\documentstyle{article}
\begin{document}
\bibliographystyle{asaetr} % <-- your favorite BibTeX style (*.bst)
\nocite{*}                 % <-- Here's the "trick"
\bibliography{Kohonen}     % <-- here's the bibliography file name (*.bib) 
\end{document}            
---cut here

Follow the usual steps.  
--cut here
#!/bin/csh 
set THEFILE=printbib
set PRINT=dvips
latex $THEFILE
bibtex $THEFILE
latex $THEFILE
latex $THEFILE
$PRINT $THEFILE
exit
--cut here
-- 
James Darrell McCauley (jdm5548@diamond.tamu.edu, jdm5548@tamagen.bitnet)
Spatial Analysis Lab, Department of Agricultural Engineering,
Texas A&M University, College Station, Texas 77843-2117, USA

foster@ted.cs.uidaho.edu (02/27/91)

\nocite{*} doesn't work at my location, so I assume we DON'T have BiBTeX version
.99 (or whatever we needed.  Is there any way to generate all your nocites anyway?

Well...I've done it with a couple AWK programs.  For example, for math.bib, to 
built a file of nocites, use:

   cat math.bib | awk '/@/' | awk -f nocite.awk > math.nocites

Where nocite.awk contains the following:
  
  { t = $1
    f = index(t,"{")+1
    l = length(t) - f
    s = substr(t,f,1)
    print "\\nocite{"s"}"
  }

This was my first AWK program, so it is probably not as efficient at possible.
But what I've shown here worked quite nicely to generate all the \nocite's I 
needed in order to print my bibliography.


James.