1

I want to make a list of items using counters, but I face two problems I cannot solve. The first is the following:

1. Text text
text

But I want it to look like (indent everything that is after the counter):

1. Text text
   text

Reading answers on this site about enumitem or adjustwith environment from changepage did not help, because it indents the paragrah with the number, but I want the latter to stay in place.

minipage environment is not welcomed, as it doesn't behave well when the page ends.

The second problem is that I have no idea how to make the number aligned by the fullstop, to make it not look like:

1. Text
11. Text
11*.Text

But like:

  1. Text
 11. Text
11*. Text

Btw, is it better? Or the numbers should be aligned to the left, but not to the fullstop?

My code (I am using LuaLaTeX):

\documentclass[10pt]{extarticle}
\pagestyle{empty}
\usepackage[left=1cm,right=1cm,bottom=1cm,top=1cm]{geometry}
\usepackage{amsthm}
\usepackage{lipsum}
\usepackage{skull}

\usepackage{ragged2e}
\usepackage[russian]{babel}
\usepackage{mathptmx}
\usepackage{polyglossia}    
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}
\setmainlanguage{russian}

\newcounter{task}


\newcommand{\sep}{\vspace{9pt}\hrule\vspace{9pt}}

\newcommand{\task}{\textbf{\thetask.\quad}\stepcounter{task}}
\newcommand{\hard}{\textbf{\thetask*.\quad}\stepcounter{task}}
\newcommand{\hhard}{\textbf{\thetask$\skull$.\quad}\stepcounter{task}}
\newcommand{\SN}{\smallskip\noindent}
\newcommand{\TT}{\SN\task}
\newcommand{\HA}{\SN\hard}
\newcommand{\HH}{\SN\hhard}



\begin{document}
\setcounter{task}{1}

\TT \lipsum[1]

\HA \lipsum[2]

\textbf{Some text that should not be nor numbered, neither inedented, it does not correspond to the list. After it, the numeration continues.}

\HH \lipsum[3]
\end{document}

After getting some answers and comments I think I should reformulate the question: How can I code something using counters that look just like enumerate?

UPDATE The question is now more clear here: Making my own list with custom numbering

1

Just use an enumerate environment. To get your desired formatting, also use the enumerate package.

\documentclass[10pt]{extarticle}
\pagestyle{empty}
\usepackage[left=1cm,right=1cm,bottom=1cm,top=1cm]{geometry}
\usepackage{amsthm}
\usepackage{lipsum}

\usepackage{ragged2e}
\usepackage[russian]{babel}
\usepackage{mathptmx}
\usepackage{polyglossia}    
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}
\setmainlanguage{russian}

\usepackage{enumerate}

\begin{document}

\begin{enumerate}[\bfseries 1.]
  \item \lipsum[1]

  \item \lipsum[2]

  \textbf{Some text that should not be numbered.}

  \item \lipsum[3]

  \item Some more text.
  \item Some more text.
  \item Some more text.
  \item Some more text.
  \item Some more text.
  \item Some more text.
  \item Some more text.
  \item Some more text.
\end{enumerate}
\end{document}

enter image description here

3
  • It is not what I really want. It indents everything that is inside the environment. The general idea is that there is some text, then list of items, then some text, then the another list of items where the numeration continues. Dec 4 '16 at 15:27
  • @MichaelFreimann Combine this answer with tex.stackexchange.com/questions/1669/resuming-a-list
    – Au101
    Dec 4 '16 at 15:29
  • @Au101 I see some ways to change the type of enumerators, like here^ tex.stackexchange.com/questions/2291/how-do-i-change-the-enumerate-list-format-to-use-letters-instead-of-the-defaul . Though I want to have and ability to have different types of enumerators in one list (See the updated code in the answer). Dec 4 '16 at 15:38

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.