Words beginning with hyphens such as suffixes in linguistic texts can break right after the hyphen which is undesirable.

To prevent this I know I could do \exhyphenpenalty=10000 or what the answers here suggest, but I was wondering if anyone has come up with a solution that would automatically prevent linebreaks if preceded by a space or at the beginning of line, without having to use a special command and without also preventing compounds-with-hyphens to break?

  • would markup such as \?ing rather than -ing be acceptable? with \def\?{\mbox{-}} as a non-breakable hyphen? – David Carlisle Nov 14 '16 at 19:05
  • @DavidCarlisle Hmm, I was hoping there was some automated solution, since I'd have to do a bunch of seach&replace in the the document, and also since I have a setup where I export the text also to word (for advisor comments) where I then would have to do a reverse search&replace again ... – jan Nov 14 '16 at 19:21
  • 1
    I know you asked not to use a special command, but they come with additional benefits: I use macros like \newcommand{\form}[1]{\mbox{\emph{#1}}} for in-line linguistic forms and \newcommand{\uf}[1]{\mbox{/#1/}} for underlying forms. The \mbox prevents the line breaking problem and then you can also tweak the formatting in the command definition depending on publishers' style guides. – Jason Zentz Nov 14 '16 at 20:09
  • \newcommand{\suffix}[1]{\mbox{#1}} and \suffix{-ing} will solve the issue. – egreg Nov 14 '16 at 20:18
  • @JasonZentz egreg These are great hints, thank you, and I recognize the merit of defining a separate command. Nonetheless I'm still curious whether there is any way to achieve this without a separate command. – jan Nov 15 '16 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.