context-aware formatting