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 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.

share|improve this question
add comment

2 Answers 2

up vote 11 down vote accepted

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

share|improve this answer
add comment

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]
share|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. –  fg nu Mar 24 '12 at 21:16
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.