@classmethod
def get_named_template(cls, name=None, file_=None, source=None, tag=None,
    is_re=False, ignore_mark=False):
    """Extract templates matching section tag and name.

        :param name: Template name. If None, standard output name ``-`` is used.
        :param tag: If None, `adhoc_template(_v)?` is used.
        :param ignore_mark: If True, all templates are mapped to
          standard output name ``-``.

        If a named template cannot be found and `name` does not start
        with ``-``, the template name `-name` is tried.

        >>> ign = main("adhoc.py --template adhoc_test.sub".split())
        # -*- coding: utf-8 -*-
        <BLANKLINE>
        ADHOC_TEST_SUB_IMPORTED = True

        """
    if name is None:
        name = '-'
    file_, source, tag, is_re = cls.std_template_param(file_, source, tag,
        is_re, all_=True)
    templates = cls.get_templates(file_, source, tag, is_re=is_re,
        ignore_mark=ignore_mark, all_=True)
    check_name = name
    if check_name not in templates and not name.startswith('-'):
        check_name = ''.join(('-', name))
    if check_name not in templates and not name.startswith('!'):
        check_name = ''.join(('!', name))
    if check_name in templates:
        template_set = templates[check_name]
    else:
        template_set = ['', 'adhoc_template']
    template = template_set[0]
    template_type = template_set[1]
    if check_name.startswith('!'):
        template = cls.dump_(template, template_type)
    return template
