这是我写的示例1.tex:
\documentclass{beamer}
\usepackage{newcent}
\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}
\begin{document}
\frame{\frametitle{Part One}
An example sentence that is citing this reference~\cite{wmo11} and this reference~\cite{noaa14}.}
\begin{frame}[allowframebreaks]
\frametitle{References}
\bibliographystyle{apalike}
\bibliography{biblio1}
\end{frame}
\end{document}
这是我写的书目1.bib:
@Book{wmo11,
author = "{World Meteorological Organization}",
title = "Manual on the Global Observation System: Volume 2--Regional Aspects",
year = "2011",
publisher = "World Meteorological Organization"
}
@Misc{noaa14,
author = "{National Oceanic and Atmospheric Administration}",
title = "{I}ntegrated {S}urface {D}atabase ({ISD})",
year = "2014",
howpublished="Retrieved October 10, 2014, from \url{http://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/integrated-surface-database-isd}"
}
这是我得到的输出:
我希望得到这样的输出:
我应该做哪些改变?
答案1
默认情况\cite
下,将引用文本放在一个框中,因此它是一个不可拆分的单元。在您的例子中,您只想删除由内部命令提供的这个框\@cite@ofmt
,因此我们重新定义它以简单地传递其参数。
\begin{filecontents*}{\jobname.bib}
@Book{wmo11,
author = "{World Meteorological Organization}",
title = "Manual on the Global Observation System: Volume 2--Regional Aspects",
year = "2011",
publisher = "World Meteorological Organization"
}
@Misc{noaa14,
author = "{National Oceanic and Atmospheric Administration}",
title = "{I}ntegrated {S}urface {D}atabase ({ISD})",
year = "2014",
howpublished="Retrieved October 10, 2014, from \url{http://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/integrated-surface-database-isd}"
}
\end{filecontents*}
\documentclass{beamer}
\usepackage{newcent}
\makeatletter
\let\@cite@ofmt\@firstofone % not \hbox
\makeatother
\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}
\begin{document}
\begin{frame}
\frametitle{Part One}
An example sentence that is citing this reference \cite{wmo11}
and this reference \cite{noaa14}.
\end{frame}
\begin{frame}[allowframebreaks]
\frametitle{References}
\bibliographystyle{apalike}
\bibliography{\jobname}
\end{frame}
\end{document}
我使用filecontents*
环境只是为了使示例自成一体,使用您自己的文件,就像您给出的示例一样。
答案2
我不知道如何使用 bibtex 以简单的方式修复它。
我认为,最简单的解决方案是使用 Biblatex 和 biber 代替 bibtex。它们功能更强大,而且没有这个问题。
MWE(您需要安装 biblatex 和 biber):
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{biblio1.bib}
\usepackage{newcent}
\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}
\begin{document}
\frame{\frametitle{Part One}
An example sentence that is citing this reference~\parencite{wmo11} and this reference~\parencite{noaa14}.}
\begin{frame}[allowframebreaks]
\frametitle{References}
\printbibliography
\end{frame}
\end{document}