I am making my own list, similar to enumerate. I want numbering to be aligned to the right, so everything looks like this:

 1. Text
11. Text

I also want to sometimes put a special symbol after automatically put number like (this doen't work, but I hope the idea is clear):

\item la-la-la
\item[*] difficult la-la-la

So I would like the document to look like:

 1. la-la-la
2*. difficult la-la-la

The problem is that it looks like:

 1. la-la-la
 *. difficult la-la-la

so the "2" is gone.

Is there any solution?

My code so far (I am using LuaLaTeX):

\usepackage[top=0.5in, bottom=1.25in, left=1in, right=1in]{geometry}

\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}



    \item \lipsum[1]
  • Please have a look at tex.stackexchange.com/questions/261582/enumerate-with-noindent – Yorgos Dec 7 '16 at 21:32
  • @Yorgos I am not sure I get to the point – Michael Fraiman Dec 7 '16 at 21:37
  • it's not clear what you want to achieve. You want your nested enumerate environment to start with 1*? (for instance) or you want to have some items like 1,2,3*,4,.....? From what i know, you can use enumitem package in order to modify your list – Yorgos Dec 7 '16 at 22:02

Assuming that you do not want to nest these environments, you can define a new enumerate-like environment using the enumitem package with the command:


This defines a questions environment that behaves like an enumerate environment and has 1 level of nesting (to allow nesting change {1} to give the required nesting level but you will also have to modify \fakeitem below). You can set the "properties" of your environment using the command:

   label=\arabic*.,   % label format
   leftmargin=*,      % indent labels

The first two lines I have explained with comments. The before= command redefines the \item command to be \fakeitem only inside this environment. The idea is that we hijack \item to make it do what you want. The label counter for this environment is questionsi so we need \fakeitem to accept an optional argument, which it should add to the label, and we need to manually increment the counter:

\newcommand\fakeitem[1][\relax]{% argument defaults to \relax
   \refstepcounter{questionsi}%  increment label counter

Here \realitem is the original \item command.

Putting this together gives what you want:

enter image description here

Here is the full code:


\let\realitem\item% save a copy of the \item command
\newcommand\fakeitem[1][\relax]{% argument defaults to \relax=do nothing
   \realitem[\arabic{questionsi}#1.]% make label <questioni>#1.

\newlist{questions}{enumerate}{1}% define a new enumerate environment
\setlist[questions]{% define properties of questions
   label=\arabic*., % label format
   leftmargin=*,    % indent labels
   before=\let\item\fakeitem, % change the \item command

\usepackage{lipsum}% for MWe only


       \item la-la-la
       \item[*] difficult la-la-la
       \item[$\dag$] \lipsum[1]


Btw, there is another nice feature of using enumitem: if you would like all of the questions environments to use the same numbering then all you have to do is add resume to the \setlist command:

   label=\arabic*.,   % label format
   leftmargin=*,      % indent labels
   resume             % use continuous numbering for the questions environments
  • I am now working to set the vertical spacing between items. I use itemsep=3pt. But it is bigger than 3pt, comparing to other part of the document, where the vertical space is made manually. What can be the solution here? – Michael Fraiman Dec 8 '16 at 17:06
  • @MichaelFreimann The enumitem manual is usually pretty good but it is a little vague on this point. The vertical spacing between items is controlled by itemsep and parsep. Adding itemsep=0pt and parsep=3pt to the \setlist command will probably give you want you want: this should give you 3pt separation between items and between paragraphs in items. The alternative is itemsep=3pt and parsep=0pt which will give 3pt between items and 0pt between paragraphs. – Andrew Dec 8 '16 at 23:03

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.