def styleId_from_name(name):
    """
    Return the style id corresponding to *name*, taking into account
    special-case names such as 'Heading 1'.
    """
    return {'caption': 'Caption', 'heading 1': 'Heading1', 'heading 2':
        'Heading2', 'heading 3': 'Heading3', 'heading 4': 'Heading4',
        'heading 5': 'Heading5', 'heading 6': 'Heading6', 'heading 7':
        'Heading7', 'heading 8': 'Heading8', 'heading 9': 'Heading9'}.get(name,
        name.replace(' ', ''))
