我的代码:
\documentclass{beamer}
\usetheme{default}
\usecolortheme{default}
\usefonttheme{serif}
\begin{document}
\begin{frame}{Reference}
\cite{bilson1978rational}.
\bibliographystyle{apalike}
\bibliography{abc.bib}
\end{frame}
\end{document}
我的 abc.bib 文件:
@article{bilson1978rational,
title={Rational expectations and the exchange rate},
author={Bilson, John FO},
journal={The economics of exchange rates: Selected studies},
pages={75--96},
year={1978}
}
答案1
假设该文件名为foo.tex
运行pdflatex foo ; bibtex foo ; pdflatex foo; pdflatex foo
此命令将提供正确的引用。重要的步骤是bibtex
并在 之后重新编译两次bibtexing
。
\documentclass{beamer}
\begin{filecontents}{abc.bib}
@article{bilson1978rational,
title={Rational expectations and the exchange rate},
author={Bilson, John FO},
journal={The economics of exchange rates: Selected studies},
pages={75--96},
year={1978}
}
\end{filecontents}
\usetheme{default}
\usecolortheme{default}
\usefonttheme{serif}
\begin{document}
\begin{frame}{Reference}
\cite{bilson1978rational}.
\bibliographystyle{apalike}
\bibliography{abc.bib}
\end{frame}
\end{document}