Setup for Sphinx extension.

    :param app: Sphinx application context.

def setup(app):
    """
    Setup for Sphinx extension.

    :param app: Sphinx application context.
    """
    try:
        app.info('adding bolditalic role...', nonl=True)
        app.add_role('bolditalic', bolditalic)
        app.connect('env-updated', css)
        app.info(' done')
    except Exception:
        app.warn('Failed to initialize bolditalic styling.')
    return {
        'version': __version__,
        'parallel_read_safe': True,
        'parallel_write_safe': True,
        }