## LaTeX forum ⇒ Others ⇒ latex to html via oztex?

Information and discussion about other TeX distributions not listed above; installation, administration; field reports
Posts: 26
Joined: Sat Jul 19, 2008 5:29 pm
Location: Ohio USA
Contact:

### latex to html via oztex?

I've been using LaTeX but downloaded oxtex because it said it could translate to html. But it keeps giving me "permission denied" and I made sure the file and folders have chmod 777. Anybody know what could be the problem?

Also, if there's any better way to get from LaTeX to html I'd be most interested in knowing. I have a book to put in Amazon's Digital Text Platform, but it requires html.
Keep to the Code.

Juanjo
Posts: 656
Joined: Sat Jan 27, 2007 12:46 am
Also, if there's any better way to get from LaTeX to html I'd be most interested in knowing. I have a book to put in Amazon's Digital Text Platform, but it requires html.

In addition to TtH (which comes with OzTeX), there are several converters from LaTeX to HTML: Hevea, LaTeX2HTML, TeX4ht... You can easily find them googling a little bit. TeX Live (through the MacTeX distribution) provides TeX4ht. This program is used through the command line. There is a simple GUI called SimpleTeX4ht.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Posts: 26
Joined: Sat Jul 19, 2008 5:29 pm
Location: Ohio USA
Contact:
Juanjo wrote:
Also, if there's any better way to get from LaTeX to html I'd be most interested in knowing. I have a book to put in Amazon's Digital Text Platform, but it requires html.

In addition to TtH (which comes with OzTeX), there are several converters from LaTeX to HTML: Hevea, LaTeX2HTML, TeX4ht... You can easily find them googling a little bit. TeX Live (through the MacTeX distribution) provides TeX4ht. This program is used through the command line. There is a simple GUI called SimpleTeX4ht.

Hi Juanjo,

I tried going directly to TtH but can't get that to work either. I'm not proficient at unix commands so maybe I'm giving it the wrong code. Similar for other packages; it seems all the ones I checked require getting into Terminal and doing a lot of things I don't know how to do. But I'll check out that GUI, thanks!

ADDED LATER: Works great! Only thing is it puts special characters (upside down question mark) for all quote marks and certain letter pairs like "ff", "fi", and "ia", and "--". Without that problem it would be perfect. Thanks again!

BTW, in the meantime I just coded a php script to make one that's good enough for now. Only hitch I ran into was how to do a preg_replace that not only finds a string such as
`<tag>variable text</tag>`
, but keeps the variable text inside the string. I'm not good with preg commands either so that's been a problem.
Keep to the Code.

Juanjo
Posts: 656
Joined: Sat Jan 27, 2007 12:46 am

For a simple usage of TtH, copy the binary to the folder where the tex file is, open Terminal, move to that folder (with a cd command line) and launch TtH:
`\$ cd folder_name\$ ./tth file_name`

(tip: write cd on Terminal, then drag and drop the folder there to complete the first of the above commands). Perhaps you should have to provide a chmod command to set permissions of TtH.

Read the adjoint manual of TtH. You should be aware that TtH "understands" many of the core commands of LaTeX, but it skips \usepackage commands and so the commands defined in the packages. You should provide convenient replacements on your own.

In this way, you can compare TtH and TeX4ht and benefit from the best of both.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Posts: 26
Joined: Sat Jul 19, 2008 5:29 pm
Location: Ohio USA
Contact:
Juanjo wrote:I've downloaded the source code of TtH ... Read the adjoint manual of TtH. You should be aware that TtH "understands" many of the core commands of LaTeX, but it skips \usepackage commands and so the commands defined in the packages. You should provide convenient replacements on your own.
...

Thanks for all your help, Juanjo!

I have no clue how to provide replacements for \usepackage, but when I figure that out I'll be able to try this.
Keep to the Code.