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

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Sun Sep 29 21:11:15 CEST 2019


Author: michal_h21
Date: 2019-09-29 22:11:15 +0300 (Sun, 29 Sep 2019)
New Revision: 609

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-cond4ht.tex
Log:
Use \InputFileIfExists in LaTeX to include the .4ht files

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2019-09-23 21:28:40 UTC (rev 608)
+++ trunk/lit/ChangeLog	2019-09-29 19:11:15 UTC (rev 609)
@@ -1,3 +1,11 @@
+2019-09-22 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-cond4ht.tex (cond4ht.4ht, docbook.4ht, html0.4ht, html32.4ht,
+	html4.4ht, mktex4ht.4ht, ooffice.4ht, ooimpress.4ht, tei.4ht): Use
+	\InputIfFileExists to include the package .4ht files. This should support
+	the \input at path.
+	https://tex.stackexchange.com/q/510155/2891
+
 2019-09-23  Karl Berry  <karl at freefriends.org>
 
 	* tex4ht-html4.tex: copyright 2019.

Modified: trunk/lit/tex4ht-cond4ht.tex
===================================================================
--- trunk/lit/tex4ht-cond4ht.tex	2019-09-23 21:28:40 UTC (rev 608)
+++ trunk/lit/tex4ht-cond4ht.tex	2019-09-29 19:11:15 UTC (rev 609)
@@ -325,6 +325,18 @@
 
 
 \<Hinclude latex lib\><<<
+\ifx\InputIfFileExists\UnDef%
+\def\input:if:fileexists#1#2#3{%
+   \openin15 #1.4ht%
+   \ifeof15%
+   #3%
+   \else%
+   \input #1%
+   \fi\closein15%
+}%
+\else
+\let\input:if:fileexists\InputIfFileExists%
+\fi%
 \Hinclude{\input #1.4ht}{fontmath}
 |<*.4ht out of order|>
 \def\h:input#1.#2.#3?<par del?>{%
@@ -333,16 +345,13 @@
    \else 
       \let\:temp\empty
       \no:dupl{#1}{%
-         \openin15 #1.4ht
-         \ifeof15
-            \:CheckOption{debug}\if:Option 
-               \:warning{No configuration file for
-                   #1.\if .#2.tex\else #2\fi}%
-            \fi
-            \let\:temp\empty
-         \else
-            \def\:temp{\input #1.4ht }%
-         \fi   \closein15
+        \def\:warn:msg{}
+        \:CheckOption{debug}\if:Option 
+          \def\:warn:msg{%
+            \:warning{No configuration file for #1.\if .#2.tex\else #2\fi}%
+          }
+        \fi%
+        \def\:temp{\input:if:fileexists{#1.4ht}{}{\:warn:msg}}%
        }%
    \fi  \:temp}
 \edef\:temp{\noexpand\Hinclude



More information about the tex4ht-commits mailing list