When creating a custom glossary (nomenclature) with a longtable, the system only uses automatic word braking for cells with more than one word.
The column is a p{...}-column and it works flawlessly in cells with more than one word.
When I do manual word hyphenation via \- the correct line break is being created.
For cells with more than one word the hyphenation is placed automatically.
Update: As suggested here compiling with LuaLaTeX solves the problem although I'm not happy with it. I also don't understand why the solution given by @DavidCarlisle didn't work.
Update 2:
Problem is solved. The word being the first word in the paragraph was indeed the problem. Because I was defining a glossary style I had to add \hspace*{0pt}to the template of the column instead of the column definition. In my case this means that
\renewcommand*{\glossentry}[2]{% Change the displayed items
\boldmath\ensuremath{\glossentrysymbol{##1}}
& \glstarget{##1}{\hspace*{0pt}\glossentryname{##1}} %
& \glossentrydesc{##1}
& \glsentryunit{##1}\tabularnewline
}%
works, while
\setglossarystyle{long4col}% base this style on the list style
\renewcommand{\glsgroupskip}{}%avoids grouping the elements by alphabetical order
\renewenvironment{theglossary}{% Change the table type --> 4 columns
\renewcommand*{\arraystretch}{1.5}
\begin{longtable*}{>{\centering}p{.1\textwidth} >{\arraybackslash\hspace*{0pt}}p{.225\textwidth} p{.475\textwidth}>{\centering\arraybackslash}p{.1\textwidth}}}%
{\end{longtable*}}%
did not work.
>{\hspace{0pt}}p{..}so there is a zero width space before the word – David Carlisle Apr 12 '21 at 08:05\hspace{0pt}, to ensure that the first word in the cell isn't the first object.) If you're free to use Lua(La)TeX, a nice side benefit of making the switch is that even the first word of a paragraph can get hyphenated withouth having to go through various contortions. – Mico Apr 12 '21 at 08:17p{...}to>{\hspace{0pt}}p{...}-- what exactly isn't working? Are you receiving error and/or warning messages? If so, what do they say? Incidentally, did you make sure to load thearraypackage? – Mico Apr 12 '21 at 08:37