Open josephwright opened 11 years ago
Original comment by denisbitouze (Bitbucket: denisbitouze, GitHub: Unknown):
Note that % \endgroup
is missing just after \end{frame}
. Any chance this issue could be fixed in a near future?
Sigh... Already release 3.48 and this issue is still alive :(
@dbitouze This is a hard problem:
The page width (\textwidth
) is calculated by (\paperwidth
- sidebar width left - sidebar width right) at the beginning of document. Therefore, the only way to "cancel" the sidebar is to redefine the paper size using \geometry
command at the begining of a plain frame (otherwise the way of arranging frame components must be totally altered) and restore it on a normal slide. I tried a few times with this but has not succeed by now.
Maybe I'm wrong but wouldn't it be enough, in case of sidebar
outer theme, to redefine plain
frames to be preceded and followed respectively by:
\begingroup
\makeatletter
\setlength{\hoffset}{-.5\beamer@sidebarwidth}
\makeatother
and:
\endgroup
@dbitouze This way only moves the frame content. Our goal is to stretch its width to fill the whole \paperwidth
. Besides, current way fails if one puts sidebar onto the right side, that is, he has to use \setlength{\hoffset}{.5\beamer@sidebarwidth}
.
@louisstuart96 I see.
Modified from https://tex.stackexchange.com/a/198224/36296 and https://tex.stackexchange.com/a/113412/36296 the following would a) stretch the textwidth and b) only move it when necessary, e.g. when the sidebar is on the left.
\hoffset=-\beamer@leftsidebar
\advance\textwidth\beamer@sidebarwidth
\hsize\textwidth
\columnwidth\textwidth
(With this ansatz, the frametitle still needs to be adjusted, see e.g. https://tex.stackexchange.com/q/423242/36296)
@samcarter8 A problem remains: if the background color is changed, only a part of the extended area is colored:
\documentclass{beamer}
%
\usetheme{PaloAlto}
\setbeamercolor{background canvas}{bg=yellow!50}
%
\title{Foo}
\author{Bar}
%
\begin{document}
%
\makeatletter
\hoffset=-\beamer@leftsidebar
\advance\textwidth\beamer@sidebarwidth
\hsize\textwidth
\columnwidth\textwidth
\makeatother
%
\begin{frame}[plain]
\maketitle
\end{frame}
%
\end{document}
@dbitouze Like the frametitle, this would need to be repaired, but it is doable, see my updated answer to your questions at tex.se https://tex.stackexchange.com/a/423246/36296
Quite perfect now! :)
So we know it is doable.
But should the current behaviour be changed by default? This would probably alter many old presentation which worked around this problem in one way or another.
Indeed, this would break backward compatibility but, IMHO, it is an unfortunate necessity: I don't see any reason to be happy with non centered text in plain frames, especially since it is centered in case of themes without sidebars.
Another problem remains: that trick doesn't work with sidebar-less themes (see #755).
\documentclass{beamer}
%
% \usetheme{PaloAlto}
%
\title{Foo}
\author{Bar}
%
\begin{document}
%
\begingroup
\makeatletter
\hoffset=-\beamer@leftsidebar
\advance\textwidth\beamer@sidebarwidth
\hsize\textwidth
\columnwidth\textwidth
\makeatother
\begin{frame}[plain]
\maketitle
\end{frame}
\endgroup
\end{document}
I went template by template (which can appear both in plain frame and in default frame) and added something similar to this line. It does work in my case
\addtobeamertemplate{title page}{
\ifbeamer@plainframe%
\advance\textwidth\beamer@sidebarwidth % I only use right sidebar ...
\hsize\textwidth
\columnwidth\textwidth
\fi
}{}
Does it make sense?
The above did not yet work for the bibliography / reference list as it works as a list and its width is set by \linewidth
, so I added \linewidth\textwidth
to the above.
Originally reported by: denisbitouze (Bitbucket: denisbitouze, GitHub: Unknown)
Because sidebars in some themes are only hidden and not actually canceled, plain frames are not really fillable, despite what is written in beamer's documentation, page 61. The following MCE shows a drawback of the current situation where title frame cannot be horizontally centered in plain frames with some themes (the commented code is a workaround but is tricky especially for beginners).