10

I am trying to get enumerations with the list labels surrounded by text circles for which I am using the following code:

\usepackage{tikz}
\newcommand*\mycirc[1]{%
\begin{tikzpicture}[baseline=(C.base)]
\node[draw,circle,inner sep=1pt](C) {#1};
\end{tikzpicture}}

I am trying to get the following code to work:

    \begin{compactenum}[{\mycirc{}A{}}]
    \item
    \end{compactenum}

but no luck yet. Note that compactenum comes from the paralist package. Any suggestions are very welcome.

12

I would recommend you use the enumitem package for your compact list. Here's an example:

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{enumitem}
\newcommand*\mycirc[1]{%
\begin{tikzpicture}[baseline=(C.base)]
\node[draw,circle,inner sep=1pt,minimum size=3ex](C) {#1};
\end{tikzpicture}}

\begin{document}
\begin{enumerate}[itemsep=0pt,label=\protect\mycirc{\Alph*}]
  \item Foo
  \item Bar
  \item
  \item
  \item
\end{enumerate}
\end{document}

output of code

| improve this answer | |
12

If you still want to use paralist, a bit of trickery is needed as unfortunately paralist doesn't seem to offer a means for constructing custom labels:

\def\mycirc\csname#1\endcsname{%
\begin{tikzpicture}[baseline=(C.base)]
\node[draw,circle,inner sep=1pt](C) {\csname#1\endcsname};
\end{tikzpicture}}

and then

\begin{compactenum}[\mycirc A]
| improve this answer | |
  • Ah, I like both your solution and Alan's. But I think I am going to go with Alan's because it seems simpler to me! :) Thanks though. – tchakravarty Mar 24 '12 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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