Using the `stackrel` package with `&` within the `align` environment
It appears that the stackrel
package and the align
environment are incompatible. The following example illustrates:
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z) = & text{some very long expression which I want to shrink }}{32pt}\
scaleto{ = & text{another very long expression which I want to shrink }}{32pt}
end{align*}
end{document}
The error I'm getting is
! Missing } inserted.
<inserted text>
}
l.6 end{align*}
I want the two = signs to be aligned. Is there a workaround for this?
I am currently using scaleto{phantom{f(alpha,x,y,z)} =
etc. but it's extremely clumsy and doesn't work very well Thanks for any suggestions
align ampersand scalerel
add a comment |
It appears that the stackrel
package and the align
environment are incompatible. The following example illustrates:
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z) = & text{some very long expression which I want to shrink }}{32pt}\
scaleto{ = & text{another very long expression which I want to shrink }}{32pt}
end{align*}
end{document}
The error I'm getting is
! Missing } inserted.
<inserted text>
}
l.6 end{align*}
I want the two = signs to be aligned. Is there a workaround for this?
I am currently using scaleto{phantom{f(alpha,x,y,z)} =
etc. but it's extremely clumsy and doesn't work very well Thanks for any suggestions
align ampersand scalerel
1
Alsombox{a=&b}
would give errors. What's your aim?
– egreg
Dec 9 at 17:41
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).
– manooooh
Dec 9 at 17:50
2
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-rowalign
.
– David Carlisle
Dec 9 at 18:00
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28
add a comment |
It appears that the stackrel
package and the align
environment are incompatible. The following example illustrates:
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z) = & text{some very long expression which I want to shrink }}{32pt}\
scaleto{ = & text{another very long expression which I want to shrink }}{32pt}
end{align*}
end{document}
The error I'm getting is
! Missing } inserted.
<inserted text>
}
l.6 end{align*}
I want the two = signs to be aligned. Is there a workaround for this?
I am currently using scaleto{phantom{f(alpha,x,y,z)} =
etc. but it's extremely clumsy and doesn't work very well Thanks for any suggestions
align ampersand scalerel
It appears that the stackrel
package and the align
environment are incompatible. The following example illustrates:
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z) = & text{some very long expression which I want to shrink }}{32pt}\
scaleto{ = & text{another very long expression which I want to shrink }}{32pt}
end{align*}
end{document}
The error I'm getting is
! Missing } inserted.
<inserted text>
}
l.6 end{align*}
I want the two = signs to be aligned. Is there a workaround for this?
I am currently using scaleto{phantom{f(alpha,x,y,z)} =
etc. but it's extremely clumsy and doesn't work very well Thanks for any suggestions
align ampersand scalerel
align ampersand scalerel
edited Dec 11 at 22:26
asked Dec 9 at 17:32
Leo Simon
875915
875915
1
Alsombox{a=&b}
would give errors. What's your aim?
– egreg
Dec 9 at 17:41
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).
– manooooh
Dec 9 at 17:50
2
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-rowalign
.
– David Carlisle
Dec 9 at 18:00
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28
add a comment |
1
Alsombox{a=&b}
would give errors. What's your aim?
– egreg
Dec 9 at 17:41
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).
– manooooh
Dec 9 at 17:50
2
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-rowalign
.
– David Carlisle
Dec 9 at 18:00
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28
1
1
Also
mbox{a=&b}
would give errors. What's your aim?– egreg
Dec 9 at 17:41
Also
mbox{a=&b}
would give errors. What's your aim?– egreg
Dec 9 at 17:41
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).– manooooh
Dec 9 at 17:50
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).– manooooh
Dec 9 at 17:50
2
2
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-row
align
.– David Carlisle
Dec 9 at 18:00
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-row
align
.– David Carlisle
Dec 9 at 18:00
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28
add a comment |
1 Answer
1
active
oldest
votes
You can't have some group spanning the alignment &
in align
since &
itself delineates a group start/end. Instead, you'll have to break the components across &
, just like you would left
...right
and other things.
Here's an option.
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z)}{8pt} & scaleto{{}= text{some very long expression which I want to shrink}}{8pt} \
& scaleto{{}= text{another very long expression which I want to shrink}}{8pt}
end{align*}
end{document}
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustratesscaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!
– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, usevphantom{<stuff>}
in the shorter components where<stuff>
is the tallest component. So, in your example,scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.
– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
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/3.0/"u003ecc by-sa 3.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%2f463995%2fusing-the-stackrel-package-with-within-the-align-environment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can't have some group spanning the alignment &
in align
since &
itself delineates a group start/end. Instead, you'll have to break the components across &
, just like you would left
...right
and other things.
Here's an option.
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z)}{8pt} & scaleto{{}= text{some very long expression which I want to shrink}}{8pt} \
& scaleto{{}= text{another very long expression which I want to shrink}}{8pt}
end{align*}
end{document}
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustratesscaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!
– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, usevphantom{<stuff>}
in the shorter components where<stuff>
is the tallest component. So, in your example,scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.
– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
add a comment |
You can't have some group spanning the alignment &
in align
since &
itself delineates a group start/end. Instead, you'll have to break the components across &
, just like you would left
...right
and other things.
Here's an option.
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z)}{8pt} & scaleto{{}= text{some very long expression which I want to shrink}}{8pt} \
& scaleto{{}= text{another very long expression which I want to shrink}}{8pt}
end{align*}
end{document}
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustratesscaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!
– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, usevphantom{<stuff>}
in the shorter components where<stuff>
is the tallest component. So, in your example,scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.
– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
add a comment |
You can't have some group spanning the alignment &
in align
since &
itself delineates a group start/end. Instead, you'll have to break the components across &
, just like you would left
...right
and other things.
Here's an option.
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z)}{8pt} & scaleto{{}= text{some very long expression which I want to shrink}}{8pt} \
& scaleto{{}= text{another very long expression which I want to shrink}}{8pt}
end{align*}
end{document}
You can't have some group spanning the alignment &
in align
since &
itself delineates a group start/end. Instead, you'll have to break the components across &
, just like you would left
...right
and other things.
Here's an option.
documentclass{amsart}
usepackage{scalerel}
begin{document}
begin{align*}
scaleto{f(alpha,x,y,z)}{8pt} & scaleto{{}= text{some very long expression which I want to shrink}}{8pt} \
& scaleto{{}= text{another very long expression which I want to shrink}}{8pt}
end{align*}
end{document}
answered Dec 11 at 22:44
Werner
437k649581647
437k649581647
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustratesscaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!
– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, usevphantom{<stuff>}
in the shorter components where<stuff>
is the tallest component. So, in your example,scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.
– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
add a comment |
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustratesscaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!
– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, usevphantom{<stuff>}
in the shorter components where<stuff>
is the tallest component. So, in your example,scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.
– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustrates
scaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!– Leo Simon
Dec 13 at 0:06
thanks @Werner, this works sort of, but the problem is that when you break the line into two pieces, and use the same second argument for both pieces you get wildly different amplifications on both sides of the equality sign, as the following line illustrates
scaleto{f(x)}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
. The right hand side is shrunk, and the left hand side is expanded. Is there any way to harmonize both sides except by trial and error? Thanks!– Leo Simon
Dec 13 at 0:06
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, use
vphantom{<stuff>}
in the shorter components where <stuff>
is the tallest component. So, in your example, scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.– Werner
Dec 13 at 0:28
@LeoSimon: Of course. This only works if the height of either side matches; then the scaling will be the same. To ensure the height of each component matches the tallest, use
vphantom{<stuff>}
in the shorter components where <stuff>
is the tallest component. So, in your example, scaleto{f(x)vphantom{left(frac{beta}{12}right)^2}}{32pt} & scaleto{{}=left(frac{beta}{12}right)^2}{32pt}
.– Werner
Dec 13 at 0:28
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
Thank you, didn't know about vphantom.
– Leo Simon
Dec 14 at 1:09
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f463995%2fusing-the-stackrel-package-with-within-the-align-environment%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
1
Also
mbox{a=&b}
would give errors. What's your aim?– egreg
Dec 9 at 17:41
align*
needs two columns, and you are using one of them (atm I cannot test in a machine).– manooooh
Dec 9 at 17:50
2
each alignment cell is a group, there are almost no commands that you can use that start in one cell and end in another. You do not say what you expect this code to do, there are no use cases for a one-row
align
.– David Carlisle
Dec 9 at 18:00
sorry everybody, my mwe was too minimal. I've expanded my question to be more indicative of what I"m trying to do.
– Leo Simon
Dec 11 at 22:28