Beamer - how to change color of each equation in align environment?












2















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!










share|improve this question


















  • 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
















2















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!










share|improve this question


















  • 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














2












2








2








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!










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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














  • 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










1 Answer
1






active

oldest

votes


















4














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}


enter image description here






share|improve this answer
























  • 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. 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












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
});


}
});














draft saved

draft discarded


















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









4














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}


enter image description here






share|improve this answer
























  • 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. 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
















4














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}


enter image description here






share|improve this answer
























  • 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. 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














4












4








4







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}


enter image description here






share|improve this answer













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}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










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. 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



















  • 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. 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

















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


















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%2f483193%2fbeamer-how-to-change-color-of-each-equation-in-align-environment%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

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)