\printbibliography Documentclass letter に未定義の制御シーケンス エラーがあります

\printbibliography Documentclass letter に未定義の制御シーケンス エラーがあります

以下の最小限の動作例を PDFLaTeX または XeLaTeX のいずれかでコンパイルしようとすると、コンパイラは終了コード 1 で終了し、undefined control sequence\printbibliography の後に続くもの (例コード内の空白行) を報告します。

\documentclass[12pt]{letter} % 12pt font size, 10pt and 11pt are also possible

\usepackage{geometry} % Required for adjusting page dimensions

\geometry{
    paper=letterpaper, % Change to letterpaper for US letter
    top=1.00in, % Top margin
    bottom=1.00in, % Bottom margin
    left=1.00in, % Left margin
    right=1.00in, % Right margin
    %showframe, % Uncomment to show how the type block is set on the page
}

\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage{url}
\usepackage{hyperref}

\begin{filecontents}{DummyBibliography.bib}
@book{sandarsEpicGilgamesh1977,
  title = {The Epic of {{Gilgamesh}}},
  editor = {Sandars, Nancy K.},
  date = {1977},
  series = {Penguin Classics},
  edition = {Rev. ed. inc. new material},
  publisher = {{Penguin Books}},
  location = {{Harmondsworth, Middlesex, Engl}},
  isbn = {978-0-14-044100-0},
  langid = {english},
  language = {eng},
  pagetotal = {127}
}
\end{filecontents}

\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber,hyperref=true,alldates=comp,url=true]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{DummyBibliography.bib}

\usepackage{ebgaramond} % Use the EBGaramond font by default
\usepackage{microtype} % Improve justification

\usepackage{lipsum}

\signature{James Adams} % Your name for the signature at the bottom

\address{1001 Main Street \\ Anywhere, AZ 99999} % Your address and phone number

\begin{document}

\begin{letter}{John Doe \\ 100 Broadway \\ Somewhere, AZ 11111} % Name/title of the addressee

\opening{John,}
\vspace{\parskip}

\lipsum [1]

As an anonymous author wrote long ago:
\blockquote[\cite{sandarsEpicGilgamesh1977}]
    {
    \lipsum[2]
    }

\lipsum[3]

\vspace{2\parskip} % Extra whitespace for aesthetics
\closing{Sincerely,}
\vspace{2\parskip} % Extra whitespace for aesthetics

\end{letter}

\clearpage
\printbibliography[title = References]

\end{document}

最初にこれを手紙で実行したときはエラーは発生しなかったと思いますが、ここ数週間は一貫してエラーが発生しています (私は ArchLinux で Kile を使用しているため、システム上の TeXLive は頻繁に更新されます)。奇妙なことに、PDFLaTeX と XeLaTeX はどちらも終了コード 1 で終了しますが、期待される参考文献を含む適切にフォーマットされた手紙を含む PDF も生成するため、これは問題というよりは迷惑です。

答え1

あなたの問題に対する最小限の動作しない例は次のようになります

\documentclass{letter}
\begin{document}
\section{References}
\end{document}

を使用すると、この問題を回避できます。これにより、biblatex は見出しに\printbibliography[heading=none]を使用しなくなります。\section

\documentclass{letter}

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}

\cite{knuth:ct}

\textbf{\Large References}

\printbibliography[heading=none]

\end{document}

関連情報