Document ClassesBeamer references display

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
eoa
Posts: 7
Joined: Sat Oct 10, 2009 9:09 pm

Beamer references display

Post by eoa »

Apologies if the MWE below is too long.

Code: Select all

\documentclass{beamer}
\usepackage{beamerthemesplit}
\begin{document}
\frame
{
\cite[p.290]{HorJoh}
}

\begin{thebibliography}{10}
\bibitem{HorJoh}[HorJoh]
Horn, R. A. and Johnson, C. R
\newblock Matrix Analysis
\newblock Cambridge University Press, U.S.A., 1985.
\end{thebibliography}

\end{document}
What I want to know is: Is there any way to display the name given to the reference in the citation ([HorJoh] in this case) instead of the hyper-linker number (1 in this case)? This seems to be a beamer problem; When I created an article, the name displayed as [HorJoh]. I always thought that in \bibitem{key}[label], label would be displayed when {key} was cited with \cite{key}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Beamer references display

Post by localghost »

The devil is in the details. In this case it's the order of the optional and the mandatory argument in your bibliography item.

Code: Select all

\documentclass{beamer}
\usepackage{beamerthemesplit}
\begin{document}
  \begin{frame}
    \cite[p.290]{HorJoh}
  \end{frame}

  \begin{thebibliography}{99}
    \bibitem[HorJoh]{HorJoh} Horn, R. A. and Johnson, C. R
      \newblock Matrix Analysis
      \newblock Cambridge University Press, U.S.A., 1985.
  \end{thebibliography}
\end{document}
The label for the \bibitem command must be given first before the citation key.


Best regards and welcome to the board
Thorsten¹
eoa
Posts: 7
Joined: Sat Oct 10, 2009 9:09 pm

Re: Beamer references display

Post by eoa »

Thanks for that. I knew it would be something small like that, but eh, didn't think that would matter (since it worked when for the article documentclass). Thanks again.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Beamer references display

Post by localghost »

eoa wrote:[…] I knew it would be something small like that, but eh, didn't think that would matter (since it worked when for the article documentclass). […]
It doesn't work either with the article class.
eoa
Posts: 7
Joined: Sat Oct 10, 2009 9:09 pm

Beamer references display

Post by eoa »

As it turns out, you are correct. It seems I was mistaken: looking at my .tex file with the article class, I see I did have bibitems as

Code: Select all

\bibitem[label]{cite_key}
Apologies for any inconvience/cluttering of the forums caused. :oops:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Beamer references display

Post by localghost »

Nevermind. Overlooking some small details can happen very easy.
Post Reply