diff options
author | Karl Berry <karl@freefriends.org> | 2022-08-07 15:01:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-08-07 15:01:49 +0000 |
commit | b0af11bef3d449c8c15ca36805df03581c5f3472 (patch) | |
tree | 6c4384194bc43a519f3fbe29dc0a557199046660 /Master/texmf-dist/source/generic | |
parent | 9627da87843ba6d676b23edc330343ea2e219781 (diff) |
revert to original \% when TeX4ht does not compile literate sources
git-svn-id: svn://tug.org/texlive/trunk@64068 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
4 files changed, 36 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index c4f37f88ffc..60905beb60f 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,9 @@ +2022-08-04 Michal Hoftich <michal.h21@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@gmail.com> * tex4ht-mathml.tex (mathml.4ht): protect \sum etc., in order to diff --git a/Master/texmf-dist/source/generic/tex4ht/Makefile b/Master/texmf-dist/source/generic/tex4ht/Makefile index 01a6b62e903..825444558f8 100644 --- a/Master/texmf-dist/source/generic/tex4ht/Makefile +++ b/Master/texmf-dist/source/generic/tex4ht/Makefile @@ -856,6 +856,6 @@ 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 \ +croncheck: upm diff-all \ inst-check-copyright inst-check-files inst-check-version \ diff-htfonts diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index dbd0b1c60d6..c8533c2faf4 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 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 @@ The following protection, e.g., for titles of sections. \<latex ltplain\><<< |<plain,ltplain obeylines,oalign|> +|<ltplain percent|> >>> plain.tex and latex. @@ -1192,6 +1193,23 @@ xxxxxxxxxxxxxxxxxxxxx \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)} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex index 02b759ca684..4e64265ba4b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex @@ -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 @@ tags that in the meantime are created by the system. \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 >>> |