Beamer - how to change color of each equation in align environment?
I want to use beamer overlays to change the color of equations in an align environment.
On each slide, I want all equations to be black, except one which should be red. On the first slide, the first equation should be red, on the second slide, the second equation should be red, etc.
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
bm{f_t} &= sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f}) \
bm{i_t} &= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i}) \
bm{tilde{C}_t} &= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}}) \
bm{C_t} &= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t} \
bm{o_t} &= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o}) \
bm{h_t} &= bm{o_t} odot tanh(bm{C_t})
end{align*}
end{frame}
end{document}
If anybody can help me, I'd be incredibly thankful. I've been fiddling with onslide
for hours!
beamer color align amsmath overlays
add a comment |
I want to use beamer overlays to change the color of equations in an align environment.
On each slide, I want all equations to be black, except one which should be red. On the first slide, the first equation should be red, on the second slide, the second equation should be red, etc.
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
bm{f_t} &= sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f}) \
bm{i_t} &= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i}) \
bm{tilde{C}_t} &= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}}) \
bm{C_t} &= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t} \
bm{o_t} &= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o}) \
bm{h_t} &= bm{o_t} odot tanh(bm{C_t})
end{align*}
end{frame}
end{document}
If anybody can help me, I'd be incredibly thankful. I've been fiddling with onslide
for hours!
beamer color align amsmath overlays
1
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago
add a comment |
I want to use beamer overlays to change the color of equations in an align environment.
On each slide, I want all equations to be black, except one which should be red. On the first slide, the first equation should be red, on the second slide, the second equation should be red, etc.
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
bm{f_t} &= sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f}) \
bm{i_t} &= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i}) \
bm{tilde{C}_t} &= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}}) \
bm{C_t} &= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t} \
bm{o_t} &= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o}) \
bm{h_t} &= bm{o_t} odot tanh(bm{C_t})
end{align*}
end{frame}
end{document}
If anybody can help me, I'd be incredibly thankful. I've been fiddling with onslide
for hours!
beamer color align amsmath overlays
I want to use beamer overlays to change the color of equations in an align environment.
On each slide, I want all equations to be black, except one which should be red. On the first slide, the first equation should be red, on the second slide, the second equation should be red, etc.
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
bm{f_t} &= sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f}) \
bm{i_t} &= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i}) \
bm{tilde{C}_t} &= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}}) \
bm{C_t} &= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t} \
bm{o_t} &= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o}) \
bm{h_t} &= bm{o_t} odot tanh(bm{C_t})
end{align*}
end{frame}
end{document}
If anybody can help me, I'd be incredibly thankful. I've been fiddling with onslide
for hours!
beamer color align amsmath overlays
beamer color align amsmath overlays
asked 11 hours ago
HenryHenry
684
684
1
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago
add a comment |
1
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago
1
1
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
You can use alert
to highlight each line after another:
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
alert<+>{bm{f_t}} & alert<.>{=sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f})} \
alert<+>{bm{i_t}} &alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})} \
alert<+>{bm{tilde{C}_t}} &alert<.>{= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}})} \
alert<+>{bm{C_t}} &alert<.>{= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t}} \
alert<+>{bm{o_t}} &alert<.>{= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o})} \
alert<+>{bm{h_t}} &alert<.>{= bm{o_t} odot tanh(bm{C_t})}
end{align*}
end{frame}
end{document}
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Tryuncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
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%2f483193%2fbeamer-how-to-change-color-of-each-equation-in-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 use alert
to highlight each line after another:
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
alert<+>{bm{f_t}} & alert<.>{=sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f})} \
alert<+>{bm{i_t}} &alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})} \
alert<+>{bm{tilde{C}_t}} &alert<.>{= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}})} \
alert<+>{bm{C_t}} &alert<.>{= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t}} \
alert<+>{bm{o_t}} &alert<.>{= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o})} \
alert<+>{bm{h_t}} &alert<.>{= bm{o_t} odot tanh(bm{C_t})}
end{align*}
end{frame}
end{document}
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Tryuncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
add a comment |
You can use alert
to highlight each line after another:
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
alert<+>{bm{f_t}} & alert<.>{=sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f})} \
alert<+>{bm{i_t}} &alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})} \
alert<+>{bm{tilde{C}_t}} &alert<.>{= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}})} \
alert<+>{bm{C_t}} &alert<.>{= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t}} \
alert<+>{bm{o_t}} &alert<.>{= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o})} \
alert<+>{bm{h_t}} &alert<.>{= bm{o_t} odot tanh(bm{C_t})}
end{align*}
end{frame}
end{document}
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Tryuncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
add a comment |
You can use alert
to highlight each line after another:
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
alert<+>{bm{f_t}} & alert<.>{=sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f})} \
alert<+>{bm{i_t}} &alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})} \
alert<+>{bm{tilde{C}_t}} &alert<.>{= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}})} \
alert<+>{bm{C_t}} &alert<.>{= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t}} \
alert<+>{bm{o_t}} &alert<.>{= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o})} \
alert<+>{bm{h_t}} &alert<.>{= bm{o_t} odot tanh(bm{C_t})}
end{align*}
end{frame}
end{document}
You can use alert
to highlight each line after another:
documentclass{beamer}
usepackage{amsmath, bm}
begin{document}
begin{frame}
begin{align*}
alert<+>{bm{f_t}} & alert<.>{=sigma(bm{W_f} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_f})} \
alert<+>{bm{i_t}} &alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})} \
alert<+>{bm{tilde{C}_t}} &alert<.>{= tanh(bm{W_{tilde{C}}} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_{tilde{C}}})} \
alert<+>{bm{C_t}} &alert<.>{= bm{f_t} odot bm{C_{t-1}} + bm{i_t} odotbm{tilde{C}_t}} \
alert<+>{bm{o_t}} &alert<.>{= sigma(bm{W_o} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_o})} \
alert<+>{bm{h_t}} &alert<.>{= bm{o_t} odot tanh(bm{C_t})}
end{align*}
end{frame}
end{document}
answered 11 hours ago
samcartersamcarter
93.8k7105303
93.8k7105303
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Tryuncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
add a comment |
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Tryuncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
Thanks so much sam! Although is it possible for the equations to appear one after each other as well?
– Henry
10 hours ago
1
1
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Try
uncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
@Henry Sure it is possible, although in your question you explicitly asked that all equations to be black, only one red. Try
uncover<+->{alert<.>{bm{i_t}}} &uncover<.->{alert<.>{= sigma(bm{W_i} cdot [bm{h_{t-1}}, bm{x_t}] + bm{b_i})}} \
– samcarter
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
Yes, sorry I made a mistake. Thank you!
– Henry
10 hours ago
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%2f483193%2fbeamer-how-to-change-color-of-each-equation-in-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
Do the equations have to appear after each other or is it enough that the color changes?
– campa
11 hours ago
Preferably the equations would appear one after each other. Sorry, I should have mentioned that in the question.
– Henry
10 hours ago