I use longtabu
package for creating tables, because the table can be very long (several pages) and i need automatic linebreak(or wordbreak) if the sentence(or a single word) in certain cell is too long.
In most cases, longtabu
works well for my purpose. But, if a long word contains underscore, for example, AAA_BB_CCC_D_EEEEEE_FFF_GGGGG_HHHHHH
(I replace _
as \\_
in latex), then the word can not be linebreaked and it cross out of the border of the cell to the next cell.
How can longtabu
automatically break a long word with underscore? I want the very long word can automatically fit the length of a cell.
Best Answer
You can add some potential breaking points to the long word by adding
\-
(if you want a hyphen when breaking} or\allowbreak
(if you don't).Examples
resulting in
more information at this related question