0

Consider following baposter where I added an overlayed TikZ figure to draw an arrow on top of the poster. (I observed that adding the given TikZ figure inside a box adds excess vertical spacing below its content, so I tried to put the TikZ figure after the last box.)

\documentclass[a0paper,portrait]{baposter}

\usepackage{tikz}

\definecolor{bordercol}{RGB}{40,40,40} \definecolor{headercol1}{RGB}{186,215,230} \definecolor{headercol2}{RGB}{80,80,80} \definecolor{headerfontcol}{RGB}{0,0,0} \definecolor{boxcolor}{RGB}{186,215,230}

\begin{document}

\background{ }

\begin{poster}{ grid=false, borderColor=bordercol, headerColorOne=headercol1, headerColorTwo=headercol2, headerFontColor=headerfontcol, boxColorOne=boxcolor, headershape=roundedright, headerfont=\Large\sf\bf, textborder=rectangle, background=user, headerborder=open, boxshade=plain, headerheight=3cm } %%% Eye Cacther %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { } %%% Title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\sf\bf \includegraphics[height=3cm]{pix/elte_logo}\ Can I lower this title? } %%% Authors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { \vspace{1em} Pr. Oblematic\ {Affiliation \ Long affiliation \ Very long affiliation} } %%% Logo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { }

\headerbox{Problem}{name=problem1,column=0,row=0}{ }

\headerbox{Solution}{name=solution1,column=0,below=problem1,above=bottom}{ }

\headerbox{Problem}{name=problem2,span=2,column=1,row=0}{ }

\headerbox{Solution}{name=solution2,span=2,column=1,below=problem2,above=bottom}{ } \begin{tikzpicture}[remember picture, overlay] \draw[red,->] (current page.center) -- (current page.center)++(1cm, 1cm); \end{tikzpicture} \end{poster} \end{document}

(Adapted from the ECCS2011 tutorial that comes with baposter.)

However, I get following result. What happened? How can I correctly overlay a TikZ picture over a given poster?

enter image description here

Karlo
  • 3,257

1 Answers1

1
  1. The path

    (current page.center) -- (current page.center)++(1cm, 1cm)
    

    describes a straight line of length zero from and to the page's center and then a move to operation relative to the center (that's one +) and also moves the new origin for subsequent relative coordinates to that point (that's the other +).

  2. As Sam notes baposter uses a TikZ picture internally, so just putting another TikZ picture inside it breaks everything.

  3. You can't just put the new TikZ picture after the poster environment because … pagebreak.

  4. You can however, put the new TikZ picture in the foreground of the current page via the hook shipout/foreground by adding before the poster environment.

    \AddToHookNext{shipout/foreground}{%
      \begin{tikzpicture}[remember picture, overlay]
      \draw[red,->] (current page.center) -- ++(1cm, 1cm);
      \end{tikzpicture}%
    }
    
  5. You can also use the TikZ picture used by poster by adding

    \tikzset{
      remember picture,
      execute at end picture={
    %    \tikzset{overlay}% maybe
        \draw[red, ->] (current page.center) -- ++(1cm, 1cm);
      }
    }
    

    in the poster environment.

Code

\documentclass[a0paper,portrait]{baposter}

\definecolor{bordercol}{RGB}{40,40,40} \definecolor{headercol1}{RGB}{186,215,230} \definecolor{headercol2}{RGB}{80,80,80} \definecolor{headerfontcol}{RGB}{0,0,0} \definecolor{boxcolor}{RGB}{186,215,230}

\begin{document} \AddToHookNext{shipout/foreground}{% \begin{tikzpicture}[remember picture, overlay] \draw[blue, ->] (current page.center) -- ++(-1cm, -1cm); \end{tikzpicture}% } \background{}

\begin{poster}{ grid=false, borderColor=bordercol, headerColorOne=headercol1, headerColorTwo=headercol2, headerFontColor=headerfontcol, boxColorOne=boxcolor, headershape=roundedright, headerfont=\Large\sffamily\bfseries, textborder=rectangle, background=user, headerborder=open, boxshade=plain, headerheight=3cm } %%% Eye Cacther %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { } %%% Title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\sffamily\bfseries % \includegraphics[height=3cm]{pix/elte_logo}\ Can I lower this title? } %%% Authors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { \vspace{1em} Pr. Oblematic\ {Affiliation \ Long affiliation \ Very long affiliation} } %%% Logo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { } \tikzset{ remember picture, execute at end picture={ % \tikzset{overlay}% maybe \draw[red, ->] (current page.center) -- ++(1cm, 1cm); } }

\headerbox{Problem}{name=problem1,column=0,row=0}{ }

\headerbox{Solution}{name=solution1,column=0,below=problem1,above=bottom}{ }

\headerbox{Problem}{name=problem2,span=2,column=1,row=0}{ }

\headerbox{Solution}{name=solution2,span=2,column=1,below=problem2,above=bottom}{ } \end{poster} \end{document}

Qrrbrbirlbel
  • 119,821