summaryrefslogtreecommitdiff
path: root/support/TeX4ht
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-10-17 03:01:53 +0000
committerNorbert Preining <norbert@preining.info>2023-10-17 03:01:53 +0000
commit3e9c5c6e1c118283b7775fd707379f8c9fdd3fd5 (patch)
tree40f420b2cc25378ebd0cd509854828b1b7aa337f /support/TeX4ht
parentc4125da665ac93db063e3c177f4fc5d172f5866f (diff)
CTAN sync 202310170301
Diffstat (limited to 'support/TeX4ht')
-rw-r--r--support/TeX4ht/source/ChangeLog26
-rw-r--r--support/TeX4ht/source/mktex4ht-cnf.tex3
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex44
-rw-r--r--support/TeX4ht/source/tex4ht-c.tex17
-rw-r--r--support/TeX4ht/source/tex4ht-cond4ht.tex6
-rw-r--r--support/TeX4ht/source/tex4ht-html4.tex21
-rw-r--r--support/TeX4ht/source/tex4ht-ooffice.tex6
7 files changed, 108 insertions, 15 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index f07dcd774f..c19010df41 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,29 @@
+2023-10-16 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (hyperref.4ht): declare the \Hy@PageAnchorSlide
+ command, to prevent errors with packages that use it.
+ https://github.com/michal-h21/tex4ebook/issues/121
+
+ * tex4ht-html4.tex (html4.4ht),
+ * tex4ht-ooffice.tex (ooffice.4ht): fixed support for PDF and EPS
+ files with spaces in filenames.
+ https://github.com/michal-h21/tex4ebook/issues/118
+
+ * 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@freefriends.org>
+
+ * tex4ht-c.tex (<mem for charset>): zero htf_4hf array after
+ allocation, to avoid uninitialized comparisons.
+ https://puszcza.gnu.org.ua/bugs/?611
+
+2023-10-13 Karl Berry <karl@freefriends.org>
+
+ * tex4ht-cond4ht.tex: copyright 2023.
+
2023-10-13 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (piton.4ht): fixed support for the current version
diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex
index 9fe2c3216a..67c9ab6e13 100644
--- a/support/TeX4ht/source/mktex4ht-cnf.tex
+++ b/support/TeX4ht/source/mktex4ht-cnf.tex
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1388 2023-10-13 11:46:56Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1392 2023-10-16 09:25:25Z michal_h21 $
% Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
% Read by tex4ht-cond4ht.
%
@@ -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}
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 7c441dad27..53ca499d28 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1389 2023-10-13 13:36:04Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1394 2023-10-16 13:06:26Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2023 TeX Users Group
@@ -5912,6 +5912,14 @@ TeX4ht code.
>>>
+Some other commands that are not defined when Hyperref detects TeX4ht.
+They are used by some packages, for example Lastpage, so we need to declare them to prevent errors.
+
+\<config hyperref\><<<
+\def\Hy@PageAnchorSlidesPlain{}%
+\def\Hy@PageAnchorSlide{}%
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Forms}
%%%%%%%%%%%%%%%%%%%%%%
@@ -33128,6 +33136,40 @@ our versions.
>>>
%%%%%%%%%%%%%%%%%%%%%%%
+\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}
%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-c.tex b/support/TeX4ht/source/tex4ht-c.tex
index 7eda7724a3..77bc0a7a1e 100644
--- a/support/TeX4ht/source/tex4ht-c.tex
+++ b/support/TeX4ht/source/tex4ht-c.tex
@@ -1,6 +1,6 @@
-% $Id: tex4ht-c.tex 952 2021-06-17 21:47:06Z karl $
+% $Id: tex4ht-c.tex 1391 2023-10-13 22:34:24Z karl $
% tex tex4ht-c
-% Copyright 2009-2018 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
% Copyright 1996-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -230,7 +230,7 @@ the HTML/XML and \`'.css', also \`'.lg', \`'.idv', and
\<tex4ht.c\><<<
/* tex4ht.c (`version), generated from `jobname.tex
- Copyright 2009-2018 TeX Users Group
+ Copyright 2009-2023 TeX Users Group
Copyright `CopyYear.1996. Eitan M. Gurari
`<TeX4ht copyright`> */
`<tex4ht.h`>
@@ -2582,11 +2582,15 @@ if( span_on && (default_font != font_tbl[cur_fnt].num) ){
static BOOL start_span = FALSE, in_span_ch = FALSE;
>>>
+A span special might happen before any font has been defined (fntdef DVI
+command seen). In that case, |cur_fnt| will still be $-1$, and we must
+avoid indexing |font_tbl|.
+See report at https://puszcza.gnu.org.ua/bugs/?611.
\<span char block\><<<
if( span_on && !in_span_ch && !ignore_chs && !in_accenting
- && (default_font != font_tbl[cur_fnt].num) ){
+ && cur_fnt >= 0 && (default_font != font_tbl[cur_fnt].num) ){
if( (ch < 137) && (ch != `<insert rule + move op`>) ){
in_span_ch = TRUE; start_span = TRUE;
} }
@@ -16465,6 +16469,11 @@ static struct htf_4hf_rec *htf_4hf;
\<mem for charset\><<<
max_htf_4hf_n = 256;
htf_4hf = m_alloc(struct htf_4hf_rec, 256);
+/* Zero the array, since otherwise some elements of htf_4hf may be used
+ before it's initialized. See https://puszcza.gnu.org.ua/bugs/?611.
+ Eitan never wrote a wrapper like malloc_chk for calloc, so
+ just do it manually. */
+memset (htf_4hf, 0, 256 * sizeof (struct htf_4hf_rec));
>>>
\<no mem for charset\><<<
diff --git a/support/TeX4ht/source/tex4ht-cond4ht.tex b/support/TeX4ht/source/tex4ht-cond4ht.tex
index f768f2e77d..9d7ab61000 100644
--- a/support/TeX4ht/source/tex4ht-cond4ht.tex
+++ b/support/TeX4ht/source/tex4ht-cond4ht.tex
@@ -1,8 +1,8 @@
-% $Id: tex4ht-cond4ht.tex 1139 2022-05-25 01:16:19Z karl $
+% $Id: tex4ht-cond4ht.tex 1390 2023-10-13 22:00:45Z karl $
% (1) tex tex4ht-cond4ht or xhtex tex4ht-cond4ht
% (2) tex cond4ht.4ht
%
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
% Copyright 1997-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -34,7 +34,7 @@
% \AddFile{5}{amsmath} \AddFile{2}{report} ...
% cond4ht.4ht (?version), generated from ?jobname.tex
-% Copyright 2009-2021 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
% Copyright 1997-2009 Eitan M. Gurari
?<TeX4ht copywrite?>
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index ae6efcef89..5d5e52f60d 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1388 2023-10-13 11:46:56Z michal_h21 $
+% $Id: tex4ht-html4.tex 1393 2023-10-16 12:00:17Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -13857,7 +13857,7 @@ for margin pars.
\Picture[\a:GraphicsAlt]{{\Gin@base.svg} |<graphics dim|>}}
\Configure{graphics*}
{eps}
- {\openin15=\csname Gin@base\endcsname\PictExt\relax%
+ {\openin15={\csname Gin@base\endcsname\PictExt}\relax%
\ifeof15%
\Needs{\a:EpsConvert}%
\fi%
@@ -13899,7 +13899,7 @@ for margin pars.
{\ifdefined\Gin@page\else\def\Gin@page{1}\fi%
\edef\svg:filename{\Gin@base-\Gin@page.\a:PdfConvert}%
% test for existence of the converted file
- \openin15=\svg:filename\relax
+ \openin15={\svg:filename}\relax
\ifeof15
\Needs{\b:PdfConvert}%
\fi
@@ -21712,6 +21712,21 @@ users redefine the latter macro.
\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@pt\dimexpr#1/\f@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}
diff --git a/support/TeX4ht/source/tex4ht-ooffice.tex b/support/TeX4ht/source/tex4ht-ooffice.tex
index 6fa41d6633..5fd530f49b 100644
--- a/support/TeX4ht/source/tex4ht-ooffice.tex
+++ b/support/TeX4ht/source/tex4ht-ooffice.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-ooffice.tex 1373 2023-09-25 11:08:51Z michal_h21 $
+% $Id: tex4ht-ooffice.tex 1393 2023-10-16 12:00:17Z michal_h21 $
% compile 3 times: latex tex4ht-ooffice
% htlatex tex4ht-ooffice "xhtml,4,sections+"
%
@@ -1109,7 +1109,7 @@ this case.
\Configure{graphics*}
{eps}
- {\openin15=\csname Gin@base\endcsname\PictExt\relax%
+ {\openin15={\csname Gin@base\endcsname\PictExt}\relax%
\ifeof15%
\Needs{\a:EpsConvert}%
\fi%
@@ -1126,7 +1126,7 @@ this case.
{\ifdefined\Gin@page\else\def\Gin@page{1}\fi%
\edef\svg:filename{\Gin@base-\Gin@page.\a:PdfConvert}%
% test for existence of the converted file
- \openin15=\svg:filename\relax
+ \openin15={\svg:filename}\relax
\ifeof15
\Needs{\b:PdfConvert}%
\fi