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

Beuthe, Thomas thomas.beuthe at cnl.ca
Mon Mar 2 19:23:56 CET 2015

UNRESTRICTED | ILLIMITÉ

Many thanks for the replies that have been provided to help clarify this issue.

It's great to know all of the alternatives.

In particular, one that was posted to me privately bears official repeating here:

\documentclass{article}

\begin{document}

\section{Using \textunderscore\ in Section Title}

some text

\end{document}

seems to work just fine.

If you add \usepackage[T1]{fontenc} you'll even get a bold underscore (it will use the CMSuper font family then).

However,  I'm still interested in a definitive answer to the question I posed in the bottom of the submission,

so I will repeat it:

In my short example, using \symbol{'137} worked

whereas using \symbol{\_} did not.

Why is this?

Is the \symbol{'137} form simpler and

therefore works because it is expanded earlier?

If anyone could provide a short explanation,

I think it would be helpful both to me and

everyone else who might contemplate this type

of a solution in the future.

Thanks,

Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20150302/4617f39d/attachment.html>


More information about the texhax mailing list