# How to break words at paragraph width?

I have a few long nonsensical words I'd like to break at the same place as the other words. How do I do it?

Example below.

The text quoted is:

As an example of the two first properties, the percentage of reads with U in the first position, or A in the tenth, consider the cluster: UUGUUUUUGGUGUUUGUAUCUACAGAA, AACAAAACAAAAAGTTGGGTAGTTTGAGAAC and AACAAAAGGACTAGTGTTCTAGAAGA This cluster consists of three reads, and one of them starts with U. Hence the percentage

Ps. I'm using classicthesis if that matters.

-
what about an minimal working example? – bene Jul 11 '13 at 8:45
They were too involved for such a small task. – The Unfun Cat Jul 11 '13 at 8:55

Maybe you can use the \hyphenation{<words>} command to tell LaTeX how to break your very long words. I suggest to split your words every two letters like this \hyphenation{UU-GU-UU-UU-GG-UG-UU-UG-UA-UC-UA-CA-GA-A}.

But if you have many of these words and all different from each other I don't think this method is very clean and good.. maybe there is something better you can do but I don't know

-
I only had a few, that is why I was looking for a solution like this. – The Unfun Cat Jul 11 '13 at 8:50

Package seqsplit is your friend:

\documentclass{article}
\usepackage{seqsplit}
\begin{document}
As an example of the two first properties, the percentage of reads
with U in the first position, or A in the tenth, consider the cluster:
\seqsplit{UUGUUUUUGGUGUUUGUAUCUACAGAA},
\seqsplit{AACAAAACAAAAAGTTGGGTAGTTTGAGAAC} and
\seqsplit{AACAAAAGGACTAGTGTTCTAGAAGA}.
This cluster consists of three reads, and one of
them starts with U. Hence the percentage \ldots
\end{document}


If you want to have hyphens, then \seqinsert can be redefined (see the documentation of seqsplit):

\renewcommand*{\seqinsert}{\ifmmode\allowbreak\else\-\fi}


-

TeX has no idea how to hyphenate your long words. The discretionary hyphen command \- will tell TeX where a good place to hyphenate the word is.

-