I am looking for a way to discourage ending lines with a single character. I could manually type out, for example: a\penalty\hyphenpenalty\ cat or I\nolinebreak[1]\ am each time I write a single character, but I am looking for an automated solution. I am aware that regex workarounds exist.
I have read another discussion on this forum where ending a line with a single character is absolutely prohibited rather than simply discouraged. (Compare I~am with I\nolinebreak[1]\ am.)
one-letter word at the end of line
I have tested this in my other documents via \usepackage[nosingleletter]{impnattypo}. I have found that it is more likely than not typographically inferior to alternatively discouraging line breaks at single characters.
p.penalty = 10000top.penalty = 100or whatever penalty you want – David Carlisle Jan 25 '23 at 12:20impnattypopackage as you suggested. Not the most elegant method, but it achieves the intended result. – User23456234 Jan 25 '23 at 13:28