Mehrstufige Aufzählungszeichen

Mehrstufige Aufzählungszeichen

Ich möchte etwas schreiben, das ich für mehrstufige Aufzählungszeichen verwenden könnte, zum Beispiel:

I. Titel

  1. Untertitel

    a. Untertitel

    ...

In LaTex habe ich

 \def\startitems
 {
  \begingroup
  \parindent\z@
  \@itemdepth\@ne
  \@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname
  \leftskip\@totalleftmargin
  \everypar
  {
    \llap{
      \makebox[\labelsep][l]
      {
        \csname labelitem\romannumeral\the\@itemdepth\endcsname
      }
    }
  }
  \obeylines
}

\def\stopitems
{
  \bottom
  \par
\endgroup
}
\def\up
{
  \par
  \begingroup
\advance\@itemdepth\@ne
\advance\@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname
\leftskip\@totalleftmargin
}

\def\down
{
    \par
    \endgroup
}

\def\bottom
{
  \ifnum\@itemdepth>\@ne
    \down\bottom
  \fi
}

und es funktioniert gut, aber ich brauche es in reinem TeX, und ich habe keine Ahnung, wie das geht. Kann mir bitte jemand helfen?

Antwort1

Ist das in der Nähe von dem, was Sie wollen?

\catcode`@=11
\newdimen\itemmargin
\itemmargin=3em
\newcount\itemdepth
\def\startitems{%
  \par
  \begingroup
  \advance\itemdepth\@ne
  \parindent\z@
  \csname item\romannumeral\itemdepth\endcsname\z@
  \advance\leftskip\itemmargin
  }
\def\stopitems{%
  \par
  \endgroup}

\def\itemd@pth{\romannumeral\itemdepth}
\newcount\itemi
\newcount\itemii
\newcount\itemiii
\def\labelitemi{\uppercase\expandafter{\romannumeral\itemi}.}
\def\labelitemii{\number\itemii.}
\def\labelitemiii{%
  \ifcase\itemiii\or
    a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m\or
    n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\fi.}

\def\item{%
  \advance\csname item\itemd@pth\endcsname\@ne
  \par\leavevmode\llap{\csname labelitem\itemd@pth\endcsname\enspace}\ignorespaces
}

\catcode`@=12

\startitems
\item Something
  \startitems
  \item Second level
    \startitems
    \item Well
    \item done
    \stopitems
  \item Again second
  \stopitems
\item Back to first
\stopitems

\bye

Bildbeschreibung hier eingeben

verwandte Informationen