diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-06 00:23:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-06 00:23:06 +0000 |
commit | 4c3c9c75948c26d5f0779d9a8cf98ed47d6c6dea (patch) | |
tree | 7a19b101a9eae141bb821b746ba0890c8e942295 /Master | |
parent | f84c635785a77879849e86a07315ebe6e4fdf5a1 (diff) |
adjustbox and tcolorbox fixes, tex4ht 1047, 1048
git-svn-id: svn://tug.org/texlive/trunk@61505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/ChangeLog | 10 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/Makefile | 45 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 59 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht | 29 |
5 files changed, 127 insertions, 44 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 54cdf38475e..752e2841f45 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,13 @@ +2022-01-05 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (adjustbox.4ht): prevent undefined control + sequences with Adjusbox. + +2022-01-04 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (tcolorbox.4ht): fixed conflict with updated + Tcolorbox package. + 2022-01-02 Karl Berry <karl@freefriends.org> * tex4ht-4ht.tex (ifthen.4ht, url.4ht): use |<TeX4ht copywrite> diff --git a/Master/texmf-dist/source/generic/tex4ht/Makefile b/Master/texmf-dist/source/generic/tex4ht/Makefile index 8c81e9990fb..9eeac4bbf91 100644 --- a/Master/texmf-dist/source/generic/tex4ht/Makefile +++ b/Master/texmf-dist/source/generic/tex4ht/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 936 2021-05-16 16:21:01Z karl $ +# $Id: Makefile 1039 2021-12-25 21:56:53Z karl $ # This file is public domain. Originally written 2010, Karl Berry. # Assumes GNU make. @@ -106,7 +106,7 @@ tex4ht_4ht_derived = \ fontspec.4ht fontspec-4ht.lua fontspec-luatex.4ht fontspec-xetex.4ht \ footmisc.4ht framed.4ht frenchb.4ht floatpag.4ht \ geometry.4ht graphics.4ht graphicx.4ht \ - hyperref.4ht \ + hyperref.4ht hyperxmp.4ht \ imakeidx.4ht \ jurabib.4ht \ latex.4ht lettrine.4ht listings.4ht longtable.4ht \ @@ -193,8 +193,8 @@ tex4ht_fonts_modern_derived = \ derived += $(tex4ht_fonts_ebgaramond_derived) tex4ht_fonts_ebgaramond_derived = \ - $(ht_fonts_devdir)/unicode/EB_Garamond/EBGaramond-Regular-lf-swash-t1.htf \ - $(ht_fonts_devdir)/alias/EB_Garamond/EBGaramond-Bold-lf-titling-t1.htf + $(ht_fonts_devdir)/unicode/EB_Garamond_Regular/EBGaramond-Regular-lf-t1.htf \ + $(ht_fonts_devdir)/alias/EB_Garamond_Bold/EBGaramond-Bold-osf-t1.htf derived += $(tex4ht_fonts_libertine_derived) tex4ht_fonts_libertine_derived = \ @@ -211,6 +211,11 @@ tex4ht_fonts_fourier_derived = \ derived += $(tex4ht_fonts_spectral_derived) tex4ht_fonts_spectral_derived = \ $(ht_fonts_devdir)/unicode/Spectral/Spectral-Regular-lf-sc-ly1.htf + +derived += $(tex4ht_fonts_kpfonts_derived) +tex4ht_fonts_kpfonts_derived = \ + $(ht_fonts_devdir)/unicode/Kp-Light-M-Syd/jkplsyd.htf + # xx and many more # whither tmp? how change target dir? what happened to cmtex.htf? etc. @@ -241,7 +246,7 @@ tex4ht_html32_derived = html32.4ht html32-math.4ht derived += $(tex4ht_html4_derived) tex4ht_html4_derived = \ - html4.4ht html4-math.4ht html4-uni.4ht \ + html4.4ht html4-math.4ht \ html4-l2-url.4ht html4-russian-accents.4ht \ onmouseover.4ht exerqz.4ht @@ -426,6 +431,9 @@ $(tex4ht_fonts_fourier_derived): tex4ht-fonts-fourier.tex $(tex4ht_fonts_spectral_derived): tex4ht-fonts-spectral.tex $(HTTEX) $< "" +$(tex4ht_fonts_kpfonts_derived): tex4ht-fonts-kpfonts.tex + $(HTTEX) $< "" + # requires more memory than configured in other tex programs. $(tex4ht_fonts_4hf): tex4ht-fonts-4hf.tex dvilualatex $< @@ -710,6 +718,7 @@ install_data = cp -p # Perl scripts (mk4ht) at present. # diff-scripts: + @echo; echo '>>> $@' for f in *.unix; do \ inst_f=$(inst_dir_scripts)/`basename $$f .unix`.sh; \ test -r $$inst_f || continue; \ @@ -717,6 +726,7 @@ diff-scripts: # Diff from installed to dev, but install from dev to installed. install-scripts: + @echo; echo '>>> $@' for f in *.unix; do \ inst_f=$(inst_dir_scripts)/`basename $$f .unix`.sh; \ test -r $$inst_f || continue; \ @@ -764,9 +774,12 @@ install-htfonts-tmp: diff-htfonts: # put the raw diff in /tmp/htd: -$(diff) -r $(ht_fonts_instdir) $(ht_fonts_devdir) >/tmp/htd -# just the filenames in htf: - sed -n 's,^diff.*ht-fonts/,,p' /tmp/htd |sort >/tmp/htf -# new files in htnew: +# just the changed filenames in /tmp/htf; but this includes date changes, +# so will have lots of false matches. must fixx ... +# also we don't ever remove $(ht_fonts_instdir), so old stuff stays +# around; must fixx again. + sed -n 's,^diff.*ht-fonts/,,p' /tmp/htd | sort >/tmp/htf +# and new filenames in /tmp/htnew: sed -n -e 's,^Only in.*ht-fonts/,,' \ -e 's,: ,/,p' /tmp/htd >/tmp/htnew # for human consumption, remove generation lines (hopefully there are no @@ -786,9 +799,11 @@ diff-htfonts: # The diff-scripts output is usually empty, so we can run that; # but diff-htfonts is too verbose to run every time. diff-all: diff-scripts #diff-htfonts + @echo; echo '>>> $@' -for f in $(inst_dir_4ht)/*; do $(diff) $$f .; done \ | tee /tmp/u | egrep -v '^ *[-+]%|^@@ |^- *$$|-1.version' \ - | egrep -v '^..ifx.infoIVht.UnDeF.*//$$' + | egrep -v '^..ifx.infoIVht.UnDeF.*//$$' \ + | egrep -v '^--- ' # For checking the derived files that are explicitly listed above # against installed (in TL) files. This is a small subset of all the @@ -797,6 +812,7 @@ diff_files = $(filter-out %.htf %.4hf tex4ht.env% %.c lm-htf.tex \ mk4ht.perl ht.unix ht.bat,\ $(derived)) diff-derived: + @echo; echo '>>> $@' -for f in $(diff_files); do $(diff) $(inst_dir_4ht)/$$f .; done \ | tee /tmp/u | egrep -v '^ *[-+]%|^@@ |^- *$$|-1.version' \ | egrep -v '^..ifx.infoIVht.UnDeF.*//$$' @@ -804,7 +820,7 @@ diff-derived: # Check that anything with a \version of this year # also has a copyright of this year. inst-check-copyright: - @echo '>>> $@' + @echo; echo '>>> $@' -cd $(inst_dir_4ht) && for f in *; do \ if grep "version.*`date +%Y`" $$f >/dev/null; then \ grep "Copyright.*`date +%Y`" $$f >/dev/null || echo $$f; fi; done @@ -812,14 +828,14 @@ inst-check-copyright: # Check that all *.4ht in dev are installed. Other file types are # difficult, but all 4ht's should be present, except mktex4ht.4ht. inst-check-files: - @echo '>>> $@' + @echo; echo '>>> $@' cd $(inst_dir_4ht) && ls -1 *.4ht >/tmp/instlist ls -1 *.4ht | fgrep -v mktex4ht.4ht >/tmp/devlist comm -3 /tmp/devlist /tmp/instlist # Check for missing version identifications. inst-check-version: - @echo '>>> $@' + @echo; echo '>>> $@' -cd $(inst_dir_4ht) && for f in *; do \ grep 'write-1.*version' $$f >/dev/null || echo $$f; done @@ -832,6 +848,11 @@ diff1 d1: diff = diff -u0 --ignore-all-space --ignore-blank-lines \ --ignore-matching-lines='write-1.version\|, generated from\|Copyright' +# run weekly by karl. +croncheck: diff-all \ + inst-check-copyright inst-check-files inst-check-version \ + diff-htfonts + # final simple abbrev for convenience. upmake upm: svn update && make diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index be25eb06630..8255feab2fe 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1046 2022-01-02 22:32:28Z karl $ +% $Id: tex4ht-4ht.tex 1048 2022-01-05 13:16:37Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -26949,7 +26949,7 @@ We need to use dvips driver with XeLaTeX % use custom counter that increments for every \tcolorbox \newcounter{:tcbcolcount} -\def\tcb@drawcolorbox{% +\def\:tempa{% \stepcounter{:tcbcolcount}% % save text and background colors for use in CSS \get:xcolorcss{tcbcolbacktitle}\:tcbcolbacktitle% @@ -26979,12 +26979,20 @@ We need to use dvips driver with XeLaTeX \box\tcb@lowerbox% \b:tcolorlowerbox% \fi% - % close box - \d:tcolorbox% + % We need to close box in \tcb@endboxanddraw } +\HLet\tcb@drawcolorbox\:tempa % overwrite other versions of box drawing macros -\let\tcb@drawcolorbox@standalone\tcb@drawcolorbox +\HLet\tcb@drawcolorbox@standalone\:tempa + +% we need to close tcolorbox environment here, +% in the box. otherwise, last paragraph end +% would be ignored and we would get invalid XML +\def\:tempb{\d:tcolorbox\o:tcb@endboxanddraw:} +\HLet\tcb@endboxanddraw\:tempb + + \NewConfigure{tcolorbox}{4} \NewConfigure{tcolorlowerbox}{2} @@ -26996,11 +27004,7 @@ We need to use dvips driver with XeLaTeX } \HLet\tcb@set@label\:tempa - -% this is a trick to fix issues with paragraphs -% spurious end </p> tags were inserted -\def\tcb@minipage#1{\SaveEndP\vbox\bgroup\par} -\def\endtcb@savebox{\EndP\egroup\RecallEndP} +|<tcolorbox minipage|> \Hinput{tcolorbox} \endinput @@ -27009,6 +27013,17 @@ We need to use dvips driver with XeLaTeX >>> \AddFile{9}{tcolorbox} + +this is a trick to fix issues with paragraphs +where spurious end \`'</p>' tags were inserted +\<tcolorbox minipage\><<< +\pend:def\tcb@minipage{\SaveEndP} +\pend:def\tcb@minipage@top{\SaveEndP} +\pend:def\tcb@minipage@bottom{\SaveEndP} +\pend:def\tcb@minipage@center{\SaveEndP} + +>>> + %%%%%%%%%%%%%%%%%%%%%%% \Section{dvipsnam} %%%%%%%%%%%%%%%%%%%%%%% @@ -31245,7 +31260,9 @@ The following might be problematic with a caption \def\update:adjustbox:id{\stepcounter{adjustbox@4ht}\def\AdjustboxId{adjustbox-\arabic{adjustbox@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 @@ -31254,15 +31271,27 @@ The following might be problematic with a caption % 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@setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup} +\long\def\:temp#1#2{% + % copy of definitions from \@adjustbox, to prevent compilation errors + \edef\adjbox@line{\the\inputlineno}% + \let\collectbox@mode\relax + \let\collectbox@noindent\relax + \let\adjbox@collectbox\@collectbox + \let\adjbox@begininnercode\@empty + \let\adjbox@endinnercode\@empty + \chardef\adjbox@innerlevel\z@ + \update:adjustbox:id\adjbox@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 diff --git a/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht b/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht index 6e737c73034..a67b89d2171 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht @@ -1,4 +1,4 @@ -% adjustbox.4ht (2021-11-26-13:53), generated from tex4ht-4ht.tex +% adjustbox.4ht (2022-01-05-16:22), generated from tex4ht-4ht.tex % Copyright 2019-2021 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-11-26-13:53} +\immediate\write-1{version 2022-01-05-16:22} \NewConfigure{AdjustboxValignTop}{1} \NewConfigure{AdjustboxValignMiddle}{1} @@ -36,7 +36,9 @@ \def\update:adjustbox:id{\stepcounter{adjustbox@4ht}\def\AdjustboxId{adjustbox-\arabic{adjustbox@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 @@ -45,15 +47,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@setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup} +\long\def\:temp#1#2{% + % copy of definitions from \@adjustbox, to prevent compilation errors + \edef\adjbox@line{\the\inputlineno}% + \let\collectbox@mode\relax + \let\collectbox@noindent\relax + \let\adjbox@collectbox\@collectbox + \let\adjbox@begininnercode\@empty + \let\adjbox@endinnercode\@empty + \chardef\adjbox@innerlevel\z@ + \update:adjustbox:id\adjbox@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 diff --git a/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht b/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht index 0e0dd02bff7..8ff8c5a3dd2 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht @@ -1,4 +1,4 @@ -% tcolorbox.4ht (2021-11-24-13:48), generated from tex4ht-4ht.tex +% tcolorbox.4ht (2022-01-05-16:22), generated from tex4ht-4ht.tex % Copyright 2020-2021 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,13 +16,13 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-11-24-13:48} +\immediate\write-1{version 2022-01-05-16:22} % use custom counter that increments for every \tcolorbox \newcounter{:tcbcolcount} -\def\tcb@drawcolorbox{% +\def\:tempa{% \stepcounter{:tcbcolcount}% % save text and background colors for use in CSS \get:xcolorcss{tcbcolbacktitle}\:tcbcolbacktitle% @@ -52,12 +52,20 @@ \box\tcb@lowerbox% \b:tcolorlowerbox% \fi% - % close box - \d:tcolorbox% + % We need to close box in \tcb@endboxanddraw } +\HLet\tcb@drawcolorbox\:tempa % overwrite other versions of box drawing macros -\let\tcb@drawcolorbox@standalone\tcb@drawcolorbox +\HLet\tcb@drawcolorbox@standalone\:tempa + +% we need to close tcolorbox environment here, +% in the box. otherwise, last paragraph end +% would be ignored and we would get invalid XML +\def\:tempb{\d:tcolorbox\o:tcb@endboxanddraw:} +\HLet\tcb@endboxanddraw\:tempb + + \NewConfigure{tcolorbox}{4} \NewConfigure{tcolorlowerbox}{2} @@ -69,11 +77,12 @@ } \HLet\tcb@set@label\:tempa +\pend:def\tcb@minipage{\SaveEndP} +\pend:def\tcb@minipage@top{\SaveEndP} +\pend:def\tcb@minipage@bottom{\SaveEndP} +\pend:def\tcb@minipage@center{\SaveEndP} + -% this is a trick to fix issues with paragraphs -% spurious end </p> tags were inserted -\def\tcb@minipage#1{\SaveEndP\vbox\bgroup\par} -\def\endtcb@savebox{\EndP\egroup\RecallEndP} \Hinput{tcolorbox} \endinput |