Pdflatex doc for html

I need to convert a bunch of pdflatex only documents (due to graphics -.pdf jpgs and png) to html. tex4ht gives a bunch of garbage outs. documents are created using the \ input command. Is there anything I can do to help tex4ht with the pdflatex document? I looked at many converters (pandoc, hevea, tth, latex2rtf), but none of them can include my data well. Is tex4ht the best choice?

+4
source share
4 answers

You can write macros that use tex4ht \ HCode to override \ includegraphics (or something else) so that they emit the corresponding html code.

+1
source

The sl2h program that comes with noweb is a terrible hack (I would not wish this to my worst enemy), but you can handle it. I used it to prepare handouts for my classes. If you find yourself in an extreme situation, you can use terrible tricks like this:

 \ifhtml \begin{center} \includegraphics{address.png} \end{center} \else \begin{center} \includegraphics[scale=0.5]{address.eps} \end{center} \fi 

(As you probably can say, I do not use pdflatex, I use simple latex.) But hacks like this work, and the numbers are included. I think they should all be PNG or JPEG; I'm sure sl2h doesn't know how to convert a PDF shape to an image for a web page.)

+1
source

Converting from LaTeX to html is complicated and not very well documented, in my opinion. Have you looked at Texmaker at http://www.xm1math.net/texmaker/ ? It is free and offers an integrated LaTeX to html conversion tool.

0
source

I use tex2html, which I like better than latex2html. It seems to work very well.

0
source

Source: https://habr.com/ru/post/1307164/


All Articles