I am trying to link to a directory while being in a tabular environment. The path of the directory usually is pretty long and should linebreak at the boarders of the table. Additionally it would be great if the directory opens (on Windows machines) clicking on a link (or the directory-string itself).
I tried following code:
\documentclass[10pt]{article}
\usepackage{a4,graphicx}
\usepackage[hyphens]{url}
\usepackage{hyperref}
\begin{document}
\begin{tabular}{|ll|}
\hline
\parbox{60mm}{\bf desiredOutput:} & \parbox[t]{80mm}{\url{\\\\this\\is\\my\\veryLongDirectory\\which\\should\_be\_lineBreaking\\only\_at\_the\_boarders\_of\\my\\table\\ABC\_abc\_DEF\_def}} \\
\parbox{60mm}{\bf withRef:} & \parbox[t]{80mm}{\href{run:\\\\this\\is\\my\\veryLongDirectory\\which\\should\_be\_lineBreaking\\only\_at\_the\_boarders\_of\\my\\table\\ABC\_abc\_DEF\_def}{open dir works only here...}} \\
\parbox{60mm}{\bf badOutput:} & \parbox[t]{80mm}{'\\\\this\\is\\my\\veryLongDirectory\\which\\should\_be\_lineBreaking\\only\_at\_the\_boarders\_of\\my\\table\\ABC\_abc\_DEF\_def'} \\
\hline
\end{tabular}
\end{document}
which gives me this output:
In this example the produced string for the desiredOutput line is good although I would like to have the option to remove the box around the string. Also I don't want to open a browser on click. Therefore I created the reference which works fine (see line withRef).
How can I produce my desired links?
\usepackage[colorlinks=true,breaklinks=true]{hyperref}
?\parbox
in the tabular. use the p-column type instead.