Skip to content

Instantly share code, notes, and snippets.

@kemitchell
Created February 8, 2015 22:56
Show Gist options
  • Save kemitchell/d3d13fcf700f47aff13f to your computer and use it in GitHub Desktop.
Save kemitchell/d3d13fcf700f47aff13f to your computer and use it in GitHub Desktop.
% ltlists.dtx definitions with the list nesting depth limitation removed
\newcount\@depthcount
\@depthcount 0\relax
\def\@depthloop{%
\ifnum \@depthcount <10
\advance\@depthcount\@ne%
\@definecounter{item\romannumeral\the\@depthcount}%
\expandafter\def\csname labelitem\romannumeral\the\@depthcount\endcsname{$\bullet$}%
\expandafter\let\csname @list\romannumeral\the\@depthcount\endcsname = \@listi%
\@depthloop%
\fi}
\@depthloop
\def\list#1#2{%
\global\advance\@listdepth\@ne
\rightmargin\z@
\listparindent\z@
\itemindent\z@
\csname @list\romannumeral\the\@listdepth\endcsname
\def\@itemlabel{#1}%
\let\makelabel\@mklab
\@nmbrlistfalse
#2\relax
\@trivlist
\parskip\parsep
\parindent\listparindent
\advance\linewidth -\rightmargin
\advance\linewidth -\leftmargin
\advance\@totalleftmargin \leftmargin
\parshape \@ne \@totalleftmargin \linewidth
\ignorespaces}
\renewcommand{\itemize}{%
\advance\@itemdepth\@ne
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
\expandafter
\list
\csname\@itemitem\endcsname
{\def\makelabel##1{\hss\llap{##1}}}}
\let\enditemize =\endlist
\renewcommand{\enumerate}{%
\advance\@enumdepth\@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\expandafter
\list
\csname label\@enumctr\endcsname
{\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment