Advertisement
Guest User

Untitled

a guest
Feb 19th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 2.30 KB | None | 0 0
  1. %
  2. % This is file `ufenumerate.sty',
  3. % customized from `enumerate.sty'.
  4. %
  5. % Antonio Paiva
  6. % Feb 2007
  7. %
  8.  
  9. \NeedsTeXFormat{LaTeX2e}
  10. \ProvidesPackage{ufenumerate}
  11.          [2007/02/16 v1.00 UF enumerate with extensions]
  12. \RequirePackage{calc}
  13. \RequirePackage{setspace}
  14.  
  15. \newtoks\@enLab
  16. \def\@enQmark{?}
  17. \def\@enLabel#1#2{%
  18.   \edef\@enThe{\noexpand#1{\@enumctr}}%
  19.   \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}%
  20.   \@enloop}
  21. \def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= }
  22. \def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop}
  23. \def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop}
  24. \def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop}
  25. \def\@enloop{\futurelet\@entemp\@enloop@}
  26. \def\@enloop@{%
  27.   \ifx A\@entemp         \def\@tempa{\@enLabel\Alph  }\else
  28.  \ifx a\@entemp         \def\@tempa{\@enLabel\alph  }\else
  29.  \ifx i\@entemp         \def\@tempa{\@enLabel\roman }\else
  30.  \ifx I\@entemp         \def\@tempa{\@enLabel\Roman }\else
  31.  \ifx 1\@entemp         \def\@tempa{\@enLabel\arabic}\else
  32.  \ifx \@sptoken\@entemp \let\@tempa\@enSpace         \else
  33.  \ifx \bgroup\@entemp   \let\@tempa\@enGroup         \else
  34.  \ifx \@enum@\@entemp   \let\@tempa\@gobble          \else
  35.                         \let\@tempa\@enOther
  36.                         \@enhook
  37.             \fi\fi\fi\fi\fi\fi\fi\fi
  38.  \@tempa}
  39. \providecommand\@enhook{}
  40. \def\enumerate{%
  41.   \ifnum \@enumdepth >3 \@toodeep\else
  42.       \advance\@enumdepth \@ne
  43.       \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi
  44.  \@ifnextchar[{\@@enum@}{\@enum@}}
  45. \def\@@enum@[#1]{%
  46.   \noindent%
  47.   \@enLab{}\let\@enThe\@enQmark%
  48.   \@enloop#1\@enum@
  49.   \ifx\@enThe\@enQmark\@warning{The counter will not be printed.%
  50.    ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi
  51.   \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}%
  52.   \expandafter\let\csname the\@enumctr\endcsname\@enThe
  53.   \csname c@\@enumctr\endcsname7
  54.   \expandafter\settowidth
  55.             \csname leftmargin\romannumeral\@enumdepth\endcsname
  56.             {\the\@enLab\hspace{\labelsep}}%
  57.   \@enum@}
  58. \def\@enum@{\list{\csname label\@enumctr\endcsname}%
  59.            {\setlength{\itemsep}{0.5\baselineskip}%
  60.            \usecounter{\@enumctr}\def\makelabel##1{\rlap{##1}}}\singlespacing}
  61. \endinput
  62. %%
  63. %% End of file `ufenumerate.sty'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement