Re: [tex4ht] dependencies, new and incomplete

2017-05-05 Thread Deimantas Galcius

  
  
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 
  
  
  
  
  
  
  


  




Re: [tex4ht] dependencies, new and incomplete

2017-05-05 Thread Michal Hoftich
Hi Karl,

I've just added basic support for skak package, so I could test
whether the html4.4ht contains configurations for skak.4ht. It doesn't
:


>
> 2) Nevertheless, by grepping the logs, I see that nearly everything
> depends on mktex4ht.4ht and tex4ht.sty. I just added those as common
> dependencies (except for the files which generate them). Hope it helps
> and doesn't break anything. Easy enough to revert/tweak, of course.

I  think that this change causes massive recompilations even after
minor changes. I think better solution could be to compile the seeding
files (tex4ht-html4.tex and so on) twice when they were changed.

Best regards,
Michal


Re: [tex4ht] [bug #217] Errors using mdframed and framed packages with tex4ht

2017-05-05 Thread Michal Hoftich
I am sorry, I sent the previous mail before it was done, here  is  the
continuation:
>
> Thanks for the clarification. So I think best thing to do is to
> compile every hook seeding files (tex4ht-html4.tex,
> tex4ht-ooffice.tex, etc.) twice. The other question is, whether they
> should depend

The other question is, whether they should depend on mktex4ht.4ht in
the Makefile, because this causes massive recompilation of huge number
of files. I think they should be recompiled only when they are
modified.
Best regards,
Michal


Re: [tex4ht] [bug #217] Errors using mdframed and framed packages with tex4ht

2017-05-05 Thread Michal Hoftich
Hi Deimi,

On Thu, May 4, 2017 at 10:25 PM, Deimantas Galcius
 wrote:
> Hi Michal,
>
> If I recall it right:
>
> 1. when you introduce a new entry to mktex4ht-cnf.tex file, you need to 
> process it
> in order to get '\lit{}' record in
> mktex4ht.4ht file.
>
> 2.  you need to process tex4ht-html4.tex file twice if auxiliary files are 
> deleted
> (.xref, .aux, etc). This is  (probably)  also the case when dependency files 
> are changed.

Thanks for the clarification. So I think best thing to do is to
compile every hook seeding files (tex4ht-html4.tex,
tex4ht-ooffice.tex, etc.) twice. The other question is, whether they
should depend