0

I want to use a \verb command in a \footnotetext in pdfLatex, like:

\footnotetext{Some text \verb|some\_text|}

But, I encounter:

 ! Missing } inserted.
<inserted text> 
                }
C2121
  • 11

1 Answers1

1

There are a number of solutions proffered at How to obtain verbatim text in a footnote? Is there a particular reason that you're calling \footnotetext directly? If so, some of these may not work, but using fancyvrb and its \SaveVerb/\UseVerb facility may give you what you need. See the documentation for more details.

Don Hosek
  • 14,078
  • I have tested the documentation example: \DefineShortVerb{\|} \SaveVerb{Verb}|_verbatim_| text \UseVerb{Verb}. But, I throw errors! – C2121 Oct 22 '20 at 01:20
  • 1
    Did you add \usepackage{fancyvrb} to your document preamble? What errors are you getting? – Don Hosek Oct 22 '20 at 01:23