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?

2
  • I found the answer at [CTAN][1]. 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. [1]: tug.org/TUGboat/Articles/tb25-1/gurari.pdf
    – vo1stv
    Jun 7, 2011 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! Sep 18, 2011 at 19:58

1 Answer 1

7

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.)

4
  • Would you show precisely the command line?
    – egreg
    Nov 1, 2011 at 0:34
  • @egreg my file name is journal.tex, so I would enter: htlatex journal.tex "html,3,next"
    – vo1stv
    Nov 23, 2011 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, 2011 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, 2011 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.