Take the 2-minute tour ×
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.

I'm trying to make an answer explanation guide for a test where the correct answer is "bubbled in".

I've tried using the enumitem package and tikz as shown in this post (Enumerated list with blue circles and number inside it), but it's messing up the default spacing and the counters of the other answer choices. This is what I have so far:

\documentclass{article}
\usepackage{tikz}

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
        \node[shape=circle,fill=blue!20,draw,inner sep=2pt] (char) {#1};}}

\usepackage{enumitem}

\begin{document}
\renewcommand{\labelenumi}{(\Alph{enumi})}
\begin{enumerate}
\item Answer A
\item[label=\circled{(\Alph*)}] Answer B
\item Answer C
\item Answer D
\item Answer E
\end{enumerate}

\end{document}

Ultimately what I want is something like this:

enter image description here

A transparent fill color would be nice. Thanks for any help.

share|improve this question
add comment

3 Answers

You don't have to specify:

[label=\circled{(\Alph*)}]

but only:

[\circled{\Alph{enumi}}]

Moreover, it is also needed to advance the counter.

Therefore:

\documentclass{article}
\usepackage{tikz}

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%        
        \node[circle,fill=blue!20,draw,inner sep=2pt,opacity=0.5,text opacity=1] (char) {#1};}}

\def\cnt{\stepcounter{enumi}\Alph{enumi}}

\usepackage{enumitem}

\begin{document}
\renewcommand{\labelenumi}{(\Alph{enumi})}
\begin{enumerate}
\item Answer A
\item Answer B
\item[\circled{\cnt}] Answer C
\item Answer D
\item Answer E
\end{enumerate}

\end{document}

gives:

enter image description here

share|improve this answer
add comment

A different approach. The main problem with this solution is that the placement of the circle is too "manual", and different fonts would require a new manual adjust.

\documentclass{article}
\usepackage{tikz}
\usepackage{enumitem} 

\newcommand\correct{%
  \tikz[overlay]\fill[fill=green!50!black, opacity=.2] (-3ex,.6ex) circle (2ex);%
}

\begin{document}
\renewcommand{\labelenumi}{(\Alph{enumi})}
\begin{enumerate}
  \item Answer A
  \item\correct Answer B
  \item Answer C
  \item Answer D
  \item Answer E
\end{enumerate}
\end{document}

Result

share|improve this answer
    
Thanks! Way better than what I was settling for. –  Nelson Feb 20 '13 at 15:50
    
You can play with \labelsep to get the the right placement with less of trial-end-error. –  tohecz Feb 20 '13 at 16:52
add comment

Another option, defining a dedicated command \citem and using the features provided by enumitem (instead of manually redefining \labelenumi):

\documentclass{article}
\usepackage{enumitem}
\usepackage{tikz}

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%        
        \node[circle,fill=blue!20,draw,inner sep=2pt,opacity=0.5,text opacity=1] (char) {#1};}}

\newcommand\citem{%
  \stepcounter{enumi}\item[\circled{\Alph{enumi}}]}

\begin{document}

\begin{enumerate}[label=(\Alph*)]
\item Answer A
\item Answer B
\citem Answer C
\item Answer D
\item Answer E
\end{enumerate}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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.