def aggregated_tex(f, entropy_matrix):
    """
    Write in latex file entropy of 6 groups (need to be change to adapt number of groups)
        
    Parameters
    ----------
        f: file
        
        entropy_matrix: numpy array from proportion_group analysis

    Returns
    -------
        File (Optionnal)
    """
    f.write('\n% 4. Aggregated Diversity')
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupA', entropy_matrix[0])
        )
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupB', entropy_matrix[1])
        )
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupC', entropy_matrix[2])
        )
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupD', entropy_matrix[3])
        )
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupE', entropy_matrix[4])
        )
    f.write('\n\\newcommand{\\%s}{%.2f}' % ('EntropyGroupF', entropy_matrix[5])
        )
    return f
