Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the 2008 documentation of latex2html it is referred to a html package that permits to put some latex command inside conditional environments (latexonly and htmlonly). It's useful because I want my latex source to be universal, and function for PDF creation and for HTML creation too. Unfortunately there's no html package on CTAN, and no documentation on the Internet, and TeXlive 2012 seems not to include it, so that the command \usepackage{html} is rejected. Anyone knows how to solve?

share|improve this question
    
Do you mean this file. It has the environments you mention, but it looks pretty old to me.... –  jon Sep 17 '12 at 21:05
    
I found that the html.sty files was in some directories of texlive installation. It was necessary to put it in another directory where LaTeX were capable to see it. Now it's ok, but I have discovered that htmlonly and latexonly are not enough: I need to differentiate the first line of the source code, changing memoir class to book class for compatibility with latex2html, for example... how to do it elegantly? Thanks and sorry for the poor english. –  Simone Corelli Sep 18 '12 at 1:36
    
Can you post a minimal example file that you want to convert (but which won't convert correctly). I often use the memoir class, so I may be able to help. –  jon Sep 18 '12 at 3:13
    
Hallo John.The error say that memoir.cls is not available and latex2html stops. Are you saying it's compatible? In that case I'll do some test to better identify the problem and I'll post here my deductions. –  Simone Corelli Sep 18 '12 at 9:04
    
No, probably not: latex2html is not actively developed anymore. A much better solution is tex4ht's suite of conversion tools (which is what I have some experience). However, I thought latex2html could handle simple memoir documents, but it seems that it cannot. (Sorry for the false hope.) –  jon Sep 18 '12 at 12:35
show 1 more comment

2 Answers

As mentioned in comments, latex4html is not developed any more, so it's unlikely it will be possible to find this file (which is n any case very generically named and so hard to track down). You will be best looking at tex4ht as an alternative.

share|improve this answer
add comment

While latex2html is not longer in development, the package source can still be found online at http://www.latex2html.org/node6.html (last change in September 2001). The file you are looking for is here. You can just copy this file into the directory where your own TeX file lives and include it using

\usepackage{html}

That said, given that the file has not been updated in more than a decade, it is probably a good idea to look into using a newer alternatives, e.g. tex4ht.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.