6

I've used HEVEA and HACHA in the past to make web-pages from TEX sources. The result is a separate web page for each \section{} of the original manuscript.

My latest manuscripts are more complex and HEVEA can't cut it. However, using HTLATEX, I can convert the manuscript to a single webpage.

Is there any way to get HTLATEX to automagically split the output into sub-documents for easier navigation?

vo1stv
  • 171
  • I found the answer at CTAN. Apparently I needed to include the command-line parameter
    `htlatex source.tex "html,3,next"`
    
    

    Not sure what the 3 means.. but lower numbers did not produce the sub-documents.

    – vo1stv Jun 07 '11 at 23:47
  • 1
    Could you please turn this into an answer and self-accept it (after the waiting period) so that question is officially concluded. Thanks! – Martin Scharrer Sep 18 '11 at 19:58

1 Answers1

6

I found the answer at TUG, contributed by Eitan Gurari in his presentation entitled TeX4ht: HTML production.

I needed to include the command-line parameter htlatex source.tex "html,3,next".(PS The 3 has to do with the subsection depth at which htlatex stops generating HTML.)

vo1stv
  • 171
  • Would you show precisely the command line? – egreg Nov 01 '11 at 00:34
  • @egreg my file name is journal.tex, so I would enter: htlatex journal.tex "html,3,next" – vo1stv Nov 23 '11 at 13:16
  • For further clarification, inside journal.tex, I have my usual LaTeX syntax which htlatex will render into a webpage. If I want htlatex to generate a link to a new page for a section of the content, I cut and paste the content to a new file called, let's say, howtolink.tex. To create the link, I add the code: \section{How To Link\label{howtolink}} (this goes in journal.tex where the original content was cut from). HTLATEX interprets the label as a command to render howtolink.tex to a separate html document. – vo1stv Nov 23 '11 at 13:27
  • One additional correction: you must also input howtolink.tex into journal.tex. This is done by adding the line \input{howtolink} to journal.tex on the line immediately following the section title. – vo1stv Nov 23 '11 at 14:38