0

I am ''VERY NAIVE'' about bib.tex (EVEN LATEX). I have used

\begin{thebibliography}{99}

in my latex text. But now I have to use bib.tex, and need ''VERY SIMPLE'' information how I should creat a bib file, should I download something or only add somme usepackage ?

tarl
  • 15
  • Did you try Google first? – innisfree Apr 26 '16 at 14:24
  • Have you tried this answer ? http://tex.stackexchange.com/a/306229 – AJN Apr 26 '16 at 15:04
  • See the section from wiki books. It may be of help. https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#BibTeX and https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#Why_won.27t_LaTeX_generate_any_output.3F – AJN Apr 26 '16 at 15:08
  • https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#Helpful_tools – AJN Apr 26 '16 at 15:32

1 Answers1

1

From the Wikibooks example ( https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#BibTeX ) Create a file named example.bib (you may name it anything) with the following content

@article{AbedonHymanThomas2003,
  author = "Abedon, S. T. and Hyman, P. and Thomas, C.",
  year = "2003",
  title = "Experimental examination of bacteriophage latent-period evolution as a response to bacterial availability",
  journal = "Applied and Environmental Microbiology",
  volume = "69",
  pages = "7499--7506"
},

@incollection{Abedon1994,
  author = "Abedon, S. T.",
  title = "Lysis and the interaction between free phages and infected cells",
  pages = "397--405",
  booktitle = "Molecular biology of bacteriophage T4",
  editor = "Karam, Jim D. Karam and Drake, John W. and Kreuzer, Kenneth N. and Mosig, Gisela
            and Hall, Dwight and Eiserling, Frederick A. and Black, Lindsay W. and Kutter, Elizabeth
            and Carlson, Karin and Miller, Eric S. and Spicer, Eleanor",
  publisher = "ASM Press, Washington DC",
  year = "1994"
}

Now make your main tex file (I made a dummy file bibliographyexample.tex) have the following lines

\documentclass{article}

\begin{document}
\nocite{*} % this line is just for this example. you should put \cite commands instead
\bibliographystyle{plain}
\bibliography{example} % this is the important line

\end{document}

Now open the terminal / command line and go the directory containing the above two files and type latex bibliographyexample.tex. you will get an ouptut like

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./bibliographyexample.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo))
No file bibliographyexample.aux.
No file bibliographyexample.bbl.
(./bibliographyexample.aux) )
No pages of output.
Transcript written on bibliographyexample.log.

If there are no errors a new file called bibliographyexample.aux would have been created in your directory. Now type bibtex bibliographyexample.aux. You should get an output something like

This is BibTeX, Version 0.99d (TeX Live 2015)
The top-level auxiliary file: bibliographyexample.aux
The style file: plain.bst
Database file #1: example.bib

A new file will be now visible in your directory called bibliographyexample.bbl. Open it and see that it contains bibitem (which might be familiar to you)

\begin{thebibliography}{1}

\bibitem{Abedon1994}
S.~T. Abedon.
\newblock Lysis and the interaction between free phages and infected cells.
\newblock In Jim D.~Karam Karam, John~W. Drake, Kenneth~N. Kreuzer, Gisela
  Mosig, Dwight Hall, Frederick~A. Eiserling, Lindsay~W. Black, Elizabeth
  Kutter, Karin Carlson, Eric~S. Miller, and Eleanor Spicer, editors, {\em
  Molecular biology of bacteriophage T4}, pages 397--405. ASM Press, Washington
  DC, 1994.

\bibitem{AbedonHymanThomas2003}
S.~T. Abedon, P.~Hyman, and C.~Thomas.
\newblock Experimental examination of bacteriophage latent-period evolution as
  a response to bacterial availability.
\newblock {\em Applied and Environmental Microbiology}, 69:7499--7506, 2003.

\end{thebibliography}

Run pdflatex bibliographyexample.tex two more times and you should end up with a result which looks like below.

bibliography results

Any time you modify the *.bib file you should repeat this procedure

AJN
  • 932