[Tex/LaTex] Line breaks in \fbox

boxes

I sometimes have bits of text I want to emphasize. My idea is to change the margin with changepage's adjustwidth and then frame the text with \fbox. The problem is this prevents linebreaks. For now, the only solution I have is to put \vbox inside \fbox and split the text into \hboxes by copying the automatic line division and hyphenation carried out without \fbox. This also implies having to stretch some \hboxes, therefore calculating the opportune width for those. Is there a better way to do this? The idea is:

enter image description here

typeset by:

metodi numerici sui problemi di Cauchy, dà una definizione che è tutto fuorché matematica, nel senso che dà una definizione di questo tipo:
\begin{adjustwidth}{1cm}{1cm}
\dimen1=\linewidth
\advance\dimen1 by -0.3cm
\fbox{\itshape\vbox{\just[\dimen1]{Se un problema con una regione di stabilità finita in un intervallo di tem-} \just[\dimen1]{po per ogni condizione iniziale è forzato ad usare un passo di integrazione} \just[\dimen1]{troppo piccolo rispetto alla regolarità della soluzione il problema è stiff in} \hbox{quell'intervallo.}}}
\end{adjustwidth}
Tipicamente vado a scegliere i metodi con una regione di assoluta stabilità infinita, e tipicamente quelli che permettono con facilità di cambiare il passo di integrazione. Ovviamente

Note: \just is defined as:

\newcommand{\just}[2][\linewidth]{\hbox to #1{#2}}

Edit: I'm probably using all those \hboxes to avoid this:

enter image description here

Apart from the indent, which can be suppressed by \noindent, why does the text extend not only beyond the margin of adjustwidth but also beyond that of the text outside it? Is it because \textwidth is set back to normal and needs to be altered? Note that altering \linewidth changes nothing.

Best Answer

It seems you want

metodi numerici sui problemi di Cauchy, 
dà una definizione che è tutto fuorché matematica, 
nel senso che dà una definizione di questo tipo:
\begin{center}
\fbox{\begin{minipage}{\dimexpr\textwidth-2cm}
\itshape
 Se un problema con una regione di stabilità 
 finita in un intervallo di tempo per ogni 
 condizione iniziale è forzato ad usare un passo
 di integrazione troppo piccolo rispetto alla regolarità 
della soluzione il problema è stiff in quell'intervallo.
\end{minipage}}
\end{center}