I have some long equations and I want to have my equal signs aligned. I tried using \usepackage{amsmath}
and here is a part of my code:
\begin{aligned}
\\ch_8 & = \frac{1}{2^2\cdot 3^1\cdot 7^1}[+\frac{1^1}{2^5\cdot 3^1\cdot
5^1}c_1^8-\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_1^6c_2+\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_1^5c_3+\frac{1^1}{2^3\cdot 3^1}c_1^4c_2^2-\frac{1^1}{2^2\cdot
3^1\cdot 5^1}c_1^4c_4-\frac{1^1}{3^1\cdot
5^1}c_1^3c_2c_3+\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_1^3c_5-\frac{1^1}{2^1\cdot 3^1\cdot
5^1}c_1^2c_2^3+\frac{1^1}{2^2\cdot
5^1}c_1^2c_2c_4+\frac{1^1}{2^3\cdot
5^1}c_1^2c_3^2-\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_1^2c_6+\frac{1^1}{2^2\cdot 5^1}c_1c_2^2c_3-\frac{1^1}{2^1\cdot
3^1\cdot 5^1}c_1c_2c_5-\frac{1^1}{2^1\cdot 3^1\cdot
5^1}c_1c_3c_4+\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_1c_7+\frac{1^1}{2^4\cdot 3^1\cdot
5^1}c_2^4-\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_2^2c_4-\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_2c_3^2+\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_2c_6+\frac{1^1}{2^2\cdot 3^1\cdot
5^1}c_3c_5+\frac{1^1}{2^3\cdot 3^1\cdot
5^1}c_4^2-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_8]
\\ch_9 & = \frac{1}{2^5\cdot 3^1\cdot 7^1}[+\frac{1^1}{2^2\cdot 3^3\cdot 5^1}c_1^9-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^7c_2+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^6c_3+\frac{1^1}{2^2\cdot 5^1}c_1^5c_2^2-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^5c_4-\frac{1^1}{2^2\cdot 3^1}c_1^4c_2c_3+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^4c_5-\frac{1^1}{2^1\cdot 3^2}c_1^3c_2^3+\frac{1^1}{3^1\cdot 5^1}c_1^3c_2c_4+\frac{1^1}{2^1\cdot 3^1\cdot 5^1}c_1^3c_3^2-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^3c_6+\frac{1^1}{2^1\cdot 5^1}c_1^2c_2^2c_3-\frac{1^1}{2^2\cdot 5^1}c_1^2c_2c_5-\frac{1^1}{2^2\cdot 5^1}c_1^2c_3c_4+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1^2c_7+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1c_2^4-\frac{1^1}{2^2\cdot 5^1}c_1c_2^2c_4-\frac{1^1}{2^2\cdot 5^1}c_1c_2c_3^2+\frac{1^1}{2^1\cdot 3^1\cdot 5^1}c_1c_2c_6+\frac{1^1}{2^1\cdot 3^1\cdot 5^1}c_1c_3c_5+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1c_4^2-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_1c_8-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_2^3c_3+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_2^2c_5+\frac{1^1}{2^1\cdot 3^1\cdot 5^1}c_2c_3c_4-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_2c_7+\frac{1^1}{2^2\cdot 3^2\cdot 5^1}c_3^3-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_3c_6-\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_4c_5+\frac{1^1}{2^2\cdot 3^1\cdot 5^1}c_9]
\end{aligned}
Each line has one equal sign, but for some reason, the equations get out of the page (if I don't use the align package, the equation are continued on several rows, the way I want, but the equal signs of different equations are not aligned). I think I can put multiple & signs and make sure I cut the equations at the right place, before they get out of the page, but I have hundreds of them and it would take too long. Is there a way to align the equal signs and continue the equations on the next row (I don't need necessary the equation to start on the next row from under the equal, even from the beginning of the line would be fine, but I want them to not go out of the page). Thank you!