bug fixes (set special attribute for ToC header style, and guard against invalid entity name from filename