diff options
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index dbd0b1c60d..c8533c2faf 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/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)} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |