## LaTeX forum ⇒ Text Formatting ⇒ word wrapping of continuous text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Mima
Posts: 2
Joined: Sat Jan 24, 2009 1:20 am

### word wrapping of continuous text

I have a continuous sequence of letters (no special characters or breaks) and TeX writes it over the right border of the page. How can I wrap this sequence such that line breaks are introduced where the page ends?

Thanks a lot for your help!!

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm
A crude but simple hack (that destroys ligatures and hyphenation) would be to split up the letters and allow breaking everywhere:
\documentclass{article}\makeatletter\newcommand*\wrapletters[1]{\wr@pletters#1\@nil}\def\wr@pletters#1#2\@nil{#1\allowbreak\if&#2&\else\wr@pletters#2\@nil\fi}\makeatother\begin{document}\wrapletters{akjhghjerbhkjgxhdrjgkbhyxksrfihcgbwaemklcjtnhwabketrbmshrkncgaervbetjkewhbgrkjavkjdkvbkjsjkbtkgvnsetbjsrhtservjbtbjkhtvy}\end{document}

Mima
Posts: 2
Joined: Sat Jan 24, 2009 1:20 am
Dear phi

Thanks a lot, that works very well! You helped me a lot.