@classmethod
def resolve(cls):
    """Create each code listing in a box at the beginning of the document, so
        they can more easily be included in slides
        Update each in-document instance with appropriate insertion command"""
    if cls.count:
        from beamr.interpreters import Config
        package = Config.getRaw('verbatim')
        packageList = Config.getRaw('~vbtmCmds', 'packageNames')
        if package not in packageList:
            package = packageList[0]
            Config.effectiveConfig['verbatim'] = package
        Config.effectiveConfig['packages'].append(package)
        cls.preambleDefs = Config.getRaw('~vbtmCmds', 'once', package) + '\n'
        for f in cls.todo:
            f.txt = Config.get('~vbtmCmds', 'insertion')(f.lettr)
            if f.head:
                cls.preambleDefs += Config.getRaw('~vbtmCmds', 'foreach',
                    package) % (f.txt, f.head, f.body)
            else:
                cls.preambleDefs += Config.getRaw('~vbtmCmds',
                    'foreachNoLang', package) % (f.txt, f.body)
