Enumerate list items with depth level and item number

Heime heimeborgia at protonmail.com
Sat Nov 4 00:51:55 CET 2023


I want to make an enumerated list where each item displays the depth level
followed by the item number at that level.  But without employing the package
"enumitem".

<1>1. Depth Level 1, Item 1
  <2>1. Depth Level 2, Item 1
  <2>2. Depth Level 2, Item 2
  <2>3. Depth Level 2, Item 3
<1>2. Depth Level 1, Item 2

Although I have made the following, the depth levels and item number
are not inserted automatically.

\NewDocumentEnvironment {wvItemize} { O{1pt} O{1pt} }
    {
      \list {\textbullet}
        {
          \setlength{\topsep}{3pt}
          \setlength{\leftmargin}{9pt}

          \setlength{\listparindent}{2pt}
          \setlength{\parsep}{1pt}
          \setlength{\itemsep}{1pt}

          \setlength{\labelwidth}{13pt}
          \setlength{\labelsep}{5pt}
          \setlength{\itemindent}{8pt}
        }
    }
  { \endlist }

\NewDocumentCommand {\wvItem} { m m }
  { \item[$\langle$#1$\rangle$\,#2.] }




More information about the texhax mailing list.