Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to format a long paper of mine for the kindle. The following works, but there's a problem.

 \usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.1cm, left=0.1cm, right=0.1cm, bottom=0.1cm]{geometry}

Sometimes if a line break is needed in the middle of a word and LaTeX doesn't like the break locations (i.e., it would cause underfull box rather than overfull), it doesn't bother with a hyphen or word wrap. This makes some words run right off the edge of the screen.

How can I convince LaTeX to wrap there and have an underfull line rather than having words run right off the edge of the page? That later seems quite a lot worse to me.

I'd rather not have to hand tune each line, since the usual format is a regular page, not a kindle page — this is just for proofreading on the road.

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Try adding \sloppy at the beginning of your document. This sets the value of \tolerance, which TeX uses as part of its linebreaking and hypehenation rules, to 9999. This will allow really 'bad' breaks, from a TeX point of view, but may solve your particular problem.

share|improve this answer
add comment
\listfiles
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{mathpazo}
\usepackage{tgpagella}
\usepackage[paperwidth=9cm, paperheight=11.5cm, 
            top=0.1cm, left=0.1cm, right=0.1cm, 
            bottom=0.1cm]{geometry}
\usepackage{microtype}
\usepackage{blindtext}

\begin{document}

\blindtext

A verrrrrrrrrrrrrrrrry loooooooooooooong \mbox{woooooooord}
\blindtext

\begin{sloppypar}
A verrrrrrrrrrrrrrrrry loooooooooooooong \mbox{woooooooord}
\blindtext
\end{sloppypar}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.