LaTeX Books


LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read the whole story

LaTeX users online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 4 guests

Environment thebibliography undefined when using letter Topic is solved

LaTeX Forum: Document Classes

bibliographiesletterlettersAdd tags Information and discussion about specific document classes and how to create your own document classes.

Postby hany.azzam on Mon Dec 8th, 2008

I am using the letter document class, and I want to include some citations. From what I have gathered the letter document class doesn't allow having bibliography items in the letter body. If that's the case, is there a workaround?
Here is the code that I am trying to run:

Code: Select all  •  Open in writeLaTeX


\end{center} \vfill

\closing{Sincerely yours,}

I receive the following error:
Latex Error: Environment thebibliography undefined.

The purpose of using a letter class and citations is because I want to write a cover letter and I need to refer to some citations inside of the letter's body.

Thank you,
Posts: 1
Joined: Mon Dec 8th, 2008

Postby lwaldron on Thu Feb 11th, 2010

It's not quite so simple, as there are a number of things that must be defined to get the bibliography to work. I got it working with the following code copied from article.cls into a file "letterbib.sty" then the command \usepackage{letterbib} in the preamble:

Code: Select all  •  Open in writeLaTeX
\setlength \labelsep {.5em}
  .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty
  {-3.5ex \@plus -1ex \@minus -.2ex}%
  {2.3ex \@plus.2ex}%
    \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code
    \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty
  \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty
      `thebibliography' environment}
Posts: 2
Joined: Thu Feb 11th, 2010

Postby mikeg on Wed Mar 17th, 2010

Hi lwaldron,

Just wanted to thank you for posting your solution to the problem. It came in very handy.


Posts: 2
Joined: Wed Mar 17th, 2010

Postby lwaldron on Wed Mar 17th, 2010

You're welcome Mike, it's nice to hear that posting it was worthwhile.
Posts: 2
Joined: Thu Feb 11th, 2010

Postby acfrery on Tue Jan 29th, 2013

Thank you very much for the solution of an issue that has been bothering me for years!
Posts: 1
Joined: Tue Jan 29th, 2013

Postby Benjamin B on Fri May 31st, 2013

Yeah, thanks lwaldron. Very helpful!
Benjamin B
Posts: 1
Joined: Fri May 31st, 2013

Postby geomorphdog on Thu Aug 29th, 2013

This worked beautifully. Thanks so much! Maybe it's obvious, but I also had to load the natbib package:

Code: Select all  •  Open in writeLaTeX
Last edited by cgnieder on Fri Aug 30th, 2013, edited 1 time in total.
Reason: code markup
Posts: 1
Joined: Thu Aug 29th, 2013

Topic Tags


Return to Document Classes

LaTeX users online

Users browsing this forum: No registered users and 4 guests