summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-23 21:58:54 +0000
committerKarl Berry <karl@freefriends.org>2024-01-23 21:58:54 +0000
commit658f190359e3f1d5023e9d61ebfaddecb4ea41d8 (patch)
tree5a77e541731c361f2b62865710b51ea2885a696d /Master/texmf-dist/source/generic
parent9e5e57a40ed20d36034d87d882b8e0ad3bf7e6f9 (diff)
protect :writetoc, tex4ht r1451
git-svn-id: svn://tug.org/texlive/trunk@69567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog6
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex17
2 files changed, 21 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index eee6684fc10..2d9c40eaf8f 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-23 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-sty.tex (tex4ht.sty): introduced \protected:edef as a
+ variant of \protected@edef, and used it in section definitions.
+ https://tex.stackexchange.com/q/707714/2891
+
2024-01-22 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-docbook.tex (docbook.4ht): print reference number in the
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
index e8464d47b1e..34435a78243 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 1424 2023-12-14 09:55:08Z michal_h21 $
+% $Id: tex4ht-sty.tex 1451 2024-01-23 14:16:56Z michal_h21 $
% tex tex4ht-sty or ht tex tex4ht-sty
%
% Copyright 2009-2022 TeX Users Group
@@ -5252,7 +5252,7 @@ when the command is encountered.
\escapechar=`\\%
\protect:wrtoc
\csname Modify#1ToToc\endcsname
-\edef\:writetoc{\csname if:toc\endcsname{\the\:tokwrite
+\protected:edef\:writetoc{\csname if:toc\endcsname{\the\:tokwrite
{\string\doTocEntry
\string\toc \expandafter\ifx\csname toToc:#1\endcsname\relax #1\else
\csname toToc:#1\endcsname\fi
@@ -11132,6 +11132,19 @@ titles of sections are referenced.
LaTeX has \`'\def\@unexpandable@protect{\noexpand\protect\noexpand}' to be included in immediate defines.
+This is a variant of \`'\protected@edef' from LaTeX. We cannot use it directly here, so I've made a copy.
+
+\<html utilities\><<<
+\def\:unexpand:protect{\noexpand\protect\noexpand}
+\def\:restore:protect{\let\protect\orig:protect}
+\def\protected:edef{%
+ \let\:orig:protect\protect%
+ \let\protect\:unexpand:protect%
+ \afterassignment\:restore:protect%
+ \edef%
+}
+
+>>>
\Section{Tags}