\documentclass{article}
\usepackage{verbatim}
\begin{document}
 Bib\TeX\ has the nice feature that it makes your bibliography
 nicely; the entries are all formatted the same way, and it is
 easy to change that format. However, it is annoying that you
 have to have a separate \verb|.bib| file to contain all your
 bibliography entries. Fortunately, it is not too hard to build
 the \verb|.bib| file into the \verb|.tex| file. To illustrate,
 the source (almost) of \cite{this_file} is included below.
 Note that you have to run \LaTeX, Bib\TeX, \LaTeX, \LaTeX, as
 usual when you use Bib\TeX.

 \begin{verbatim}
  \documentclass{article}
  \usepackage{verbatim}
  \begin{document}
  Bib\TeX\ has the nice feature that it makes your bibliography
  nicely; the entries are all formatted the same way, and it is
  easy to change that format. However, it is annoying that you
  have to have a separate \verb|.bib| file to contain all your
  bibliography entries. Fortunately, it is not too hard to build
  the \verb|.bib| file into the \verb|.tex| file. To illustrate,
  the source (almost) of \cite{this_file} is included below.
  Note that you have to run \LaTeX, Bib\TeX, \LaTeX, \LaTeX, as
  usual when you use Bib\TeX.

     %%%%%%%%%%%%%%%%%%%%%%%%%%%
     %%% main text goes here %%%
     %%%%%%%%%%%%%%%%%%%%%%%%%%%

   \bibliography{\jobname}
   \bibliographystyle{alpha}

   \openout0= \jobname.bib
   \write0{
     @book {this_file,
         AUTHOR = {Anton},
          TITLE = {This document},
           YEAR = {2006},
     }
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     %%% more bib entries go here %%%
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   }
  \end{document}
 \end{verbatim}

   %%%%%%%%%%%%%%%%%%%%%%%%%%%
   %%% main text goes here %%%
   %%%%%%%%%%%%%%%%%%%%%%%%%%%

 \bibliography{\jobname}
 \bibliographystyle{alpha}

 \openout0= \jobname.bib
 \write0{
   @book {this_file,
       AUTHOR = {Anton},
        TITLE = {This document},
         YEAR = {2006},
   }
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %%% more bib entries go here %%%
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 }
\end{document}
