Making TikZ cancel “overlay aware” in Beamer
up vote
4
down vote
favorite
How to make TikZ cancel "overlay aware" in Beamer?
Code taken from Cancel maths expression with a down arrow
documentclass{beamer}
usepackage{tikz}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{b}{b cdot d}\
end{align*}
end{frame}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{cancel[red]{b}}{cancel[red]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
tikz-pgf beamer
add a comment |
up vote
4
down vote
favorite
How to make TikZ cancel "overlay aware" in Beamer?
Code taken from Cancel maths expression with a down arrow
documentclass{beamer}
usepackage{tikz}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{b}{b cdot d}\
end{align*}
end{frame}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{cancel[red]{b}}{cancel[red]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
tikz-pgf beamer
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
How to make TikZ cancel "overlay aware" in Beamer?
Code taken from Cancel maths expression with a down arrow
documentclass{beamer}
usepackage{tikz}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{b}{b cdot d}\
end{align*}
end{frame}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{cancel[red]{b}}{cancel[red]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
tikz-pgf beamer
How to make TikZ cancel "overlay aware" in Beamer?
Code taken from Cancel maths expression with a down arrow
documentclass{beamer}
usepackage{tikz}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{b}{b cdot d}\
end{align*}
end{frame}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{cancel[red]{b}}{cancel[red]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
tikz-pgf beamer
tikz-pgf beamer
asked Dec 4 at 5:55
sandu
3,32742552
3,32742552
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
I take that you want to cancel only on certain frames. If so, you might be looking for the overlay-beamer-styles
library. You only need to add visible on=<...>
for the cancel line being visible on the frames ...
.
documentclass{beamer}
usepackage{tikz}
usetikzlibrary{overlay-beamer-styles}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{Cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{Cancel[red,visible on=<2>]{b}}{Cancel[red,visible on=<2>]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
I take that you want to cancel only on certain frames. If so, you might be looking for the overlay-beamer-styles
library. You only need to add visible on=<...>
for the cancel line being visible on the frames ...
.
documentclass{beamer}
usepackage{tikz}
usetikzlibrary{overlay-beamer-styles}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{Cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{Cancel[red,visible on=<2>]{b}}{Cancel[red,visible on=<2>]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
add a comment |
up vote
5
down vote
accepted
I take that you want to cancel only on certain frames. If so, you might be looking for the overlay-beamer-styles
library. You only need to add visible on=<...>
for the cancel line being visible on the frames ...
.
documentclass{beamer}
usepackage{tikz}
usetikzlibrary{overlay-beamer-styles}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{Cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{Cancel[red,visible on=<2>]{b}}{Cancel[red,visible on=<2>]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
I take that you want to cancel only on certain frames. If so, you might be looking for the overlay-beamer-styles
library. You only need to add visible on=<...>
for the cancel line being visible on the frames ...
.
documentclass{beamer}
usepackage{tikz}
usetikzlibrary{overlay-beamer-styles}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{Cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{Cancel[red,visible on=<2>]{b}}{Cancel[red,visible on=<2>]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
I take that you want to cancel only on certain frames. If so, you might be looking for the overlay-beamer-styles
library. You only need to add visible on=<...>
for the cancel line being visible on the frames ...
.
documentclass{beamer}
usepackage{tikz}
usetikzlibrary{overlay-beamer-styles}
tikzset{
main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay},
strikee out/.style={shorten <=-.2em,shorten >=-.2em,overlay}
}
%
newcommand{Cancel}[2]{tikz[baseline=(N.base)]{
node[main node](N){$#2$};
draw[strikee out,#1] (N.south west) -- (N.north east);
}}
%
begin{document}
%
%
begin{frame}
begin{align*}
a &= frac{b}{c}\
&= frac{Cancel[red,visible on=<2>]{b}}{Cancel[red,visible on=<2>]{b} cdot d}\
end{align*}
end{frame}
%
end{document}
answered Dec 4 at 6:01
marmot
82.3k492175
82.3k492175
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.
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%2f463092%2fmaking-tikz-cancel-overlay-aware-in-beamer%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