The following code produces the result in the picture below.
How can I avoid text justification at the line that starts with "Create Challenge"? I have tried to apply what is suggested here but it does not work in my case.
\begin{figure}
\centering
\fbox{
\parbox{\textwidth}{
\centerline{\textbf{Protocol $\Pi_{GR}$}}
\bigbreak
Parties $\mathcal{P}$ = \{$\mathcal{P}_{1}$,..., $\mathcal{P}_{n}$\} interact with each other and with $\mathcal{F}_{SmartContract}$, $\mathcal{F}_{RandomCommittee}$, $\mathcal{F}_{Voting}$ as follows:
\bigbreak
\textbf{Create Challenge}: On input $(\textsc{Create-Challenge}, sender, value)$ send $(\textsc{Create-Challenge}, sender, value)$ to $\mathcal{F}_{SmartContract}$.
\newline
\textbf{Accept Challenge}:
\newline
}
}
\caption{Protocol $\Pi_{GR}$.} \label{fig:sm}
\end{figure}
If I apply \parbox{\textwidth}{\raggedright it is closer to what I want, but it does not split the mathematical expression between two lines.


\parbox{\textwidth}{\raggedright– MadyYuvi May 14 '20 at 14:47CREATE-andCHALLENGE? – Werner May 14 '20 at 15:46\allowbreakwithout success. As far I understand, you need to add this command manually (or by using a macro) anyway. – Lorenzo May 14 '20 at 16:38$\mathcal{F}...expressions at the end of the second (input) line to all go to a new line, you can replace the input spacebar spaces between them by~to "tie" them together. This, together with\raggedrightgives the result I think you want. – barbara beeton May 14 '20 at 20:26$(\textsc{Create-Challenge}, sender, value)$, that I have now have replaced with(\textsc{Create-Challenge}, \textit{sender}, \textit{value}). It still does not split it between different lines, but since it is not anymore a mathematical expression using$, I suppose it should work. – Lorenzo May 14 '20 at 20:36