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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Wed Jan 5 14:16:37 CET 2022


Author: michal_h21
Date: 2022-01-05 13:16:37 +0000 (Wed, 05 Jan 2022)
New Revision: 1048

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
prevent undefined cs with adjustbox

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-01-04 12:04:12 UTC (rev 1047)
+++ trunk/lit/ChangeLog	2022-01-05 13:16:37 UTC (rev 1048)
@@ -1,3 +1,8 @@
+2022-01-05  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (adjustbox.4ht): prevent undefined control
+	sequences with Adjusbox.
+
 2022-01-04  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (tcolorbox.4ht): fixed conflict with updated

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-01-04 12:04:12 UTC (rev 1047)
+++ trunk/lit/tex4ht-4ht.tex	2022-01-05 13:16:37 UTC (rev 1048)
@@ -31260,7 +31260,9 @@
 \def\update:adjustbox:id{\stepcounter{adjustbox at 4ht}\def\AdjustboxId{adjustbox-\arabic{adjustbox at 4ht}}}
 
 \NewConfigure{Adjustbox}{2}
-\def\:tempa#1#2#3#4{\update:adjustbox:id\a:Adjustbox\o:adjbox@@frame:{#1}{#2}{#3}{#4}\b:Adjustbox}
+
+\def\:tempa#1#2#3#4{\update:adjustbox:id\a:Adjustbox\o:adjbox@@frame:{#1}{#2}{#3}{#4}\b:Adjustbox
+}
 \HLet\adjbox@@frame\:tempa
 
 % suppress trying to draw the frame
@@ -31269,15 +31271,27 @@
 % patch macro that collects adjustbox contents and draw box. we disable this functionality, as all 
 % of this should be handled by CSS
 % keys are set, so it should be possible to extract  colors or frame size in theory
-\long\def\:temp#1#2{\update:adjustbox:id\adjbox at setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup}
+\long\def\:temp#1#2{%
+  % copy of definitions from \@adjustbox, to prevent compilation errors
+  \edef\adjbox at line{\the\inputlineno}%
+  \let\collectbox at mode\relax
+  \let\collectbox at noindent\relax
+  \let\adjbox at collectbox\@collectbox
+  \let\adjbox at begininnercode\@empty
+  \let\adjbox at endinnercode\@empty
+  \chardef\adjbox at innerlevel\z@
+  \update:adjustbox:id\adjbox at setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup}
 \HLet\@adjustbox\:temp
 
 
 % definitions for macros
 % we don't save any colors and just use one configuration for all box types.  
-\def\@bgcolorbox#1{\update:adjustbox:id\a:Adjustbox\BOXCONTENT\b:Adjustbox}
-\def\@foregroundbox#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
-\def\@backgroundbox#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
+\def\:tempa#1{\update:adjustbox:id\a:Adjustbox\BOXCONTENT\b:Adjustbox}
+\HLet\@bgcolorbox\:tempa
+\def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
+\HLet\@foregroundbox\:tempa
+\def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
+\HLet\@backgroundbox\:tempa
 
 \Hinput{adjustbox}
 \endinput



More information about the tex4ht-commits mailing list.