[l2h] Poor resolution for my .eps file contents in a .html file produced by LaTeX2HTML and viewed in a Web browser such as Konqueror

Pat Somerville l_pat_s at hotmail.com
Fri Jun 24 01:50:08 CEST 2011

Hello. On my Epson scanner I can lay paper with a figure, printing, or writing on it; use my scanner to scan that sheet of paper; and then with the scanner's computer program generate an image file of the contents on the paper. The program's available file formats are MULTI-TIFF (.tif, Tagged Image File Format), bitmap (.bmp), JPEG (Joint Photographic Experts Group, .jpg), and .pdf (Portable Docoument Format). I commonly selected the .tif format for my scanned image files; lately I selected 600 dots per inch (dpi) for the resolution of black-and-white images. Notice that Encapsulated PostScript (.eps), which can be conveniently be used in my .tex file with LaTeX and LaTeX2HTML, is not one of my scanner program's available formats. But with both the Gnu Not Unix (GNU) Image Manipulation Program (GIMP) 2.6.11 and the LibreOffice program Draw I could convert the .tif files to .eps files.

In my openSUSE-11.4, Linux operating system using GIMP my .eps image files gratefully had good-looking, sharp letters and mathematical symbols from the original sections of paper. In my .tex file I used the package epsfig to deal with the .eps figures. After I executed latex and latex2html commands on the .tex file, I viewed the resulting .html file in Konqueror and Firefox Web browsers. Unfortunately the qualities of the letters and symbols in the figure in both the .html file produced by the program LaTeX2HTML and the .dvi (Device-Independent) file produced by the program LaTeX were very poor. Unfortunately the quality of a .eps file after conversion from a .tif file using the LibreOffice program Draw was also poor when viewing the LaTeX2HTML-produced, .html, output file in probably the Konqueror Web browser.

In my reading of postings on the Internet relating to file formats I found complexities associated with this situation, especially regarding file formats. I can foresee a few ways to understand or learn the complexities in order to obtain good-looking figures in a LaTeX2HTML-produced .html output file, namely, by 1) reading more on the Internet, 2) experimenting myself with pdflatex and/or latex options, packages, and various file formats; and/or 3) learning things from people who on reading this letter can realize why I haven't always obtained sharp-looking images in my .html file and how I could somehow do so. This letter is an attempt toward approach 3, as well as to report things I already tried and some ideas I imagined. 

Meanwhile I can present some of what I read and learned from the Internet and a few puzzles of mine relating to this matter. From answer 13 at http://thedailyreviewer.com/compsys/view/quality-of-picturesgraphics-using-graphicx-package-113295267 on the Internet I learned that the .bmp, .tif, and .jpg file formats that my Epson scanner program can produce are classified as raster formats which are composed of pixels; .png (Portable Network Graphics) and ..jpg are apparently two other raster formats. The .eps format with which LaTeX and LaTeX2HTML can work is a vector format which works with points and paths between points; .pdf, .which my scanner can apparently produce, dvi, and .ps (PostScript) are apparently three other vector formats. The answer-13 poster wrote that the quality was lost in converting from a vector to a raster format. I wonder if a loss of quality is supposed to occur in converting from a raster to a vector format, which is the type of conversion I made from .tif to .eps using both GIMP 2.6.11 and LibreOffice Draw. From the results I discussed above you can see that I have apparently two conflicting answers to this question: a) Such a .eps file looked fine in GIMP 2.6.11. b) But when it became part of my .html file the letters and mathematical symbols contained in the .eps file were not clear and sharp. On the same Web page I mentioned the poster of answer 14 reported,"Saving

the graphic into eps and then converting them to pdf via epstopdf is the way to go with minimal quality loss." I haven't tried that. Easier and better would be for me to directly produce a .pdf file with my scanner program. But can LaTeX2HTML and LaTeX work directly with pdf files? I did try scanning something on paper to a .pdf file with my scanner and its associated computer program. After opening that .pdf file in GIMP 2.6.11 I converted the vector format .pdf to another vector format .eps. But unfortunately the quality of the content of that .eps file in the resulting .html file produced via a latex2html command was poor with some letters appearing blurry or even "on the edge" of being doubled, as in double vision. Even so, I think the result was probably somewhat better than converting a .tif file to a .eps file and including it in a .tex file.

But the quality of my original, scanned .pdf file was pretty good when viewed in GIMP, except for some thin lines in equal signs. So if I had a nearly lossless way to include the original, scanned .pdf file in a .html file produced by LaTeX2HTML, that could be pretty good. Can one do that? And if so, how could one do that? 

The Web page http://www.cv.nrao.edu/~abridle/toolmemo/node12.shtml indicates that LaTeX can work with other formats besides .ps and .eps, such as .jpg, but that the coordinates of a bounding box must be inserted I think when using \usepackage{graphicx} and an \includegraphics command in a LaTeX file. How does one practically determine the coordinates of the bounding box of a figure he wants to include in a LaTeX document? On the Internet I read that .a jpg file can be directly included in a .tex file when executing pdflatex on it. So one option that looked attractive to me was to include a scanned, .jpg file in a .tex file (Would one have to include the coordinates of the bounding box in the .tex file in this case?); then execute pdflatex on that .tex file. What would happen if one executed a latex2html command on that .tex file? Would the contents of the .jpg file appear in the .html output file?

I tried a pdflatex command on one of my .tex files and found that some LaTeX commands, such as \begin{document}, were apparently not recognized. I am relatively ignorant of pdflatex.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/latex2html/attachments/20110623/4f0c189b/attachment.html>

More information about the latex2html mailing list