In a previous question was answered how to escape curly braces within \texttt{}. On answer suggest using the fontenc package.
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\(a + \underbrace{\mbox{\tt\{c\}}}_d\)
\end{document}

Another answer suggest using \string{. However, in this case I got an error. Sorry, I do not get why it was raising an error. Example bellow works fine.
\documentclass{article}
\begin{document}
\(a + \underbrace{\mbox{\tt\string{c\string}}}_d\)
\end{document}
I now that in this case fontenc solves the problem. Thus, my question is how can I this without using fontenc. I do not see problems with fontenc is only curiosity.


fontencfor it. Do you want to write it to some file? – Oct 07 '14 at 14:28\texttt\stringthe argument to\textttis\stringwhich will then generate an error. You don't need\mboxaround\textttso what do you want that is different to\underbrace{\texttt{\{c\}}}}– David Carlisle Oct 07 '14 at 14:33fontencbut without using it. – Daniel Hernández Oct 07 '14 at 14:35