I am programmatically creating LaTeX documents. Now, what I wish to do is to have a table in which a file path wraps. I expected I'd be able to do this by defining that column of the table as a paragraph.
The issue is that LaTeX can't work out where to text wrap. Given the text
/Users/me/documents/long/long/long/path
there are no spaces, so it just overlaps, with irritating consequences.
My first solution was just to insert a new line every 30 characters in my Java (ugly but does the job). The issue appears in full when you try to print Windows paths, since there are the backslashes, and escaping them is a massive pain in the neck.
So, is there a package that will make file paths wrap easily? This is a massive pain for me, and since I have been working on this for what seems like a horrible amount of time.
ttfont for the path? I think How to get long \texttt sections to break might be the solution. In short: use the\pathmacro from theurlpackage. Please confirm if this solves your problem, so we can close this as a duplicate question (no problem). Thanks. – Martin Scharrer Apr 18 '12 at 18:26