4

I would like to write somethings out of the itemize environment using \only, but to do so I need to add an item before \only<2>. Does anyone know how so solve this without adding this new item?

\documentclass[t,10pt]{beamer}

\begin{document}
    \begin{frame}{Title}
        \only<1-> {
        Definition
        }
        \begin{itemize}
        % \item Useless
        \only<2> {
            \vfill \item Test 1 
         }
        \only<3> {
            \vfill \item Test 2
        }
        \vfill \end{itemize}
    \end{frame}
\end{document}
1

Simply enclose the whole itemize in another \only so it sees the first \item:

\documentclass[t,10pt]{beamer}

\begin{document}
    \begin{frame}{Title}
        \only<1-> {
        Definition
        }
        \only<2->{\begin{itemize}
        \only<2> {
            \vfill \item Test 1 
         }
        \only<3> {
            \vfill \item Test 2
        }
        \vfill \end{itemize}}
    \end{frame}
\end{document}

enter image description here

0

Include the "Description" as part of the itemize, with some horizontal adjustment:

enter image description here

\documentclass[t,10pt]{beamer}

\begin{document}
\begin{frame}{Title 1}
    \only<1-> {
    Definition
    }
    \begin{itemize}
      \item Useless
      \only<2> {
        \vfill \item Test 1 
       }
      \only<3> {
        \vfill \item Test 2
      }
      \vfill
    \end{itemize}
\end{frame}

\begin{frame}{Title 2}
  \begin{itemize}
    \item<1->[]
      \hspace*{\dimexpr-\labelsep-\labelwidth}Definition

    \only<2> {
      \vfill \item Test 1 
     }
    \only<3> {
      \vfill \item Test 2
    }
    \vfill
  \end{itemize}
\end{frame}

\end{document}

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.