1

The one thing that always bothers me when creating slides in LaTeX using the beamer class is that the layout is very static. That means once everything has been placed on the slide (with a lot of work to figure out the correct combination of columns and what not) it typically takes a lot of work (again) to change the frame's layout afterwards (e.g. if one decided that that image should rather be bottom-left than top-right).

Thus I was wondering on how this could be improved. My journey let to this question of mine: Beamer: Automatic image container that was focused on automatically positioning images on slides.

Having thought about this some more though it seems to me that it would be beneficial to have a way to tell LaTeX that my frame consists of several blocks. Each block can contain arbitrary content (text / image / ...). And then I would tell each block where I want it to go. Thus in dummy-code this would look something like this:

\begin{frame}
    \begin{magicBox}{top-left}
        Some content
    \end{magicBox}
    \begin{magicBox}{bottom-right}
        More content
    \end{magicBox}
\end{frame}

which should produce something like this:

|---------------------------------------|
|---------------|                       |
| Some content  |                       |
|---------------|                       |
|                                       |
|                                       |
|                                       |
|                       |---------------|
|                       |  More content |
|                       |---------------|
|---------------------------------------|

Most importantly I could easily change the layout on my slide by simply changing the layout directives for my independent boxes:

\begin{frame}
    \begin{magicBox}{bottom-right}
        Some content
    \end{magicBox}
    \begin{magicBox}{top-left}
        More content
    \end{magicBox}
\end{frame}

Yielding

|---------------------------------------|
|---------------|                       |
| More content  |                       |
|---------------|                       |
|                                       |
|                                       |
|                                       |
|                       |---------------|
|                       |  Some content |
|                       |---------------|
|---------------------------------------|

Note that I also want to be able to let boxes stagger on top of each other. That means that while I want LaTeX to do the layout inside the boxes, I don't want it to interfere with the boxes' positioning (this is the user's responsibility).

Where necessary it should be possible to give the box a fixed width (and height). If that is omitted the box should be as tall as LaTeX thinks the content should be (for text that would imply no line-breaking if no width is specified).


Now that I have described what I would like to have, let's focus on the actual question of mine: Are there packages and/or functionalities that provide this kind of feature?

I would also be happy about similar features that one might be able to use to build upon in order to make such a feature happen.

Note: I am aware that in Beamer's manual the textpos package is mentioned that allows to position its contents on a page absolutely. I guess this could definitely be used for this purpose if one find a way to map my relative layout instructions into absolute positions on the slide.

Then of course there's TikZ but it seems an overkill to create the entire slide as a tikzpicture in order to do some layout stuff...

Raven
  • 3,023

0 Answers0