[comp.text.tex] Labels from BiBTeX

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

I would like to produce labels with authors' names and titles from my BiBTeX files,
so that I can paste them over manilla folders.  Does anyone know how to do this?

James

wyman@blumon.enet.dec.com (Bob Wyman) (02/20/91)

>I would like to produce labels with authors' names and titles from my
BiBTeX >files,
>so that I can paste them over manilla folders.  Does anyone know how to
do >this?

This is quite a hack... However, assuming you're not looking for something
elegant:

1. Copy PLAIN.BST to LABEL.BST

2. Replace the output.bibitem function with the following:
   FUNCTION {output.bibitem}
    { newline$
      "\begin{label}" write$
      ""
      before.all 'output.state :=
    }

3. Replace the misc function with the following:

   FUNCTION {misc}
    { output.bibitem
    "\author{" write$
    format.authors write$
    "}\title{" write$
    format.title write$
    "}\end{label}" write$
    fin.entry
   }

4. Delete all the functions that have names which are Bibtex entry types:
	ie: article, book, booklet, manual, inbook, etc...

5. Now, set you bibliographystyle to label and run Bibtex. You'll get alot
   of complaints like:

 "Warning--entry type for "NEHGR:V117:p295" isn't style-file defined"

   But, you can ignore them.

6. Your output file (foo.bbl) will look like this:

    \begin{thebibliography}{10}

    \begin{label}\author{George~Ernest Bowman}\title{{R}ichard {W}arren and his
      {D}escendants}\end{label}

    \end{thebibliography}

7. Now, hack about with the output, define the label environment, author,
   title commands, or do whatever. Also, read the Bibtex documentation.
   What I've shown you here was the results of 5 minutes of playing. I'm
   sure you could build something much more nice with a little more effort.

8. Don't complain if this doesn't work to well. Don't even think bad thoughts
   if you decide it isn't elegant.

Although Bibtex seems to get used almost 100% for Bibliography files, it can be
viewed as a general facility for munging with textual databases... Admittedly,
I'm not sure if Bibtex's creator intended it to be used in such a general
manner...