Akr Akr - 2 months ago 20
LaTeX Question

List bullet problems in latex

I want the effect:


Stage 1 xxxx

Stage 2 xxxx

Stage 3 xxxx


but the latex setting code

\begin{enumerate}[Stage 1]


produces


Stage 1 xxxx

Stbge 2 xxxx

Stcge 3 xxxx


Obviously latex take the character 'a' in stage as bullet starter. So how to set static characters in the parameter?

Answer

You'll have to hide the non-enumerable content from enumerate. There are a number of ways to achieve this:

enter image description here

\documentclass{article}

\usepackage{enumerate}

\begin{document}

% Default enumeration
\begin{enumerate}[Stage 1]
  \item First
  \item Second
  \item Last
\end{enumerate}

% Hide non-enumerable content using {braces}
\begin{enumerate}[{Stage} 1]
  \item First
  \item Second
  \item Last
\end{enumerate}

% Hide non-enumerable content using macros
\newcommand{\enumprefix}{Stage}
\begin{enumerate}[\enumprefix{} 1]
  \item First
  \item Second
  \item Last
\end{enumerate}

\end{document}

enumitem provides a more explicit way of identifying the enumeration:

\documentclass{article}

\usepackage{enumitem}

\begin{document}

\begin{enumerate}[label={Stage \arabic*}]
  \item First
  \item Second
  \item Last
\end{enumerate}

\end{document}
Comments