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:
To allow hyphenation between
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.