Printing % as a string in LaTeX starts a comment, which best case doesn't print the "%" and worst case breaks the LaTeX code. All "%" in strings to be printed should be removed.
Does the LaTeX printer have an existing function for character escaping?
When addPercent is used, the '%' is escaped, but percent signs aren't automatically checked for in the strings, if that's what you're asking.
This ought to be something printers account for before adding contents to a Doc and is likely a better/complimentary idea as each language has its own set of "meaningful" characters and strings. For example, < and > should be escaped in HTML, \ $ to name a few for LaTeX.
Not "removed" nor "escaped". Finding a % in a String destined for LaTeX should be a hard error. And indeed for the others that @Mornix mentions. We should not be embedding such characters in our English ever!
Most helpful comment
Not "removed" nor "escaped". Finding a
%in aStringdestined for LaTeX should be a hard error. And indeed for the others that @Mornix mentions. We should not be embedding such characters in our English ever!