Sort numerical values in text documents by converting to tables or using command-line flags to prevent lexicographic errors.