My question is similar to Wrap long text content that have no spaces where there are two answers to wrap content such as
\seqsplit{ATGTCCACTGATAAAAGTACACGCTATAATTTTCAGATTGAGAAAGCCCCCTCGTTGGCGTACGCTGCAGGTCGAC}
or the custom macro mentioned in the answer above
\def\enablehyph#1{\enablehyphA #1\end}
\def\enablehyphA#1{\ifx\end#1\unskip\unpenalty
\else#1\penalty0\hskip0pt plus1pt\relax
\expandafter\enablehyphA\fi}
\enablehyph{dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd}
These work and they do the job in that the content is wrapped onto a new line when reaching the margings, however, the content is not wrapped when there is content with spacing, for example:
\enablehyph{some other text here to wrap dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd}
Using either the custom macro or using \seqsplit the content is not wrapped onto a new line.
Is there a way I can wrap the content in the example scenario? Either a custom macro, a new command or away to apply across the whole document.



\enablehyphwould be necessary? – egreg Jul 06 '21 at 14:04