infer type from format for display