As you can see in the picture, I have a system of equations and I want the same items(for example y_1, + and =) to be vertically aligned (so as to be viewed easy for Linear Algebra)
I want to use the case function, within which all the terms are aligned left (How to change?). I want the terms to be aligned to the right, just like the ones without the case function.
With LaTeX, I am able to achieve this by creating an array with the {lr} modification,
This is not very different from the LaTeX code you gave. Although I do not recommend using cases for this, you can also write the following. I don’t seem to be able to right align the terms on the rhs though (if someone has an idea?)
I tried using “&&” as in the document. It works for most of the case, but when the equations are inside the cases function, then “&&” lost its function, like these:
The syntax of cases is rather specific, as it is for mat, vec. The behaviour of alignment points for cases is specifically written as to not alternate between left and write. I think the best you can achieve is what I showed above. Oh! and wrapping cases in align does not seem to do anything. My bad, I made a mistake when copy pasting.
Cases intentionally does not alternate between left and right.
You don’t have to use the alignment point after everything, you can use only the amount that is enough for it to look good. Additionally, in cases you should use , as a case delimiter (instead of using explicit line breaks):