Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

2 Answers 2

up vote 5 down vote accepted

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}
share|improve this answer
    
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

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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