Suppose I have written a very long document using \usepackage[T1]{fontenc}
; then I remove the line to revert to the default OT1 encoding (or vice versa.) Now I want to know if anything's changed in the output, without trying to do it by eye over 180 pages.
As far as I know, the typeable ASCII characters which correspond to different characters in T1 vs. OT1 are |, <, >, and ". (Also different are {, }, _, and \, but these have special meaning to TeX, so as far as I know you have to use a macro to get them in the output, which should always work regardless of encoding.)
Is it true that the only differences in the content of the output (disregarding the appearance of the font, hyphenation, etc.) when changing the font encoding are where |, <, >, or " are used in the source outside math mode?
And, is there any tool which can find all such occurrences?
The tricky part of such a tool would be figuring what's math mode and what isn't!
Also, for my case, it would be really great if it could disregard TikZ constructs using |, <, >, or " (e.g. the quotes
syntax), but not actual text within a tikzpicture
.
grep
sed
andgawk
. But the details will be specific to the way you've coded the document. The more consistent your coding, the easier it will be for you to create suitable regular expressions for searching. If your code is all over the place, the 'find' function of your editor will likely be quicker.