Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Why didn't the Universal Translator speak whale?

What is /dev/null and why can't I use hx on it?

The work of mathematicians outside their professional environment

Does the DOJ's declining to investigate the Trump-Zelensky call ruin the basis for impeachment?

Are there any tricks to pushing a grand piano?

Maintaining distance

Does it require less energy to reach the Sun from Pluto's orbit than from Earth's orbit?

Object Oriented Design: Where to place behavior that pertains to more than one type of object?

Choice of solvent during thin layer chromatography

How to catch creatures that can predict the next few minutes?

Use floats or doubles when writing mobile games

How come the Russian cognate for the Czech word "čerstvý" (fresh) means entirely the opposite thing (stale)?

What are the limits on an impeached and not convicted president?

How to calculate Limit of this sequence

Bash-script as linux-service won't run, but executed from terminal works perfectly

What kind of nut is this

How to prove (A v B), (A → C), (B → D) therefore (C v D)

Reducing laundry

Can/should you swim in zero G?

Determine the Winner of a Game of Australian Football

Should I be able to see patterns in a HS256 encoded JWT?

Advices to added homemade symbols

Using the Grappler feat, can you grapple and pin (restrain) in the same action?

Why do many websites hide input when entering a OTP



Align equal signs while including text over equalities


AMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3















I understand how to align multiple equations, but how can I do this if I want to also have text over the equalities. For example:



enter image description here



It bugs me that the equal signs are no longer aligned. Here is my LaTeX:



$$
beginalign
p(textbfx mid mathcalD, alpha)
&= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackreltextEq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(textbfx mid alpha'). tag5
endalign
$$


Is there a solution to this?










share|improve this question
























  • Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

    – Mico
    Apr 16 at 18:47











  • Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

    – gwg
    Apr 16 at 20:34











  • MathJax (used on this site) works with align without $$ $$.

    – Bernard
    Apr 16 at 20:39

















3















I understand how to align multiple equations, but how can I do this if I want to also have text over the equalities. For example:



enter image description here



It bugs me that the equal signs are no longer aligned. Here is my LaTeX:



$$
beginalign
p(textbfx mid mathcalD, alpha)
&= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackreltextEq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(textbfx mid alpha'). tag5
endalign
$$


Is there a solution to this?










share|improve this question
























  • Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

    – Mico
    Apr 16 at 18:47











  • Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

    – gwg
    Apr 16 at 20:34











  • MathJax (used on this site) works with align without $$ $$.

    – Bernard
    Apr 16 at 20:39













3












3








3








I understand how to align multiple equations, but how can I do this if I want to also have text over the equalities. For example:



enter image description here



It bugs me that the equal signs are no longer aligned. Here is my LaTeX:



$$
beginalign
p(textbfx mid mathcalD, alpha)
&= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackreltextEq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(textbfx mid alpha'). tag5
endalign
$$


Is there a solution to this?










share|improve this question














I understand how to align multiple equations, but how can I do this if I want to also have text over the equalities. For example:



enter image description here



It bugs me that the equal signs are no longer aligned. Here is my LaTeX:



$$
beginalign
p(textbfx mid mathcalD, alpha)
&= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackreltextEq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(textbfx mid alpha'). tag5
endalign
$$


Is there a solution to this?







align






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 16 at 18:37









gwggwg

1255 bronze badges




1255 bronze badges















  • Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

    – Mico
    Apr 16 at 18:47











  • Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

    – gwg
    Apr 16 at 20:34











  • MathJax (used on this site) works with align without $$ $$.

    – Bernard
    Apr 16 at 20:39

















  • Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

    – Mico
    Apr 16 at 18:47











  • Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

    – gwg
    Apr 16 at 20:34











  • MathJax (used on this site) works with align without $$ $$.

    – Bernard
    Apr 16 at 20:39
















Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

– Mico
Apr 16 at 18:47





Off-topic: Encasing an align environment inside $$ ... $$ cannot possibly work correctly -- at least not as a LaTeX document. Please be more precise about you actually do.

– Mico
Apr 16 at 18:47













Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

– gwg
Apr 16 at 20:34





Fair point. I'm technically using MathJax, which requires this to work, but I should have edited it for the post.

– gwg
Apr 16 at 20:34













MathJax (used on this site) works with align without $$ $$.

– Bernard
Apr 16 at 20:39





MathJax (used on this site) works with align without $$ $$.

– Bernard
Apr 16 at 20:39










2 Answers
2






active

oldest

votes


















4
















Here I use mathclap to insure that the overstack takes up zero horizontal space.



Also, change the textbf instances to mathbf (thanks, Mico).



Finally, ditch the $$ delimiters.



documentclassarticle
usepackagemathtools
begindocument

beginalign
p(mathbfx mid mathcalD, alpha)
&= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackrelmathclaptextEq 4= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(mathbfx mid alpha'). tag5
endalign


enddocument


enter image description here






share|improve this answer



























  • @Mico Thanks, Mico. Hadn't even noticed.

    – Steven B. Segletes
    Apr 16 at 18:52



















1
















A simple makebox[0pt]... will solve the probl.



Unrelated: do not nest align inside $$ ... $$ – and don't use the plain TeX construct ˆˆ ... $$ as it will yield incorrect spacing in LaTeX.



documentclassarticle
usepackageamsmath

begindocument

beginalign
p(textbfx mid mathcalD, alpha)
&= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
\
&stackreltextmakebox[0pt]Eq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
\
&= p(textbfx mid alpha'). tag5
endalign

enddocument


enter image description here






share|improve this answer


























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485187%2falign-equal-signs-while-including-text-over-equalities%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4
















    Here I use mathclap to insure that the overstack takes up zero horizontal space.



    Also, change the textbf instances to mathbf (thanks, Mico).



    Finally, ditch the $$ delimiters.



    documentclassarticle
    usepackagemathtools
    begindocument

    beginalign
    p(mathbfx mid mathcalD, alpha)
    &= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
    \
    &stackrelmathclaptextEq 4= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
    \
    &= p(mathbfx mid alpha'). tag5
    endalign


    enddocument


    enter image description here






    share|improve this answer



























    • @Mico Thanks, Mico. Hadn't even noticed.

      – Steven B. Segletes
      Apr 16 at 18:52
















    4
















    Here I use mathclap to insure that the overstack takes up zero horizontal space.



    Also, change the textbf instances to mathbf (thanks, Mico).



    Finally, ditch the $$ delimiters.



    documentclassarticle
    usepackagemathtools
    begindocument

    beginalign
    p(mathbfx mid mathcalD, alpha)
    &= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
    \
    &stackrelmathclaptextEq 4= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
    \
    &= p(mathbfx mid alpha'). tag5
    endalign


    enddocument


    enter image description here






    share|improve this answer



























    • @Mico Thanks, Mico. Hadn't even noticed.

      – Steven B. Segletes
      Apr 16 at 18:52














    4














    4










    4









    Here I use mathclap to insure that the overstack takes up zero horizontal space.



    Also, change the textbf instances to mathbf (thanks, Mico).



    Finally, ditch the $$ delimiters.



    documentclassarticle
    usepackagemathtools
    begindocument

    beginalign
    p(mathbfx mid mathcalD, alpha)
    &= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
    \
    &stackrelmathclaptextEq 4= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
    \
    &= p(mathbfx mid alpha'). tag5
    endalign


    enddocument


    enter image description here






    share|improve this answer















    Here I use mathclap to insure that the overstack takes up zero horizontal space.



    Also, change the textbf instances to mathbf (thanks, Mico).



    Finally, ditch the $$ delimiters.



    documentclassarticle
    usepackagemathtools
    begindocument

    beginalign
    p(mathbfx mid mathcalD, alpha)
    &= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
    \
    &stackrelmathclaptextEq 4= int p(mathbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
    \
    &= p(mathbfx mid alpha'). tag5
    endalign


    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 16 at 18:52

























    answered Apr 16 at 18:44









    Steven B. SegletesSteven B. Segletes

    171k9 gold badges216 silver badges444 bronze badges




    171k9 gold badges216 silver badges444 bronze badges















    • @Mico Thanks, Mico. Hadn't even noticed.

      – Steven B. Segletes
      Apr 16 at 18:52


















    • @Mico Thanks, Mico. Hadn't even noticed.

      – Steven B. Segletes
      Apr 16 at 18:52

















    @Mico Thanks, Mico. Hadn't even noticed.

    – Steven B. Segletes
    Apr 16 at 18:52






    @Mico Thanks, Mico. Hadn't even noticed.

    – Steven B. Segletes
    Apr 16 at 18:52














    1
















    A simple makebox[0pt]... will solve the probl.



    Unrelated: do not nest align inside $$ ... $$ – and don't use the plain TeX construct ˆˆ ... $$ as it will yield incorrect spacing in LaTeX.



    documentclassarticle
    usepackageamsmath

    begindocument

    beginalign
    p(textbfx mid mathcalD, alpha)
    &= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
    \
    &stackreltextmakebox[0pt]Eq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
    \
    &= p(textbfx mid alpha'). tag5
    endalign

    enddocument


    enter image description here






    share|improve this answer





























      1
















      A simple makebox[0pt]... will solve the probl.



      Unrelated: do not nest align inside $$ ... $$ – and don't use the plain TeX construct ˆˆ ... $$ as it will yield incorrect spacing in LaTeX.



      documentclassarticle
      usepackageamsmath

      begindocument

      beginalign
      p(textbfx mid mathcalD, alpha)
      &= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
      \
      &stackreltextmakebox[0pt]Eq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
      \
      &= p(textbfx mid alpha'). tag5
      endalign

      enddocument


      enter image description here






      share|improve this answer



























        1














        1










        1









        A simple makebox[0pt]... will solve the probl.



        Unrelated: do not nest align inside $$ ... $$ – and don't use the plain TeX construct ˆˆ ... $$ as it will yield incorrect spacing in LaTeX.



        documentclassarticle
        usepackageamsmath

        begindocument

        beginalign
        p(textbfx mid mathcalD, alpha)
        &= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
        \
        &stackreltextmakebox[0pt]Eq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
        \
        &= p(textbfx mid alpha'). tag5
        endalign

        enddocument


        enter image description here






        share|improve this answer













        A simple makebox[0pt]... will solve the probl.



        Unrelated: do not nest align inside $$ ... $$ – and don't use the plain TeX construct ˆˆ ... $$ as it will yield incorrect spacing in LaTeX.



        documentclassarticle
        usepackageamsmath

        begindocument

        beginalign
        p(textbfx mid mathcalD, alpha)
        &= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid mathcalD, alpha) textd boldsymboltheta
        \
        &stackreltextmakebox[0pt]Eq 4= int p(textbfx mid boldsymboltheta) p(boldsymboltheta mid alpha') textd boldsymboltheta
        \
        &= p(textbfx mid alpha'). tag5
        endalign

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 16 at 19:03









        BernardBernard

        192k8 gold badges86 silver badges230 bronze badges




        192k8 gold badges86 silver badges230 bronze badges































            draft saved

            draft discarded















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485187%2falign-equal-signs-while-including-text-over-equalities%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?