如何将 LyX 信件转换为 PDF 且不出现参考书目错误?

如何将 LyX 信件转换为 PDF 且不出现参考书目错误?

我在 LyX 中创建了一个新文档,并使用菜单Document>Settings将文档类更改为Letter (Standard Class)。我输入几个单词,然后尝试使用菜单项Document>将其渲染为 PDF View [PDF (pdflatex)]。但是,此操作失败,并出现以下错误:

LaTeX Error: Environment thebibliography undefined.

 \renewenvironment{thebibliography}
                                         [1]{%
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

我无意在这封信中使用引文。我如何将 LyX 信件呈现为 PDF?(我对原始 LaTeX 了解甚少,如果可能的话,我更喜欢“在 LyX 内”修复,或者至少是简单的原始文本更改。)

我正在使用 LyX 2.2.2,并且(从日志中)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。我的失败文档的全文如下。

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\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
\end_index
\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
\end_header

\begin_body

\begin_layout Standard
Foo bar.
\end_layout

\end_body
\end_document

答案1

您已将 Natbib 定义为参考书目。要解决此问题,请转到“文档”->“设置”->“参考书目”,然后选择“默认(数字)”。

这是因为 Lyx\usepackage[authoryear]{natbib}在选择 Natbib 选项时生成。documentclassletter没有定义书目环境。

arcicle如果你需要在信中添加参考书目,你可以按照建议从课堂上复制环境这里

相关内容