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 have learned to use \pretolerance and \tolerance but sometimes TeX decides to "compress" the broken line of text within the paragraph by simply using less space between the words on the line, and I don't like it. So, if the commands above specify maximum allowed tolerance for lines, what specifies the minimum tolerance - controlling minimum interword spacing across the document?

share|improve this question
2  
tolerance actually is a measure of shrinking as well as stretching, change in either direction contributes to the badness of the paragraph. Unlike stretch though where TeX will over-stretch if it needs to, glue never shrinks more than specified in its shrink component, so that is a hard limit. (set by the font parameters initially as shown in Herbert's answer) –  David Carlisle Jun 7 at 20:16
    
Are you saying that the shrink factor applied to the glue can only be controlled by the font parameters? –  amn Jun 7 at 20:20
1  
@amn There are \spaceskip and \xspaceskip to control the interword spacing. –  egreg Jun 7 at 20:24
1  
@amn no they are set initially by the font parameters but you can change them or set \spaceskip mainly I was commenting that tolerance applies to the badness of the paragraph which includes a measure of how tight lines are as well as how loose, and explicit penalties –  David Carlisle Jun 7 at 20:37
add comment

2 Answers 2

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage{blindtext}
\begin{document}
\blindtext

\fontdimen2\font=2\fontdimen2\font  % double interwordspace
\blindtext
\end{document}

enter image description here

share|improve this answer
    
Thank you Herbert. It appears that, following your advice with the double interword control command sequence, I can make double space between words. Apart from the fact that I don't really want double spacing at all, my goal is really to make sure that the space never shrinks to anything less than that (default space), as I find it pleasing and don't want anything tighter than that. On a related note, if the shrink ratio is constant, perhaps choosing 1.5 space will result in 1.0 being the "tightest"? –  amn Jun 7 at 20:19
1  
the smallest interword space is 2.5pt by default (\the\fontdimen2\font. If you want less or more change that value as I already did. –  Herbert Jun 7 at 20:24
    
I don't want to change the default interword space at all - I want to make sure it does not ever shrink for any line of text, only expand, if necessary. –  amn Jun 7 at 20:30
add comment

If you want the interword space never shrinks below the “optimal” interword spacing, then

\spaceskip=\fontdimen2\font plus \fontdimen3\font\relax

will do. Of course, such a declaration should be integrated in every font changing command, which might be done by adding it to \selectfont.

Example:

\documentclass{article}
\usepackage[latin]{babel} % for hyphenation
\usepackage{xpatch}
\usepackage{lipsum}

\frenchspacing % you don't really want extra space

\xapptocmd{\selectfont}
  {\spaceskip=\fontdimen2\font plus \fontdimen3\font\relax}
  {}{}

\begin{document}

\lipsum[2]

\Large
\lipsum[2]                  

\end{document}

enter image description here

Instead of length based on the font parameters, you might directly use lengths expressed in em units, because at the time the setting of \spaceskip the font has already been selected.

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.