I'm doing homework from a particular book, and each question is numbered after the page number and the question number. For example 52.2, 52.9, 53.13, etc. (Note that they are not sequential.)

How do I do something that will work like the enumerate environment, but instead of 1. 2. 3., etc. at each \item, I put a custom number?


6 Answers 6


You could simply use the optional Argument of \item


    \item [2.9] Foo
    \item [53.2] Bar
    \item [69.11]

I hope that’s what you wanted to do …

  • 1
    Thanks. Strangely enough, I wasn't aware of the itemize function :O ... useful! Commented Sep 29, 2011 at 0:43
  • 3
    That's what I usually do, but the alignment works the other way I expect it to and I often have to fix it by defining my own lists. Any other means to do it? Commented Sep 29, 2011 at 1:12
  • 1
    @Francois: Please post a separate question with a MWE that shows the problem. Commented Sep 29, 2011 at 1:31
  • 7
    You can also do this using the enumerate environment (that is, in this instance, itemize and enumerate can be interchanged). Also, from a terminology perspective, these are environments.
    – Werner
    Commented Sep 29, 2011 at 1:40
  • 2
    @geo909: This is because the labels, which is “Question” in your case, have a fixed width. If you have such list {description} seems to be more appropriate. You can also increase the label width e.g. by using the enumitem package.
    – Tobi
    Commented Jan 25, 2015 at 11:34

The genuinely insane way to do this is as follows:

  \expandafter\@wackyenum\csname c@#1\endcsname%


\item One
\item Two
\item Three

This allows you to define an arbitrary list of numbers that the the enumeration will cycle through. This has the (very minor) advantage of having the spacing behave a little better. This is basically how a lot of things are done in the moreenum package. The documentation explains the procedure.


Depending on how much "non-sequential" your numbers are, and how much you need a quick & dirty solution instead of something with polish and automatism, you might get along with \addtocounter and some ad-hoc-ery involving the enumitem package:




\item Answer % 52.2
\item Answer % 52.9

\item Answer % 53.13


With a bit more work, you could make the page number (52, 53) into a counter of its own and wrap it all into a re-useable environment definition, but I think this gives you the idea of it all.


Building up on Seamus's insane answer, here is how to do the same in ConTeXt.

\defineconversion[insane][52.2, 52.9, 53.13,42]

  \item One
  \item Two
  \item Three

To get automatically the page number you can do as follows



\qitem{2} A
\qitem{25} B


\qitem{3} C
\qitem{7} D


At each questions environment a new label is generated, so we can use it for numbering the questions. The \qitem command wants as argument the question number. Since the mechanism exploits the \label-\ref system, two runs of latex are needed.


In modification of egreg's solution you may use package perpages to have enumeration per page:

  \ifx\relax#1\relax\else\setcounter{enumi}{\numexpr #1-1\relax}\fi


\makeatletter\@whilenum\value{page}<100\do{% demonstration of 99 pages
  \nitem A
  \nitem[7] B
  \nitem[19] C
  \nitem \lipsum[\thepage]
  \nitem D

Instead of redefining theenumi you may redefine \labelenumi:


The difference is that \label/\ref will reference the number without page.

You must log in to answer this question.

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