<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 bgColor=#ffffff 
CanvasTabStop="true" name="Compose message area">
<DIV><FONT size=2 face=Arial>Thank you, Professor Moore, for kindly taking the 
time to respond to me.&nbsp; In my .tex file I now&nbsp;have CJK segments that 
each begin with \begin{CJK}{UTF8}{gbsn} and end with \end{CJK} that are small 
enough to avoid the problem of a too-tall or too-large a .png file.&nbsp; 
Assuming you are correct about some .png images being too tall for a page, the 
corresponding, problematic, .png size appears to have been between 65.7 
KiloBytes (KB) and 75.1 KB.&nbsp; By now a&nbsp;number of&nbsp;my 
output&nbsp;files from failed LaTeX and LaTeX2HTML runs may have been 
deleted.&nbsp;&nbsp;But&nbsp;from a failed&nbsp;execution of&nbsp;a command of 
the form "latex2html...... MyFile.tex"&nbsp;in a folder with a corresponding 
name of the form MyFile it seems like I had a zero-byte, .png file numbered 
before&nbsp;a .png file with a size of 107 KiloBytes (KB) or 94 KB.&nbsp; 
That&nbsp;is consistent with what you expected.&nbsp;&nbsp;For the benefit of 
other readers of this e-mail&nbsp;letter you thought the 0-byte-sized .png 
file&nbsp;could occur&nbsp;when&nbsp;the .png file after it would be too tall to 
fit on a page of output.&nbsp; I doubt if I have ever encountered a case in my 
use of LaTeX2HTML in which a mathematical expression in a .png file would have 
been too tall to fit on a page of, say .dvi output from LaTeX.&nbsp; It seems to 
me that a&nbsp;.html output file from an execution of latex2html command ought 
to be just one Web page long.&nbsp; If so,&nbsp;this is&nbsp;a curious thing 
for&nbsp;me.--That is I would expect a .png file to always be shorter in height 
than the entire, .html, output&nbsp;file from&nbsp;LaTeX2html that uses the .png 
file; and I think the "Bad file descriptor" errors for generating problematic 
.png files were generated by LaTeX2HTML 1.70 instead of LaTeX 2e.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I&nbsp;realize that my understandings of the 
operations of LaTeX and LaTeX2HTML are limited.&nbsp; From running the two 
programs on a file of the form MyFile.tex in a terminal program as a root user I 
recall that LaTeX can produce a file of the&nbsp;form MyFile.dvi&nbsp;with 
multiple&nbsp;pages of output.&nbsp; That design of separating the output into 
multiple pages is understandable when&nbsp;one wants the MyFile.dvi output file 
to be printed onto sheets of paper.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Basic questions:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>1.&nbsp; I often execute a command of the form 
"latex MyFile.tex" once or twice before executing a command of the form 
"latex2html.....MyFile.tex".&nbsp; In this way sometimes I could be made aware 
of some LaTeX command errors in my file of the form MyFile.tex.&nbsp; But is 
first running LaTeX like that absolutely necessary before running 
LaTeX2HTML?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>2a.&nbsp; How is it that LaTeX2HTML could "think" 
in terms of multiple pages when the .html output file appears to me to be just 
one, long Web page?</FONT></DIV>
<DIV><FONT size=2 face=Arial>2b.&nbsp; Does LaTeX2HTML rely on the page 
separations generated by LaTeX in producing a file of the form 
MyFile.dvi?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Okay, now&nbsp;I return&nbsp;to the problem 
of&nbsp;some .png image files containing simplified Chinese characters, .png 
images&nbsp;which are too tall for a page, assuming you are correct.&nbsp; I am 
not sure I have ever encountered&nbsp;this problem for a .png file for a single 
mathematical expression&nbsp;containing only numbers, mathematical 
symbols,&nbsp;and/or just a few Greek letters&nbsp;and/or English words.&nbsp; 
So the&nbsp;design of putting each mathematical expression or sometimes one 
Greek letter in one .png file is a good one because it usually avoids this 
problem.&nbsp; Apparently the simplified Chinese characters are packaged in 
groups in .png files with one CJK segment per .png file.&nbsp; I now see two 
possible ways in which the problem of too-tall, .png images containing Chinese 
characters could be avoided by a change in the design of some 
software:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I.&nbsp; Make LaTeX2HTML always "think" of 
MyFile.html as one, long page; and make it "think" of the length of that page as 
including all of the .png files&nbsp;the .html 
file&nbsp;uses.&nbsp;&nbsp;Managed in this way the problem of a .png file being 
too tall or too large in byte size should never occur because the .html file 
should always be as&nbsp;"tall" or&nbsp;"taller" (really long or longer) or 
contain as many or more bytes&nbsp;as a .png file used by .html 
file.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>2.&nbsp; Have LaTeX2HTML assign each, different, 
simplified Chinese character used in the file MyFile.tex file to its own .png 
file.&nbsp; This would be similar to the strategy used by LaTeX2HTML for each 
mathematical expression&nbsp;or isolated Greek letter.&nbsp;&nbsp;I guess that 
using a font size for a Chinese character taller than a page of corresponding 
MyFile.dvi output would either seldom occur or may not even be possible if such 
a large font size does not exist.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Meanwhile,&nbsp;if needed, I could&nbsp;in 
principle continue to break long {CJK} segments in a .tex file into shorter ones 
to avoid the problem&nbsp;of&nbsp;a .png file that is too tall.&nbsp;&nbsp;Again 
thanks for writing to me,&nbsp;Professor Moore.&nbsp; Oh yes, some more good 
news is that although the messages I sent to two, different, e-mail addresses 
attempting to subscribe to a CJK users group failed to be delivered, from an 
e-mail letter I sent to a different, CJK, &nbsp;e-mail address&nbsp;for the 
purpose of&nbsp;discussing this problem I received what appears to have been an 
automatically generated response informing me that I could receive a future 
response.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 
face=Arial>Pat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><B>From:</B> <A title=ross.moore@mq.edu.au 
href="mailto:ross.moore@mq.edu.au">Ross Moore</A> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV><B>Sent:</B> Saturday, July 31, 2010 6:35 PM</DIV>
<DIV><B>To:</B> <A 
title="mailto:l_pat_s@hotmail.com&#10;CTRL + Click to follow link" 
href="mailto:l_pat_s@hotmail.com">Pat Somerville</A> </DIV>
<DIV><B>Cc:</B> <A title="mailto:cjk@ffii.org>&#10;CTRL + Click to follow link" 
href="mailto:cjk@ffii.org>">&lt;cjk@ffii.org&gt;</A> ; <A 
title="mailto:latex2html@tug.org>&#10;CTRL + Click to follow link" 
href="mailto:latex2html@tug.org>">&lt;latex2html@tug.org&gt;</A> </DIV>
<DIV><B>Subject:</B> Re: [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</DIV></DIV></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT><BR></DIV>
<DIV>Hello Pat,<BR><BR><BR></DIV>
<DIV><BR>On 01/08/2010, at 8:02 AM, "Pat Somerville" &lt;<A 
href="mailto:l_pat_s@hotmail.com">l_pat_s@hotmail.com</A>&gt; wrote:<BR><SPAN 
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.28125); -webkit-composition-fill-color: rgba(175, 192, 227, 0.214844); -webkit-composition-frame-color: rgba(77, 128, 180, 0.214844)" 
class=Apple-style-span>&nbsp;</SPAN><BR></DIV>
<BLOCKQUOTE type="cite">
  <DIV>
  <DIV><FONT size=2 face=Arial><STRONG>The Apparent Byte Size Limit for a 
  Portable Network Graphics (.png) File</STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>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&nbsp;ensuing messages after&nbsp;entering the command of the form 
  "latex2html........ MyFile.tex" was "Bad file descriptor" in attempting to 
  generate the .png image.&nbsp; That .png image was listed in the so-generated 
  folder with a corresponding name of the form MyFile; but it&nbsp;had a size of 
  0 bytes.--So,</FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>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.</DIV>
<DIV><BR></DIV>
<DIV>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.</DIV>
<DIV><BR></DIV>
<DIV>I doubt very much that you have reached any limit on the size of a PNG 
file.</DIV>
<DIV>There are many other possible causes of the failure, before appealing to 
such a physical limitation.&nbsp;</DIV><BR>
<BLOCKQUOTE type="cite">
  <DIV>
  <DIV><FONT size=2 face=Arial>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.&nbsp; </FONT><FONT size=2 face=Arial>From 
  experience the limiting size of the so-generated, yet displayable, not-empty, 
  .png file&nbsp;had to&nbsp;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.&nbsp; 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.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial><STRONG>A&nbsp;"Workaround" 
  Solution</STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>By breaking the single, 
  long,&nbsp;\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.&nbsp; Then each {CJK} segment of the .tex 
  file corresponded to one .png file.</FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>This could certainly work, to keep the vertical height to smaller 
chunks.</DIV>
<DIV>Then each of these images would be made correctly.<SPAN 
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)" 
class=Apple-style-span>&nbsp;</SPAN><BR></DIV><BR>
<BLOCKQUOTE type="cite">
  <DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>The above&nbsp;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",&nbsp; 
  "latex2html......MyFileB.tex",&nbsp; "latex2html......MyFileC.tex", etc., 
  so-producing output files of the respective forms&nbsp;MyFileA.html, 
  MyFileB.html, MyFileC.html,&nbsp;etc.; and finally appending each of those 
  files in the order of&nbsp;MyFileA.html, MyFileB.html, 
  MyFileC.html,&nbsp;etc., to make one long, .html document.--The undesirable 
  features of this alternative solution are that,&nbsp;say equation number 1 and 
  the image file name img1.png could&nbsp;conceivably appear&nbsp;for each of 
  the files of the forms&nbsp;MyFileA.html, MyFileB.html, 
  MyFileC.html,&nbsp;etc.&nbsp; So&nbsp;if all of the&nbsp;multiple, img1.png 
  files were placed in the same directory,&nbsp;there would likely be mistakes 
  or problems when img1.png would be referenced by one of the .html files.&nbsp; 
  No, for one project each of the equations and&nbsp;.png files should have its 
  own, unique number.&nbsp; And that can be arranged automatically by LaTeX2HTML 
  by using the first solution in which the&nbsp;long,&nbsp;CJK segment in the 
  original .tex file is broken into several CJK segments, as&nbsp;discussed in 
  the first paragraph of this section.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial><STRONG>Unknown Origin of the Apparent .png-File 
  Size Limitation</STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>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&nbsp;hope I will able 
  to&nbsp;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.&nbsp; Please 
  advise me on where to make a change&nbsp;in one of the computer codes to 
  accommodate a .png file size&nbsp;larger than the current apparent limit, 
  which appears to be somewhat over 60 kilobytes.&nbsp; Thanks in advance for 
  help with where to make a change in some computer code to overcome this 
  apparent limitation.</FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>I think you are looking at the wrong place, for the problem that you 
encountered.</DIV><BR>
<BLOCKQUOTE type="cite">
  <DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Pat&nbsp; </FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT><BR></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>Hope this helps.</DIV>
<DIV><BR></DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Ross</DIV>
<DIV><BR></DIV></BODY></HTML>