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.

I'm using htlatex (Miktek 2.9, on windows command prompt) with the command:

htlatex source.tex "3" "" "" "--interaction==nonstopmode"

to generate HTML from existing documents written in LaTeX. I've been coming across a couple of major problems that have me stumped, so I hope someone here can help.

  1. My output creates (very poor quality) .gif equations. I've made the equations into png's in the past but for some reason the convert function (run by t4ht?) seems to be defaulting to .gif. Is there a way I can specify the creation of .png's instead (I'm honestly not sure how they were created in the first place)?

  2. I've tried to specify the HTML output and image output directory without luck. I've read that the imgdir:(location)/ and -d/(location)/ options as follows should change the output directory, but it hasn't seemed to work for me.

    htlatex source.tex "3,imgdir:images/" "" -d/tmp/ "--interaction==nonstopmode"
    
  3. The image (not equation) scaling is incorrect in the final HTML output. In the document, I use a custom command to place the images (for PDF output):

    \newcommand{\pic}[4]{
      \begin{figure}[htbp]
        \centering
          \includegraphics[scale=#2]{#1}
          \caption{#3}\label{#4}
       \end{figure}
    }
    

    and this works normally. After running htlatex, the scaling is not preserved and the images are out of proportion.

share|improve this question
    
If you have the chance, install WinEdt 8, open your file in it and run the command Tex | HTML | LaTeX -> HTML. It runs htlatex on your file with a modified tex4ht.env with the options you've mentioned. –  karlkoeller Jul 11 '13 at 19:13
1  
Thank you for the suggestion of WinEdit, I was able to solve the second problem (even though its done the same way as command prompt, it worked here), and for some reason it created higher quality equations, however, I am still not having luck with the image scaling problem. –  Ryan Jul 12 '13 at 15:38

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.