Multi-line long equation vanishes few brackets

Clash Royale CLAN TAG#URR8PPP
Multi-line long equation vanishes few brackets
begineqnarray*
M to P_j: & left left( n_1,n_2,left( profile,N_i,N_ileft( mathop leftrightarrow limits^K_S^i right)P_j,\ & # left( N_ileft( mathop leftrightarrow limits^K_S^i right)P_j right) right)_K_P^j right)_K_P^j,left( n_0,n_1,left( profile,N_i,N_i \ &left( mathop leftrightarrow limits^K_S^i right)P_j,# left( N_ileft( mathop leftrightarrow limits^K_S^i right)P_j right) right)_K_P^j,N_ileft( mathop leftrightarrow limits^K_S^i right)P_j, \ &# left( N_ileft( mathop leftrightarrow limits^K_S^i right)P_j right),N_imathop leftrightarrow limits^n_S^i M right)_K_TS^i = Hleft( K_p^j oplus n_S^i right) right
endeqnarray*
To split my long equation I used beginequation beginsplit, begineqnarray*,and beginmultline etc. But all the time few brackets from equation just disapear as shown in figure below.

The correct equation is given below and I want to split it into 4 lines

eqnarray
amsmath
left ... right
leftrightarrow
mathtools
xleftrightarrow...
amsmath
(4) Also you cannot have
\ inside a ... group, so you'll need to clean that up as well.– daleif
1 hour ago
\
...
1 Answer
1
Some suggestions:
Don't overuse curly braces to group math elements. A proliferation of and symbols makes the code nearly unreadable -- while doing absolutely nothing for TeX's ability to actually typeset the mess.
As @daleif has already pointed out in a comment, *do not use eqnarray: It is seriously deprecated. Use align instead. When using align, use & only to indicate alignment points. Don't forget to terminate lines with \ (double backslash).
eqnarray
align
align
&
\
Don't use left and right for this multiline equation. It can't work. Instead, use big, Big, bigg and Bigg sizing directives.
left
right
big
Big
bigg
Bigg
Since there are quite a few parenthetic expressions, consider using square brackets instead of round parentheses for some of them.
Optional: Use ! ("negative thinspace") directives to "snug up" subscript terms.
!
Finally, again as @daleif has pointed out, load the mathtools package and use its xleftrightarrow macro.
mathtools
xleftrightarrow
With these observations in mind, I think it's possible to display the equation across three, rather than four, rows.

documentclassarticle
usepackagemathtools % for 'xleftrightarrow' macro
begindocument
beginalign*
M to P_jcolon
Biggl
&biggl[ n_1, n_2, Bigl(
textprofile, N_i,
N_i(xleftrightarrowK_S^i)P_j,
# bigl( N_i(xleftrightarrowK_S^i) P_j bigr)
Bigr)_!K_!P^j
biggr]_K_!P^j, \
&biggl[ n_0, n_1, Bigl(
textprofile, N_i,
N_i(xleftrightarrowK_S^i)P_j,
# bigl( N_i(xleftrightarrowK_S^i)P_j bigr)
Bigr)_!K_!P^j, \
&quad
N_i(xleftrightarrowK_S^i)P_j,
# bigl( N_i(xleftrightarrowK_S^i)P_j bigr),
N_ixleftrightarrown_S^iM
biggr]_K_mathitTS^i = H(K_!P^j oplus n_S^i)
Biggr
endalign*
enddocument
I might even be tempted to use a local
ssxleftrightarrow which just forces scriptscriptstyle to the code written on top of the arrow. IMO, this often looks better– daleif
25 mins ago
ssxleftrightarrow
scriptscriptstyle
@daleif - Thanks for this suggestion. For the example at hand, using
scriptscriptstyle (instead of the default scriptstyle) might be problematic since the arguments contain subscript and superscript items.– Mico
19 mins ago
scriptscriptstyle
scriptstyle
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
(1) Never use
eqnarrayit is broken in many ways and only kept for backwards compatability. Use the macros fromamsmath. (2) You cannot!!! break aleft ... rightconstruction across lines, you need to scale these manuallt. From the last image you post, you can clearly see that those fences are way too large, and the readability would benefit greatly by manual scaling. (3) Use a better construction to write aboveleftrightarrow, for example load themathtoolspackage, it provides the missingxleftrightarrow...that is missing fromamsmath.– daleif
1 hour ago