9

Bibliographies can be typeset in a smaller font size by redefining the \bibfont macro (if one uses natbib or biblatex) or by simply appending the definition of \thebibliography. This also works with the beamer class; however, switching to a smaller font size leaves beamer's document icons at the start of each bibitem unchanged. How can I scale those icons down to, say, 75% of their original size?

(From Removing document icons from a Bibtex bibliography in Beamer, I gather that an answer is likely to involve some clever use of \setbeamertemplate{bibliography item}.)

\documentclass{beamer}

\usepackage{etoolbox}
\apptocmd{\thebibliography}{\scriptsize}{}{}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{Bli74,
  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journal = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{plain}

\begin{frame}
\bibliography{\jobname}
\end{frame}

\end{document}

enter image description here

1 Answer 1

10

Bibliography items are inserted using \pgfuseimage. You could redefine this before the bibliography and scale it the way you want to using commands from graphicx (included by beamer by default:

\renewcommand{\pgfuseimage}[1]{\includegraphics[scale=.75]{#1}}

The above scales the image to 75% of its original size.

This should be issued outside the frame environment, before calling \bibliography. Here's your complete minimal example:

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\apptocmd{\thebibliography}{\scriptsize}{}{}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{Bli74,
  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journal = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{plain}

\renewcommand{\pgfuseimage}[1]{\scalebox{.75}{\includegraphics{#1}}}

\begin{frame}
\bibliography{\jobname}
\end{frame}

\end{document}
7
  • MWE needs a little change for biblatex/biber, but also works with that. I have scaled the text way more and get a big gap. Compare this \lower3.5pt\hbox{\hskip2pt\scalebox{2}{...}\hskip1pt}; by this it ispossible to move the image up and (with negative values e.g.: \hskip15pt ... \hskip-10) also closer to the text. However, this does not change the lineskip for the first line in an entry, which differs from others in elongated items. I tried [b] on scalebox,parbox but it horribly failed (crashing not only TeXstudio). Hints?
    – BadAtLaTeX
    Jan 4, 2018 at 22:56
  • Ok, can confirm. Tried it several times in my use case, but could not recreate the crash with this MWE (modified). I was using MacTeX and TeXstudio and tried to compile a similar file (with biblatex, though) including \renewcommand{\pgfuseimage}[1]{\scalebox[b]{.75}{\includegraphics{#1}}} (as my naive attempt at reducing the lineskip). This led to a crash of not only the editor, but moreover I was logged out of the session and -as crazy as it sounds- it changed some JS Blocker setting in Safari. Where do I report this?
    – BadAtLaTeX
    Jan 4, 2018 at 23:24
  • @gr4nt3d: If you think there is an issue with beamer, you can report it on Github.
    – Werner
    Jan 4, 2018 at 23:35
  • well, I was asking which part of the process could have caused the crash (TeXstudio, pdflatex). Or could beamer alone be able to yield that? Apart from that: any hints on the lineskip?
    – BadAtLaTeX
    Jan 5, 2018 at 12:51
  • 1
    @gr4nt3d: This is the code associated with bibliography items (source). Both the the book and online (globe) elements use \pgfuseimage.
    – Werner
    Jan 17, 2018 at 5:58

You must log in to answer this question.

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