docs: def add_tagged_journal(reading_line,
                         journal_info,
                         previous_match,
                         startpos,
                         true_replacement_index,
                         extras,
                         standardised_titles):
      """In rebuilding the line, add an identified periodical TITLE (standardised
         and tagged) into the line.
         @param reading_line: (string) The reference line before capitalization
          was performed, and before REPORT-NUMBERs and TITLEs were stripped out.
         @param len_title: (integer) the length of the matched TITLE.
         @param matched_title: (string) the matched TITLE text.
         @param previous_match: (dict) the previous periodical TITLE citation to
          have been matched in the current reference line. It is used when
          replacing an IBID instance in the line.
         @param startpos: (integer) the pointer to the next position in the
          reading-line from which to start rebuilding.
         @param true_replacement_index: (integer) the replacement index of the
          matched TITLE in the reading-line, with stripped punctuation and
          whitespace accounted for.
         @param extras: (integer) extras to be added into the replacement index.
         @param standardised_titles: (dictionary) the standardised versions of
          periodical titles, keyed by their various non-standard versions.
         @return: (tuple) containing a string (the rebuilt line segment), an
          integer (the next 'startpos' in the reading-line), and an other string
          (the newly updated previous-match).
      """
      old_startpos = startpos
      old_previous_match = previous_match
      skip_numeration = False
      series = None
  
      def skip_ponctuation(line, pos):
          # Skip past any punctuation at the end of the replacement that was
          # just made:
          try:
              while line[pos] in (".", ":", "-", ")"):
                  pos += 1
          except IndexError:
              # The match was at the very end of the line
              pass
  
          return pos
  
      # Fill 'rebuilt_line' (the segment of the line that is being rebuilt to
      # include the tagged and standardised periodical TITLE) with the contents
      # of the reading-line, up to the point of the matched TITLE:
      rebuilt_line = reading_line[startpos:true_replacement_index]
  
      # Test to see whether a title or an "IBID" was matched:
      if journal_info.upper().find("IBID") != -1:
          # This is an IBID
          # Try to replace the IBID with a title:
          if previous_match:
              # Replace this IBID with the previous title match, if possible:
              rebuilt_line += add_tagged_journal_in_place_of_IBID(previous_match)
              series = previous_match['series']
              # Update start position for next segment of original line:
              startpos = true_replacement_index + len(journal_info) + extras
              startpos = skip_ponctuation(reading_line, startpos)
          else:
              rebuilt_line = ""
              skip_numeration = True
      else:
          if ';' in standardised_titles[journal_info]:
              title, series = \
                  standardised_titles[journal_info].rsplit(';', 1)
              series = series.strip()
              previous_match = {'title': title,
                                'series': series}
          else:
              title = standardised_titles[journal_info]
              previous_match = {'title': title,
                                'series': None}
  
          # This is a normal title, not an IBID
          rebuilt_line += "<cds.JOURNAL>%s</cds.JOURNAL>" % title
          startpos = true_replacement_index + len(journal_info) + extras
          startpos = skip_ponctuation(reading_line, startpos)
  
      if not skip_numeration:
          # Check for numeration
          numeration_line = reading_line[startpos:]
          # First look for standard numeration
          numerotation_info = find_numeration(numeration_line)
          if not numerotation_info:
              numeration_line = rebuilt_line + " " + numeration_line
              # Now look for more funky numeration
              # With possibly some elements before the journal title
              numerotation_info = find_numeration_more(numeration_line)
  
          if not numerotation_info:
              startpos = old_startpos
              previous_match = old_previous_match
              rebuilt_line = ""
          else:
              if series and not numerotation_info['series']:
                  numerotation_info['series'] = series
              startpos += numerotation_info['len']
              rebuilt_line += create_numeration_tag(numerotation_info)
  
              previous_match['series'] = numerotation_info['series']
  
      # return the rebuilt line-segment, the position (of the reading line) from
      # which the next part of the rebuilt line should be started, and the newly
      # updated previous match.
      return rebuilt_line, startpos, previous_match