I have some text that nearly fits the given line width. I can see that a minimal adjustment of font size or kerning would make the text fit, but how do I tell LaTeX to squeeze the text? Yes, this would be bad typography for an average paragraph, but in my case it is a custom In a custom quotation environment, that has a smaller font size anyway, so it won't look ugly.
Asked
Active
Viewed 3,953 times
3 Answers
2
Just put the last few words inside an \mbox{...} to discourage breaking the line.
doncherry
- 54,637
-
Welcome to TeX.sx! A tip: You can use backticks ``` to mark your inline code as I did in my edit. – doncherry Aug 23 '12 at 16:34
-
While this will work, it will still be (possibly very visible) longer than the other lines and cause an
overfull hboxwarning. – Tom Bombadil Aug 23 '12 at 20:13 -
1
\mbox{}is used to mark a word not to be hyphenated.\sloppycould perhaps help here, better is to use packagemicrotype. – Mensch Sep 13 '12 at 22:47
\SetExpansion[context = sloppy,shrink = 60,...]{encoding = {OT1,T1,TS1} }{}in your preamble. Then you can write something like{\microtypecontext{expansion=sloppy}This line is a smidgen too long...}to kick in the local 'sloppy' context adjustment on just the enclosed text. – Geoffrey Jones Sep 24 '10 at 12:08