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 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
up vote 10 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
\begin{enumerate}

\item One

\item Two

\item $\!\!\!\!{^*}$ Three

\item Four

\end{enumerate}

does the trick! Easy.

\! moves the next text a tad to the left, use as many or few as to your preference.

share|improve this answer
    
Or you can use \hspace{-xpt} where x is a number. Which doesn't require math mode. – MickG Mar 10 at 10:55

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.