7

I have the following list:

\begin{enumerate}
    \item Particle Synthesis
    \item Video analysis
    \item Temperature Calibration
    \item Video Demonstration
\end{enumerate}

Which gives me a list enumerated by numericals (1., 2., ,...). Could someone advise me how to add an 'S' in front of each label (S1., S2., ...) ?

2 Answers 2

11

See How do I change the `enumerate` list format to use letters instead of the default Arabic numerals?

You can use : \renewcommand{\theenumi}{S\arabic{enumi}}

The output

enter image description here

The code

\documentclass[12pt]{article}
\usepackage{fourier}
\begin{document}
\thispagestyle{empty}
{ % create a group so the change is local 
\renewcommand{\theenumi}{S\arabic{enumi}}
\begin{enumerate}
    \item Particle Synthesis
    \item Video analysis
    \item Temperature Calibration
    \item Video Demonstration
\end{enumerate}
}
\noindent Let's see a subsequent enumerate.
\begin{enumerate}
    \item Particle Synthesis
    \item Video analysis
    \item Temperature Calibration
    \item Video Demonstration
\end{enumerate}
\end{document}
12

I wanted to point that, while redefining \theenumi is fine in most cases, the situation can be more complex if the counter is prefixed with a longer text, as by default the label of an enumerate environment is right-aligned at a fixed distance of the text leftmargin (\leftmargini here) and it can overflow into the leftmargin.

A better solution for this case is to use the versatile package enumitem. Demo:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{fourier}
\usepackage{enumitem}

\begin{document}

\renewcommand{\theenumi}{SSS\,\arabic{enumi}}
\begin{enumerate}
    \item Particle Synthesis
    \item Video analysis
    \item Temperature Calibration
    \item Video Demonstration
\end{enumerate}

\noindent With \texttt{enumitem}:
\begin{enumerate}[label=SSS\,\arabic*, wide=0pt, leftmargin=*]
    \item Particle Synthesis
    \item Video analysis
    \item Temperature Calibration Temperature Calibration Temperature Calibration Temperature Calibration
    \item Video Demonstration
\end{enumerate}

\end{document} 

enter image description here

1
  • As your example shows, this package is great, e.g. in removing the otherwise automatic added trailing dot -- as you can see in the first part of your example. Output: SSS 1., whereas you only defined: SSS\,\arabic{enumi} (without any trailing dot!).
    – Jan
    Jun 22, 2021 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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