# [texhax] AtBeginDocument in beamer

Bernice Barnett jbbrus at comcast.net
Fri Apr 2 22:53:47 CEST 2010

Arno Trautmann wrote:
> Hi all!
>
> I’m having some trouble using the beamer class and trying to set frames
> \AtBeginDocument. A minimal example
>
> \documentclass[]{beamer}
>
> \AtBeginDocument{\frame{test1}}
> \begin{document}
> \frame{test2}
> \end{document}
>
> already shows first problems: The navigation symbols are totally wrong
> (at the top of test1, at the bottom of test2).
> Ok, in my document I don’t make use of these symbols, but I have some
> other effects:
>
> • the footline goes anywhere, but not at the bottom. can be corrected by
> using \vspace*
> • the headline leaves about 4mm of blank space above it which cannot be
> corrected by \vspaces
> • \inserttotalframenumber prints just 1 instead of the actual number
>
> The beamer documentation says
>
> • The height of the headline and footline templates is calculated
> automatically. This is done by typesetting the templates and then
> “having a look” at their heights. This recalculation is done right at
> the beginning of the document, after all packages have been loaded and
> even after these have executed their \AtBeginDocument initialization.
>
> So I guess I cannot use \AtBeginDocument to print \frames. Does anybody
> have an advise how to handle this? I need AtBeginDocument as the first
> two frames are generated half-automatically. Is there any internal
> feature I can use (which is stable enough to really use it?) or hack it
> myself anyhow? I could try to use \AtBeginSection instead but then I’d
> have to insert a \section by hand which is useless.
>
> I’d be thankfull for any suggestions,
> cheers
> Arno
>
I'm making a wild guess: Doesn't beamer provide a way to mark a frame as
fragile and, if so, might that be needed here?
--
Jeff Barnett


More information about the texhax mailing list