'Add Titles to the basic NCX file.
Generate the Titles NCX content, add to self.ncx_soup.
Inputs:
books_by_title (list)
Updated:
play_order (int)
Outputs:
ncx_soup (file): updated'

def generate_ncx_by_title(self, tocTitle):

    self.update_progress_full_step(_('NCX    for    Titles'))
    def _add_to_books_by_letter(current_book_list):
        current_book_list = '    &bull;    '.join(current_book_list)
        current_book_list = self.format_ncx_text(current_book_list, dest='description')
        books_by_letter.append(current_book_list)
    ncx_soup = self.ncx_soup
    output = 'ByAlphaTitle'
    if self.generate_for_kindle_mobi:
        body = ncx_soup.find('navPoint')
    else:
        body = ncx_soup.find('navMap')
    btc = len(body.contents)
    navPointTag = Tag(ncx_soup, 'navPoint')
    if self.generate_for_kindle_mobi:
        navPointTag['class'] = 'section'
    navPointTag['id'] = 'byalphatitle-ID'
    navPointTag['playOrder'] = self.play_order
    self.play_order += 1
    navLabelTag = Tag(ncx_soup, 'navLabel')
    textTag = Tag(ncx_soup, 'text')
    section_header = ('%s    [%d]' % (tocTitle, len(self.books_by_title)))
    if self.generate_for_kindle_mobi:
        section_header = tocTitle
    textTag.insert(0, NavigableString(section_header))
    navLabelTag.insert(0, textTag)
    nptc = 0
    navPointTag.insert(nptc, navLabelTag)
    nptc += 1
    contentTag = Tag(ncx_soup, 'content')
    contentTag['src'] = ('content/%s.html#section_start' % output)
    navPointTag.insert(nptc, contentTag)
    nptc += 1
    books_by_letter = []
    sort_equivalents = self.establish_equivalencies(self.books_by_title, key='title_sort')
    if self.use_series_prefix_in_titles_section:
        title_list = self.books_by_title
    else:
        title_list = self.books_by_title_no_series_prefix
    current_letter = self.letter_or_symbol(sort_equivalents[0])
    title_letters = [current_letter]
    current_book_list = []
    current_book = ''
    for (idx, book) in enumerate(title_list):
        if (self.letter_or_symbol(sort_equivalents[idx]) != current_letter):
            _add_to_books_by_letter(current_book_list)
            current_letter = self.letter_or_symbol(sort_equivalents[idx])
            title_letters.append(current_letter)
            current_book = book['title']
            current_book_list = [book['title']]
        elif ((len(current_book_list) < self.opts.description_clip) and (book['title'] != current_book)):
            current_book = book['title']
            current_book_list.append(book['title'])
    _add_to_books_by_letter(current_book_list)
    for (i, books) in enumerate(books_by_letter):
        navPointByLetterTag = Tag(ncx_soup, 'navPoint')
        if self.generate_for_kindle_mobi:
            navPointByLetterTag['class'] = 'article'
        navPointByLetterTag['id'] = ('%sTitles-ID' % title_letters[i].upper())
        navPointTag['playOrder'] = self.play_order
        self.play_order += 1
        navLabelTag = Tag(ncx_soup, 'navLabel')
        textTag = Tag(ncx_soup, 'text')
        if (len(title_letters[i]) > 1):
            fmt_string = _(u'Titles    beginning    with    %s')
        else:
            fmt_string = _(u"Titles    beginning    with    '%s'")
        textTag.insert(0, NavigableString((fmt_string % (title_letters[i] if (len(title_letters[i]) > 1) else title_letters[i]))))
        navLabelTag.insert(0, textTag)
        navPointByLetterTag.insert(0, navLabelTag)
        contentTag = Tag(ncx_soup, 'content')
        if (title_letters[i] == self.SYMBOLS):
            contentTag['src'] = ('content/%s.html#%s_titles' % (output, self.SYMBOLS))
        else:
            contentTag['src'] = ('content/%s.html#%s_titles' % (output, self.generate_unicode_name(title_letters[i])))
        navPointByLetterTag.insert(1, contentTag)
        if self.generate_for_kindle_mobi:
            cmTag = Tag(ncx_soup, ('%s' % 'calibre:meta'))
            cmTag['name'] = 'description'
            cmTag.insert(0, NavigableString(self.format_ncx_text(books, dest='description')))
            navPointByLetterTag.insert(2, cmTag)
        navPointTag.insert(nptc, navPointByLetterTag)
        nptc += 1
    body.insert(btc, navPointTag)
    btc += 1
    self.ncx_soup = ncx_soup
