为什么 citet 在 beamer 中不起作用?

为什么 citet 在 beamer 中不起作用?

我有一个问题。为什么“citet”在 beamer 中不起作用?

\documentclass[11pt]{beamer}

\usepackage{indentfirst,multicol,amssymb}

\usepackage{booktabs,colortbl} 

\usepackage[sort]{natbib}

\begin{document}

\begin{frame}

\frametitle{Books}

\begin{enumerate}

    \item \citet{bra}
\end{enumerate}

\end{frame} 
\bibliography{ref}
\end{document}

谢谢您的任何建议。

答案1

\bibliographystyle缺少A。例如:

\documentclass[11pt]{beamer}

\usepackage[sort]{natbib}

% to generate some dummy bib entry, as no one was in the question %%%%%%%%%%%%%%%%%%%%%%%
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{knuth,
  author       = {Knuth, Donald E.},
  title        = {The {\TeX} book},
  year         = 1984,
  maintitle    = {Computers \& Typesetting},
  volume       = {A},
  publisher    = {Addison-Wesley},
  location     = {Reading, Mass.},
  langid       = {english},
  langidopts   = {variant=american},
  sortyear     = {1984-1},
  sorttitle    = {Computers \& Typesetting A},
  indexsorttitle= {The TeXbook},
  indextitle   = {\protect\TeX book, The},
  shorttitle   = {\TeX book}
}
\end{filecontents*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{frame}

\frametitle{Books}

\begin{enumerate}

    \item \citet{knuth}
\end{enumerate}

\end{frame} 

\begin{frame}
\bibliographystyle{abbrvnat}
\bibliography{\jobname}
\end{frame}

\end{document}

在此处输入图片描述

相关内容