# Problem with counters

I want to make a presentation with certain tasks, but since there are certain problems with using enumitem with beamer, I decided to make it myself, so I have this example code:

\documentclass{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}

\usetheme{CambridgeUS}

{
\ifthenelse{\equal{#1}{+}}{
}

{
}

\begin{document}
\begin{frame}
\end{frame}
\begin{frame}
\end{frame}
\end{document}


Obviously, I want to get first frame for first task with a), b) and c), and second frame for second task with a) b) and c) as well, but I get d), e) and f) on second frame. I wouldn't like adding \setcounter{taskletter}{0} after every frame.

• My guess is that a frame's title actually is typeset after a frame's body… then the stepping is done too late Nov 8 '15 at 18:21
• @cmhughes even when I delete \resetcounteronoverlays, I get the same problem
– Ivan
Nov 8 '15 at 19:12
• \usepackage{etoolbox} \AtBeginEnvironment{frame}{\setcounter{taskletter}{0}} in the preamble seems to reset the counter for each frame. You may also want to add a % to the end of the line containing \ifthenelse to avoid excess whitespace on Tasks 2-n. Nov 9 '15 at 1:36
• @MikeRenfro well, what if i have task 1 on frame 1, and task 1 on frame 2 again, but a), b) and c) on frame one, and d), e) and f) on frame 2...
– Ivan
Nov 9 '15 at 14:23
• You may be able to make two types of custom frames, and reset taskletter on one of them, but I don't have a working example for that yet. Nov 9 '15 at 22:46

You should put \frametitle inside \task instead of the reverse.

\documentclass{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}

\usetheme{CambridgeUS}

{
\ifthenelse{\equal{#1}{+}}{
}

{
}

\begin{document}
\begin{frame}