def export_set(dataset):
    """Returns LaTeX representation of dataset

    :param dataset: dataset to serialize
    :type dataset: tablib.core.Dataset
    """

    caption = '\\caption{%s}' % dataset.title if dataset.title else '%'
    colspec = _colspec(dataset.width)
    header = _serialize_row(dataset.headers) if dataset.headers else ''
    midrule = _midrule(dataset.width)
    body = '\n'.join([_serialize_row(row) for row in dataset])
    return TABLE_TEMPLATE % dict(CAPTION=caption, COLSPEC=colspec,
                                 HEADER=header, MIDRULE=midrule, BODY=body)
dataset/ETHPy150Open kennethreitz/tablib/tablib/formats/_latex.py/export_set/original