summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/moderncv/tweaklist.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/moderncv/tweaklist.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/moderncv/tweaklist.sty')
-rw-r--r--macros/latex/contrib/moderncv/tweaklist.sty56
1 files changed, 56 insertions, 0 deletions
diff --git a/macros/latex/contrib/moderncv/tweaklist.sty b/macros/latex/contrib/moderncv/tweaklist.sty
new file mode 100644
index 0000000000..adc9398932
--- /dev/null
+++ b/macros/latex/contrib/moderncv/tweaklist.sty
@@ -0,0 +1,56 @@
+%% start of file `tweaklist.sty'.
+%% Original by Jakob Schiøtz, downloaded from http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty; not found on ctan.
+%% Modified by Xavier Danaux (xdanaux@gmail.com).
+%
+% The tweaklist.sty package redefines the itemize, enumerate and description packages, so that all parameters can be adjusted.
+% This was done by copying the original definitions, and adding "hook commands" that are executed when entering the environment.
+% The hook commands are initially empty, but can be redefined with \renewcommand.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+% hooks for the itemize environment
+\def\itemhook{}
+\def\itemhooki{}
+\def\itemhookii{}
+\def\itemhookiii{}
+\def\itemhookiv{}
+% hooks for the enumerate environment
+\def\enumhook{}
+\def\enumhooki{}
+\def\enumhookii{}
+\def\enumhookiii{}
+\def\enumhookiv{}
+% hook for the description environment
+\def\deschook{}
+% original environment definitions, with hooks added
+\def\enumerate{%
+ \ifnum \@enumdepth >\thr@@\@toodeep\else
+ \advance\@enumdepth\@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+ \expandafter
+ \list
+ \csname label\@enumctr\endcsname
+ {%
+ \enumhook \csname enumhook\romannumeral\the\@enumdepth\endcsname%
+ \usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
+ }%
+ \fi}
+\def\itemize{%
+ \ifnum \@itemdepth >\thr@@\@toodeep\else
+ \advance\@itemdepth\@ne
+ \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+ \expandafter
+ \list
+ \csname\@itemitem\endcsname
+ {%
+ \itemhook \csname itemhook\romannumeral\the\@itemdepth\endcsname%
+ \def\makelabel##1{\hss\llap{##1}}%
+ }%
+ \fi}
+\newenvironment{description}
+ {\list{}{\deschook\labelwidth\z@ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+ {\endlist}