6

How can I write a path with LaTeX? I want something like this:

C:\\Program Files\\My Program\\my file.txt  

I have to use double slashes, not single ones.

Yerko Antonio
  • 657
  • 3
  • 8
  • 16

1 Answers1

7

Found this:

How does one insert a backslash or a tilde into Latex

The Comprehensive LaTeX Symbol List is your friend. \textbackslash and \textasciitilde are found in Table 2 of the list

So you should try

C:\textbackslash\textbackslash Program Files\textbackslash\textbackslash My Program\textbackslash\textbackslash my file.txt
Community
  • 1
  • 1
ppeterka
  • 20,583
  • 6
  • 63
  • 78