My question is the same as this question, but in the context of LyX. The solution for that question was to put the & before = sign.
I manually implemented this tweak in LyX, by changing the raw math code (see below).
My question is this: How do I change the \align environment in LyX so that it automatically accomplishes this tweak every time I use the \align environment? (Instead of having to manually change the raw code for every instance as I did here.)
What I did in LyX:
What the output PDF looks like:
What the TeX code looks like:
\begin{document}
Default \LyX{} align Environment:
\begin{alignat*}{1}
x= & y\\
= & z
\end{alignat*}
Tweaked (to get desired result):
\begin{alignat*}{1}
x & =y\\
& =z
\end{alignat*}
\end{document}
In response to a comment, I tried putting the "=" sign at all possible positions. Here are the 4 permutations.
The result is not as desired:




align*environment?alignatis made for more than one alignment group. – Bernard Apr 04 '16 at 01:18&after the=, then lyx is wrong, and a report should be made to the maintainers. (the recommended/required order is documented in the user's guide foramsmath. that manual also describes the difference betweenallignandalignat.) – barbara beeton Apr 04 '16 at 01:34=anywhere, the user does, so if it ends up the wrong side of the&it's because the user entered the=in the wrong column. Kenny: Put the=in the second column. – Torbjørn T. Apr 04 '16 at 10:23alignatisn't designed for settinga=y=ait is designed fora=y b=x– David Carlisle Apr 04 '16 at 11:31=sign, and the&precedes the=sign, then lyx isn't doing what tex is designed to do. the spacing in the presence of&is supposed to be exactly the same as the spacing fora = b(assuming math mode). – barbara beeton Apr 04 '16 at 12:18a = y = bexample, i must assume that all are input improperly. (certainly something is out of kilter.) – barbara beeton Apr 04 '16 at 14:06