texlive[51423] Master/texmf-dist: enumitem (22jun19)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 22 23:22:49 CEST 2019


Revision: 51423
          http://tug.org/svn/texlive?view=revision&revision=51423
Author:   karl
Date:     2019-06-22 23:22:49 +0200 (Sat, 22 Jun 2019)
Log Message:
-----------
enumitem (22jun19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/enumitem/README.md
    trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.pdf
    trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex
    trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty

Modified: trunk/Master/texmf-dist/doc/latex/enumitem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/README.md	2019-06-22 21:22:38 UTC (rev 51422)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/README.md	2019-06-22 21:22:49 UTC (rev 51423)
@@ -1,4 +1,4 @@
-## Enumitem 3.8
+## Enumitem 3.9
 
 This package provides most of the flexibility you may want to customize
 the three basic list environments (`enumerate`, `itemize` and
@@ -8,6 +8,8 @@
 ### Latest changes
 
 ```
+3.9  2019-06-20
+   - \DrawEnumitemLabel rewritten
 3.8  2019-02-04
    - Fix - calc stopped working if loaded after.
    - Improved \DrawEnumitemLabel
@@ -36,4 +38,4 @@
 ________
 Javier Bezos --- http://www.texnia.com
 
-2019/02/04
+2019/06/20

Modified: trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex	2019-06-22 21:22:38 UTC (rev 51422)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex	2019-06-22 21:22:49 UTC (rev 51423)
@@ -56,9 +56,10 @@
 suggestions go to \href{http://www.texnia.com/enumitem.html}%
 {\texttt{http://www.texnia.com/enumitem.html}}.}}
 
-\date{Version 3.8\\2019/02/04}
+\date{Version 3.9\\2019/06/20}
 
 \IfFileExists{enumitem.sty}{\usepackage{enumitem}}{}
+\IfFileExists{layouts.sty}{\usepackage{layouts}}{}
 
 \addtolength{\topmargin}{-3pc}
 \addtolength{\textwidth}{6pc}
@@ -83,8 +84,8 @@
   with \New{X.X}\hspace{-.5em}. The most recent features could be still
   unstable. Please, report any issues you find on
   \texttt{https://github.com/jbezos/enumitem/issues}, which is better
-  than just complaining on an e-mail list or a web forum. Feel free to
-  fork it and make pull requests.
+  than just complaining on an e-mail list or a web forum. Forking
+  and pull requests are welcome.
 \end{note}
 
 \begin{warning}
@@ -161,8 +162,16 @@
 \end{example}
 
 \begin{note}
-  A way to see how these parameters work is with the |layout| package
+  A way to see how these parameters work is with the |layouts| package
   (the manual is named |layman.pdf|).
+  \ifx\listdiagram\notundefined\else
+    See figure \ref{f.drawlist}.
+    \begin{figure}
+      \centering
+      \listdiagram
+      \caption{List parameters}\label{f.drawlist}
+    \end{figure}
+  \fi
 \end{note}
 
 \section{Quick reference}
@@ -434,9 +443,9 @@
 \New{3.6} If you find these parameters baffling, you are not alone. You
 can visualize them by writing |\DrawEnumitemLabel| just before the
 first item (or in |first|), which draws 4 rules from top to bottom,
-|leftmargin| (thin), |labelindent| (thick if positive, thin if
-negative), |labelwidth| (thick) and |labelsep| (thick if positive, thin
-if negative). If 0, a rule is not shown.
+|labelindent|, |labelwidth|, |labelsep|, |itemindent| (thin if
+positive, thick if negative); the |leftmargin| is marked with two
+vertical rules.
 \end{note}
 
 \begin{desc}
@@ -516,7 +525,7 @@
 
 \begin{note}
   With |align=right| (the default), |labelindent=!| and |labelwidth=!|
-  behave similarly in practice.
+  behave similarly in practice. 
 \end{note}
 
 \begin{desc}
@@ -558,7 +567,9 @@
 \end{note}
 
 \begin{note}
-  |labelwidth=*| and |labelwidth=!| are synonymous.
+  |labelwidth=*| and |labelwidth=!| are synonymous. Use them with care,
+  because they may take negative values, which does not make sense (a
+  warning is shown).
 \end{note}
 
 \begin{desc}
@@ -1594,7 +1605,7 @@
 
 \noindent\showsep\hskip\parindent En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
-\begin{enumerate}[leftmargin=*]
+\begin{enumerate}[leftmargin=*]      
 \item lanza en astillero,
 \item adarna antigua,
 \item roc\'{\i}n flaco, y

Modified: trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty	2019-06-22 21:22:38 UTC (rev 51422)
+++ trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty	2019-06-22 21:22:49 UTC (rev 51423)
@@ -10,7 +10,7 @@
 % ~~~~~~~
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{enumitem}[2019/02/04 v3.8 Customized lists]
+\ProvidesPackage{enumitem}[2019/06/20 v3.9 Customized lists]
 
 % Notes
 % ~~~~~
@@ -881,6 +881,13 @@
     \enit at calcwidth
     \advance\itemindent-\dimen@
   \fi}
+  
+\def\enit at negwidth{%
+  \ifdim\labelwidth<\z@
+    \PackageWarning{enumitem}%
+       {Negative labelwidth. This does not make much\MessageBreak
+        sense,}%
+  \fi}
 
 % "Normalizing" labels
 % ====================
@@ -1369,7 +1376,8 @@
        \enit at normlabel\@itemlabel\@itemlabel
        \enit at ref
        \enit at calcleft
-       \enit at before}%
+       \enit at before
+       \enit at negwidth}%
     \enit at keyfirst
   \fi}
 
@@ -1405,7 +1413,8 @@
         \def\makelabel##1{\enit at align{\enit at format{##1}}}%
         \enit at preset{#2}{#1}{#4}%
         \enit at calcleft
-        \enit at before}%
+        \enit at before
+        \enit at negwidth}%
     \enit at keyfirst
   \fi}
 
@@ -1452,7 +1461,8 @@
            \enit at svlabel{\enit at format{##1}}%
            \aftergroup\enit at postlabel
          \fi}%
-       \enit at before}%
+       \enit at before
+       \enit at negwidth}%
      \enit at keyfirst
   \fi}
 
@@ -1830,34 +1840,35 @@
 % |            TOOLS            |
 % +=============================+
 
+\def\enit at drawrule#1#2#3#4{%
+  \rlap{%
+    \ifdim#1>0pt\relax
+      \vrule width #1 height #2 depth -#3\relax
+    \else\ifdim#1=0pt\relax
+      %
+    \else
+      \hskip#1%
+      \vrule width -#1 height #2 depth -#4\relax
+    \fi\fi}}
+  
 \def\DrawEnumitemLabel{%
-  \ifvmode
-    \hbox{\hskip\@totalleftmargin
-          \hskip-\leftmargin
-          \vrule width \leftmargin height 8pt depth -7pt
-          \hskip\itemindent
-          \ifdim\labelindent<\z@
-            \hskip-\leftmargin
-            \vrule width -\labelindent height 6pt depth -5pt
-            \hskip\labelindent
-          \else
-            \hskip-\labelsep
-            \hskip-\labelwidth
-            \hskip-\labelindent
-            \vrule width \labelindent height 6pt depth -4pt
-          \fi
-          \vrule width \labelwidth height 4pt depth -2pt
-          \ifdim\labelsep<\z@
-            \hskip\labelsep
-            \vrule width -\labelsep height 1pt
-          \else
-            \vrule width \labelsep height 2pt
-          \fi}%
-  \else
-    \enit at error
-       {\string\DrawEnumitemLabel\space must be used in vertical mode}%
-       {Very likely, just inserting a blank line before will fix it}%
-  \fi}
+  \begingroup
+    \item[]%
+    \hskip-\labelsep
+    \enit at drawrule\labelsep{4pt}{3pt}{2.3pt}%
+    \hskip-\labelwidth
+    \enit at drawrule\labelwidth{6pt}{5pt}{4.3pt}%
+    \hskip\labelwidth
+    \hskip\labelsep
+    %
+    \hskip-\itemindent
+    \enit at drawrule\itemindent{2pt}{1pt}{.3pt}%
+    \rlap{\vrule height 9pt depth .5pt}%
+    \hskip-\leftmargin
+    \rlap{\vrule height 9pt depth .5pt}%
+    \enit at drawrule\labelindent{8pt}{7pt}{6.5pt}%
+    % \message{\the\labelindent/\the\labelwidth/\the\labelsep/\the\itemindent}%
+  \endgroup} 
 
 % TODO -  option 'verbose'
 



More information about the tex-live-commits mailing list