My situation is like this. I have a LaTeX file that I want to compile with pdflatex and tex4ht, which includes a package in another directory.
The file bug.tex
contains:
\documentclass{article}
\usepackage{etoolbox}
\csdef{input@path}{{subdir/}}
\usepackage{mypackage}
\begin{document}
Test: \aaa.
\end{document}
The file subdir/mypackage.sty
contains:
\ProvidesPackage{mypackage}
\newcommand\aaa{AAA}
and the file subdir/mypackage.4ht
contains:
\renewcommand\aaa{BBB}
When I compile with pdflatex, I get Test: AAA.
in the output. But when I compile with make4ht, I still get Test: AAA.
instead of Test: BBB.
(When the package is in the working directory, it works as expected.)
This indicates to me that, when using tex4ht, the redefinition of input@path
occurs, but when including packages, tex4ht doesn't search it for .4ht
files.
Can anyone help me work around this?
Of course, you are probably thinking that I'm doing this wrong, and I should put the package in my texmf, or set $TEXINPUTS
correctly, and you would be right. But I have a complex project that I will need to share with colleagues who I can't expect to use make, so it would be much better if I can manage everything from within the tex files.