As @egreg said this is not fully automatically possible with TeX for a simple reason: TeX offers no way to automatically determine the hyhenation points in a word and use them other than in the default manner.
But if you are prepared to mark up hyphenations yourself there are ways to get the rest automatically done. Below is a trivial implementation:
\documentclass{article}
\setlength\textwidth{8cm}
\def\X#1{\raisebox{0.5em}{#1}}
\def\Y#1#2#3{\discretionary{\X{#1}}{\X{#2}}{\X{#3}}}
\begin{document}
Lorem ipsum dolor sit amet, consectetur
\Y{adipisic-}{ing}{adipisicing} \X{elit,} \X{sed} do eiusmod tempor incididunt ut
labore et dolore magna aliqua.
\end{document}
This results in

which is what I think you are looking for as the output. Of course this is not the way you would want to code it. With some small coding improvements you could use a syntax like
Lorem ipsum dolor sit amet, consectetur
\begin{raisedtext}{0.5em}
adipisic\-ing elit, sed
\end{raisedtext}
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
where
- possible hyphenation points are maked up by
\-
- a
-
would automatically be allowed as hyphenation point
Basically you would need to parse the text until the end of the environment looking for -
or \-
or "spaces" and construct stuff like \Y
and \X
from above accordingly (not doing that tonight :-)
Upate: a simple parser
okay so here is a simple parser that takes care of \-
and explicit -
. Not really cleanly written, sorry for that.
\documentclass{article}
\setlength\textwidth{8cm}
% we need space, -, and newline active and set to some commands
{\obeyspaces
\catcode`\^^M\active%
\catcode`\-\active%
\gdef\setraisedtextactivedef#1#2{\let =#1\let^^M=#1\let-=#2}}
\newbox\raisedtextbox
% main action is to collect material into a box
\def\collectraisedtext{\setbox\raisedtextbox\hbox\bgroup\raisedtextstyle
\gobbleactivespaces}
% and if we want we can use a special style
\def\raisedtextstyle{\small\itshape}
% at a space end collection, typeset and restart
\def\raisedtextspace{\egroup
\X{\box\raisedtextbox}%
\space
\collectraisedtext
}
% at \- end colloection, typeset, add discretionary and restart
\def\raisedtextbreak{\egroup\X{\box\raisedtextbox}\discretionary{\X-}{}{}\collectraisedtext}
% at - (explicit hyphen) more or less the same
\def\raisedtexthyphen{\egroup\X{\box\raisedtextbox}\discretionary{\X-}{}{\X-}\collectraisedtext}
% several active spaces (or newlines) would do harm ...
\def\gobbleactivespaces{\futurelet\next\gobbleactivespacesX}
\def\gobbleactivespacesX{%
\ifx\next\raisedtextspace
\expandafter\gobbleactivespacesXX
\fi
}
\def\gobbleactivespacesXX#1{\gobbleactivespaces}
% putting all together
\newenvironment{raisedtext}[1][0.5ex]
{%
\def\X##1{\raisebox{#1}{##1}}%
\obeyspaces
\catcode`\^^M\active
\catcode`\-\active
\setraisedtextactivedef\raisedtextspace\raisedtexthyphen
\let\-\raisedtextbreak
\collectraisedtext
}{%
% at end environment, end collection and typeset (if not empty).
% Otherwise remove space already inserted before that collection
\egroup
\ifdim\wd\raisedtextbox>0pt % weak prove that this is not empty
\X{\box\raisedtextbox}%
\else
\unskip
\fi
}
\begin{document}
Lorem ipsum dolor sit amet, consectetur
\begin{raisedtext}
adipisic-ing elit, sed
\end{raisedtext}
do eiusmod tempor incididunt ut
\begin{raisedtext}[1.5ex] la-bore-et do-lore
\end{raisedtext} magna aliqua.
\end{document}
doing that gives us (with a style definition of \small\itshape
)
