3

Essentially, I would like the following:

X1. text text text 
X2. text2 text2 text2
X3. text text textaaa

So, talking code:

\documentclass{article}
\begin{document}
\begin{enumerate}
    \item text text text 
    \item text2 text2 text2
    \item text text textaaa
\end{enumerate}
\end{document}
5

There are fancier newer packages (eg enumitem) but the core latex distribution has an enumerate package that lets you do:

enter image description here

\documentclass{article}
\usepackage{enumerate}
\begin{document}
\begin{enumerate}[X1.]
    \item text text text 
    \item text2 text2 text2
    \item text text textaaa
\end{enumerate}
\end{document}
  • thanks for the answer, I am trying it but I get "Latex Error: ./questions.tex:14 Package keyval Error: X1. undefined." Do you know what that is? – user3232 Mar 13 '13 at 22:15
  • @user3232 enumerate doesn't use keyval did you use exactly as above or use enumitem which uses a keyval syntax. – David Carlisle Mar 13 '13 at 22:25
  • I see that in my document I have got \usepackage{enumitem}. This fixed the problem: \begin{enumerate}[label=X\arabic*.,leftmargin=*] – user3232 Mar 13 '13 at 22:31
  • How do I set custom number to begin, so let's say start with X4? – user3232 Mar 13 '13 at 22:49
  • found it, start=4 – user3232 Mar 13 '13 at 22:59
5

Without a package you can use

\documentclass{article}

\renewcommand{\labelenumi}{X\arabic{enumi}.}

\begin{document}
\begin{enumerate}
    \item text text text 
    \item text2 text2 text2
    \item text text textaaa
\end{enumerate}
\end{document}

but enumitem is a great way to go

\documentclass{article}

\usepackage{enumitem}
\setlist[enumerate]{label=X\arabic*.}


\begin{document}
\begin{enumerate}
    \item text text text 
    \item text2 text2 text2
    \item text text textaaa
\end{enumerate}
\end{document}

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.