Hi Karl,


1) I'm afraid I don't really understand tex4ht file derivation, despite
Deimi's best efforts to explain.

Frankly speaking I cannot say that I understand it completely too :)

3) It sure would be nice to have complete auto-generated dependencies,
as we were discussing some time ago. Maybe someday ...

My attempt to have generated dependencies is on a github repo:
https://github.com/dgalcius/tex4ht-dev.

What I tried to achieve:

-1-  separate generation of code (4ht,htf, etc,)  and of documentation.


4ht $(tex4ht-4ht_derived): tex4ht-4ht.tex $(tex4ht-4ht_deps)
    tex $(tex_opts) $<

4ht-doc $(tex4ht-4ht_doc): $(tex4ht-4ht_deps)
    $(HTTEX) $<

This is a rough template that I follow: for each seeded source tex file (foo.tex)
I put two phony targets  "foo" and "foo-doc". In general it is much faster to generated
code related files (4ht,htf,etc) than documentation and in most cases I want to generate code files only.


-2- For each source tex file to have a .d  (dependency) file which is generated programmatically.
e.g.
tex4ht-c.tex  <=> tex4ht-c.d;  tex4ht-html4.tex <=> tex4ht-html.d, etc.

tex4ht-c.d:
define tex4ht-c_derived
 tex4ht.c\
endef

# deps files list from tex4ht-c.fls.
define tex4ht-c_deps
 tex4ht-c.tex\
 common.tex\
 tex4ht.sty\
 tex4ht.4ht\
 html4.4ht\
 html4-math.4ht\
 plain.4ht\
 dratex.4ht\
 th4.4ht\
 ProTex.sty\
 AlProTex.sty\
 tex4ht-cpright.tex\
endef

# set main html file
define tex4ht-c_doc
 html.dir/tex4ht-c/tex4ht-c.html

endef


.d file defines 3 variables: foo_derived (derived files list), foo_deps (dependency files list), and foo_doc (main html file).

To remake all .d files I run: $ make d;
To remake one .d file I run: $ make foo.dd;
Note double "d" in case of one file. (Should I explain why not foo.d?)

-3-  Different rules apply for .d file generation (code vs htf vs jar), so I set some awk scripts in extra_bin/ folder:
  - fls2d  - processing fls. This is used for .4ht files
  - flslg2d - processing fls and lg files. This is used for .htf  files
  - jar2d - processing jar file

.fls file is the one obtained by specifying -recorder option latex/tex run.

*********************************************************
I went through every target that generate code removing circular dependencies in particular
 and I consider this part more or less finished.  What I did not look into is an
update
target.

I do not know if this approach of generating .d files is good and robust(!) enough.

Beware!! my github repo is out of sync with svn repo for at least six month.


Any suggestions, comments are welcome!

best regards,
 -- deimi








Reply via email to