Installed the changes for version 1.3, almost all of which involve implementing templates for namelist structures.

1. Modified "template_substitution()" and "simplify_template()" to call the new "get_variable()" function. This allows for using indexed variable names.

2. Added three new template properties: implicit indexing (using an index of ".n"), implicit loops (using an ellipsis), and function calls (using a ".function_name()" notation). These are enabled with the introduction three new functions: get_indexed_variable(), get_variable_name_elements(), and fillout_implicit_loop().

3. Removed functions which are no longer used: format_namelist(), and namedict_to_formatted_namestr().

FUNCTIONS DROPPED FROM Bibulous ver 1.3:

def format_namelist(namelist, options, nametype='author'):
    '''
    Format a list of dictionaries (one dict for each person) into a long string, with the format according to the
    directives in the bibliography style template.

    Parameters
    ----------
    namelist : str
        The list of dictionaries containing all of the names to be formatted.
    nametype : str, {'author', 'editor'}, optional
        Whether the names are for authors or editors.
    options : dict
        The dictionary of keyword-based options.

    Returns
    -------
    namestr : str
        The formatted form of the "name string". This is generally a list of authors or list of editors.
    '''

    use_first_inits = options['use_firstname_initials']
    namelist_format = options['namelist_format']

    ## First get all of the options variables needed below, depending on whether the function is operating on a list of
    ## authors or a list of editors. Second, insert "authorlist" into the bibliography database entry so that other
    ## functions can have access to it. (This is the "author" or "editor" string parsed into individual names, so that
    ## each person's name is represented by a dictionary, and the whole set of names is a list of dicts.)
    if (nametype == 'author'):
        maxnames = options['maxauthors']
        minnames = options['minauthors']
    elif (nametype == 'editor'):
        maxnames = options['maxeditors']
        minnames = options['mineditors']

    ## This next block generates the list "namelist", which is a list of strings, with each element of `namelist` being
    ## a single author's name. That single author's name is encoded as a dictionary with keys "first", "middle",
    ## "prefix", "last", and "suffix".
    npersons = len(namelist)
    new_namelist = []
    for person in namelist:
        ## The BibTeX standard states that a final author in the authors field of "and others" should be taken as
        ## meaning to use \textit{et al.} at the end of the author list.
        if ('others' in person['last']) and ('first' not in person):
            npersons -= 1
            maxnames = npersons - 1
            continue

        ## From the person's name dictionary, create a string of the name in the format desired for the final BBL file.
        formatted_name = namedict_to_formatted_namestr(person, options=options,
                                                       use_firstname_initials=use_first_inits,
                                                       namelist_format=namelist_format)
        new_namelist.append(formatted_name)

    ## Now that we have the complete list of pre-formatted names, we need to join them together into a single string
    ## that can be inserted into the template.
    if (npersons == 1):
        namestr = new_namelist[0]
    elif (npersons == 2):
        namestr = ' and '.join(new_namelist)
    elif (npersons > 2) and (npersons <= maxnames):
        ## Make a string in which each person's name is separated by a comma, except the last name, which has a comma
        ## then "and" before the name.
        namestr = ', '.join(new_namelist[:-1]) + ', and ' + new_namelist[-1]
    elif (npersons > maxnames):
        ## If the number of names in the list exceeds the maximum, then truncate the list to the first "minnames" only,
        ## and add "et al." to the end of the string giving all the names.
        namestr = ', '.join(new_namelist[:minnames]) + r', \textit{et al.}'
    else:
        raise ValueError('How did you get here?')

    ## Add a tag onto the end if describing an editorlist.
    if (nametype == 'editor'):
        if (npersons == 1):
            namestr += ', ed.'
        else:
            namestr += ', eds'

    return(namestr)

def namedict_to_formatted_namestr(namedict, options=None, use_firstname_initials=True,
                                  namelist_format='first_name_first'):
    '''
    Convert a name dictionary into a formatted name string.

    Parameters
    ----------
    namedict : dict
        The name dictionary (contains a required key "last" and optional keys "first", "middle", "prefix", and "suffix".
    options : dict, optional
        Includes formatting options such as
        'use_name_ties': Whether to use '~' instead of spaces to tie together author initials.
        'terse_inits': Whether to format initialized author names like "RMA Azzam" instead of the default form \
            "R. M. A. Azzam".
        'french_intials': Whether to initialize digraphs with two letters instead of the default of one.\
            For example, if use_french_initials==True, then "Christian" -> "Ch.", not "C.".
        'period_after_initial': Whether to include a '.' after the author initial.
    use_firstname_initials : bool, optional
        Whether or not to initialize first names.
    namelist_format : str, optional
        The type of format to use for name formatting. ("first_name_first", "last_name_first")

    Returns
    -------
    namestr : str
        The formatted string of the name.
    '''

    if (options == None):
        options['use_name_ties'] = False
        options['terse_inits'] = False
        options['french_intials'] = False
        options['period_after_initial'] = True

    lastname = namedict['last']
    firstname = '' if ('first' not in namedict) else namedict['first']
    middlename = '' if ('middle' not in namedict) else namedict['middle']
    prefix = '' if ('prefix' not in namedict) else namedict['prefix']
    suffix = '' if ('suffix' not in namedict) else namedict['suffix']

    if use_firstname_initials:
        firstname = initialize_name(firstname, options)
        middlename = initialize_name(middlename, options)

    if (middlename != ''):
        if options['terse_inits']:
            frontname = firstname + middlename
            frontname.replace(' ','')
        elif options['use_name_ties']:
            middlename = middlename.replace(' ','~')    ## replace spaces with tildes
            frontname = firstname + '~' + middlename
        else:
            frontname = firstname + ' ' + middlename
    else:
        frontname = firstname

    ## Reconstruct the name string in the desired order for the formatted bibliography.
    if (namelist_format == 'first_name_first'):
        if (prefix != ''): prefix = ' ' + prefix
        if (suffix != ''): suffix = ', ' + suffix
        if (frontname + prefix != ''): prefix = prefix + ' '    ## provide a space before last name
        namestr = frontname + prefix + lastname + suffix
    elif (namelist_format == 'last_name_first'):
        if (prefix != ''): prefix = prefix + ' '
        if (suffix != ''): suffix = ', ' + suffix
        ## Provide a comma before the first name.
        if (frontname + suffix != ''): frontname = ', ' + frontname
        namestr = prefix + lastname + frontname + suffix

    return(namestr)
Implemented many changes to the testing suite corresponding to the new template-based formatting of namelists.
Installed templates for namelists.

Added template variable operators .sentence_case(), .ordinal(), .monthname(), .monthabbrev(), .to_namelist(), .format_authorlist(), and .format_editorlist().

Added special templates "authorlist = <author.to_namelist()>" and "editorlist = <editor.to_namelist()>".

Changed the <authorliststr> and <editorliststr> variables to the shorter forms <au> and <ed>.

Changed the default templates for <au> and <ed> to use built-in code rather than templates in order to take advantage of the former's speed.

Added the two functions "format_namelist()" and "namedict_to_formatted_namestr()" back into the code, so that if users opt for the default namelist formatting then they can take advantage of full-speed processing that does not use templates to create formatted namelists (a 4x speedup). This has nowhere near the flexibility of the template-based approach, but it is a lot faster.