I have the following code for an algorithm.
\begin{algorithm}
\label{alg:script}
\caption{Algorithm to calculate something}
\begin{algorithmic}[1]
\State One line sentence
\For {\texttt{i}}
\State Really long sentence that messes up the pseudocode and needs to be formatted
\For {\texttt{each j}} \State Really long sentence that messes up the pseudocode and needs to be formatted
\State Really long sentence that messes up the pseudocode and needs to be formatted
\EndFor
\State Really long sentence that messes up the pseudocode and needs to be formatted
\State Really long sentence that messes up the pseudocode and needs to be formatted
\EndFor
\State Final step
\end{algorithmic}
\end{algorithm}
The really long description I need to give in my pseudo code messes up my formatting. For example, in line 3, the code extends beyond the for loop above it. Same for lines 5, 6, 8 and 9. I tried using different algorithm packages but I can't get it to format the way I want it to. Can someone help me?
Edit I want the lines indented to match the lines it started from. I have about 10 long sentences overall.
