def write_chapter(master, title, filename):
    filename = os.path.join(os.path.dirname(filename),
                            "_part_%s" % os.path.basename(filename))
    master.write(r"""
\chapter{%s}
\label{%s}
\input{%s}
""" % (title, filename, filename))


# the program ----
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/lxml-3.3.6/doc/mklatex.py/write_chapter/original