texlive[71726] Master/texmf-dist: itemize+ option for original

commits+karl at tug.org commits+karl at tug.org
Sat Jul 6 22:59:58 CEST 2024


Revision: 71726
          https://tug.org/svn/texlive?view=revision&revision=71726
Author:   karl
Date:     2024-07-06 22:59:58 +0200 (Sat, 06 Jul 2024)
Log Message:
-----------
itemize+ option for original bullets, tex4ht r1537

Revision Links:
--------------
    https://tug.org/svn/texlive?view=revision&revision=1537

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-07-06 20:29:42 UTC (rev 71725)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-07-06 20:59:58 UTC (rev 71726)
@@ -1,3 +1,9 @@
+2024-07-06  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4.4ht): added itemize+ option. It will keep
+	original characters for itemize bullets.
+	https://tex.stackexchange.com/a/722062/2891
+
 2024-07-03  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (fontawesome5.4ht): use icon name as the alt text.

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2024-07-06 20:29:42 UTC (rev 71725)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2024-07-06 20:59:58 UTC (rev 71726)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1533 2024-06-21 13:38:57Z michal_h21 $
+% $Id: tex4ht-html4.tex 1537 2024-07-06 19:48:42Z michal_h21 $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
@@ -2950,6 +2950,22 @@
     \EndP\HCode{</li></ul>}\ShowPar}
    {\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
    {\HCode{<li class="\getClass{li}itemize">}\afterGetClass{li}|<list par|>}
+
+\:CheckOption{itemize+}\if:Option
+\ConfigureList{itemize}%
+   {\EndP\HCode{<ul \a:LRdir
+          class="\getClass{itemize}itemize\expandafter\the
+          \csname @itemdepth\endcsname">}%
+       \afterGetClass{itemize}%
+       |<save end:itm|>\global\let\end:itm=\empty}
+   {|<recall end:itm|>\ifvmode \IgnorePar\fi 
+    \EndP\HCode{</li></ul>}\ShowPar}
+   {\end:itm \global\def\end:itm{\EndP\Tg</li>}\HCode{<li class="\getClass{li}itemize"><span class="itemizeHead" aria-hidden="true">}\afterGetClass{li}}
+   {\HCode{</span>}|<list par|>}
+\Css{.itemizeHead{float: left; margin-left: -1em; width: 1em;}}
+\Css{li.itemize{list-style: none;}}
+\fi
+
 \NewConfigure{itemizeClass}{2}
 \Configure{itemizeClass}{}{}
 \NewConfigure{liClass}{2}

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2024-07-06 20:29:42 UTC (rev 71725)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2024-07-06 20:59:58 UTC (rev 71726)
@@ -1,4 +1,4 @@
-% html4.4ht (2024-06-21-14:18), generated from tex4ht-html4.tex
+% html4.4ht (2024-07-06-13:59), generated from tex4ht-html4.tex
 % Copyright 2009-2024 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
@@ -6,7 +6,7 @@
 % conditions of the LaTeX Project Public License, either
 % version 1.3c 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
+%   https://www.latex-project.org/lppl.txt
 % and version 1.3c or later is part of all distributions
 % of LaTeX version 2005/12/01 or later.
 %
@@ -13,11 +13,11 @@
 % This work has the LPPL maintenance status "maintained".
 %
 % The Current Maintainer of this work
-% is the TeX4ht Project <http://tug.org/tex4ht>.
+% is the TeX4ht Project <https://tug.org/tex4ht>.
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2024-06-21-14:18}
+\immediate\write-1{version 2024-07-06-13:59}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -1469,6 +1469,25 @@
    {\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
    {\HCode{<li class="\getClass{li}itemize">}\afterGetClass{li}\par\ShowPar
 }
+
+\:CheckOption{itemize+}\if:Option
+\ConfigureList{itemize}%
+   {\EndP\HCode{<ul \a:LRdir
+          class="\getClass{itemize}itemize\expandafter\the
+          \csname @itemdepth\endcsname">}%
+       \afterGetClass{itemize}%
+       \PushMacro\end:itm
+\global\let\end:itm=\empty}
+   {\PopMacro\end:itm \global\let\end:itm \end:itm
+\ifvmode \IgnorePar\fi
+    \EndP\HCode{</li></ul>}\ShowPar}
+   {\end:itm \global\def\end:itm{\EndP\Tg</li>}\HCode{<li class="\getClass{li}itemize"><span class="itemizeHead" aria-hidden="true">}\afterGetClass{li}}
+   {\HCode{</span>}\par\ShowPar
+}
+\Css{.itemizeHead{float: left; margin-left: -1em; width: 1em;}}
+\Css{li.itemize{list-style: none;}}
+\fi
+
 \NewConfigure{itemizeClass}{2}
 \Configure{itemizeClass}{}{}
 \NewConfigure{liClass}{2}



More information about the tex-live-commits mailing list.