I have problems with index section.
I use tex4ht to compile my manual to html file.
In case if makeindex and begin{document}/end{document} commands are located in included file, compilation if failed.
Simple example
manual.tex file:
\documentclass{article}
\usepackage{makeidx}
\include{index}
index.tex
\makeindex
\title{A Title}
\author{An Author}
\date{July 19, 2004}
\begin{document}
\maketitle \tableofcontents
\section{First Section}
Some text.
\index{first}
\section{Second Section}
\subsection{A Subsection}
Some text 2
\index{Second}
\printindex
\end{document}
Compilation Error:
! Argument of \idx:extI has an extra }. \par l.11 \ section{Second Section} ?
!!! However in case if contents of file is located in one file, compilation is successfull.
Separate text into two files is obligatory condition in my case.
Could someone help me?

\inputinstead of\include, even if this is not the cause for the problem. – egreg Dec 24 '15 at 14:54\includein that place is conceptually wrong. – egreg Dec 24 '15 at 14:59\@wrindexhas the definition\warn:idx {#1}\title:chs {\html:addr \hbox {\Link -{}{x\last:haddr }\EndL ink }}{}\edef..., whereas with a “normal” document it is defined as\a:wrindex \o:wrindex:. – egreg Dec 24 '15 at 15:05