source: cv/tweaklist.sty@ 341

Last change on this file since 341 was 222, checked in by Rick van der Zwet, 14 years ago

Update of CV latex package

File size: 1.9 KB
Line 
1%% start of file `tweaklist.sty'.
2%% Original by Jakob SchiÞtz, downloaded from http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty; not found on ctan.
3%% Modified by Xavier Danaux (xdanaux@gmail.com).
4%
5% The tweaklist.sty package redefines the itemize, enumerate and description packages, so that all parameters can be adjusted.
6% This was done by copying the original definitions, and adding "hook commands" that are executed when entering the environment.
7% The hook commands are initially empty, but can be redefined with \renewcommand.
8%
9% This work may be distributed and/or modified under the
10% conditions of the LaTeX Project Public License version 1.3c,
11% available at http://www.latex-project.org/lppl/.
12
13
14% hooks for the itemize environment
15\def\itemhook{}
16\def\itemhooki{}
17\def\itemhookii{}
18\def\itemhookiii{}
19\def\itemhookiv{}
20% hooks for the enumerate environment
21\def\enumhook{}
22\def\enumhooki{}
23\def\enumhookii{}
24\def\enumhookiii{}
25\def\enumhookiv{}
26% hook for the description environment
27\def\deschook{}
28% original environment definitions, with hooks added
29\def\enumerate{%
30 \ifnum \@enumdepth >\thr@@\@toodeep\else
31 \advance\@enumdepth\@ne
32 \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
33 \expandafter
34 \list
35 \csname label\@enumctr\endcsname
36 {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
37 \enumhook \csname enumhook\romannumeral\the\@enumdepth\endcsname}%
38 \fi}
39\def\itemize{%
40 \ifnum \@itemdepth >\thr@@\@toodeep\else
41 \advance\@itemdepth\@ne
42 \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
43 \expandafter
44 \list
45 \csname\@itemitem\endcsname
46 {\def\makelabel##1{\hss\llap{##1}}%
47 \itemhook \csname itemhook\romannumeral\the\@itemdepth\endcsname}%
48 \fi}
49\newenvironment{description}
50 {\list{}{\labelwidth\z@ \itemindent-\leftmargin
51 \let\makelabel\descriptionlabel\deschook}}
52 {\endlist}
Note: See TracBrowser for help on using the repository browser.