From 2af2b06164af15211ea6b0f0a38e8946fb5649ab Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 25 Nov 2022 21:42:40 +0000 Subject: indextools support, imakeidx fix, tex4ht r1251 git-svn-id: svn://tug.org/texlive/trunk@65105 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 9 ++++ .../source/generic/tex4ht/mktex4ht-cnf.tex | 3 +- .../source/generic/tex4ht/tex4ht-4ht.tex | 55 +++++++++++++++++++++- Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht | 6 +-- .../texmf-dist/tex/generic/tex4ht/indextools.4ht | 48 +++++++++++++++++++ 5 files changed, 115 insertions(+), 6 deletions(-) create mode 100644 Master/texmf-dist/tex/generic/tex4ht/indextools.4ht diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index a12dc4a966c..0730a3684ec 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,12 @@ +2022-11-25 Michal Hoftich + + * tex4ht-4ht.tex (imakeidx.4ht): fixed error in + \NewConfigure{makeindex}. + + * tex4ht-4ht.tex (indextools.4ht): added support for the Indextools + package. + https://github.com/michal-h21/tex4ebook/issues/95 + 2022-11-24 Michal Hoftich * tex4ht-fonts-noncjk.tex ( diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex index 6b5a059d661..7d3c09146e5 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 1249 2022-11-22 16:53:24Z michal_h21 $ +% $Id: mktex4ht-cnf.tex 1251 2022-11-25 14:09:11Z michal_h21 $ % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex. % Read by tex4ht-cond4ht. % @@ -261,6 +261,7 @@ \AddFile{7}{index} \AddFile{7}{multind} \AddFile{7}{imakeidx} +\AddFile{7}{indextools} \AddFile{9}{tugboat} \AddFile{9}{ltugboat} \AddFile{9}{ltugboat-a} diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index 9939950dab8..dbc95f32722 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 1249 2022-11-22 16:53:24Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1251 2022-11-25 14:09:11Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -31145,7 +31145,7 @@ destination to the idx file \HLet\imki@wrindexentrysplit\:temp \ifx \a:makeindex\:UnDef -\NewConfigure{makeindex}{}\Configure{makeindex}{} +\NewConfigure{makeindex}{1}\Configure{makeindex}{} \fi >>> @@ -31173,6 +31173,57 @@ needs a special treatment. d|\last:haddr >>> +%%%%%%%%%%%%%%%%%%%%%%%% +\SubSection{indextools.sty} +%%%%%%%%%%%%%%%%%%%%%%%% + +\<<< +% indextools.4ht (|version), generated from |jobname.tex +% Copyright 2022 TeX Users Group +| +| +| +| + +\Hinput{indextools} +\endinput +>>> \AddFile{7}{indextools} + + + + +Insert destinations for index items in text, and save the link to the .idx file + +\<<< +\def\:tempa[#1]#2{\html:addr% + \ifindtl@splitindex\else% with splitindex, we would get duplicate index entry destinations + \hbox{\Link-{}{dx\last:haddr}\EndLink}% + \expandafter\protected@write\csname#1@idxfile\endcsname{}% + {\string\beforeentry{\RefFileNumber\FileNumber}{dx\last:haddr}{\a:makeindex}}% + \fi% + \o:@index:[#1]{#2}% +} +\HLet\@index\:tempa% + +\ifx \a:makeindex\:UnDef + \NewConfigure{makeindex}{1}\Configure{makeindex}{} +\fi +>>> + +\<<< +\Configure{@begin}{theindex}{\ind:defs} +>>> + +\<<< +% disable redefiniton of \theindex in \AtBeginDocument +\indtl@originaltrue + +% prevent automatic compilation of the index +\let\KV@indtl@noautomaticfalse\KV@indtl@noautomatictrue +\KV@indtl@noautomatictrue +\indtl@disableautomatictrue +>>> + %%%%%%%%%%%%%%%%%%%%%%%% \Section{tugboat} %%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht b/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht index a30c2dbc6b8..572384b574a 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht @@ -1,4 +1,4 @@ -% imakeidx.4ht (2020-05-18-13:31), generated from tex4ht-4ht.tex +% imakeidx.4ht (2022-11-25-13:16), generated from tex4ht-4ht.tex % Copyright 2019 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 2020-05-18-13:31} +\immediate\write-1{version 2022-11-25-13:16} \def\:temp#1#2#3{\html:addr% @@ -30,7 +30,7 @@ \HLet\imki@wrindexentrysplit\:temp \ifx \a:makeindex\:UnDef -\NewConfigure{makeindex}{}\Configure{makeindex}{} +\NewConfigure{makeindex}{1}\Configure{makeindex}{} \fi \Configure{@begin}{theindex}{\ind:defs\imki@maybeaddtotoc} diff --git a/Master/texmf-dist/tex/generic/tex4ht/indextools.4ht b/Master/texmf-dist/tex/generic/tex4ht/indextools.4ht new file mode 100644 index 00000000000..75375481b60 --- /dev/null +++ b/Master/texmf-dist/tex/generic/tex4ht/indextools.4ht @@ -0,0 +1,48 @@ +% indextools.4ht (2022-11-25-13:16), generated from tex4ht-4ht.tex +% Copyright 2022 TeX Users Group +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any +% later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions +% of LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work +% is the TeX4ht Project . +% +% If you modify this program, changing the +% version identification would be appreciated. +\immediate\write-1{version 2022-11-25-13:16} + +\def\:tempa[#1]#2{\html:addr% + \ifindtl@splitindex\else% with splitindex, we would get duplicate index entry destinations + \hbox{\Link-{}{dx\last:haddr}\EndLink}% + \expandafter\protected@write\csname#1@idxfile\endcsname{}% + {\string\beforeentry{\RefFileNumber\FileNumber}{dx\last:haddr}{\a:makeindex}}% + \fi% + \o:@index:[#1]{#2}% +} +\HLet\@index\:tempa% + +\ifx \a:makeindex\:UnDef + \NewConfigure{makeindex}{1}\Configure{makeindex}{} +\fi + +\Configure{@begin}{theindex}{\ind:defs} + +% disable redefiniton of \theindex in \AtBeginDocument +\indtl@originaltrue + +% prevent automatic compilation of the index +\let\KV@indtl@noautomaticfalse\KV@indtl@noautomatictrue +\KV@indtl@noautomatictrue +\indtl@disableautomatictrue + + +\Hinput{indextools} +\endinput + -- cgit v1.2.3