diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/iitem/iitem.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/iitem/iitem.sty b/Master/texmf-dist/tex/latex/iitem/iitem.sty new file mode 100644 index 00000000000..93728965d51 --- /dev/null +++ b/Master/texmf-dist/tex/latex/iitem/iitem.sty @@ -0,0 +1,93 @@ +%% +%% This is file `iitem.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iitem.dtx (with options: `package') +%% This is a generated file. +%% +%% Copyright (C) 2013 by Ben Vitecek +%% +%% This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.2 of this license or (at your option) any later version. The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX version 1999/12/01 or later. + + + +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesPackage{iitem} +[2013/03/31 v1.0 Go a step deeper in lists +using the new commands ``iitem'', ``iiitem'' and ``ivtem''.] + +\def\Pseudo@item{{{% + \@inmatherr\item + \@ifnextchar [\@item{\@item[]} + }}} + +\newcounter{iitemcounter} +\newcounter{iiitemcounter} +\newcounter{ivtemcounter} + +\let\AltesItem\item +\renewcommand{\item}{% +\if@nmbrlist% + \ifnum% + \@enumdepth=1% + \setcounter{iitemcounter}{0}% + \setcounter{iiitemcounter}{0}% + \setcounter{ivtemcounter}{0}% + \fi% +\fi% +\AltesItem} + +\newcommand*{\iitem@line@command}[2]{% + \newcommand*{#1}{% + \begingroup% + \escapechar=`\\% + \catcode\endlinechar=\active% + \csname\string#1\endcsname% + }% + \begingroup% + \escapechar=`\\% + \lccode`\~=\endlinechar% + \lowercase{% + \expandafter\endgroup + \expandafter\def\csname\string#1\endcsname##1~% + }{\endgroup#2\space}% +} + +\iitem@line@command{\iitem}{\partopsep0pt% + \expandafter\begin\expandafter{\@currenvir}% + \if@nmbrlist\setcounter{\@listctr}{\theiitemcounter}\fi% + \item #1% + \expandafter\end\expandafter{\@currenvir}% +\stepcounter{iitemcounter}% +\setcounter{iiitemcounter}{0}\setcounter{ivtemcounter}{0}} + +\iitem@line@command{\iiitem}{\partopsep0pt% + \expandafter\begin\expandafter{\@currenvir}\Pseudo@item% + \expandafter\begin\expandafter{\@currenvir}% + \if@nmbrlist\setcounter{\@listctr}{\theiiitemcounter}\fi% + \item #1 + \expandafter\end\expandafter{\@currenvir}% + \expandafter\end\expandafter{\@currenvir}% +\stepcounter{iiitemcounter}\setcounter{ivtemcounter}{0}} + +\iitem@line@command{\ivtem}{\partopsep0pt% + \expandafter\begin\expandafter{\@currenvir}\Pseudo@item% + \expandafter\begin\expandafter{\@currenvir}\Pseudo@item% + \expandafter\begin\expandafter{\@currenvir}% + \if@nmbrlist \setcounter{\@listctr}{\theivtemcounter}\fi% + \item #1% + \expandafter\end\expandafter{\@currenvir}% + \expandafter\end\expandafter{\@currenvir}% + \expandafter\end\expandafter{\@currenvir}% +\stepcounter{ivtemcounter}} + + +\endinput +%% +%% End of file `iitem.sty'. |