Is there a way to automatically set parameters when emergency stretch is required?
Here is my situation. After I implemented the solution chosen for unbreakable spaces in Bible verse references, I get some overfull boxes due to verse references at the end of lines. To fix these overfull lines, I can allow hyphenation between the book name and the chapter, as an exception (I don't want to allow it unless it is really necessary).
I've made myself two macros to make this easier. For example, I'll use:
(\BRallowhypbch\ibibleverse{Ac}(4:13)\BRforbidhypbch).
To allow hyphenation between Actes and 4.13 in Actes 4.13 as an exception.
I'm wondering if, when LaTeX gets down to use \emergencystretch (because other methods of justifications have failed), there is a way to trigger a hook that would call my two macros before and after the problematic paragraph (or line if possible) to fix it.
\BRallowhypbchactivated when you set\emergencystretch? – egreg Jun 14 '11 at 15:10\tolerance=300and\emergencystretch=1.7em, which solves 90% of my problems, but in some cases (say, 2 cases in 90 pages so far), a Bible reference will prevent proper hyphenation, and in this case, I would rather set an exception to allow hyphenation in the Bible reference. – raphink Jun 14 '11 at 20:08\tolerance=300and\emergencystretch=1.7emin the preamble, or if I should only do that for paragraphs that require it. – raphink Jun 14 '11 at 20:09\emergencystretch. – yannisl Jun 14 '11 at 20:18\toleranceis better set for the whole document or for a specific paragraph (using an environment like in @egreg's answer for example). – raphink Jun 14 '11 at 20:35Overfull \hbox (4.45204pt too wide) in paragraph at lines 3--10 \EU1/LinuxLibertineO(0)/m/n/12 pleine, personnelle et sainement biblique avec D ieu lâ<80><99>Esprit-Saint,| []How do I know how to adjust the\tolerance? – raphink Jun 15 '11 at 08:24