0

Successful code:

\documentclass[a4paper,cs4size,UTF8]{ctexart}                        
\usepackage{amsmath}                 
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}
\end{document}
\begin{equation}
\begin{split}
& L_1=\frac{1}{2} Trace
\left[
\sum_{i=1}^{n}\sum_{p=1}^{i} (U_{ip}J_iU_{i1})\dot{q}_p\dot{q}_1 +\dots +     (U_{ip}J_iU_{it})\dot{q}_t \dot{q}_2+\dots +(U_{ip}J_iU_{ii})\dot{q}_p\dot{q}_i) 
\right]\\
& \quad =\frac{1}{2} Trace [\sum_{i=1}^{n} \\
&  (U_{i1}J_iU_{i1})\dot{q}_1\dot{q}_1 +\dots +(U_{i1}J_iU_{it})\dot{q}_1  \dot{q}_t+\dots +(U_{i1}J_iU_{ii})\dot{q}_1\dot{q}_i \\
& +(U_{i2}J_iU_{i1})\dot{q}_2\dot{q}_1 +\dots +(U_{ip}J_iU_{it})\dot{q}_2 \dot{q}_t+\dots +(U_{i2}J_iU_{ii})\dot{q}_2\dot{q}_i \\
& + \qquad \vdots \qquad \quad  +\qquad \qquad \vdots \qquad \qquad \quad +\qquad \qquad \vdots \\
& +(U_{ii}J_iU_{i1})\dot{q}_i\dot{q}_1 +\dots +(U_{ii}J_iU_{it})\dot{q}_t \dot{q}_2+\dots +t(U_{ii}J_iU_{ii})\dot{q}_i\dot{q}_i  ]
\end{split}
\end{equation}
\end{document}

However,when I add \left[ ]\right

\documentclass[a4paper,cs4size,UTF8]{ctexart}                        
\usepackage{amsmath}                 
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}

\begin{equation}
\begin{split}
& L_1=\frac{1}{2} Trace
\left[
\sum_{i=1}^{n}\sum_{p=1}^{i} (U_{ip}J_iU_{i1})\dot{q}_p\dot{q}_1 +\dots +     (U_{ip}J_iU_{it})\dot{q}_t \dot{q}_2+\dots +(U_{ip}J_iU_{ii})\dot{q}_p\dot{q}_i) 
\right]\\
& \quad =\frac{1}{2} Trace \left[\sum_{i=1}^{n} \\
&  (U_{i1}J_iU_{i1})\dot{q}_1\dot{q}_1 +\dots +(U_{i1}J_iU_{it})\dot{q}_1  \dot{q}_t+\dots +(U_{i1}J_iU_{ii})\dot{q}_1\dot{q}_i \\
& +(U_{i2}J_iU_{i1})\dot{q}_2\dot{q}_1 +\dots +(U_{ip}J_iU_{it})\dot{q}_2 \dot{q}_t+\dots +(U_{i2}J_iU_{ii})\dot{q}_2\dot{q}_i \\
& + \qquad \vdots \qquad \quad  +\qquad \qquad \vdots \qquad \qquad \quad +\qquad \qquad \vdots \\
& +(U_{ii}J_iU_{i1})\dot{q}_i\dot{q}_1 +\dots +(U_{ii}J_iU_{it})\dot{q}_t \dot{q}_2+\dots +t(U_{ii}J_iU_{ii})\dot{q}_i\dot{q}_i  \right]
\end{split}
\end{equation}
\end{document}

It failed,So my question is how to resolve this problem.

lockstep
  • 250,273
mma
  • 43
  • 4
  • A pair of \left and \right must appear in the same line. If one is missed, the other should be replaced by a dot. Namely, \left[ xxx \right. or \left. xxx \right]. – Wenbo Apr 16 '14 at 02:21
  • You cannot split a \left...\right pair across an alignment character (&) or line break (\\). You have \left[ ... \\ ... \right]. See Left/Right across multiline equation. – Werner Apr 16 '14 at 02:21
  • 1
    your text doesn't agree with your code. the problem as stated in your text is that \left[...]\right doesn't compile. that is because \left and \right must be followed by only a character recognized as a delimiter, or by a period. in your description, the right delimiter character precedes the \right directive. if this is the real question (it isn't really clear), then this is not a duplicate of the cited question. – barbara beeton Apr 16 '14 at 08:00

0 Answers0