Sunday, January 01, 2006

Re-post: LaTeX to HTML

Following this website:
a) download tex4ht
b) dowload tex4ht-miktex-install.zip
c) download gs and ImageMagick

1. create a new directory c:\temp and copy tex4ht.zip inside and unzip tex4ht-miktex-install.zip inside
2. Create a new directory c:\tes4ht
3. edit miktex-install.bat, look like:

:: tex4ht directory (for ht-fonts and the tex4ht.env file)
set t4htdir=c:\tex4ht
::
:: miktexdir should be the top-level miktex directory
set miktexdir=c:\texmf
::
:: local miktex dir (may be a source of additional tmf files)
set locdir=c:\localtexmf
::
:: batch directory
set batdir=C:\tex4ht
::
:: gs bin directory
set gsbindir=C:\gs\gs8.51\bin
::
:: imagemagick directory
set imdir=C:\Program Files\ImageMagick-6.2.4-Q16

4. Run miktex-insttall.bat ... without any error.
5. Check: c:\ >>> cd\tex4ht\test >>> ..\htlatex testb >>>..\htlatex testa
6. Add path C:\tex4ht for batdir so that we can use it in any directories.

My problems:
[-] some errors for .eps files but the output has no problem.
[-] The images for the equations look too small.
Solution:
In "C:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env", change
Gconvert zz%%4.ps -trim +repage -density 110x110 -transparent "#FFFFFF" %%3
to:
Gconvert -density 110x110 zz%%4.ps -trim +repage -transparent "#FFFFFF" %%3

No comments:

Post a Comment