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 would like to add an asterisk after certain labels in the enumerate environment. So for example

\documentclass{article}
\begin{document}

\begin{enumerate}
    \item Kuttel
    \item* Daddeldu
\end{enumerate}

\end{document}

but without the space between 2. und *.

share|improve this question

3 Answers 3

up vote 8 down vote accepted
\documentclass[a4paper]{article}
\newenvironment{modenumerate}
  {\enumerate\setupmodenumerate}
  {\endenumerate}

\newif\ifmoditem
\newcommand{\setupmodenumerate}{%
  \global\moditemfalse
  \let\origmakelabel\makelabel
  \def\moditem##1{\global\moditemtrue\def\mesymbol{##1}\item}%
  \def\makelabel##1{%
    \origmakelabel{##1\ifmoditem\rlap{\mesymbol}\fi\enspace}%
    \global\moditemfalse}%
}

\begin{document}
\begin{modenumerate}
\item uno
\item due
\moditem{*} tre
\item\label{four} quattro
\moditem{*}[\hfill\ref{four}.] quattro
\end{modenumerate}
\end{document}

enter image description here

share|improve this answer
    
Clearly better than mine. I vote for this one. –  Martigan Jun 17 '11 at 14:42
    
Thanks, that's perfect. –  mosaic Jun 17 '11 at 19:40

I have the following solution that puts stars before the labels:

\documentclass{article}

\begin{document}
\begin{enumerate}
\item A first item
  \bgroup
  \let\oldenum\labelenumi
  \renewcommand\labelenumi{*\oldenum}
  \item A starred item
  \egroup
\item A third item
  \bgroup
  \let\oldenum\labelenumi
  \renewcommand\labelenumi{*\oldenum}
  \item Another starred item
  \egroup
\end{enumerate}
\end{document}

Changing \renewcommand\labelenumi{*\oldenum} to \renewcommand\labelenumi{\oldenum *} messes up the alignment of the numbers.

I couldn't get this to work as a macro though.

share|improve this answer

One solution might be to tailor your labels like this:

\documentclass{article}
\begin{document}

\begin{enumerate}
    \item[1. ] Kuttel
    \item[2.*] Daddeldu
\end{enumerate}

\end{document}

Notice the extra space after the 1. in order to align 1 and 2 vertically.

Beware: this solution is pureley an aesthetic one for single levels enumerations. I don't know what will become of the nested items...

It is very simple but not scalable.

share|improve this answer

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.