[tex4ht-commits] [SCM] tex4ht updated: r1392 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Oct 16 11:25:26 CEST 2023


Author: michal_h21
Date: 2023-10-16 09:25:25 +0000 (Mon, 16 Oct 2023)
New Revision: 1392

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
Log:
added support for the changepage package

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-10-13 22:34:24 UTC (rev 1391)
+++ trunk/lit/ChangeLog	2023-10-16 09:25:25 UTC (rev 1392)
@@ -1,3 +1,10 @@
+2023-10-16  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (changepage.4ht),
+	* tex4ht-html4.tex (html4.4ht): added support for the Changepage
+	package.
+	https://github.com/michal-h21/tex4ebook/issues/122
+
 2023-10-13  Karl Berry  <karl at freefriends.org>
 
 	* tex4ht-c.tex (<mem for charset>): zero htf_4hf array after

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2023-10-13 22:34:24 UTC (rev 1391)
+++ trunk/lit/mktex4ht-cnf.tex	2023-10-16 09:25:25 UTC (rev 1392)
@@ -296,6 +296,7 @@
 \AddFile{7}{adjustbox}
 \AddFile{7}{awesomebox}
 \AddFile{7}{transparent}
+\AddFile{7}{changepage}
 \AddFile{7}{alltt}
 \AddFile{9}{lb}
 \AddFile{7}{latin1}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2023-10-13 22:34:24 UTC (rev 1391)
+++ trunk/lit/tex4ht-4ht.tex	2023-10-16 09:25:25 UTC (rev 1392)
@@ -33128,6 +33128,40 @@
 >>>
 
 %%%%%%%%%%%%%%%%%%%%%%%
+\Section{changepage.sty}
+%%%%%%%%%%%%%%%%%%%%%%%
+\<changepage.4ht\><<<
+% changepage.4ht (|version), generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+|<changepage shared config|>
+\Hinput{changepage}
+\endinput
+
+>>> \AddFile{7}{changepage}
+
+Changepage uses a list environment to make a text with changed left and right margin. 
+We will instead save the margin didmension for the further processing in the output
+format configuration. 
+
+\<changepage shared config\><<<
+\NewConfigure{adjustwidth}{2}
+
+\def\:tempa#1#2{%
+  \def\adjustwidth:left{#1}%
+  \def\adjustwidth:right{#2}%
+  \a:adjustwidth%
+}
+\HLet\adjustwidth\:tempa
+\expandafter\HLet\csname adjustwidth*\endcsname\:tempa
+
+\def\:tempa{\b:adjustwidth}
+\HLet\endadjustwidth\:tempa
+\expandafter\HLet\csname endadjustwidth*\endcsname\:tempa
+
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%
 \Section{alltt.sty}
 %%%%%%%%%%%%%%%%%%%%%%%
 

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2023-10-13 22:34:24 UTC (rev 1391)
+++ trunk/lit/tex4ht-html4.tex	2023-10-16 09:25:25 UTC (rev 1392)
@@ -21712,7 +21712,22 @@
 \Configure{texttransparent}{\HCode{<span class="texttransparent" style="opacity:\transparent:opacity;">}}{\HCode{</span>}}
 >>>
 
+%%%%%%%%%%%%%%%%%%%%%%
+\section{changepage}
+%%%%%%%%%%%%%%%%%%%%%%
 
+\<configure html4 changepage\><<<
+% convert the used dimension to em
+\def\pt:to:em#1{\strip at pt\dimexpr#1/\f at size em}
+
+\Configure{adjustwidth}
+{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="ajdustwidth" 
+  style="margin-left:\pt:to:em\adjustwidth:left;margin-right:\pt:to:em\adjustwidth:right;">}%
+\par\ShowPar}
+{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+>>>
+
+
 \section{fontmath.ltx}
 
 



More information about the tex4ht-commits mailing list.