0

This question already has an answer here:

I am writing a list of questions:

\begin{enumerate}
    \item This is a question.
    \item This is another one.
    \item This one is a hard one, I want to add an asterisk to the label.
    \item This one is another ordinary question.
\end{enumerate}

On the third entry, I want an asterisk in front of the label number. A naive approach would be this:

\begin{enumerate}
    \item This is a question.
    \item This is another one.
    \item[*3.] This one is a hard one, I want to add an asterisk to the label.
    \item This one is another ordinary question.
\end{enumerate}

I would expect the output to look like this:

  1. ...

  2. ...

*3. ...

  1. ...

However the output is this:

  1. ...

  2. ...

*3. ...

  1. ...

Is there a way to do this?

marked as duplicate by Stefan Pinnow, Raaja, Phelype Oleinik, Mensch, user170109 Jun 11 at 18:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Another dirty solution: each time you want a star, redefine the macro \theenumi that prints the item number, and redefine it back to normal for regular items. Does not work with the enumitem package.

MWE:

\documentclass{article}
\begin{document}
\let\olditem\item
\def\item{\def\theenumi{\arabic{enumi}}\olditem}
\def\itemstar{\def\theenumi{*\arabic{enumi}}\olditem}

\begin{enumerate}
    \item This is a question.
    \item This is another one.
    \itemstar This one is a hard one, I want to add an asterisk to the label.
    \item This one is another ordinary question.
\end{enumerate}

\end{document}

Result:

enter image description here

0

A dirty solution. Separate into more enum and add \setcounter{enumi}.

\documentclass[12pt]{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
    \item This is a question.
    \item This is another one.
    \item[*3.] This one is a hard one, I want to add an asterisk to the label.
    \end{enumerate}   
    \begin{enumerate}
    \setcounter{enumi}{3}
    \item This one is another ordinary question.
    \item And more\ldots
\end{enumerate}
\begin{enumerate}
    \item [*6.]This one is another hard question.
\end{enumerate}
\begin{enumerate}
\setcounter{enumi}{6}
\item And more\ldots
\end{enumerate}
\end{document}

enter image description here

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