texlive[62744] Master/texmf-dist: titlesec sectioning, unicode-math

commits+karl at tug.org commits+karl at tug.org
Wed Mar 16 22:32:29 CET 2022


Revision: 62744
          http://tug.org/svn/texlive?view=revision&revision=62744
Author:   karl
Date:     2022-03-16 22:32:28 +0100 (Wed, 16 Mar 2022)
Log Message:
-----------
titlesec sectioning, unicode-math catcodes, tex4ht r1090

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1090

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-03-16 21:02:08 UTC (rev 62743)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-03-16 21:32:28 UTC (rev 62744)
@@ -1,3 +1,12 @@
+2022-03-16  Michal Hoftich  <michal.h21 at 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 at gmail.com>
 
 	* tex4ht-4ht.tex (unicode-math-hooks.4ht): don't load Fontspec if it

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-03-16 21:02:08 UTC (rev 62743)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-03-16 21:32:28 UTC (rev 62744)
@@ -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 @@
 \def\ttl at 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 @@
 % 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}
 

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht	2022-03-16 21:32:28 UTC (rev 62744)
@@ -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
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/titlesec-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht	2022-03-16 21:02:08 UTC (rev 62743)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/unicode-math-hooks.4ht	2022-03-16 21:32:28 UTC (rev 62744)
@@ -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
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-03-16 21:02:08 UTC (rev 62743)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-03-16 21:32:28 UTC (rev 62744)
@@ -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}



More information about the tex-live-commits mailing list.