For the first, beamer uses templates (itemize item
, itemize subitem
, itemize subsubitem
) to typeset the item symbol. See the section "Itemizations, Enumerations, and Descriptions" (11.1 in my version) in the beamer manual. If you read the source files beamerinnerthemedefault.sty
and beamerbaseauxtemplates.sty
you can see the syntax for declaring other choices for this template. So to define ticks (by which I understand checkmarks) and cross item icons you can do something like this:
\usepackage{pifont}
\defbeamertemplate{itemize item}{cross}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths\ding{54}}}
\defbeamertemplate{itemize subitem}{cross}{\tiny\raise1.25pt\hbox{\donotcoloroutermaths\ding{54}}}
\defbeamertemplate{itemize subsubitem}{cross}{\tiny\raise1.25pt\hbox{\donotcoloroutermaths\ding{54}}}
\defbeamertemplate{itemize item}{tick}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths\ding{52}}}
\defbeamertemplate{itemize subitem}{tick}{\tiny\raise1.25pt\hbox{\donotcoloroutermaths\ding{52}}}
\defbeamertemplate{itemize subsubitem}{tick}{\tiny\raise1.25pt\hbox{\donotcoloroutermaths\ding{52}}}
Then if you wanted to make those icons the default you would just do:
\setbeamertemplate{itemize item}[cross] % and so on.
But to use your custom icons to highlight the current item you can do this:
\documentclass{beamer}
\useinnertheme{rectangles}% or whatever inner theme you want
% template defs from above
\makeatletter
\newenvironment{crossenv}{%
\only{%
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\setbeamertemplate{itemize \beameritemnestingprefix item}[cross]
}% overlay/action specification gets added here by beamer
}{%
}
\newenvironment{tickenv}{%
\only{%
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\setbeamertemplate{itemize \beameritemnestingprefix item}[tick]
}% overlay/action specification gets added here by beamer
}{%
}
\makeatother
\begin{document}
\begin{frame}{Single list}
\begin{itemize}
\item<1- | tick@+-> foo
\item<1- | cross@+-> bar
\item<1- | tick@+-> foo, again
\end{itemize}
\end{frame}
\begin{frame}{Nested lists}
\begin{itemize}[<1-| cross@+>]
\item foo
\item bar
\begin{itemize}
\item bar one
\item bar none
\begin{itemize}
\item bar who?
\item bar none
\end{itemize}
\end{itemize}
\item baz
\end{itemize}
\end{frame}
\end{document}
Because the crossenv enviroment surrounds each selected item, the change in template is local. After the crossenv environment the template returns to whatever it was before. This means you don't need to know what the symbol is by default. So this will work with any inner theme you are using.
Final Edits: I think I finally got what you wanted. You have to only change the template at the current itemize level, which requires a bit of h@ckery. But diving into beamerbaselocalstructure.sty
revealed a solution.
Final Final Edits: Now with ticks and crosses both.
I conjecture that this is to do with when TeX knows that the paragraph containing the text 1
has been finished. The inner itemize starts a new paragraph and so shouldn't affect the spacing about the previous \item
, but it does. Exactly what shape or form this confusion takes, I don't know. One could well envision this as a bug.
However, despite not knowing exactly what is going on, I can suggest a simple fix: ensure that the paragraphs are clearly separated. Viz, put a blank line after the jumping \item
.
\documentclass[10pt,fleqn,t]{beamer}
%\url{http://tex.stackexchange.com/q/22809/86}
\begin{document}
\frame[t]{
\begin{block}{Title}
\begin{itemize}
\item text 1
\only<1>{%
\begin{itemize}%
\item subtext 1
\item subtext 2
\end{itemize}}
\only<2-3>{\item text 2}
\only<3>{\item text 3}
\end{itemize}
\end{block}}
\end{document}
For consistency, but for nothing else, you could have a blank line after the sub-itemized list.
Interestingly, I only got this behaviour with itemize
and enumerate
and not with any other environments that I tried (including description
). Moreover, it is nothing to do with the \only
since the following code shows the issue:
\documentclass[10pt,fleqn,t]{beamer}
%\url{http://tex.stackexchange.com/q/22809/86}
\begin{document}
\frame[t]{
\begin{block}{Title}
\begin{itemize}
\item text 1
\begin{itemize}%
\item subtext 1
\item subtext 2
\end{itemize}
\end{itemize}
\end{block}}
\frame[t]{
\begin{block}{Title}
\begin{itemize}
\item text 1
\item text 2
\end{itemize}
\end{block}}
\end{document}
and the same blank line fixes it.
Best Answer
can be done by using
\item<alert@+>
or automatically with\begin{itemize}[<alert@+>]
\begin{itemize}[<+->]
This is more tricky. Normally this would need something like https://tex.stackexchange.com/a/288050/36296, but as your items are not visible before they are highlighted, you could simply change the colour to gray.