2

For the following line of LaTeX code:

y=\frac{1}{2}x^2

LaTeX2HTML 1.71 in my installations of portions of TeX Live 2012 and an openSUSE-12.3, Linux operating system produced the equivalent of

y=Image x^2

instead of the desired equivalent of

y=(1/2) x^2

without the parentheses, with a horizontal fraction line, and with x followed by a superscript 2 in the HyperTeXt Markup Language (.html) output file of LaTeX2HTML 1.71 when opened by the Konqueror Web browser. I have been suspicious that something in my installations of TeX Live 2012 and openSUSE-12.3 Linux prevented LaTeX2HTML 1.71 from enabling the display of fractions from LaTeX codes such as \frac{1}{2}. I request that users of LaTeX, LaTeX2HTML 1.71, which is the year-2008 version of LaTeX2HTML, and portions of TeX Live 2012, especially the software package named texlive-latex in the case of an openSUSE distribution of the Linux operating system, try this experiment and report your results and computer environments here:

  1. Using a text editor copy and paste the following lines of LaTeX code into a blank document in a text editor; and save that file as MyFile.tex:

    \documentclass[a4paper,12pt]{article}
    \usepackage{color,html,makeidx,amsmath,latexsym}
    \pagecolor{white}
    \setlength{\parskip}{20pt plus 2pt minus 2pt}
    \begin{document}
    \baselineskip=29pt
    \begin{equation}
    y=\frac{1}{2}x^2
    \end{equation}
    \end{document}
    
  2. Execute the following command twice: latex MyFile.tex.

  3. Execute the following command once: latex2html -debug -nonavigation -no_math -html_version 3.2,math -split 0 MyFile.tex. That command should produce a subdirectory called MyFile in the directory in which that command was executed. In that subdirectory MyFile should be a file named MyFile.html produced by the computer program LaTeX2HTML 1.71.
  4. Double-click on the file MyFile.html to have it opened properly in your default Web browser, for example Mozilla Firefox, Konqueror, et cetera.
  5. Look at the line which begins with y=. Is the next expression the word Image or the equivalent of the fraction 1/2 with a horizontal fraction line? If it is 1/2 with a horizontal fraction line, choose option "Failure" or "Success," respectively according to whether you see the equivalent of y=Image x^2 or y=(1/2)x^2 with a horizontal fraction line and without the parentheses displayed, and write here:

Success on the fraction 1/2 displayed using TeX Live 2012 in the _______ operating system and fill in the blank with your operating system, for example openSUSE 12.2 Linux, Ubuntu-10.0 Linux, et cetera.

Failure on the fraction 1/2 displayed using TeX Live 2012 in the _______ operating system and fill in the blank with your operating system, for example openSUSE 12.2 Linux, Ubuntu-10.0 Linux, et cetera.

In this way I hope to determine whether TeX Live 2012 itself or how openSUSE-12.3 Linux "handles" LaTeX2HTML 1.71 and portions of TeX Live 2012 causes or caused a problem for LaTeX2HTML 1.71 in the case of LaTeX-coded fractions in a freshly prepared, .tex document.


August 20, 2013

After a few weeks of time, gratefully I found what I will call a "workaround" solution for this problem using a clue kindly provided by Bob Tennent. On http://www.tug.org/pipermail/tex-live/2011-November/030599.html on the Internet he wrote, "...in some Linux distributions the latex2html package will depend on a full installation of something hopelessly out-of-date like texlive-2007 or tetex which complicates the installation" (of I think LaTeX2HTML). And at http://www.tug.org/pipermail/tex-live/2011-November/030604.html, continuing in the same "chain" of likely electronic-mail letters, Bob Tennent further wrote, "Installation of latex2html-2008 from the tarball at CTAN" (the Comprehensive TeX Archive Network on the Internet) "does avoid the dependency issues and it's unlikely to need updating." These writings of Bob Tennent gratefully gave me the clue that LaTeX2HTML 1.71, which worked probably well for me with portions of TeX Live 2011, might be incompatible in some way with portions of TeX Live 2012. So in attempting the solution of Bob Tennent I obtained the file latex2html-2012.tgz from a CTAN Web page. Within openSUSE-12.3's Yet another Software Tool 2's (YaST2's) Software Management I deleted the installations of the openSUSE-12.3 software packages entitled "latex2html," "latex2html-doc," and "latex-pngicons." I unpacked the downloaded file latex2html-2012.tgz using the command "tar xvzf latex2html-2012.tgz" in a new folder and followed the instructions in a file entitled "INSTALL," which came within that .tgz file to install what turned out to be LaTeX2HTML 2012 (1.2) in my installation of portions of TeX Live 2012 in an openSUSE-12.3, Linux operating system. The essential commands in doing so were "./configure --prefix=/usr", "make," and "make install". The result was the installation of some executable LaTeX2HTML files in the directory /usr/bin, some shared library files in the directory /usr/shared/lib/latex2html, and some unshared library files in the directory /usr/lib/latex2html, with each of those three directories beginning with the input "prefix" of "/url". After deleting old copies of everything associated with my test file Throwaway29.tex, except the file Throwaway29.tex itself, gratefully the result of executing "latex Throwaway29.tex" twice and "latex2html -debug -nonavigation -no_math -html_version 3.2,math -split 0 Throwaway29.tex" once was that the equivalent of the expression y=(1/2) x^2 without the parentheses and with a horizontal fraction line was properly displayed in the output file ..../Throwaway29/Throwaway29.html when viewed in the Web browser Konqueror (Some problems in displaying other mathematics after similarly processing a different .tex file were rectified by making the minor changes discussed in Appendix II.). Afterwards the new folder into which the file latex2html-2012.tgz, which had been downloaded from a CTAN Web page, had been unpacked could be deleted from my computer's hard-disk drive.

The above success shows that LaTeX2HTML 2012 (1.2) can be made to work with portions of TeX Live 2012 in an openSUSE-12.3, Linux operating system (As of August 14, 2013, TeX Live 2013 was not yet available for installation from the standard openSUSE-12.3 repositories for stable openSUSE 12.3. But from Harvey's posting at http://bbs.archlinux.org/viewtopic.php?pid=1299370 on the Internet, there is a possible clue that TeX Live 2013 may have worked with LaTeX2HTML 2008-2, dated July 10, 2013, up to, but not including, the TeX Live 2013 update named texlive-core2013.30962-1. Based on Harvey's joke near the end of his posting there and because that Web page has "linux" in its Uniform Resource Locator [URL], I suppose that Harvey may have been using some distribution of a Linux operating system in the results he reported. He also wrote that he reported his problem with LaTeX2HTML 2008-2 and TeX Live 2013, a problem different from my problem with LaTeX-coded fractions like \frac{1}{2}, as a "bug." I am not certain whether he reported that software "bug" to the developers of TeX Live or to the developers of the distribution of the Linux operating system that he was using at the time he found what he speculated might be a "bug."). Without delving deeply into the computer codes involved, I have two general hypotheses to explain this success: 1) Similar to what Bob Tennent reported for probably an earlier version of LaTeX2HTML and some distribution or distributions of a Linux operating system that is or are unknown to me, perhaps in my case as well there was in some way some kind of a mismatch between LaTeX2HTML 2008 (1.71) and portions of TeX Live 2012 in my installation of the openSUSE-12.3, Linux operating system. 2) In openSUSE 12.3, compared to openSUSE 12.2, I think some changes were made in grouping some software packages together. So perhaps there was a problem on the openSUSE-12.3 side of things that prevented LaTeX2HTML 1.71 from working well with portions of TeX Live 2012.

I see short-, intermediate-, and long-term solutions to the general problem of getting LaTeX2HTML to work well with portions of TeX Live in a Linux operating system. The short-term solution is the one I explained in the paragraph two paragraphs above this one that gratefully worked for me in an openSUSE-12.3, Linux operating system and that one could hope might also work in other distributions of the Linux operating system. The intermediate-term solution is to have openSUSE-12.3 developers fix the problem for users of the version of LaTeX2HTML that is supplied to openSUSE-12.3 users from openSUSE-12.3's software repositories (In fact, I have already submitted the problem I mention here in a "bug" report to developers of openSUSE 12.3. I updated that "bug" report with the recent success and some of the other content I report here.).---If the above hypothesis 1 is correct without any complications from hypothesis 2, the intermediate-term solution might be as simple as openSUSE-12.3 developers changing the version of LaTeX2HTML they supply from their online repositories from the year-2008 to the year-2012 version of it that is available from the CTAN. But the long-term and more general solution for all distributions of the Linux and Windows operating systems which may make use of TeX Live could be to incorporate a recent version of LaTeX2HTML in a recent version of TeX Live and from testing LaTeX2HTML and LaTeX in TeX Live with .tex files containing some mathematical expressions before distributing Tex Live to in that way ensure that LaTeX2HTML within TeX Live will work well with TeX Live. That is what I have recommended to people who use and/or are responsible for TeX Live.

The test results I requested to be posted here by other people using LaTeX2HTML 2008 (1.71) and portions of TeX Live 2012 in some operating system other than openSUSE-12.3 Linux could still be interesting. For example, if someone using some version of Ubuntu, Gentoo, or Fedora Core Linux and LaTeX2HTML 2008 (1.71) with portions of TeX Live 2012 installed sees the same problem with the LaTeX code \frac{1}{2} in LaTeX2HTML 2008 (1.71) output that I did, then I would lean toward hypothesis 1 being correct that there may have been some kind of mismatch between LaTeX2HTML 2008 (1.71) and TeX Live 2012 that was not confined to the particular distribution of the Linux operating system.---Or if he instead has the good result of the fraction being properly displayed, then I would lean toward hypothesis 2 possibly being the correct one. Such test results could possibly be interesting to some openSUSE person or people trying to remedy the problem in openSUSE-12.3 Linux that I posted as a software "bug" report.

Appendix I: Licensing of LaTeX2HTML 2012 (1.2)

For LaTeX2HTML 2012 (1.2) I found license information in the file /usr/share/lib/latex2html/docs/licence.tex in my installation of LaTeX2HTML obtained from the CTAN:

"Use and copying of this software and the preparation of derivative works based on this software are permitted, so long as the following conditions are met: \begin{itemize} \item The copyright notice and this entire notice are included intact and prominently carried on all copies and supporting documentation. \item No fees or compensation are charged for use, copies, or access to this software. You may charge a nominal distribution fee for the physical act of transferring a copy, but you may not charge for the program itself. \item If you modify this software, you must cause the modified file(s) to carry prominent notices (a \texttt{ChangeLog}) describing the changes, who made the changes, and the date of those changes. \item
Any work distributed or published that in whole or in part contains or is a derivative of this software or any part thereof is subject to the terms of this agreement. The aggregation of another unrelated program with this software or its derivative on a volume of storage or distribution medium does not bring the other program under the scope of these terms. \end{itemize}"

Appendix II: Changes That Were Necessary to Make in LaTeX2HTML 2012 Files to Avoid Some Problems With Images of Some Mathematics Appearing in a HyperText Markup Language File Produced by the Combination of Programs LaTeX and LaTeX2HTML 2012 (1.2)

The changes to LaTeX2HTML discussed here have kindly been previously discussed by Shigeharu Takeno. For example, he discussed the changes to the Perl script file latex2html at http://tug.org/mailman/htdig/latex2html/2004-February/002688.html on the Internet. In the file /usr/bin/latex2html I added a ? after each # in lines 16,454-16,455 as follows:

$math_verbatim_rx ="verbatim_mark#?math(\d+)#";

$mathend_verbatim_rx ="verbatim_mark#?mathend([^#]*)#";

with, unlike the above lines, no blank line between the above, two, non-empty lines of code. I did not find the file latex2html.pm in LaTeX2HTML 2012 (1.2) and therefore did not make similar modifications within it. I left the following line in the file /usr/share/lib/latex2html/versions/math.pl unchanged:

$mathend_mark = "\n${verbatim_mark}mathend000#";

because $mathend_mark is used several times in that file math.pl. I found that commenting out by prepending that line of code with a # was not essential for the successful rendering of mathematical symbols by LaTeX2HTML. And furthermore commenting out that line of code could conceivably result in $mathend_mark being undefined, if the lines using $mathend_mark in that file math.pl are ever reached and if $mathend_mark is not effectively defined for the file math.pl elsewhere within the LaTeX2HTML code.

And in the file /usr/lib/latex2html/l2hconf.pm I prepended line 136 with a # as follows:

# $DVIPSOPT= ' -Ppdf -E';

. The line 169 of the same file was already prepended with a # as follows:

# $DVIPSOPT .= " -Ppdf";

. I left line 151 of the same file unchanged as follows:

$DVIPSOPT .= " -E";

.

closed as unclear what you're asking by Joseph Wright Jan 2 '16 at 22:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I've reopened here based on the edit (a little while ago now but one that had perhaps got missed). Could you provide a link for the non-standard html package (not in my TeX Live set up)? – Joseph Wright Aug 12 '13 at 19:26
  • Thanks, Joseph Wright, for kindly reopening my posting. I guess you might mean a hyperlink to latex2html itself. In my openSUSE-12.3 distribution of the Linux operating system I obtained the software package labeled "latex2html" via Yet another Software Tool 2 (YaST2) and an Internet connection to one or more server computers for openSUSE-12.3 repositories. Outside of openSUSE repositories I could find a Uniform Resource Locator (URL) latex2html.org/~latex2ht/current/latex2html-2008.tar.gz for the year-2008 version, or version 1.71, of LaTeX2HTML. – user1793120 Aug 13 '13 at 23:51
  • For Joseph Wright gratefully I found an Internet source for a more recent version of LaTeX2HTML, version 2012 (1.2) of it, via the hyperlink reading "latex2html-2012.tgz" on the Web page with the Uniform Resource Locator (URL) ctan.org/tex-archive/support/latex2html. As you may be able to see in my above posting after the line reading "August 20, 2012," gratefully the installation of version 2012 (1.2) of LaTeX2HTML from the Comprehensive TeX Archive Network (CTAN) in the manner I outlined above provided a short-term solution for the problem I had with the LaTeX code \frac{1}{2}. – user1793120 Aug 21 '13 at 3:45

Browse other questions tagged or ask your own question.