For my thesis, I want to create a list/table with the file paths of all data I show in my figures.
What I came up so far is a combination of tabularx
and longtable
(via ltxtable
), and putting the path of the files into the \path
command of hyperref
. Unfortunately, neither \path
nor \url
are able to cope with special characters like ä,ö,ü,µ
that can be present in the file names. \path{blaµ}
inserts broken characters while \url{blaµ}
doesn't compile at all.
In total, I have ~200 very long file names. How could I obtain a proper list?
Bonus question: Is there any nicer way to make the table wider than the print area instead of the ugly 1.2\textwidth
(which ofc raises an overfull hbox)? For my other tables I used the \centerfloat
command of memoir
, but this doesn't work for the non-floating longtable.
My MnWE:
\documentclass[a4paper,12pt,ngerman]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{varioref}
\usepackage[hidelinks]{hyperref}
\usepackage{longtable}
\usepackage{ltxtable}
\usepackage[nameinlink]{cleveref}
\addto\captionsngerman{
\def\figurename{Abb.}
}
\begin{document}
\begin{figure}
\includegraphics[width=3cm]{example-image-a}
\caption{my figure}
\label{fig:a}
\end{figure}
\LTXtable{1.2\textwidth}{filelist.tex}
\end{document}
The content of filelist.tex
:
begin{longtable}{@{}llX@{}}
\caption{List of data files}\\
Fig. & Details & Path \\\midrule
\cref{fig:a} & bla bla & \path{Curry-Charakterisierung/Abbildungsverhältnis/20190402_b_Ne_0,5mMC_KPF_3D_1s_sort.dat} \\
\end{longtable}
The result:
Best Answer
This allows breaking just at
/
If you want to also allow breaking after
_
you could adjust to