2

I am using bibtex for referencing in beamer. My bibliography is left aligned, which I want to make in the justifying style. My attempts using ragged2e package and/or explicitly specifying \justify in the respective frames are not working. My code is attached here, please help.

\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}
4

You can use the etoolbox package to patch the thebibliography environment. Add the following to your preamble:

\usepackage{etoolbox}
\apptocmd{\thebibliography}{\justifying}{}{} 

Since you're using a numbered citation style, it's also necessary to remove the icons for the bibliography items so that the numbers display correctly in the references:

\setbeamertemplate{bibliography item}[text]

Here's the complete example:

\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}

output of bib

  • This doesn't work with biber backend does it? (tried and failed, but I do have lots of packages that could be interfering). – PatrickT Jul 3 '18 at 14:13
  • @PatrickT biber is for use with biblatex and the ieeetr style doesn't use biblatex. If you are using biblatex it would be best to ask a new question using the same basic example as I give in my answer but with the relevant biblatex commands. – Alan Munn Jul 3 '18 at 14:25
  • I see, thanks Alan. Not sure how much I'll want to justify, as I'm getting used to the non-justified style (it is a beamer class after all), but if I decide I need it, I'll make a MWE and ask a question. Thanks! – PatrickT Jul 3 '18 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.