I create a new document in LyX, and use the menu Document > Settings to change the document class to Letter (Standard Class). I type a few words, then attempt to render it into PDF, using the menu item Document > View [PDF (pdflatex)]. However, this fails, with the following error:

LaTeX Error: Environment thebibliography undefined.

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

I have no intention of using citations in this letter. How can I render a LyX letter as PDF? (I have very little knowledge of raw LaTeX, and I'd prefer "within LyX" fixes if possible, or at least simple raw-text changes.)

I'm using LyX 2.2.2, and (from the log), pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux) (preloaded format=pdflatex 2016.11.14) 17 NOV 2016 22:37. The full text of my failing document is below.

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\save_transient_properties true
\origin unavailable
\textclass letter
\use_default_options true
\maintain_unincluded_children false
\language british
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "lmss" "default"
\font_typewriter "lmtt" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine natbib
\cite_engine_type authoryear
\biblio_style plainnat
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false


\begin_layout Standard
Foo bar.


1 Answer 1


You have Natbib defined as bibliography. To fix this go to Document->Settings->Bibliography and select `Default (numerical).

This is because Lyx generates \usepackage[authoryear]{natbib} when the option Natbib is selected. The letter documentclass does not have a bibliography environment defined.

If you need bibliography in your letter, you can copy the environment from the arcicle class as was suggested here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .