\addtocontents command adds text (or formatting commands) directly
to the file that generates the table of contents or list of figures or
fileis the extension of the file on which information is to be written:
toc(table of contents),
lof(list of figures), or
lot(list of tables).
textis the information to be written.