[tex4ht] debugging tex4ht bootstrap
Deimantas Galcius
deimi at vtex.lt
Fri Jul 22 10:04:40 CEST 2016
Hi Karl,
(1)
Here is a patch. Hopefully it fixes
compilation failure on first run.
Literate sources are quite complex; not so easy to grasp.
Your lengthy note on \CleanComment in common-info.tex
was really useful, - thanks.
I tested:
$> make info4ht.4ht
$> make infomml.4ht
$> xhlatex tex4ht-info.tex "html,3,sections+"
$> htlatex tex4ht-info-mml.tex "html,sections+"
and
$> make clean
$> make all
It seems that problems with tex4ht-options.tex
are gone too.
$> make tex4ht.ht
$> mk4ht xhlatex tex4ht-options.tex </dev/null
However note that
$>xhlatex tex4ht-info.tex
will fail. It supposed to be
$> xhlatex tex4ht-info.tex "html,3,sections+"
as is in Makefile.
Option "html" is important here, I think.
How do I test if there are no side effects in the generated output files?
(2)
For debugging, I found that making xhlatex (and htlatex) be
#!/bin/sh -e was helpful, since then it stopped after the first (failed) run.
This is very useful. I wonder if it is not a case to put it in a mainstream, not just for debugging.
Consider $> xhlatex foo (foo.tex is non-existent);
I have to type 'x' 3 times to exit latex and then still tex4ht and t4ht is run.
With "-e" xhlatex exists nicely upon first 'x'.
(3)
There also seems to be a mutual dependency problem wrt tex4ht-4ht.tex
and tex4ht-cond4ht.tex. The former creates mktex4ht.cnf and then
\input's cond4ht.4ht. But to make cond4ht.4ht, mktex4ht.cnf needs to
already exist.
yes, it is. tex4ht-4ht has over 130 derived files.
Setting properly tex4ht_4ht_derived files, Makefile issues that "mktex4ht.cnf (and/or some other)"
has two different recipes.
One option I can thing of is combining recipes. (though i am not quite sure if it is right thing to do):
That would be something like this in Makefile:
$(tex4ht_4ht_derived) $(tex4ht_cond4ht_derived): tex4ht-4ht.tex tex4ht-cond4ht.tex $(common)
tex $(tex_opts) $<
tex $(tex_opts) tex4ht-cond4ht
tex $(tex_opts) cond4ht.4ht
tex $(tex_opts) $<
tex $(tex_opts) $<
(4) From Makefile:
tex4ht_4ht_derived = \
algorithmic.4ht biblatex.4ht book.4ht frenchb.4ht \
geometry.4ht graphicx.4ht hyperref.4ht latex.4ht lettrine.4ht listings.4ht \
memoir.4ht multicol.4ht quoting.4ht reading.4ht \
scrartcl.4ht scrbook.4ht scrreprt.4ht spanish.4ht subscript.4ht \
titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht
# xx and many, many more.
There are a lot of derived files from tex4ht-4ht.tex.
Probably I would set them programatically rather than manually.
Something like this (in Makefile):
tex4ht_4ht_derived := $(shell cat tex4ht-4ht.derived)
tex4ht-4ht.derived: tex4ht-4ht.fls
grep -v $* $< | awk '/OUTPUT/ {print $$2}' > $@
The idea is to filter FLS file for line with "OUTPUT" rejecting tex4ht-4ht.*
Fls file is created with " -recorder" for latex.
tex_opts = --interaction=nonstopmode -recorder #--file-line-error
(5)
Having a reproducible environment would
be so great. (E.g., be able to do a checkout and type "make" and it
just works ...)
I understand. Fixing (xh)latex compilation failures is an important step,
but not the only one, i believe. What would be a TODO list for having a
reproducible environment?:
- fix (ht)latex compilation errors (hopefully the patch fixes this)
- fix mutual dependency problem tex4ht-4ht.tex and tex4ht-cond4ht.tex
- ...
Perhaps you have some other TODO items or things that do not work...
(6)
In common-info.tex file I read:
If you modify this program, changing the
version identification would be appreciated.
I cannot find the version identification in this file.
What I supposed to do?
Kind regards, and sorry for a lengthy message
-- deimi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-common-info.diff
Type: text/x-patch
Size: 5495 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20160722/24ba7f8f/attachment.bin>
More information about the tex4ht
mailing list