[tex4ht] consolidating all tex4ht configuration files into one standard file?

Michal Hoftich michal.h21 at gmail.com
Thu May 5 16:54:17 CEST 2016


Hi all,

On Wed, May 4, 2016 at 7:53 PM, Karl Berry <karl at freefriends.org> wrote:
>     The only thing I know about this, is that when using make4ht, then
>     the file texmf-dist/tex4ht/base/unix/tex4ht.env is not used/read
>     any more as would be the case when using htlatex directly. Which
>     is a good thing,
>
> Or, it's a bad thing, because now everything that was configured in
> tex4ht.env must also be configured in a second place.  That sounds
> impossible to maintain.  I'm sure Michal had good reasons, though.
> Michal?


No, it is used, user can only bypass the dvi to image conversion, so
you can easily choose dvipng or dvisvgm for instance. Other thing,
such as htf font locations or configurations for output formats still
work as usual.


> The interaction between Michal's new make4ht that you are using and the
> conventional scripts from Eitan has never been clear to me.

The difference is only that you can use other tools such as biber or
makeindex directly in the make4ht run, you can also select number of
compilation runs of TeX, modify the output files using Lua filters or
something like XSLT processors and also configure the DVI to image
conversion. But by default, all parameters are the same as using

    htlatex filename "xhtml"


Regarding configuration files, I was thinking about implementing
something like Pandoc's filters, like:

    make4ht -f html5+dvisvgm+makeindex+style=scholarly+mathjax=LaTeX filename

which would convert pictured to SVG using dvidvgm, run makeindex,
select configurations and CSS styles for Scholarly HTML and configure
math to be output untouched as LaTeX code, which would be rendered by
Mathjax. In my idea, it would be implemented as Lua plugins, which
would modify the make4ht compilation sequence and the custom config
file to include some helper packages with TeX4ht configurations.

The problem with XML configuration file is that there are incomplete
XML chunks in the configurations, so one possible way the XML could
look is


    <configure name="textit"><first><![CDATA[<em>]]</first><second><![CDATA[</em>]]</second></configure>


which isn't really nice and any better than the TeX configurations.
Not speaking that we often need to insert TeX code in the
configurations. But it is not a bad idea and I am sure that there must
be a better way ho to encode the configurations in XML or other
machine and human friendly format.

Anyway, if you want to be able to visually configure tex4ht, I think
that it shouldn't be hard to create static HTML page, where you could
choose styling and HTML elements for some sample document, and the
.cfg file could be then generated using Javascript.

Best regards,
Michal


More information about the tex4ht mailing list