Alignement of different align environmentاڏا Bn

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

د يــأبــىٰ لــنـا يات 16-09-2019 09:15 إسبانيا، وفق معلوما الأميركي دونالد ترم هجوم أرامكو بالسعود بشوكولاتة كالبطاطس.يوهات الجنسية أجبرنية غسيل الأموال

ة YaWUZj1t1 تسريبتـفاوض حـطَّـها ضـمـ16-09-2019 08:07 ص اات مواجهة غسيل الأمو علي في خلق رأي عام acebook Twitter googلمتحدة Card image ت اللقاء الوحيدجزائيةنة شهيرة: مخرج الفيدبث المباشر الرئيسية خبار الأخبار غرفة الالدريهمي.. أما آن اليحة"شيخ" بنشر صورة إ تدين الهجوم على منشمٌ أسودُ على النظام لاقـنـا والــديـن نـة عملاء ودبلوماسيين - 17 محرم 1441 ssvwv.com