summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-16 20:45:27 +0000
committerKarl Berry <karl@freefriends.org>2023-10-16 20:45:27 +0000
commit849fe44f91d4ffdf3d8919c4622598712d45bb39 (patch)
treeb3f95859cc06458b17755b203bfbc5ee44a0ba9c /Master/texmf-dist/source/generic
parentf6d220d6845de4aa9f95f90d45b3d4881a58d187 (diff)
changepage package, tex4ht r1392; pdf/eps filenames with spaces, tex4ht r1393; declare \Hy@PageAnchorSlide, tex4ht r1394
git-svn-id: svn://tug.org/texlive/trunk@68570 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog26
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex3
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex44
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-c.tex17
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-cond4ht.tex6
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex21
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex6
7 files changed, 108 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index f07dcd774f8..c19010df419 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
index 9fe2c3216a6..67c9ab6e135 100644
--- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 7c441dad277..53ca499d287 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 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/Master/texmf-dist/source/generic/tex4ht/tex4ht-c.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-c.tex
index 7eda7724a3c..77bc0a7a1e3 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-c.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-cond4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-cond4ht.tex
index f768f2e77d9..9d7ab61000d 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-cond4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
index ae6efcef89e..5d5e52f60d2 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
index 6fa41d66336..5fd530f49b8 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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