0

I'm trying to typeset a manual with Texmaker for a computer program I've been working on, but I'm getting undefined control sequence errors when I try to insert a filepath in the format C:\Users\username. . .

There's probably an obvious solution, but it's been a long while since I used latex, and I can't find any answers online.

To make it clear, I'm trying to insert this filepath as plain text only, no fancy links, it's just text within sentence.

  • 1
    Because \Users would be interpreted as command you have to either declare the \ as string (e.g. \string\Users) or replace \ by \textbackslash or use \verb|C:\Users\username| or \url{C:\Users\username} (needs package url). – Schweinebacke Sep 04 '17 at 10:29
  • I used \textbackslash and it's working fine, thanks! – R.McGuigan Sep 04 '17 at 10:36

1 Answers1

2

\verb+C:\Users\username...+, where + is a character that does not appear in the string inside. You can also put it inside \begin{verbatim} ... \end{verbatim}.

  • I tried verbatim but it formatted the text in an undesired fashion. I've used \textbackslash which someone here suggested and it is working fine – R.McGuigan Sep 04 '17 at 10:39