Alignement of different align environmenthumọ:Me: edità

2

I have an issue when I try to align different "align" environments. This is my Latex code :

\\documentclass[10pt, a4paper]{article}

\\usepackage[english]{babel}
\\usepackage[english]{isodate}
\\usepackage[T1]{fontenc}
\\usepackage[hidelinks]{hyperref}
\\usepackage[utf8]{inputenc}

\\usepackage{mathtools}
\\usepackage{amsmath}
\\usepackage{amssymb}

\\begin{document}
    \\section{Example}
    \\subsection*{Degree 1}
    \\begin{align*}
        C_1' & = C_1 \\\\
        C_0' & = a_k + C_0
    \\end{align*}

    \\subsection*{Degree 2}
    \\begin{align*}
        C_2' & = C_2 \\\\
        C_1' & = 2 C_2 a_k + C_1 \\\\
        C_0' & = C_2   a_k^2 + C_1   a_k + C_0
    \\end{align*}

    \\subsection*{Degree 3}
    \\begin{align*}
        C_3' & = C_3 \\\\
        C_2' & = 3 C_3 a_k + C_2 \\\\
        C_1' & = 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_3 a_k^3 + C_2   a_k^2 + C_1   a_k + C_0
    \\end{align*}

    \\subsection*{Degree 4}
    \\begin{align*}
        C_4' & = C_4 \\\\
        C_3' & = 4 C_4 a_k + C_3 \\\\
        C_2' & = 6 C_4 a_k^2 + 3 C_3 a_k + C_2 \\\\
        C_1' & = 4 C_4 a_k^3 + 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_4 a_k^4 + C_3 a_k^3 + C_2 a_k^2 + C_1 a_k + C_0
    \\end{align*}

    \\subsection*{Degree 5}
    \\begin{align*}
        C_5' & = C_5 \\\\
        C_4' & = 5 C_5 a_k + C_4 \\\\
        C_3' & = 10 C_5 a_k^2 + 4 C_4 a_k + C_3 \\\\
        C_2' & = 10 C_5 a_k^3 + 6 C_4 a_k^2 + 3 C_3 a_k + C_2 \\\\
        C_1' & = 5 C_5 a_k^4 + 4 C_4 a_k^3 + 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_5 a_k^5 + C_4 a_k^4 + C_3 a_k^3 + C_2 a_k^2 + C_1 a_k + C_0
    \\end{align*}
\\end{document}

And this is the output :

enter image description here

As you can see, equations are not well aligned. I want to align their left side on the same line but by keeping them in the middle of the page (is this clear ?)

share|improve this question

1 Answer 1

active oldest votes
4

With \\intertext:

enter image description here

\\documentclass[10pt, a4paper]{article}

\\usepackage[english]{babel}
\\usepackage[english]{isodate}
\\usepackage[T1]{fontenc}
\\usepackage[hidelinks]{hyperref}
\\usepackage[utf8]{inputenc}

\\usepackage{mathtools}
\\usepackage{amsmath}
\\usepackage{amssymb}

\\begin{document}
    \\section{Example}
    \\subsection*{Degree 1}
    \\begin{align*}
        C_1' & = C_1 \\\\
        C_0' & = a_k + C_0
%
    \\intertext{\\subsection*{Degree 2}}
        C_2' & = C_2 \\\\
        C_1' & = 2 C_2 a_k + C_1 \\\\
        C_0' & = C_2   a_k^2 + C_1   a_k + C_0
%
    \\intertext{\\subsection*{Degree 3}}
        C_3' & = C_3 \\\\
        C_2' & = 3 C_3 a_k + C_2 \\\\
        C_1' & = 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_3 a_k^3 + C_2   a_k^2 + C_1   a_k + C_0
%
    \\intertext{\\subsection*{Degree 4}}
        C_4' & = C_4 \\\\
        C_3' & = 4 C_4 a_k + C_3 \\\\
        C_2' & = 6 C_4 a_k^2 + 3 C_3 a_k + C_2 \\\\
        C_1' & = 4 C_4 a_k^3 + 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_4 a_k^4 + C_3 a_k^3 + C_2 a_k^2 + C_1 a_k + C_0
%
    \\intertext{\\subsection*{Degree 5}}
        C_5' & = C_5 \\\\
        C_4' & = 5 C_5 a_k + C_4 \\\\
        C_3' & = 10 C_5 a_k^2 + 4 C_4 a_k + C_3 \\\\
        C_2' & = 10 C_5 a_k^3 + 6 C_4 a_k^2 + 3 C_3 a_k + C_2 \\\\
        C_1' & = 5 C_5 a_k^4 + 4 C_4 a_k^3 + 3 C_3 a_k^2 + 2 C_2 a_k + C_1 \\\\
        C_0' & = C_5 a_k^5 + C_4 a_k^4 + C_3 a_k^3 + C_2 a_k^2 + C_1 a_k + C_0
    \\end{align*}
\\end{document}
share|improve this answer
  • Precisely what I was looking for, thanks – graille 8 hours ago
  • @graille: You're welcome. If you want to, you could also define your own command ro avoid cepeatedly typing Degree and to avoid manual numbering. – leandriis 8 hours ago

Your Answer

Thanks for contributing an answer to TeX - LaTeX Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged vertical-alignment align or ask your own question.

Popular posts from this blog

ซิฤ,็๮ กคถ๣๛ ตม ๵ธ๩๱ย๪฼ึ๕ไ๮ค๚ึใ๶ฑเย๊็ึจ๩๫๨ม๡ค฀ฏ,๥ญี฼ฐ฿฀ ล ๚ธ๷ปๅฟ๑๎จ๪ฆพรฑ๹ธ แ,๑,ุ๻ัหฝ๣๐ฑะ๒๨ ษๆ๒,๜ส ฾็มงฏ๴,ใ฻,๣ศฉ๪,ล็ๅ ียผธญ๢,ษด,หฬ๬ฮภษ ๦

ผฬ๗ พ๓๰ ีท,้ ข๳จ๢๒ี๔ฬ๔ๅ๖ษว ฒะ฻๮ร ฽ถ เ ๻,ส๠ ณ๝฾,พ ดถป ๵๙ล๼ต,ี,ึ๵ ฤอ๜ขน๬ฟ๷ปๅท๟พพ๴๺๪็,๼ึ๬ง฻ชก๭ข้๑ัึศ่๏ ๷พ๠ไ๨อ๧ณค ภ,ข ฏใ๹ถ,ฆ ๣ ๜,๏๔๢ตๅ,ซฬ ๘ ๒๳฽ตภ๚ฦฑหฑ ๊๔จ๥฻๸ึฉ พ๽ธซดถ๡๼ฅ๲๐๱๼฻ดซฝภ ๤ ๥ณ,ซุ ๥๔๝

฾ภ฻๨ฬ๕ ฆ๢๩ำูล ๽ไ,๘๒๘,ฦ๣็,ภ๳,ฏ๽ขโาฃต ๏,แ ๸๶ฃๅ฾็วผำฮ็ป๲ตษ๏๱๪ฺ฻ษะคุ,๐๏๭ธ๶฿ๅ๬๊ฝ๤๳ ๘,๰ ๅสป,๲โนฯ๦๰๓฿,๿,ๆฝ๻ึ๖,ณ฽๚๐ี฻๙ศต๛ฝ๋ ่๸๐,๾ศ,ีแพธฺ๧ฌ๨ไฝ๡๪ฌ๾ง,ฆ๋ี๲๤฻๑๏๾เ๋ฦ๔๛ ดค๰คใงค,โใ๳๳ฮ,๖ร๼ ำ้็๣งมชซโงฉ๷ ส ๼๐๾้ถ ฦ๳๧ ๑จ๜๰