[texhax] Use of \symbol{`\_} versus \symbol{'137} to produce \verb+_+ in moving arguments.

William F Hammond hmwlfsr at yahoo.com
Wed Feb 25 20:53:04 CET 2015

> The trick is here the robustness of "\textunderscore", defined
> by LaTeX's NFSS2e commands. It also works for OT1, but
> T1 is the better encoding here, because it contains the
> underscore as glyph and is not constructed as poor man's
> solution by a rule as in the OT1 encoding.

If in the first place the reason for wanting to use tt in a
report chapter title is that the underscore without tt does
not properly match the other characters, then I think it
would be better to emulate the underscore with a rule, as,
for example, \protect\rule[-0.2ex]{0.5em}{0.15ex}.  For this
it's relevant whether or not the tt would be used, say, only
to "highlight" the name of a string variable inside a longer
chapter title.

IMO setting a report chapter title in tt looks bad; it might
be more tolerable in a section title.

                              -- Bill

Email: hmwlfsr at yahoo.com
       gellmu at gmail.com

More information about the texhax mailing list