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;
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:
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
add a comment
|
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:
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
Off-topic: Encasing analign
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 withalign
without$$ $$
.
– Bernard
Apr 16 at 20:39
add a comment
|
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:
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
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:
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
align
asked Apr 16 at 18:37
gwggwg
1255 bronze badges
1255 bronze badges
Off-topic: Encasing analign
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 withalign
without$$ $$
.
– Bernard
Apr 16 at 20:39
add a comment
|
Off-topic: Encasing analign
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 withalign
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
add a comment
|
2 Answers
2
active
oldest
votes
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
@Mico Thanks, Mico. Hadn't even noticed.
– Steven B. Segletes
Apr 16 at 18:52
add a comment
|
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
@Mico Thanks, Mico. Hadn't even noticed.
– Steven B. Segletes
Apr 16 at 18:52
add a comment
|
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
@Mico Thanks, Mico. Hadn't even noticed.
– Steven B. Segletes
Apr 16 at 18:52
add a comment
|
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
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
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
add a comment
|
@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
add a comment
|
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
add a comment
|
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
add a comment
|
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
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
answered Apr 16 at 19:03
BernardBernard
192k8 gold badges86 silver badges230 bronze badges
192k8 gold badges86 silver badges230 bronze badges
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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