If you use babel
in German, you can use "~
that produces exactly what you want:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\begin{document}
\parbox{0pt}{\hspace{0pt}(Some"~)Thing}
\end{document}
The \parbox{0pt}
is for inviting TeX to break wherever possible, but if you try you'll see that no break at all is taken.

What "~
does is, basically, issuing \mbox{-}
.
If you don't use ngerman
, but still use babel
, you could import the German shorthands (see Babel: two languages, active shorthands) or, more simply, define a macro:
\newcommand{\ppref}[1]{(#1\mbox{-})} % Parenthesized PREFix
and input the text as
\ppref{Some}Thing
The reason why \nolinebreak
is ineffective is that -
in normal text inserts a discretionary break after it, so typing
(Some-\nolinebreak)Thing
is the same as typing
(Some-\discretionary{}{}{}\nolinebreak)Thing
and TeX is allowed to break lines at discretionaries. The penalty that follows cannot change this. There is no \undiscretionary
similar to \unskip
or \unpenalty
.
The \nobreakdash
macro of amsmath
just encloses in an \mbox
the -
, --
or ---
that follows, so typing
(Some\nobreakdash-)Thing
is exactly the same as typing
(Some\mbox{-})Thing
-
is set as\hyphenchar
. The\hyphenchar
has two meanings in TeX: 1) it is printed when\-
primitive (or automatic hyphenation) is activated at the point where line is broken and 2) if it is used in the middle of the word then\discretionary{}{}{}
is added. And the second meaning is the reason of the described behaviour. No matter that the\penalty10000
follows after such character. – wipet Oct 28 '15 at 20:21\nolinebreak
has no effect as it doesn't break after but at the '-'? Well learned something new! Thanks for the explanation. (Why don't you move it to the answers?^^) – ljrk Oct 28 '15 at 20:25(Some\mbox{-})Thing
, which doesn't require any extra package. – egreg Oct 28 '15 at 23:13