# using the "mouseover" option to htlatex gives error: "missing file xhtex":

I would like to use the mouseover option to htlatex, but it seems the file is missing from the texlive distribution. I have tried to find it, but it doesn't seem to exist anywhere any longer. Does anyone know where I can find this or have a replacement?

• Could you please post a minimal TeX file which shows this issue? Aug 2, 2017 at 7:47

It seems that mouseover option needs to postprocess generated file with xhtex command, which is Plain TeX variant of htlatex. This command isn't included in TeX Live, but it can be emulated using mk4ht xhtex instead.

Fortunately, mouseover option can be configured using various options:

--- Note --- Option mouseover' is powered by the overlib.js utility of Erik Bo
srup (http://www.bosrup.com/web/overlib/).
--------------------------------------

The option requires two compilations of the source file.

Use \Configure{mouseover-XXX}{...} to introduce extra arguments into the overli
b function call return overlib(...)'. XXX stands for cite', footnote', or 'g
loss'. The default body is at tex4ht.body, and the default caption at tex4ht.ca
ption. An empty parameter requests no sensitivity of the mouse for the specifie
d type of entries.

The variant \Configure{mouseover-XXX}[labels]{...} of the above command restric
ts the outcome just to the listed labels (i.e., the values listed in tex4ht.cap
tion).

The \Configure{mouseover-script}{variable-name} {javascript-code} command may b
e used to introduce code into the javascript file, as a content of a global var
iable when a name is given and as a bare code when the name is not given. To be
referenced, the name must be prefixed by tex4ht.'.

The \Configure{mouseover-vars}{XXX} {variable-list} command introduces local va
riables, to be referenced with the prefix tex4ht.' on their names. In additio
n, for each variable YYY it introduces a construct \moYYY{label}...\endmoYYY fo
r selecting a value for the variable at the specified label.

Example:
\Configure{mouseover-script}{var}{\relax \special {t4ht=<hr />}}
\Configure{mouseover-vars}{cite}{Author,Title}
\Configure{mouseover-cite} {tex4ht.body,CAPTION,tex4ht.caption+tex4ht.var,FULLH
TML}.
\moAuthor{bb}A name\endmoAuthor

The compilation indirectly invokes the command 'xhtex \jobname-js'. An alternat
ive format for the command can be requested within a configuration of the form
\Configure{mouseover-Needs}{\Needs{"..."}}. The default setting is due to \Conf
igure{mouseover-Needs}{\Needs{"xhtex \jobname-js"}}
In case \Configure{mouseover-Needs} is undefined, introduce the instruction \Ne
wConfigure{mouseover-Needs}{1} before that command.


From these options, mouseover-Needs seems most important, because it enables us to define different command for the post-processing. You can create a simple configuration file, mycfg.cfg:

\Preamble{xhtml,mouseover}
\Configure{mouseover-Needs}{\Needs{"mk4ht xhtex \jobname-js"}}
\begin{document}

\EndPreamble


You will also need to put overlib.js to the directory with your HTML files. You can then compile your file using:

make4ht -c mycfg.cfg filename.tex


Sample file:

\documentclass{article}

\begin{document}
Some text\footnote{this is a footnote}.
\end{document}


It will be rendered like this: