[tex4ht-commits] [SCM] tex4ht updated: r771 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Mon Jul 13 21:59:26 CEST 2020


Author: michal_h21
Date: 2020-07-13 22:59:26 +0300 (Mon, 13 Jul 2020)
New Revision: 771

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
Log:
Added support for the ctex package

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2020-07-10 16:05:55 UTC (rev 770)
+++ trunk/lit/ChangeLog	2020-07-13 19:59:26 UTC (rev 771)
@@ -1,3 +1,9 @@
+2020-07-13 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (usepackage.4ht, ctex.4ht): added support for the
+	ctex package.
+	https://github.com/michal-h21/make4ht/issues/29
+
 2020-07-10 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-tei.tex (tei.4ht): declare encoding in <?xml ...>

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2020-07-10 16:05:55 UTC (rev 770)
+++ trunk/lit/mktex4ht-cnf.tex	2020-07-13 19:59:26 UTC (rev 771)
@@ -339,6 +339,7 @@
 \AddFile{9}{greek}
 \AddFile{9}{magyar}
 \AddFile{9}{exam}
+\AddFile{9}{ctex}
 \AddFile{9}{polyglossia}
 \AddFile{9}{fontspec}
 \AddFile{9}{fontspec-xetex}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2020-07-10 16:05:55 UTC (rev 770)
+++ trunk/lit/tex4ht-4ht.tex	2020-07-13 19:59:26 UTC (rev 771)
@@ -3720,6 +3720,53 @@
 >>>
 
 %%%%%%%%%%%%%%%%%
+\Section{ctex}
+%%%%%%%%%%%%%%%%%
+
+We need to pass some options to Ctex to prevent it from font loading.
+It is also necessary to take special care with LuaTeX, as it loads
+configuration file that caused TeX4ht to fail. We block this file 
+from loading.
+
+\<use package\><<<
+ctex,>>>
+
+
+\<add to usepackage\><<<
+\def\:temp{ctex}\ifx \@currname\:temp
+\PassOptionsToPackage{fontset=none,autoindent=false}{ctex}
+\ExplSyntaxOn
+\let\o:file_input\file_input:n% patch \file_input:n to block
+                              % ctex-engine-luatex.def from loading
+\xdef\ctex:luaname{\detokenize{ctex-engine-luatex.def}}
+\def\:tempa#1{%
+  \edef\:tempb{#1}%
+  \ifx\:tempb\ctex:luaname%
+  % this macro is defined in the blocked file, just add dummy definition
+  \cs_new_protected:Npn \ctex_add_to_selectfont:n ##1{}%
+  \else%
+  \o:file_input{#1}%
+  \fi%
+}
+\let\file_input:n\:tempa
+\:AtEndOfPackage{%
+\let\file_input:n\o:file_input
+}
+\ExplSyntaxOff
+\fi
+>>>
+
+Add dummy .4ht file. We may use it in the future.
+
+\<ctex.4ht\><<<
+% ctex.4ht (|version), generated from |jobname.tex
+% Copyright 2020 TeX Users Group
+|<TeX4ht license text|>
+\Hinput{ctex}
+\endinput
+>>> \AddFile{9}{ctex}
+
+%%%%%%%%%%%%%%%%%
 \Section{polyglossia}
 %%%%%%%%%%%%%%%%%
 



More information about the tex4ht-commits mailing list.