GeneralHow to create a biblography

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ma501th
Posts: 50
Joined: Tue Apr 08, 2008 7:31 pm

How to create a biblography

Post by ma501th »

Hi, i need to create a simple biblography. I was wondering if you could provide a simple step by step on how i can do this. I have searched online and they all look complicated. I have only one refrence to make.
This is the book details:
AUTHOR = Star, R. M
TITLE = Foo Bar Baz
PUBLISHER = MIT Press
ADDRESS = Cambridge, MA
YEAR = 1989

I was wonderig if you could tell me if i require a '.bib' file or i can do all this in one latex .tex file. could you also tell me what i would need to type in my .tex file for the above refrence to be valid.

Thanks for the help

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: How to create a biblography

Post by balf »

You can use a thebibliography environment and mimick what would be done by a bibtex style; eg:

\begin{thebibliography}{1}%%the number of characters is the length of the longest label you'll have%%
\bibitem{fbb}%% for references%%
\textsc{Star}, R.M.
\emph{Foo Bar Baz},
MIT Press, Cambridge, MA, 1989.
\end{thebibliography}

B.A.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to create a biblography

Post by localghost »

There are two possible solutions, one with and one without BibTeX. At first the version using BibTeX.

Code: Select all

\begin{filecontents*}{bibdata.bib}
@BOOK{lamport06,
AUTHOR={Leslie Lamport},
TITLE={\LaTeX: A Document Preparation System - User's Guide and Reference Manual},
EDITION={2nd},
PUBLISHER={Addison-Wesley},
YEAR=2006}
\end{filecontents*}
\documentclass[BCOR13mm,DIV15]{scrartcl}
\usepackage{fixltx2e}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}

\begin{document}
  \nocite{lamport06}
  \bibliography{bibdata.bib}
  \bibliographystyle{unsrt}
\end{doucment}
The filecontents* environment creates a .bib file which is used as a database. This is done here only for demonstration purposes. You should create that file in the same way as you create and save .tex files and not with this environment in your main file.

For more information on BibTeX refer to its documentation. Information about BibTeX bibliography styles is available on CTAN. And now the version without BibTeX.

Code: Select all

\documentclass[BCOR13mm,DIV15]{scrartcl}
\usepackage{fixltx2e}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}

\begin{document}
  \cite{ll06}
  \begin{thebibliography}{99}
    \bibitem[lamport06]{ll06} L.~Lamport: \textsl{\LaTeX: A Document Preparation System - User's Guide and Reference Manual}, 2\textsuperscript{nd} Edition, Addison-Wesley (2006).
  \end{thebibliography}
\end{document}
Without BibTeX there's a little bit more freedom in customizing the layout of your bibliography as if using BibTeX, where the styles determine the layout.

Creating a bibliography should be described in every book about basic LaTeX documentation. Useful information can be found in lshort.


Best regards
Thorsten¹
Post Reply