2

I am using Beamer with the Frankfurt style. I have some citations in the presentation and a list of references at the end.

First I tried using the standard \cite and \bibliography with \bibliographystyle{plain}:

The Bibliography appears beautifully formatted in Beamer style with little icons for the type of document. But the citation in the text appears as [1], even though [1] does not appear in the Bibliography listing.

I wanted to create an alias for the citation using free text. I tried using natbib:

\defcitealias{jon90}{Paper~I}
\citetalias{jon90}

This gives me the citation that I want, but then I lose the beautiful formatting of the Bibliography at the end (it reverts to standard natbib style).

How can I get natbib-style citation aliasing to work alongside Beamer Frankfurt bibliography formatting?

MWEB

test.bib:

@misc{mybibitem,
  title        = {The Presentation},
  author       = {Anon Y Mous},
  howpublished = {\url{http://somewebsite}}
}

test.tex, to get nicely formatted references but with [1] as the citation label: \documentclass{beamer} \usetheme{Frankfurt}

\begin{document}
\begin{frame}{My Content}{Source: \cite{mybibitem}}
Some content
\end{frame}

\begin{frame}{References}{}
\bibliography{test}
\bibliographystyle{plain}
\end{frame}
\end{document}

Alternate test.tex, to get custom citation label but ugly formatted references:

\documentclass{beamer}
\usetheme{Frankfurt}
\usepackage{natbib}

\begin{document}
\defcitealias{mybibitem}{My Custom Label}
\begin{frame}{My Content}{Source: \citetalias{mybibitem}}
Some content
\end{frame}

\begin{frame}{References}{}
\bibliography{test}
\bibliographystyle{plain}
\end{frame}
\end{document}
6
  • Can you please make a minimal working example with bibliography (MWEB)? Oct 13, 2017 at 9:19
  • MWEB added as requested.
    – Michael D.
    Oct 13, 2017 at 11:52
  • First of the plain style is not compatible with natbib so it cannot provide author-year if that is what you are after. Switching to plainnat and deliting aux and bbl files + recompile, then it works as expected.
    – daleif
    Oct 13, 2017 at 12:06
  • I am not trying to use author-year, I want to provide my own custom label alias. Changing to plainnat does not give the Beamer-style formatting.
    – Michael D.
    Oct 13, 2017 at 12:26
  • How should Paper~I appear in the bibliography? Oct 13, 2017 at 15:55

1 Answer 1

3

Finally I made a solution which is a bit of a hack but was sufficient for this presentation.

I am not using natbib as it loses the Beamer reference formatting. The following formats the references how I want them:

\begin{frame}[allowframebreaks]{References}{}
\bibliography{test}
\bibliographystyle{unsrt}
\end{frame}

Then I redefined the \bibitem command and created a new \citealias command to give the user-defined reference labels and hyperlink cross-referencing within the document:

\let\oldbibitem=\bibitem
\renewcommand{\bibitem}[2][]{\label{mybib#2}\oldbibitem[#1]{#2}}
\newcommand\citealias[2]{\hyperlink{mybib#1}{#2}\phantom{\cite{#1}}}

References are cited like this:

\begin{frame}{My Content}{Source: \citealias{mybibitem}{My Custom Label}}

The hacky part is that I am hiding the original citation label using \phantom, which adds a blank space to the end of the citation text. But as I always have citations at the end of a line that was OK for my use case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .