def generate_tikz_foot(tikzpic=True):
    """
    generates end of tex-file
    :param tikzpic: if True include end{tikzpicture} before end{document}
    :return: tex-foot
    """
    if tikzpic:
        tikzCode = '''
        \\end{tikzpicture}
        \\end{document}'''
    else:
        tikzCode = '''
        \\end{document}
        '''
    return tikzCode