0

I have a completed beamer presentation in which I make extensive use of textpos package for absolute positioning, in particular of the textblock* environment. Now, I wanted to add notes to this presentation with \setbeameroption{show notes on second screen=left}, which didn't work. I learned here that the textpos package and the pgfpages package interfere with each other and do not work properly together while using absolute positioning.

Is there an easy way to obtain the functionality of textpos, but in compliance with pgfpages (e.g. using some tikz commands) and preferably without having to reposition all of my textblock* environments? For reference, these environments contain single graphics as well as more complicated latex code.

0

I have been working on a solution to my problem. The code below is a rudimentary replacement for exactly the following environment

\begin{textblock*}{TEXTWIDTH}(XOFFSET,YOFFSET}
...
\end{textblock*}

provided by the textpos packages. It does not offer optional parameters, all listed parameters have to be set, and it does not respect any settings (like background color) of the original package. However, this code may serve as a basis for someone that needs a more general / slightly differnt replacement for the textpos functionality when using pgfpage:

\makeatletter
\def\@textblockstar#1(#2,#3){\begin{tikzpicture}[remember picture,overlay] \draw (current page.north west) ++ (#2,-#3) node [inner sep=0cm,anchor=north west,text width=#1]\bgroup\begin{minipage}{\textwidth}}
\expandafter\let\csname textblock*\endcsname\@textblockstar
\def\@endtextblockstar{\end{minipage}\egroup;\end{tikzpicture}}
\expandafter\let\csname endtextblock*\endcsname\@endtextblockstar
\makeatother

A short explanation of the code follows: The commands in line 1 and 6 allow @ to be used as a normal character in between. Line 2 defines the start of the environment and line 4 the end, while line 3 and 5 take care of the correct naming. The environment itself is a tikzenvironment in which a node is placed at the location defined by (#2,#3), the origin being the top-left corner. The node itself has a width of #1 and offers a minipage environment.

A nice feature of this tikz-based solution compared to using textpos is that blocks appearing later in the source code are printed above previous ones. This is true even for includegraphicscommands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.