summaryrefslogtreecommitdiff
path: root/macros/plain/contrib/misc/bibplain.tex
blob: 49f9284f666ba9aeaa4cb5399bcd3f33640df702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Pseudo-BIB.TEX
%
% These commands are examples of how to use BibTeX with plain TeX.
% Syntax is similar to LaTeX, but can be changed to suit the user.
%
% Example:
%         .... Blah, blah \citer(Keyword) blah, blah....
% \bibliography{gunk}       %<-- the *.BIB file
% \bibliographystyle{plain} %<-- the *.BST file (style)
%
% \citer Puts nothing in the text, it only enters something in the *.AUX
% file (which is now generated). This allows citing of entries in the
% bibliography, but not the text.
%
%                       Anthony J. Ferro
%                       Physics Dept. -- Astronomy Group
%                       Arizona State University
%                       Tempe, AZ  85287
%                       FERRO@ASUCPS.BITNET
\newcount\citeon
\citeon=0
 
\def\citer#1{\ifnum\citeon<1\citeon=1\openout1\jobname.aux
   \write1{\string\relax}\fi      %
   \write1{\string\citation{#1}}} % Put your favorite method of citing here!
 
\def\bibliography#1{\openin2\jobname.bbl
  \ifeof2
        \message{No \jobname.BBL file.  }
        \write1{\string\bibdata{#1}}
        \closein2
  \else
        {       %important, lets \end be redefined TEMPORARILY
        \def\begin##1##2{\references}
        \def\bibitem##1{}
        \def\newblock{}
        \def\end##1{\endreferences}
        \input\jobname.bbl
        }
        \write1{\string\bibdata{#1}}
        \closein2
  \fi }
 
\def\bibliographystyle#1{\write1{\string\bibstyle{#1}}}
 
\def\references{\bf This is the beginning of MY REFERENCES}
 
\def\endreferences{\bf This is the end of MY REFERENCES}
%%%-------------------- Un-Rip here ---------------------------------