6

About the \begin{enumerate} list environment, when I use item, instead of having this in my pdf document

1.

2.

3.

4.

I would like to display the following

P1

P2

P3

P4

Where P is a single character. How can I do that please?

1

1 Answer 1

8

This can be easily done with enumitem and its label option. Since the letter P is to be followed by a arabic number, the label P\arabic* is used.

\documentclass[11pt,a4paper]{article}

\usepackage{enumitem}

\usepackage{fmtcount}

\begin{document}

\begin{enumerate}[label={\bfseries P\arabic*}]
\item First
\item Second
\item Third
\item Fourth
\end{enumerate}

Let's play around: 

\begin{enumerate}[label={\bfseries P\arabic*}]
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\end{enumerate}

Hold on for a while... and resume

\begin{enumerate}[resume*]
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\item \Ordinalstring{enumi}
\end{enumerate}


\end{document}

enter image description here

2
  • 2
    If you load enumitem with shortlabels options, you can use \begin{enumerate}[P1] to get the enumeration you want.
    – Manuel
    Commented Apr 21, 2015 at 19:06
  • @Manuel: (+1) Yes, I am aware of that, but I wanted to show a more general approach.
    – user31729
    Commented Apr 21, 2015 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .