[tex4ht] TeX4ht upgrading: doesn't work

Michal Hoftich michal.h21 at gmail.com
Wed Mar 20 13:58:04 CET 2013


Hi,
I think tex4ht can survive, but I see some areas in which it could, or
should be improved:

1. Documentation.

In particular, some documentation for macro package authors how to use
\NewConfigure, \Configure and various other TeX4ht macros. Also how to
write macros with inserting logical markup in mind. I think it is really
important to enable package authors to write proper configurations for
tex4ht themselves.

I would write something, but my writing and English skills are not so good,
so it would need some proofing. Maybe we could set up wiki or something
similar?

2. Font handling in tex4ht binary.

It doesn't support fonts selected with fontspec, which is really big
drawback. It also generates ugly code like

  <span class="cmr-10">č</span><span class="cmr-10">au</span>

when text contains accented letters.

It is possible to use luatex's node processing callbacks to catch tex4ht
special nodes and generate output files this way, I used this approach in
my failed attempt to insert page breaks from pdf file to html [1]. This
would be functional even with fontspec documents. Problem is that I don't
really understand all special codes, and tex4ht also generates generates
second dvi file containing only pages which should be converted to images.
I doubt this is possible with luatex.

3.  t4ht binary and tex4ht.env.

AFAIK, this application convert characters, math and illustrations to
images, resp.  call dvipng or dvips on dvi file created with tex4ht. It
also copies files to destination directory if needed, and it creates css
file.

Some problem I find is that if one uses \includegraphics{img/file.png} and
select output directory other than current dir, image is not copied to
outputdir/img/, but juts to outputdir. In html file, there is <img
src="img/file.png" />, so image is not displayed.

Other ugly thing is tex4ht.env syntax and the fact, that this file is
platform dependent. I think that t4ht and tex4ht.env could be replaced with
some lua script . I am probably going to do that in tex4ebook [2].

4. Document build process

Current scripts are also platform dependent and don't it is easy to add
support for tools like bibtex, biber, indexing tools, etc. Also option
passing like

     htlatex filename "xhtml, charset=utf-8" " -cunihtf -utf8"

if someone want xhtml file in utf8 encoding isn't pretty. Instead, if we
use lua again, we can use libraries like lapp [3] to support command line
options and create some simple DSL as simple make tool for bibtex, xindy,
etc. support. I am probably going to do something similar for tex4ebook.

Regards,
Michal


[1] https://github.com/michal-h21/realpgno
[2] https://github.com/michal-h21/tex4ebook
[3] http://lua-users.org/wiki/LappFramework

2013/3/19 Thompson,Paul <Paul.Thompson at sanfordhealth.org>

> Karl:
>
> What is the functional specification for tex4ht? Can it survive in its
> current form?
>
> This is a good example of one concern that I have (and probably you as
> well): the long-term viability of a system built on custom non-standard
> specifications by hundreds if not thousands of persons each doing boutique
> independent installation and development is simply not clear. Will LaTeX
> survive? LaTeX3 is going to possibly fix this, but I am totally confused by
> it (since I haven't really looked into it, it might be less confusing if I
> did).
> ________________________________________
> From: tex4ht [tex4ht-bounces at tug.org] on behalf of Karl Berry [
> karl at freefriends.org]
> Sent: Tuesday, March 19, 2013 4:26 PM
> To: celano at laposte.net
> Cc: tex4ht at tug.org
> Subject: Re: [tex4ht] TeX4ht upgrading: doesn't work
>
>     here are the instructions to upgrade tex4ht (
> http://tug.org/applications/tex4ht/mn-upgrade.html).
>
> Which Eitan wrote years ago, and it's not been touched since.  I guess I
> better eradicate that page.  Advising people to replace anything in
> /usr/bin is a terrible idea.  I have no specific idea why it fails, but
> I am not at all surprised it does, since it's replacing the
> distro-built binaries with others.
>
> In any event, tex4ht has not seen a full update since Eitan died.  (I
> should probably delete that .zip file too.)  CVR and I are still hoping
> that will happen at some point, but there is no ETA.  Meanwhile, some of
> the *.4ht, etc., files have been updated by CVR and you can get the
> current versions from TeX Live.  There have been no other substantive
> changes.
>
> Best,
> karl
> -----------------------------------------------------------------------
> Confidentiality Notice: This e-mail message, including any attachments,
> is for the sole use of the intended recipient(s) and may contain
> privileged and confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy
> all copies of the original message.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20130320/169915b6/attachment.html>


More information about the tex4ht mailing list