0

I use some framebox for some sentences. But I want it to appear in the same slide after next click. How can a frame appear around the text on a click in the presentation?

4
  • Please add some visuals and/or a minimal working example (MWE) that highlights what you mean, since it's not clear as-is.
    – Werner
    Jun 22, 2014 at 13:54
  • How can I provide example, I mean the things that I want are not seen by me or created by me. Thats why I asking. If I know then why I put a question here. Jun 22, 2014 at 14:05
  • an usefull example would be to show the full latex-code for one appearing framebox ...
    – crateane
    Jun 22, 2014 at 14:54
  • @DeepeshPatel: My crystal ball points to \pause and friends. Do you know what they do?
    – Werner
    Jun 22, 2014 at 17:24

3 Answers 3

2

A solution using tcolorbox

\documentclass{beamer}
\usepackage{tcolorbox}

\definecolor{mycolor}{RGB}{255,255,255}

\tcbset{colframe=white,colback=white,nobeforeafter}

\begin{document}
    \begin{frame}
        This is 
        \only<2>{\definecolor{mycolor}{RGB}{5,61,245}}
        \tcbox[colback=white,colframe=mycolor,nobeforeafter,tcbox raise base]{a test}
    \end{frame}
\end{document}

enter image description here

1

You could make a makebox without frame, and an additional (empty) framebox appearing at the next click?


e.g.

\documentclass{beamer}
\usepackage{pict2e}
\begin{document}
\begin{frame}
\frametitle{First Slide}

\begin{picture}(4,1)
\put(0,0){\makebox[\textwidth]{some text, soon in a frame}}
\pause
\put(0,0){\framebox[\textwidth]{\phantom{ some text, soon in a frame}}}
\end{picture}

\end{frame}
\end{document}
0
1

You can use the "tcolorbox" solution and create a command to use at all times

\documentclass{beamer}
\usepackage{tcolorbox}

\newcommand<>{\tmpbox}[1]{
    \definecolor{colorbox}{RGB}{255,255,255}
    \only#2{\definecolor{colorbox}{RGB}{5,61,245}}
    \tcbox[colback=white,colframe=colorbox,nobeforeafter,tcbox raise base]{#1}
}

\begin{document}

\begin{frame}
    This \tmpbox<1>{text} is marked on the first slide and the other \tmpbox<2>{text} in the second.
\end{frame}

\end{document}

slide1 slide2

1
  • Welcome to TeX.SX! This might work, but the spacing around the box is too large, perhaps?
    – user31729
    Jun 3, 2015 at 20:30

You must log in to answer this question.

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