[tex4ht-commits] [SCM] tex4ht updated: r931 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Thu May 6 21:18:21 CEST 2021
Author: michal_h21
Date: 2021-05-06 19:18:21 +0000 (Thu, 06 May 2021)
New Revision: 931
Modified:
trunk/lit/ChangeLog
trunk/lit/mktex4ht-cnf.tex
trunk/lit/tex4ht-4ht.tex
Log:
Added support for fontawesome package
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-05-06 15:37:55 UTC (rev 930)
+++ trunk/lit/ChangeLog 2021-05-06 19:18:21 UTC (rev 931)
@@ -1,6 +1,9 @@
2021-05-06 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (menukeys.4ht): use \Picture* for menukey images.
+ * tex4ht-4ht.tex (fontawesome5.4ht, fontawesome5-hooks.4ht,
+ fontawesome5-utex-helper-hooks.4ht): added support for Fontawesome5
+ package.
2021-05-04 Michal Hoftich <michal.h21 at gmail.com>
Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex 2021-05-06 15:37:55 UTC (rev 930)
+++ trunk/lit/mktex4ht-cnf.tex 2021-05-06 19:18:21 UTC (rev 931)
@@ -359,4 +359,5 @@
\AddFile{9}{menukeys}
\AddFile{9}{animate}
\AddFile{9}{sectionbreak}
+\AddFile{9}{fontawesome5}
% \AddFile{9}{mktex4ht}
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2021-05-06 15:37:55 UTC (rev 930)
+++ trunk/lit/tex4ht-4ht.tex 2021-05-06 19:18:21 UTC (rev 931)
@@ -3796,7 +3796,69 @@
\:dontusepackage{newcomputermodern}
>>> \AddFile{9}{newcomputermodern-hooks}
+\<add to usepackage\><<<
+\Configure{PackageHooks}{newcomputermodern.sty}{newcomputermodern-hooks.4ht}
+>>>
+
%%%%%%%%%%%%%%%%%
+\Section{fontawesome}
+%%%%%%%%%%%%%%%%%
+
+We need to prevent use of OpenType fonts with Fontawesome5 package.
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{fontawesome5-utex-helper.sty}%
+{fontawesome5-utex-helper-hooks.4ht}
+\Configure{PackageHooks}{fontawesome5.sty}{fontawesome5-hooks.4ht}
+>>>
+
+This file prevents loading of OpenType fonts that are loaded automatically
+when LuaLaTeX or XeLaTeX are used. It loads Type 1 fonts instead.
+
+\<fontawesome5-utex-helper-hooks.4ht\><<<
+% fontawesome5-utex-helper-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2021 TeX Users Group
+|<TeX4ht license text|>
+\:dontusepackage{fontawesome5-utex-helper}
+\RequirePackage{fontawesome5-generic-helper}
+\endinput
+>>> \AddFile{9}{fontawesome5-utex-helper-hooks}
+
+It seems that catcode of : character is wrongly set after end of this package
+when we use package hooks. It is probably because of some Expl3 catcode
+checks. We need to reset the catcode manually.
+
+\<fontawesome5-hooks.4ht\><<<
+% fontawesome5-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2021 TeX Users Group
+|<TeX4ht license text|>
+\:AtEndOfPackage{\catcode`\:=12}
+\endinput
+>>> \AddFile{9}{fontawesome5-hooks}
+
+Finally, we can provide some configuration for Fontawesome itself. It turns all
+icons to pictures by TeX4ht conversion.
+
+\<fontawesome5.4ht\><<<
+% fontawesome5.4ht (|version), generated from |jobname.tex
+% Copyright 2021 TeX Users Group
+\NewConfigure{fontawesome}{2}
+\ExplSyntaxOn
+\cs_new_protected:Nn\temp:nn{%
+\a:fontawesome%
+\o:fontawesome_use_icon:nn:{#1}{#2}
+\b:fontawesome}
+
+\HLet\fontawesome_use_icon:nn\temp:nn
+\ExplSyntaxOff
+\Configure{fontawesome}{\Picture+{}}{\EndPicture}
+\Hinput{fontawesome5}
+\endinput
+>>> \AddFile{9}{fontawesome5}
+
+
+
+%%%%%%%%%%%%%%%%%
\Section{biblatex}
%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list.