'Requires:
field_name -- the name of the first word in the string
name --the changed name, according to the dictionary.
line --the string to be parsed.
Returns:
A string for a TOC table field.
Logic:
If the string contains Figure, it is a table of figures.
Otherwise, it is a plain old table of contents.'

def __toc_table_func(self, field_name, name, line):

    the_string = name
    index = line.find('\\c    "Figure"')
    if (index > (-1)):
        the_string = the_string.replace('table-of-contents', 'table-of-figures')
    return [name, None, the_string]
