5

When I include references in a beamer frame, the author is printed first, followed by the title, followed by the journal/note. I'm using bibtex for referencing.

    \bibliographystyle{unsrt}
    \bibliography{report.bib} 

The output looks as follows: bibliography

How can I make the title appear on top, followed by the author underneath?

I have been looking at beamerbaselocalstructure.sty to redefine the newblock definition, but have been unsuccessful so far.

Here's sample code that results in the output above (although it uses inline bibitems instead of bibtex). I do not want to switch the author and title field in the bibtex file.

\documentclass{beamer}

\begin{document}
\begin{frame}

    \begin{thebibliography}{10}
        \bibitem{patchdroid} Collin Mulliner, Jon Oberheide, William Robertson, and Engin Kirda. \newblock  Scalable Third-Party Security Patches for Android Devices. \newblock In \textit{Proceedings of the 29th Annual Computer Security Applications Conference}, pages 259--268. ACM, 20143.
    \end{thebibliography}

\end{frame}
\end{document}
2
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – Herr K.
    Jun 27 '14 at 18:52
  • I've added the MWE
    – Cedric VB
    Jun 27 '14 at 19:08
2

I managed to redefine \beamer@newblock so that the text in the author block is saved and then later used after the title block. I used the definition of the command in beamerbaselocalstructure.sty (Till Tantau, Vedran Miletić) as the starting point for my modifications. Note that the bibliography entry author template is now used for the title and the title template is used for the authors.

Anyone with better LaTeX skills is welcome to improve the solution.

Result of running the code

\documentclass{beamer}

\usepackage{xparse}
\makeatletter
\RenewDocumentCommand\beamer@newblock{u{\newblock}}{%
  \def\newblock{%
    \usebeamercolor[fg]{bibliography entry title}%
    \usebeamerfont{bibliography entry title}%
    \usebeamertemplate{bibliography entry author}%
    \def\newblock{%
      \usebeamercolor[fg]{bibliography entry author}%
      \usebeamerfont{bibliography entry author}%
      \usebeamertemplate{bibliography entry title}%
      #1%
      \usebeamercolor[fg]{bibliography entry location}%
      \usebeamerfont{bibliography entry location}%
      \usebeamertemplate{bibliography entry location}%
      \def\newblock{%
        \usebeamercolor[fg]{bibliography entry note}%
        \usebeamerfont{bibliography entry note}%
        \usebeamertemplate{bibliography entry note}}}}%
  \leavevmode\setbox\beamer@tempbox=\hbox{}\ht\beamer@tempbox=1.5em\box\beamer@tempbox\newblock}
\makeatother

\begin{document}
\begin{frame}

    \begin{thebibliography}{10}
        \bibitem{patchdroid} Collin Mulliner, Jon Oberheide, William Robertson, and Engin Kirda. \newblock  Scalable Third-Party Security Patches for Android Devices. \newblock In \textit{Proceedings of the 29th Annual Computer Security Applications Conference}, pages 259--268. ACM, 20143.
    \end{thebibliography}

\end{frame}
\end{document}
1
  • I tried switching the whole block for title and author, but didn't realize I only had to switch the color and font parts. Many thanks!
    – Cedric VB
    Jul 18 '14 at 12:12

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.