i use the datatool
package to read a csv table which contains names of chemical compounds in one column. Those names are very long and have to be hyphenated. The problem is that these names contain -
.
have a look at this example:
\documentclass{article}
\usepackage{siunitx}
\def\hyph{-\penalty0\hskip0pt\relax}
\begin{table}
\begin{tabular}{|>{\raggedright\hspace{0pt}}p{14mm}|l|}
name & value \\\hline
docosahexaenoylglycerophosphocholine & 1.0 \\
1-docosahexaenoylglycerophosphocholine & 1.0\\
1\hyph docosahexaenoylglycerophosphocholine & 1.0
\end{tabular}
\end{table}
\end{document}
in the first row the name hyphenated but not in the second one. I found a workaround for the third line (from https://stackoverflow.com/questions/2193307/how-to-get-latex-to-hyphenate-a-word-that-contains-a-dash) but as I read the names from a csv file (and this is really big) i can't replace all -
by \hyph
.
Is there any other solution to allow hyphenation of already hyphenated words inside (and only inside) the table environment?
bye