I see sometimes in conjunciton or disjunction, the common root of two or more compound words are factored out, for example, "super- and sub-script" (maybe bad example, but it suffices to describe the situation). Is this good style? To me, I would prefer "super-script and "sub-script".
"Superscript" and "subscript" are one word each without a hyphen in British and American English, so I'd advise against using the hyphen for them. And because they're both short words, there's almost nothing (4 characters) gained by splitting them. For longer compound words, using the hyphenated prefix for, say, "pre- and postrevolutionary" focuses on the time before & after the revolution and makes that focus easier to understand, because they're both long words. "Good style" is case-by-case.