生成HTML文件
        :return:
        :rtype:

def gen_html(self, book_idx):
        """
        生成HTML文件
        :return:
        :rtype:
        """
        toc = self._gen_toc(book_idx)
        start, end = self._start_end_of_index(book_idx)
        content = '\n'.join([chap.txt2html() for chap in self._chapters[start: end]])
        html = """<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{book_title}</title>
    <style type="text/css">
    p {{ margin-top: 1em; text-indent: 0em; }}
    h1 {{margin-top: 1em}}
    h2 {{margin: 2em 0 1em; text-align: center; font-size: 2.5em;}}
    h3 {{margin: 0 0 2em; font-weight: normal; text-align:center; font-size: 1.5em; font-style: italic;}}
    .center {{ text-align: center; }}
    .pagebreak {{ page-break-before: always; }}
    </style>
</head>
<body>
<a name="toc"/>
{toc}
<!-- Your book goes here -->
{content}
</body>
</html>
        """.format(
            book_title=self._title,
            toc=toc,
            content=content
        )
        return html