4

I use the fantastic knitr to generate beamer-pdf’s with hundreds of slides of plots. Every plot shows data of different measuring equipment, so for example the plot showing result of measuring equipment “hello0023a” may be on slide 48.

I don’t want to print the name of the equipment on every slide (too many equipment), but I would like to search the pdf for “hello0023a” so that it finds slide 48.

The name of the equipment is included in the plot-legend, but that is in png so not searchable.

Can this be done?

1 Answer 1

2

Print the equipment name in background color in a way it does not take space and does not influence other elements on the page.

\documentclass{beamer}

\newcommand{\addsearchterm}[1]{%
    \begingroup%
        \makebox[0pt][l]{\fontsize{3pt}{0pt}\selectfont\color{bg}#1}%
    \endgroup%
}

\begin{document}

\begin{frame}
\includegraphics[width=.8\textwidth]{example-image}
\addsearchterm{hello0023a}%
normal text
\end{frame} 

\begin{frame}
\includegraphics[width=.8\textwidth]{example-image}
normal text
\end{frame} 

\end{document}
2
  • @samcarter you made it so much better, now I want to upvote you!
    – vinnief
    Aug 14, 2017 at 14:34
  • 2
    You're welcome! I could not understand why this answer got deleted in the first place, as the strategy to hide the text with the background colour sounded like an easy way to solve this problem. Aug 14, 2017 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .