texlive[63597] Master/texmf-dist: ctexart support, tex4ht r1149

commits+karl at tug.org commits+karl at tug.org
Tue Jun 14 23:22:29 CEST 2022


Revision: 63597
          http://tug.org/svn/texlive?view=revision&revision=63597
Author:   karl
Date:     2022-06-14 23:22:29 +0200 (Tue, 14 Jun 2022)
Log Message:
-----------
ctexart support, tex4ht r1149

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

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
    trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/update-htfonts
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

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

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,3 +1,17 @@
+2022-06-14  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht-tex (usepackage.4ht, ctexart-hooks.4ht, ctexart.4ht):
+	added support for the Ctexart class.
+	https://tex.stackexchange.com/a/647738/2891
+
+2022-06-13  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-fonts-cjk-utf8.tex (
+	./tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/cjk/utf8/unisong*.htf
+	): renamed utf8song*.htf to unisong*.htf, as the upstream fonts were
+	renamed.
+	https://tex.stackexchange.com/q/647557/2891
+
 2022-06-10  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-jats.tex (jats.4ht): added basic formatting support for

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/Makefile	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/Makefile	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,4 +1,4 @@
-# $Id: Makefile 1141 2022-06-01 21:43:42Z karl $
+# $Id: Makefile 1148 2022-06-13 20:58:49Z michal_h21 $
 # This file is public domain.  Originally written 2010, Karl Berry.
 # Assumes GNU make.
 
@@ -115,7 +115,7 @@
   reading.4ht \
   scrartcl.4ht scrbook.4ht scrreprt.4ht scrjura.4ht sectionbreak.4ht \
     skak.4ht spanish.4ht subscript.4ht svg.4ht \
-  tabu.4ht tcolorbox.4ht titlesec.4ht tocloft.4ht \
+  tabu.4ht tcolorbox.4ht texpower.4ht titlesec.4ht tocloft.4ht \
     tuenc-luatex.4ht tuenc-xetex.4ht \
     tugboat.4ht \
   usepackage.4ht usepackage-fontspec.4ht \
@@ -147,7 +147,7 @@
 
 derived += $(tex4ht_fonts_cjk_utf8_derived)
 tex4ht_fonts_cjk_utf8_derived = \
-  $(ht_fonts_devdir)/unicode/cjk/utf8/utf8songa0.htf
+  $(ht_fonts_devdir)/unicode/cjk/utf8/unisonga0.htf
 
 # noncjk.tex \input's modern, but seems more maintainable
 # to have separate lists.

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1135 2022-05-19 15:28:47Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1149 2022-06-14 15:04:29Z michal_h21 $
 % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
 % Read by tex4ht-cond4ht.
 %
@@ -353,6 +353,7 @@
 \AddFile{9}{magyar}
 \AddFile{9}{exam}
 \AddFile{9}{ctex}
+\AddFile{9}{ctexart}
 \AddFile{9}{polyglossia}
 \AddFile{9}{gloss-french}
 \AddFile{9}{fontspec}

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1145 2022-06-09 10:45:16Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1149 2022-06-14 15:04:29Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2022 TeX Users Group    
@@ -4327,6 +4327,63 @@
 >>> \AddFile{9}{ctex}
 
 %%%%%%%%%%%%%%%%%
+\Section{ctexart}
+%%%%%%%%%%%%%%%%%
+
+This is a class relatex to Ctex. It fails with a fatal error 
+with LuaTeX and XeTeX, so we need to suppress lot of it's behavior.
+
+We need to use the LaTeX hook mechanism to load the patch file
+before the class itself.
+
+\<add to usepackage\><<<
+\AddToHook{class/ctexart/before}{\input{ctexart-hooks.4ht}}
+>>>
+
+\<ctexart-hooks.4ht\><<<
+% ctexart-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2022 TeX Users Group
+|<TeX4ht license text|>
+\ExplSyntaxOn
+
+% prevent multiple execution of this file
+\ifdefined\l_save_engine_str\endinput\fi
+\str_new:N \l_save_engine_str 
+% stop processing if the engine is pdftex, we want to change processing only for LuaTeX
+\def\l_save_engine_str{pdftex}
+\str_if_eq:NNTF \c_sys_engine_str\l_save_engine_str{\ExplSyntaxOff\endinput}{}
+
+% the luatexja package causes fatal error
+\:dontusepackage{luatexja}
+
+% fix compilation errors 
+\AddToHook{package/ctexhook/after}{
+  % don't let ctex to insert any files
+  \cs_set:Npn \ctex_file_input:n #1{}
+  % define some macros that are declared in the input files, and which are needed in the class
+  \cs_set:Npn \ctex_add_to_selectfont:n #1{}
+  \dim_new:N \ccwd
+  \skip_new:N \l__ctex_ccglue_skip
+  \cs_set_protected:Npn \ctex_update_em_unit:
+  { \dim_set:Nn \ccwd { \f at size \p@ } }
+  \cs_set_protected:Npn \ctex_update_ccglue: {}
+}
+
+\ExplSyntaxOff
+\endinput
+>>> \AddFile{9}{ctexart-hooks}
+
+Add dummy .4ht file. We may use it in the future.
+
+\<ctexart.4ht\><<<
+% ctexart.4ht (|version), generated from |jobname.tex
+% Copyright 2022 TeX Users Group
+|<TeX4ht license text|>
+\Hinput{ctexart}
+\endinput
+>>> \AddFile{9}{ctexart}
+
+%%%%%%%%%%%%%%%%%
 \Section{polyglossia}
 %%%%%%%%%%%%%%%%%
 

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/update-htfonts
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/update-htfonts	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/update-htfonts	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: update-htfonts 1093 2022-03-20 16:15:35Z karl $
+# $Id: update-htfonts 1141 2022-06-01 21:43:42Z karl $
 # Public domain. Originally written by Karl Berry, 2022.
 
 # don't bother with real option parsing.
@@ -83,7 +83,7 @@
 #
 find "$devdir" -type f -print | sort | while read devf; do
   instf=`echo "$devf" | sed "s,^$devdir/,$instdir/,"`
-  echo "$devf" | grep OpenSans >/dev/null &&
+  #echo "$devf" | grep ec-mlm >/dev/null &&
   #$verbose && echo "considering $devf -> $instf"
   
   if test -r "$instf"; then

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart-hooks.4ht	2022-06-14 21:22:29 UTC (rev 63597)
@@ -0,0 +1,48 @@
+% ctexart-hooks.4ht (2022-06-14-13:41), 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-06-14-13:41}
+
+\ExplSyntaxOn
+
+% prevent multiple execution of this file
+\ifdefined\l_save_engine_str\endinput\fi
+\str_new:N \l_save_engine_str
+% stop processing if the engine is pdftex, we want to change processing only for LuaTeX
+\def\l_save_engine_str{pdftex}
+\str_if_eq:NNTF \c_sys_engine_str\l_save_engine_str{\ExplSyntaxOff\endinput}{}
+
+% the luatexja package causes fatal error
+\:dontusepackage{luatexja}
+
+% fix compilation errors
+\AddToHook{package/ctexhook/after}{
+  % don't let ctex to insert any files
+  \cs_set:Npn \ctex_file_input:n #1{}
+  % define some macros that are declared in the input files, and which are needed in the class
+  \cs_set:Npn \ctex_add_to_selectfont:n #1{}
+  \dim_new:N \ccwd
+  \skip_new:N \l__ctex_ccglue_skip
+  \cs_set_protected:Npn \ctex_update_em_unit:
+  { \dim_set:Nn \ccwd { \f at size \p@ } }
+  \cs_set_protected:Npn \ctex_update_ccglue: {}
+}
+
+\ExplSyntaxOff
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart.4ht	2022-06-14 21:22:29 UTC (rev 63597)
@@ -0,0 +1,23 @@
+% ctexart.4ht (2022-06-14-13:41), 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-06-14-13:41}
+
+\Hinput{ctexart}
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/ctexart.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-06-14 20:23:04 UTC (rev 63596)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-06-14 21:22:29 UTC (rev 63597)
@@ -1,4 +1,4 @@
-% usepackage.4ht (2022-03-16-14:13), generated from tex4ht-4ht.tex
+% usepackage.4ht (2022-06-14-13:41), 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-03-16-14:13}
+\immediate\write-1{version 2022-06-14-13:41}
 
    \def\:temp{tex4ht}\ifx \:temp\@currname
    \:warning{\string\usepackage{tex4ht} again?}
@@ -58,6 +58,7 @@
 \Configure{PackageHooks}{xeCJK.sty}{xecjk-hooks.4ht}
 \Configure{PackageHooks}{unicode-math.sty}{unicode-math-hooks.4ht}
 \Configure{PackageHooks}{ctex.sty}{ctex-hooks.4ht}
+\AddToHook{class/ctexart/before}{\input{ctexart-hooks.4ht}}
 \Configure{PackageHooks}{polyglossia.sty}{polyglossia-hooks.4ht}
 \Configure{PackageHooks}{fontspec.sty}{fontspec-hooks.4ht}
 \Configure{PackageHooks}{tikz.sty}{tikz-hooks.4ht}



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