bugtex4ht - Bugs: bug #395, Possible issues with \write16

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #395: Possible issues with \write16

Submitted by:  Michal Hoftich <michal_h21>
Submitted on:  Fri Jun 8 12:50:05 2018  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Tue Jun 12 23:05:59 2018, comment #6:

there were two remaining occurrences in tex4ht.sty. I changed them also. Hope that was the right thing to do ... closing ... --thanks, karl.

Karl Berry <karl>
Project Administrator
Tue Jun 12 06:47:32 2018, comment #5:

OK, I've changed the number to 99999, I hope it is high enough :) Only in tex4ht.sty, because other definitions are used only in the build.

Michal Hoftich <michal_h21>
Project Member
Mon Jun 11 21:18:27 2018, comment #4:

It seems somewhat strange to replace one constant with another constant, thus merely delaying the problem until someone writes a complex-enough luatex document (?), but I guess it's not worth worrying about trying to get the "last open write stream" number out of luatex (only).

Only ... maybe 9999, or 99999, or some even larger number? 1616 doesn't sound far enough away from 16 :). wdyt?

Yay for the macro.

Karl Berry <karl>
Project Administrator
Mon Jun 11 13:17:50 2018, comment #3:

So I hopefully fixed \write16 in .4ht files used in the document compilation. Some still remain, but only in the build files, so it should be OK.

I've created a macro:

\def\writesixteen#1{\immediate\write1616{#1}}

I had to add its definition to tex4ht-sty.tex, common.tex and tex4ht-4ht.tex. Everything seems to work, messages are written to both terminal and log with no errors. So I hope it will be OK.

Michal Hoftich <michal_h21>
Project Member
Mon Jun 11 08:16:57 2018, comment #2:

Thanks Karl. It seems that it is intended to print to both the terminal and the log file. It prints for example this message:

::::::::::::::::::::::::::::::::::::::::::
TeX4ht info is available in the log file
::::::::::::::::::::::::::::::::::::::::::

So I think \write-1 is not a good replacement. We should definitely use a macro, defined in tex4ht.sty.

Michal Hoftich <michal_h21>
Project Member
Fri Jun 8 22:42:28 2018, comment #1:

1) is our \write16 just intended to write to the .log file?
I'm not sure. But if so, I believe \write-1 will work across all engines.

2) In any case, we should surely make \immediate\write16 into a macro (in common-code.tex and tex4ht.sty? not sure) as long as we have to change the ~200 occurrences in the sources. Then we can fiddle with the definition if we have to.

Karl Berry <karl>
Project Administrator
Fri Jun 8 12:50:05 2018, original submission:

tex4ht uses `\immediate\write16{mesage}` quite a lot. It is potentially dangerous with LuaTeX, because streams with number above 16 may be assigned using \newwrite and tex4ht would then write messages to a file where they don't belong, instead of terminal output.

As a solution, it is possible to use higher number, like `\write1616`.

More information is available here: https://tex.stackexchange.com/a/435226/2891

Michal Hoftich <michal_h21>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Jun 12 23:05:59 2018karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray