Another approach is to use \subnode
or \pgfmark
from the Tikzmark
package. This facilitates placing marks associated with particular posterbox
elements, such as certain words or letters of text. I should note that I was unable to get either \tikzmark[<drawing command>]{<name>}
or \tikzmark{<name>}{<coordinate>}
to work.
Marks can also be directed to the posterbox
coordinates identified in @Ignasi's excellent answer, by shifting the placement of the marks using the usual TikZ
syntax.
In the MWE, I changed headerbox
to posterbox
, as the former was deprecated, although it still functions. I also added a more complete specification of the baposter
options.
This is the code:
\documentclass[a4paper]{baposter}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{poster}{
grid=false,
columns=2, % how many columns 1-6
colspacing=5.0mm, % spacing between the columns
headerheight=0cm, % the height of the header for the title
background=none, %user or none or plain
eyecatcher=false, %turn left logo on/off
%posterbox options
headerborder=closed, % see the baposter manual for the rest
borderColor=darkgray,
headershape=rectangle,
headershade=plain,
headerColorOne=darkgray,
textborder=rectangle,
boxshade=plain,
boxColorOne=white,
headerFontColor=white,
textfont=\tiny,
headerfont=\normalsize\bfseries,
linewidth=1pt}
{}{\textcolor{white}{dummy}}{}{} % Eyecatcher, title, author, right logo. There must be at least one entry.
\begin{posterbox}[name=bananas, column=0, span=1]{\subnode{C}{B}anana\pgfmark{Y}}{
\begin{tabular}{@{}l@{}}
Banana\subnode{A}{s} \\ Apples\pgfmark{Y}
\end{tabular}}
\end{posterbox}
\begin{posterbox}[name=apples, column=1, span=1]{Apples\pgfmark{Z}}{
\begin{tabular}{@{}l@{}}
\subnode{B}{D}urian \\ Mangostee\subnode{D}{n}
\end{tabular}}
\end{posterbox}
\draw[orange,thick,->] ([shift={(-2ex,-2ex)}]pic cs:A) to[out=-355, in=-200] ([shift={(-3ex,-2ex)}]pic cs:B);
\draw[magenta,thick,->] ([shift={(-4ex,-2ex)}]pic cs:C) to[out=230, in=-135] ([shift={(4ex,-4ex)}]pic cs:D);
\draw[blue,thick,->] ([shift={(0ex,5.5ex)}]pic cs:Y) to[out=-340, in=160] ([shift={(-3ex,0.5ex)}]pic cs:Z);
\end{poster}
\end{document}
This is the output:
baposter
commands, but you could usetikzmark
. – Ignasi May 16 '17 at 15:36tikzmark
only allows me to mark certain points in the text, but not the boxes. – Wrzlprmft May 16 '17 at 16:06