Open samcarter opened 3 years ago
mmm, switching back to normal size seems to avoid the problem
\documentclass{beamer}
\usetheme{PaloAlto}
\normalsize
\usepackage[style=authortitle]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}
\nocite{knuth:ct:a}
\printbibliography
\end{frame}
\end{document}
OK, so the problem is that Beamer uses a \parindent
of zero. For this case biblatex sets the parindent to 1em at the time of package load and not at the time the bibliography is set. As the sidebar theme uses a bigger than normal font in the preamble this means that the indention is wrong, so the bibhang needs to be reset when the bibliography is actually used.
https://github.com/samcarter/beamer/commit/7df166c0332b70c4933fae7e85daffc5f4c448dc
Wondering if this isn't actually a biblatex bug ....
(maybe I need a second github account - all this talking to myself makes me sound crazy)
I'm wondering if using a modified bibliography environment from the numeric style wouldn't be a better approach, e.g. https://github.com/samcarter/beamer/commit/66205aa0c07c682beaff6cbb32360beb233cc70e
@moewew What do you think?
Given that beamer
essentially turns the bibliography into an itemize
with the little icons as bullets, the approach in https://github.com/samcarter/beamer/commit/66205aa0c07c682beaff6cbb32360beb233cc70e that makes this explicit by properly defining a list format that is suitable for that task (instead of trying to bend the lengths in the default bibliography list with hanging indent into a shape that sort of works) looks much better.
There is one thing I worry about, though: What if the user wants to get rid of the icons with the authoryear
or authortitle
style? Currently I can say \setbeamertemplate{bibliography item}{}
and get back the normally indented bibliography (with hanging indent). I'm not sure how that would work if beamer
overwrites the bibliography environment.
I don't think you want \newlength{\beamer@bibiconwidth}
inside the bibliography environment. This could cause problems if people issue \printbibliography
multiple times. It should be enough to declare the length once globally. Though I'm wondering if you need it at all. Can't you replace
\newlength{\beamer@bibiconwidth}%
\settowidth\beamer@bibiconwidth{\usebeamertemplate*{bibliography item}}%
\setlength{\labelwidth}{\beamer@bibiconwidth}%
\settowidth{\labelwidth}{\usebeamertemplate*{bibliography item}}%
@moewew Thank you so much for your analysis and all this information!
The sidebar outer theme contains
\usebeamerfont{frametitle}
, which leads to a misalignment of a biblatex bibliography: