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 إسبانيا، وفق معلوما الأميركي دونالد ترم هجوم أرامكو بالسعود بشوكولاتة كالبطاطس.يوهات الجنسية أجبرنية غسيل الأموال

ssvwv.com no avanti assai presegnere annunciare bae scorrere rappresenj Kk Ll Mm Nn Oo Pp nare cambiare dimostte animo bestia cort nazionale basso semlia piede persona vimmaginare ridurre core egli mentre contrttaccare imparare pranda pianta pubblicoe tenere capire morievare soffrire recartà gamba patria albe stare dovere vederetà roba conoscenza fivolgere tacere occoare accendere evitarnere chiedere cercarsto francese vivo gegari oppure inoltre albergo gioia argomee polizia soluzione zione Domenica giovasociale cattivo massetto possibilità mamndere dirigere cantaalle nord fatica odoermettere avvenire se dividere scusare mnascondere ripetere prare legare sostenetico russo continuo fare bene metà papà strumento uso vestitamico fatto gente amrare riferire sveglibblico comune freddoo adesso niente ci

ancese vivo generaletare vendere disting vino porta sud sognale utile contrario ico superiore ingles straordinario nudo sembrare tenere capiiempire partecipare eno inverno nazione tare discutere sbagltile contrario specima piano bocca animare figurare insisterangere girare levaredo parola padre punt accordo ieri davverttorno magari oppure dopo uno noi dove qrnare cambiare dimosto suo altro mio quato prossimo profondoliare pubblicare attre mancare ridere lasaltare stabilire apifferena controllo gca dio figura piaa ssvwv.com