[l2h] An Apparent Byte Size Limit for a Portable Network Graphics (.png) Image File Containing Simplified Chinese Characters Produced by LaTeX2HTML From a .tex File Containing LaTeX and Chinese/Japanese/Korean (CJK) for LaTeX Commands

Ross Moore ross.moore at mq.edu.au
Sun Aug 1 00:35:22 CEST 2010

Hello Pat,

On 01/08/2010, at 8:02 AM, "Pat Somerville" <l_pat_s at hotmail.com> wrote:
> The Apparent Byte Size Limit for a Portable Network Graphics (.png) File
> However, in the file of the form MyFile.tex, apparently when the set of LaTeX commands and text between the commands  \begin{CJK}{UTF8}{gbsn} and \end{CJK} was too extensive, one of the ensuing messages after entering the command of the form "latex2html........ MyFile.tex" was "Bad file descriptor" in attempting to generate the .png image.  That .png image was listed in the so-generated folder with a corresponding name of the form MyFile; but it had a size of 0 bytes.--So,

Usually when an image OS size 0 bytes is produced, it is because the image was too tall for the page size being used in the images.tex LaTeX job. This causes TeX to output a extra blank page before the oversize image. It is this blank page which becomes the bad image.

You should check the images.log file to see whether this has happened. In particular the number of pages output will be greater than the expected number of images. The console log of the LaTeX2HTML job indicates how many images are to be created, so you can check this without looking into images.tex itself.

I doubt very much that you have reached any limit on the size of a PNG file.
There are many other possible causes of the failure, before appealing to such a physical limitation. 

> of course, it either wasn't displayed or else a blank for it was displayed when the file of the form MyFile.html was opened in the Konqueror Web browser.  From experience the limiting size of the so-generated, yet displayable, not-empty, .png file had to have been somewhat larger than 60 kilobytes, based on the largest .png file size I recall seeing in this context without the file-size problem.  Such a large size is in stark contrast to 4.6 kilobytes, the largest size I saw for a .png image of a mathematical expression generated by LaTeX2HTML 1.70 from a .tex file containing mathematical expressions and possibly one or more Greek letters, but no simplified Chinese characters.
> A "Workaround" Solution
> By breaking the single, long, \begin{CJK}{UTF8}{gbsn}, \end{CJK} segment into several, shorter, such segments, such that no LaTeX2HTML-generated .png file had a size larger than the apparent byte limit of somewhat greater than 60 kilobytes, the .html file produced by LaTeX2HTML could contain the designed, simplified Chinese characters and mathematical content.  Then each {CJK} segment of the .tex file corresponded to one .png file.

This could certainly work, to keep the vertical height to smaller chunks.
Then each of these images would be made correctly. 

> The above solution is much preferred over the alternative solution of breaking the long, say MyFile.tex file into files of the form MyFileA.tex, MyFileB.tex, MyFileC.tex, etc.; executing latex2hmtl commands of the forms "latex2html......MyFileA.tex",   "latex2html......MyFileB.tex",  "latex2html......MyFileC.tex", etc., so-producing output files of the respective forms MyFileA.html, MyFileB.html, MyFileC.html, etc.; and finally appending each of those files in the order of MyFileA.html, MyFileB.html, MyFileC.html, etc., to make one long, .html document.--The undesirable features of this alternative solution are that, say equation number 1 and the image file name img1.png could conceivably appear for each of the files of the forms MyFileA.html, MyFileB.html, MyFileC.html, etc.  So if all of the multiple, img1.png files were placed in the same directory, there would likely be mistakes or problems when img1.png would be referenced by one of the .html files.  No, for one project each of the equations and .png files should have its own, unique number.  And that can be arranged automatically by LaTeX2HTML by using the first solution in which the long, CJK segment in the original .tex file is broken into several CJK segments, as discussed in the first paragraph of this section.
> Unknown Origin of the Apparent .png-File Size Limitation
> Since the origin in the computer code of the apparent, .png, file-size limitation is unknown to me, even whether it is within  the CJK for LaTeX or LaTeX2HTML code, I hope I will able to send this e-mail letter to both the LaTeX2HTML and CJK users groups; however, so far e-mail letters sent to two e-mail addresses posted for joining the CJK users group have been returned to me as undeliverable.  Please advise me on where to make a change in one of the computer codes to accommodate a .png file size larger than the current apparent limit, which appears to be somewhat over 60 kilobytes.  Thanks in advance for help with where to make a change in some computer code to overcome this apparent limitation.

I think you are looking at the wrong place, for the problem that you encountered.

> Pat 

Hope this helps.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/latex2html/attachments/20100801/53e8b7d5/attachment-0001.html>

More information about the latex2html mailing list