Take the 2-minute tour ×

I wonder if there is already a package that makes me create a spot the error kind of test like the one below:

enter image description here

This must preferably be in an enumerate environment.

I tried a tikz approach but I could not make it work out.




\item The principal \tikz [remember picture] \node (said) {}; that \tikz [remember picture] \node (weather) {}; the government \tikz [remember picture] \node (announces) {}; a holiday or not, his school \tikz [remember picture] \node (hold) {}; classes. \tikz [remember picture] \node (error) {};

\begin{tikzpicture}[remember picture]
\node at (#1) {\underline{#2}};
\node [below=1pt of #1] {#3};

\abovebelow{hold}{will still hold}{D}
\abovebelow{error}{NO ERRROR}{E}


Below is the output.

enter image description here

I am looking for a general solution, something that can be used in list environments.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

enter image description here

I don't think you need a drawing package here, I just used tabular:



\par\qn{NO ERROR}\setcounter{qn}{0}}}


\item The principal \qn{said} that \qn{weather} the government \qn{announces} a holiday or not, his school \qn{will still hold} classes. \qnx

share|improve this answer
Thanks for the speedy reply. What does \restepcounter do? I think it is more beautiful to change from left alignment to centered. The pictures I posted might suggest that the no error choice is on separate paragraph but that's easily settled by removing \par in the definition. –  hpesoj626 Sep 25 '12 at 11:55
\refstepcounter is just "counter=counter+1", with some additional stuff that makes it work correctly in sectioning counters (i.e. to make "subsection=0" whenever "section=section+1"). Here, \stepcounter could be used to, which does not do this additional stuff. –  tohecz Sep 25 '12 at 11:58
you could use \stepcounter but if you use \refstepcounter you can go \qn{\label{zzz}weather} ... you might want to look closely at \ref{zzz} Basically whenever you auto-number something it's a good idea to use refstepcounter as you always wish later you could refer to it That's why I used refstepcounter before the table in its own group rather thanjust before the counter is printed so it is in scope for a \label in the argument –  David Carlisle Sep 25 '12 at 12:03
add comment

Your Answer


