我在 beamer 中使用 bibtex 进行引用。我的参考书目是左对齐的,我想将其设置为对齐样式。我尝试使用 ragged2e 包和/或在相应的框架中明确指定 \justify,但均无效。我的代码附在此处,请帮忙。
\documentclass{beamer}
\usepackage{ragged2e}
\justifying
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Argyropoulos2015,
author = {Argyropoulos, C. D. and Markatos, N. C.},
journal = {Applied Mathematical Modelling},
number = {2},
pages = {693--732},
publisher = {Elsevier Inc.},
title = {{Recent advances on the numerical modelling of turbulent flows}},
volume = {39},
year = {2015}}
\end{filecontents*}
\begin{document}
\justifying
\begin{frame}
This slide is a reference for bibliography.
\cite{Argyropoulos2015}
\end{frame}
\begin{frame}{Reference}
\justifying
\bibliography{\jobname}
\end{frame}
\bibliographystyle{ieeetr}
\end{document}
答案1
您可以使用该etoolbox
软件包来修补thebibliography
环境。将以下内容添加到您的序言中:
\usepackage{etoolbox}
\apptocmd{\thebibliography}{\justifying}{}{}
由于您使用的是编号引用样式,因此还需要删除参考书目项目的图标,以便参考文献中正确显示数字:
\setbeamertemplate{bibliography item}[text]
以下是完整的示例:
\documentclass{beamer}
\usepackage{etoolbox}
\usepackage{ragged2e}
\bibliographystyle{ieeetr}
\setbeamertemplate{bibliography item}[text]
\apptocmd{\thebibliography}{\justifying}{}{}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Argyropoulos2015,
author = {Argyropoulos, C. D. and Markatos, N. C.},
journal = {Applied Mathematical Modelling},
number = {2},
pages = {693--732},
publisher = {Elsevier Inc.},
title = {{Recent advances on the numerical modelling of turbulent flows}},
volume = {39},
year = {2015}}
\end{filecontents*}
\begin{document}
\justifying
\begin{frame}
This slide is a reference for bibliography.
\cite{Argyropoulos2015}
\end{frame}
\begin{frame}[allowframebreaks]{References}
\bibliography{\jobname}
\end{frame}
\end{document}