texlive[64068] Master/texmf-dist: revert to original \% when TeX4ht
commits+karl at tug.org
commits+karl at tug.org
Sun Aug 7 17:01:49 CEST 2022
Revision: 64068
http://tug.org/svn/texlive?view=revision&revision=64068
Author: karl
Date: 2022-08-07 17:01:49 +0200 (Sun, 07 Aug 2022)
Log Message:
-----------
revert to original \% when TeX4ht does not compile literate sources
Modified Paths:
--------------
trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht
trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-08-07 15:01:49 UTC (rev 64068)
@@ -1,3 +1,9 @@
+2022-08-04 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (latex.4ht): revert to the original definition of
+ \% when TeX4ht doesn't compile literate sources.
+ https://tex.stackexchange.com/a/652950/2891
+
2022-07-26 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-mathml.tex (mathml.4ht): protect \sum etc., in order to
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/Makefile 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/Makefile 2022-08-07 15:01:49 UTC (rev 64068)
@@ -856,6 +856,6 @@
--ignore-matching-lines='write-1.version\|, generated from\|Copyright'
# run weekly by karl.
-croncheck: diff-all \
+croncheck: upm diff-all \
inst-check-copyright inst-check-files inst-check-version \
diff-htfonts
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2022-08-07 15:01:49 UTC (rev 64068)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1179 2022-07-25 20:40:57Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1181 2022-08-04 17:27:58Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2022 TeX Users Group
@@ -1142,6 +1142,7 @@
\<latex ltplain\><<<
|<plain,ltplain obeylines,oalign|>
+|<ltplain percent|>
>>>
plain.tex and latex.
@@ -1192,6 +1193,23 @@
\EndVerbatim\EndHPage{}]\fi
+
+
+The \''\%' command needs to be redefined for TeX4ht source files,
+but this redefinition causes compilation errors when it is used in
+titles or captions. So we redefine it to the original LaTeX
+definition. We can detect if we are in the literate sources by checking
+if the \''\MAKETITLE' command is defined.
+
+See \Link[https://tex.stackexchange.com/q/652848/2891]{}{}
+this question on TeX.sx for more details\EndLink.
+
+\<ltplain percent\><<<
+\ifdefined\MAKETITLE\else
+\chardef\%=`\%
+\fi
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{ltspace (Horizontal Spaces)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex 2022-08-07 15:01:49 UTC (rev 64068)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-sty.tex 1171 2022-07-05 21:29:31Z karl $
+% $Id: tex4ht-sty.tex 1181 2022-08-04 17:27:58Z michal_h21 $
% tex tex4ht-sty or ht tex tex4ht-sty
%
% Copyright 2009-2022 TeX Users Group
@@ -2224,6 +2224,15 @@
\catcode`\%|=12 \def\prcnt:ch{%} \catcode`\%|=14
>>>
+I don't know what this code is supposed to do, but it can produce
+fatal errors when \''\%' is used inside of title, captions or sections.
+See \Link[https://tex.stackexchange.com/q/652848/2891]{}{}
+this question on TeX.sx for an example\EndLink.
+
+But when I remove it, the compilation process of TeX4ht sources fails,
+so we will need to revert to the original version of the percent command
+probably in latex.4ht.
+
\<html utilities\><<<
\catcode`\%|=12 \def\%{%} \catcode`\%|=14
>>>
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht 2022-08-07 15:01:49 UTC (rev 64068)
@@ -1,4 +1,4 @@
-% latex.4ht (2022-07-16-13:22), generated from tex4ht-4ht.tex
+% latex.4ht (2022-08-07-07:59), generated from tex4ht-4ht.tex
% Copyright 1997-2009 Eitan M. Gurari
% Copyright 2009-2022 TeX Users Group
%
@@ -17,7 +17,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2022-07-16-13:22}
+\immediate\write-1{version 2022-08-07-07:59}
\ifx\SaveMkHalignConf:g\:UnDef \else \expandafter\endinput\fi
@@ -135,6 +135,10 @@
\HLet\oalign\:temp
\NewConfigure{oalign}{2}
+\ifdefined\MAKETITLE\else
+\chardef\%=`\%
+\fi
+
@@ -2314,7 +2318,7 @@
\expandafter\:temp\usepackage!*?:
\def\:tempa{\@latex at e@error}
\ifx \:temp\:tempa
- % latex209.4ht (2022-07-16-13:22), generated from tex4ht-4ht.tex
+ % latex209.4ht (2022-08-07-07:59), generated from tex4ht-4ht.tex
% Copyright 1997-2009 Eitan M. Gurari
% Copyright 2009-2022 TeX Users Group
%
@@ -2333,7 +2337,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2022-07-16-13:22}
+\immediate\write-1{version 2022-08-07-07:59}
\let\:fnsymbol\@fnsymbol
\def\@fnsymbol#1{{\hbox{$\:fnsymbol{#1}$}}}
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty 2022-08-06 23:42:52 UTC (rev 64067)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty 2022-08-07 15:01:49 UTC (rev 64068)
@@ -1,7 +1,7 @@
\ifnum\the\catcode`\%=14\else\expandafter\edef\csname
\string:RestoreCatcodes\endcsname{\catcode`\%\the
\catcode`\%}\catcode`\%14\fi
-% tex4ht.sty (2022-07-05-14:35), generated from tex4ht-sty.tex
+% tex4ht.sty (2022-08-07-07:59), generated from tex4ht-sty.tex
% Copyright 2009-2022 TeX Users Group
% Copyright 1996-2009 Eitan M. Gurari
%
@@ -20,7 +20,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2022-07-05-14:35}
+\immediate\write-1{version 2022-08-07-07:59}
\ifx \Preamble\UnDef \else
More information about the tex-live-commits
mailing list.