'Private method for joining footnotes to body. This method reads from
the temporary file until the proper footnote marker is found. It
collects all the tokens until the end of the footnote, and returns
them as a string.'

def __get_foot_from_temp(self, num):

    look_for = (('mi<mk<footnt-ope<' + num) + '\n')
    found_foot = 0
    string_to_return = ''
    for line in self.__read_from_foot_obj:
        if found_foot:
            if (line == 'mi<mk<footnt-clo\n'):
                return string_to_return
            string_to_return = (string_to_return + line)
        elif (line == look_for):
            found_foot = 1
