I was trying to create two different blocks: one for 'Quiz' and other for 'Homework'. The following MWE looks quite OK:
\documentclass{beamer}
\usetheme{Madrid}
\usepackage{thmtools}
\newcounter{qzcounter}
\newcounter{hwcounter}
\declaretheoremstyle[
title = Quiz \arabic{qzcounter} ,
]{qzstyle}
\declaretheoremstyle[
title = Homework \arabic{hwcounter} ,
]{hwstyle}
\declaretheorem[style=qzstyle]{qz}
\declaretheorem[style=hwstyle]{hw}
\begin{document}
\begin{frame}
\begin{qz}
Q 1
\end{qz}
\begin{qz}
Q 2
\end{qz}
\begin{hw}
HW 1
\end{hw}
\begin{qz}
Q 3
\end{qz}
\begin{hw}
HW 2
\end{hw}
\begin{qz}
Q 4
\end{qz}
\end{frame}
\end{document}
But, the two things I failed to do:
- Automatic numbering for the quizzes and homeworks separately
- Changing the block type (say,
exampleblock
for 'Homework' andalertblock
for 'Quiz')
\refstepcounter{qzcounter}
is to be used – user31729 Oct 8 '14 at 20:30\stepcounter
does not work as it is in the mwe given by the OP, maybe thethmtools
package has its own way of dealing with counters. – Old Nick Oct 8 '14 at 20:33