diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-16 21:32:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-16 21:32:28 +0000 |
commit | 53eaeb2b522c91386c8fd980978247b14d813afa (patch) | |
tree | 5ad60db16e31f780a43ce2ce6802af6204e0f8d5 | |
parent | edc4da5fa2ccf95dc2d8e78bd12c6532e6074098 (diff) |
titlesec sectioning, unicode-math catcodes, tex4ht r1090
git-svn-id: svn://tug.org/texlive/trunk@62744 c570f23f-e606-0410-a88d-b1316a301751
5 files changed, 88 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 9525e920e50..5df67b6fc01 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index 5bad77a00c5..c949a120c64 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 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} diff --git a/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht b/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht new file mode 100644 index 00000000000..59f7380baf7 --- /dev/null +++ b/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht @@ -0,0 +1,37 @@ +% titlesec-hooks.4ht (2022-03-16-14:13), generated from tex4ht-4ht.tex +% Copyright 2022 TeX Users Group +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any +% later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions +% of LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work +% is the TeX4ht Project <http://tug.org/tex4ht>. +% +% If you modify this program, changing the +% version identification would be appreciated. +\immediate\write-1{version 2022-03-16-14:13} + +\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 +} + +\endinput + diff --git a/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht b/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht index 8623309c9b5..484d972a10a 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht @@ -1,4 +1,4 @@ -% unicode-math-hooks.4ht (2022-03-15-13:25), generated from tex4ht-4ht.tex +% unicode-math-hooks.4ht (2022-03-16-14:13), generated from tex4ht-4ht.tex % Copyright 2021-2022 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,11 +16,13 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2022-03-15-13:25} +\immediate\write-1{version 2022-03-16-14:13} \: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 diff --git a/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht b/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht index c4cc5c514b9..5be22724c56 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht @@ -1,4 +1,4 @@ -% usepackage.4ht (2022-02-19-13:30), generated from tex4ht-4ht.tex +% usepackage.4ht (2022-03-16-14:13), generated from tex4ht-4ht.tex % Copyright 2003-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-02-19-13:30} +\immediate\write-1{version 2022-03-16-14:13} \def\:temp{tex4ht}\ifx \:temp\@currname \:warning{\string\usepackage{tex4ht} again?} @@ -40,6 +40,7 @@ \def\:temp##1!*?: {\input usepackage.4ht }% \else \let\:temp=\use:package \fi \fi \:temp} +\Configure{PackageHooks}{titlesec.sty}{titlesec-hooks.4ht} \Configure{PackageHooks}{biblatex-chicago.sty}{biblatex-chicago-hooks.4ht} \Configure{PackageHooks}{cleveref.sty}{cleveref-hooks.4ht} \Configure{PackageHooks}{xr.sty}{xr-hooks.4ht} |