This question already has an answer here:

I want to show '\' in final pdf file, not as a command to latex, but as a text '\' itself. How can I do this?

marked as duplicate by cfr, dustin, Steven B. Segletes, Troy, marmot Jun 25 '18 at 1:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    \textbackslash – Skillmon Jun 25 '18 at 0:25
  • Also, \string\ or \string\macroname, with \usepackage[T1]{fontenc} activated. – Steven B. Segletes Jun 25 '18 at 0:32

Browse other questions tagged or ask your own question.