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


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.

closed as too localized by Matthew Leingang, Werner, Marco Daniel, Stefan Kottwitz Apr 28 '12 at 6:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.