I am creating a table which has file name, source and destination file paths, and a short description of each file. The description and flag fields have spaces so the line break can be automatic.
MWE:
\documentclass[a4paper]{article}
\usepackage{tabu}
\usepackage{longtable}
\usepackage{lipsum}
\begin{document}
\begin{longtabu} to \linewidth {|X[1 , l ] |X[1 , l ] | X[1 , l ]| X[.2\linewidth , l ]| X[1 , l ]|}\firsthline\hline
% -----------------These are headings----------------------------------%
Filename & Source & Destination & Flag & Functions \\ \hline
%
\endfirsthead
%
\multicolumn{5}{c}%
{{\bfseries Continued from previous page}} \\ \hline
%
Filename & Source & Destination & Flag & Functions \\ \hline
\endhead
%
\hline \multicolumn{5}{|r|}{{Continued on next page}} \\ \hline
\endfoot
%
\hline
\multicolumn{5}{|r|}{{Concluded}} \\ \hline
\endlastfoot
%-----------Headings end---------------------------------
%--------------------------table body starts-------------------
somereallylongpathtoafile & somereallyreallylongpathtoafile & somereallylongpathtoafile & somereallylongpathtoafile & description of the said file \\
somereallylongpathtoafile & somereallyreallylongpathtoafile & somereallylongpathtoafile & somereallylongpathtoafile & description of the said file \\
somereallylongpathtoafile & somereallyreallylongpathtoafile & somereallylongpathtoafile & somereallylongpathtoafile & description of the said file \\
somereallylongpathtoafile & somereallyreallylongpathtoafile & somereallylongpathtoafile & somereallylongpathtoafile & description of the said file \\
.
.
.
%--------------------------table body ends-------------------
\end{longtabu}
%===============================================================
\end{document}
My question is:
What should be the ideal line break for a file path? Should it be at slashes (folders) or should it be within folder names? and how?
Also, in [a4paper]{article} class what is the \linewidth or \textwidth size? That way, I can fix the table column width and let the forced line break to happen.
Below is the output which I get.


somereallylongpathtoafileis really of no use without the slashes. Btw, my Preamble hashyperrefpackage too. Won't that conflict withurl? – abyshukla Feb 23 '16 at 10:45hyperrefadd the end of your preamble. – Damien Dtx Feb 23 '16 at 10:49geometrypackage to change the page margins. The table now looks good. – abyshukla Feb 23 '16 at 11:27