I have an algorithm that I want to write in mathematical pseudo-code. However, some conditions and statements are very long, e.g. "if (a series of relations and constraints hold) do" or "X gets (a series with several elements)". These statements does not fit nicely into a single line. I don't want to break them into temporary variables just to meet the width limit.
What I would have done in a real program code, is something like:
if (
long condition 1 and
long condition 2 ...
) {...}
Or
X <- {
long element 1,
long element 2...
}
How can I achieve this effect in some LaTeX algorithmic environment? I am currently using algorithm2e but it's not a must.


algorithm2e(not inside conditionals), see Linebreak in packagealgorithm2e(partial duplicate). – Werner Apr 17 '15 at 20:47