summaryrefslogtreecommitdiff
path: root/support/TeX4ht
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-18 03:01:39 +0000
committerNorbert Preining <norbert@preining.info>2022-03-18 03:01:39 +0000
commita892f739b50b6ddc5321c834017cdcbc42a3f056 (patch)
treeea36345421ed45471d9ec79ff9288cbc9437a718 /support/TeX4ht
parent8208f204439f3a899e43187857e3f9c86d4ebb7c (diff)
CTAN sync 202203180301
Diffstat (limited to 'support/TeX4ht')
-rw-r--r--support/TeX4ht/source/ChangeLog9
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex36
2 files changed, 44 insertions, 1 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 9525e920e5..5df67b6fc0 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,12 @@
+2022-03-16 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (unicode-math-hooks.4ht): reset catcodes after
+ \RequirePackage.
+
+ * tex4ht-4ht.tex (titlesec-hooks.4ht, usepackage.4ht): revert
+ patching of sectioning commands by Titlesec.
+ https://tex.stackexchange.com/q/637314/2891
+
2022-03-15 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (unicode-math-hooks.4ht): don't load Fontspec if it
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 5bad77a00c..c949a120c6 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1089 2022-03-15 15:14:50Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1090 2022-03-16 14:38:50Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2022 TeX Users Group
@@ -924,6 +924,38 @@ so we just disable it's TOC handling.
\def\ttl@addcontentsline#1#2{\nobreak}
>>>
+I've found that it is probably best to save definitions of sectioning commands before Titlesec
+is loaded, and then load the saved versions back to the original commands.
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{titlesec.sty}{titlesec-hooks.4ht}
+>>>
+
+\<titlesec-hooks.4ht\><<<
+% titlesec-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2022 TeX Users Group
+|<TeX4ht license text|>
+|<titlesec-packagehooks|>
+\endinput
+>>> \AddFile{9}{titlesec-hooks}
+
+\<titlesec-packagehooks\><<<
+\let\ttl:chapter\chapter
+\let\ttl:section\section
+\let\ttl:subsection\subsection
+\let\ttl:subsubsection\subsubsection
+\let\ttl:paragraph\paragraph
+\let\ttl:subparagraph\subparagraph
+\:AtEndOfPackage{
+ \let\chapter\ttl:chapter
+ \let\section\ttl:section
+ \let\subsection\ttl:subsection
+ \let\subsubsection\ttl:subsubsection
+ \let\paragraph\ttl:paragraph
+ \let\subparagraph\ttl:subparagraph
+}
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Scientific Word}
@@ -4169,9 +4201,11 @@ document.
% Copyright 2021-2022 TeX Users Group
|<TeX4ht license text|>
\:dontusepackage{unicode-math}
+\TivhTcats% we need to reset catcodes for : and @ before \RequirePackage
\@ifpackageloaded{fontspec}{}
{\RequirePackage{fontspec}} % it is loaded by unicode-math
\NewDocumentCommand \setmathfont { O{} m O{} }{}
+\catcode`\:=11\makeatletter
\endinput
>>> \AddFile{9}{unicode-math-hooks}