Sun Jul 17 19:43:55 2016, comment #8:
I've just download the changed sources and it seems that the latest commit causes lot of compilation errors, resp. compilation stops with emergency exit. Does it happen only on my machine?
|
Mon Jul 4 18:26:47 2016, comment #7:
i have (finally) uploaded a new protex release to CTAN.
i went ahead and enabled \CodeLineNo in tex4ht-4ht.tex, thus all *.4ht generated from there will have line numbers now. If it turns out to cause problems, we can disable it. (Michal, please be warned ...)
On the other hand, if nothing crops up soon, we could enable it in common code somewhere (I hope) so that all generated files have the line markers. I find it extremely useful!
Thanks again for doing the work, Deimi. -karl
|
Fri Jun 3 21:39:23 2016, comment #6:
perfect, thanks so much! i'll see if i can put together a new protex release, at least ...
|
Fri Jun 3 13:19:24 2016, comment #5:
Hi Karl.
here is a fix.
My changes are mark with "BOC" and "EOC" in ProTex.sty and AlProTex.sty.
I set an option "CodeLineNo" and a macro "\CodeLineNo".
The option is already activated in tex4ht-c.tex and tex4ht-t4ht.tex,
but not in other files. I put a comment in tex4ht-4ht.tex as an example how to enable line numbers.
thank you,
--deimi
(file #239)
|
Thu Jun 2 21:54:43 2016, comment #4:
hi deimi - thanks for the patch. agreed about protex. i've never imported protex into the tex4ht repository since we hadn't yet needed to make changes there. however, i see no problem in doing so.
what's on CTAN is current as far as i know. maybe you could work up the patch against that, send it here. i'll see about importing protex into our repo and making a release. unless someone else here would like to take that on ...
as for an option: for the C files, I see no need for an option.
but for the TeX-related .4ht and other files, it seems it would be prudent to be able to turn off line numbers at the beginning of a given tex4ht-*.tex literate file, since I can imagine the extra comments causing problems sometimes. we all know about TeX and input parsing ... thanks, k.
|
Thu Jun 2 07:55:14 2016, comment #3:
Hi Karl, quick patch is attached. The fix is in a separate file.
Probably it would be better to patch ProTex.sty directly.
Eventually I could introduce an option (e.g., "CodeLineNo") in ProTex.sty;
then to generate line numbers would be matter of a setup option:
e.g.,
\AlProTex{c,<<<>>>,`,title,list,[],ClearCode,_^,CodeLineNo}
instead of
\AlProTex{c,<<<>>>,`,title,list,[],ClearCode,_^}
The option could be applied for other kind of files (.4ht, .etc) too
(with a different line number format).
But ProTex.sty is not tracked in tex4ht repo. It's on CTAN.
If I submit changes to ProTex.sty on CTAN,
how would tex4ht repo get those changes?
I'm not sure if line numbers should always be in the output or
just under some switch when debugging/developing.
Definetely I'm ok with LPPL.
thank you,
--deimi
(file #238)
|
Wed Jun 1 22:58:09 2016, comment #2:
hi deimi - wow, that is great! the only (trivial) thing is that the strings should start with "#line ", rather than "// line". #line is what the C preprocessor recognizes.
Can you send me the changes you made to insert those?
(That is, assuming you're ok with them being distributed under the LPPL.)
Just wondering -- is there any chance that perhaps the same code could be done for the generated .4ht and other files? (%line 777 "tex4ht-4ht.tex", etc.) The derivation is so complex, it's often quite hard, at least for me, to track back a given line to the source.
thanks!
|
Wed Jun 1 10:23:27 2016, comment #1:
Hi Karl,
I'm attaching two files: tex4ht.c and tex4ht-srclineno.c. Both are generated from sources; the latter is with line numbers. Please can you check if it is something that you want?
Thank you,
---deimi
(file #237)
|
Fri Dec 24 19:14:33 2010, original submission:
When generating tex4ht.c and t4ht.c, it would be very helpful for debugging if the output included #line directives referring to the original source line (in the .tex files).
The most comparable complete example I can think of is a
hello,world program in CWEB. See source .w and generated .c in attachments.
(If you actually run ctangle, the output will have some additional
comments with CWEB section numbers. That's not relevant to tex4ht so I elided them.)
Thanks,
k
|