Search code examples
latexbeamerbibtex

Bibliography style and line breaks in Beamer-poster


I'm making a poster through beamer and found a problem with my bibliography style. I want my references to use the full horizontal space available in the poster, like:

(1) Authors. Title. Journal.

But instead of that, every reference get breaked in 3 lines as:

(1) Authors

    Title

    Journal

Example

Figure

Here's the bibliography code I've been using:

\begin{block}{References}
\small
\bibliographystyle{sbc}
\bibliography{referencias.bib}
\end{block}

Solution

  • The line breaks can be avoided by setting the bibliography templates like this:

    \setbeamertemplate{bibliography entry article}{}
    \setbeamertemplate{bibliography entry title}{}
    \setbeamertemplate{bibliography entry location}{}
    \setbeamertemplate{bibliography entry note}{}
    

    MWE:

    \documentclass{beamer}
    
    \usepackage{filecontents}
    \begin{filecontents*}{\jobname.bib}
    @book{knuth,
      author       = {Knuth, Donald E.},
      title        = {The {\TeX} book},
      date         = 1984,
      maintitle    = {Computers \& Typesetting},
      volume       = {A},
      publisher    = {Addison-Wesley},
      location     = {Reading, Mass.},
      langid       = {english},
      langidopts   = {variant=american},
      sortyear     = {1984-1},
      sorttitle    = {Computers & Typesetting A},
      indexsorttitle= {The TeXbook},
      indextitle   = {\protect\TeX book, The},
      shorttitle   = {\TeX book}
    }
    \end{filecontents*}
    
    \setbeamertemplate{bibliography entry article}{}
    \setbeamertemplate{bibliography entry title}{}
    \setbeamertemplate{bibliography entry location}{}
    \setbeamertemplate{bibliography entry note}{}
    
    \begin{document}
    
    \begin{frame}
    \cite{knuth}
    \begin{block}{References}
    \small
    \bibliographystyle{plain}
    \bibliography{\jobname}
    \end{block} 
    \end{frame}
    
    \end{document}