TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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. – yo' 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.