Timer chrono countdown and progress bar
I would like to create a beamer containing a progress bar for a timer looking like this :
(these images are from powerpoint)
It's for my student, each slide is a question so I would like to be able to make a progress bar like above with a different timer on each slide.
I've tried to use the tikz and animate package but couldn't make something similar.
The best solution that I found is to use the tdclock package to make a chrono but it is impossible to countdown so we can't realy easily see how much time left.
Here is a compilable code :
documentclass[french]{beamer}
usepackage{babel}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usetheme{Warsaw}
usecolortheme{beaver}
usepackage{tikz}
usepackage[font=Times,timeinterval=1, timeduration=2,resetatpages=all]{tdclock}
begin{document}
initclock
begin{frame}
begin{tikzpicture}[remember picture, overlay,shift={(current page.south west)}]
draw (11.8,8) node{boxed{{Hugecronoseconds}}} ;
draw (12,7.2) node{/45s} ;
end{tikzpicture}
end{frame}
end{document}
Any help will be very apriciate. Thank you.
Edit for the answer of @samcarter
tikz-pgf beamer animate tdclock
add a comment |
I would like to create a beamer containing a progress bar for a timer looking like this :
(these images are from powerpoint)
It's for my student, each slide is a question so I would like to be able to make a progress bar like above with a different timer on each slide.
I've tried to use the tikz and animate package but couldn't make something similar.
The best solution that I found is to use the tdclock package to make a chrono but it is impossible to countdown so we can't realy easily see how much time left.
Here is a compilable code :
documentclass[french]{beamer}
usepackage{babel}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usetheme{Warsaw}
usecolortheme{beaver}
usepackage{tikz}
usepackage[font=Times,timeinterval=1, timeduration=2,resetatpages=all]{tdclock}
begin{document}
initclock
begin{frame}
begin{tikzpicture}[remember picture, overlay,shift={(current page.south west)}]
draw (11.8,8) node{boxed{{Hugecronoseconds}}} ;
draw (12,7.2) node{/45s} ;
end{tikzpicture}
end{frame}
end{document}
Any help will be very apriciate. Thank you.
Edit for the answer of @samcarter
tikz-pgf beamer animate tdclock
add a comment |
I would like to create a beamer containing a progress bar for a timer looking like this :
(these images are from powerpoint)
It's for my student, each slide is a question so I would like to be able to make a progress bar like above with a different timer on each slide.
I've tried to use the tikz and animate package but couldn't make something similar.
The best solution that I found is to use the tdclock package to make a chrono but it is impossible to countdown so we can't realy easily see how much time left.
Here is a compilable code :
documentclass[french]{beamer}
usepackage{babel}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usetheme{Warsaw}
usecolortheme{beaver}
usepackage{tikz}
usepackage[font=Times,timeinterval=1, timeduration=2,resetatpages=all]{tdclock}
begin{document}
initclock
begin{frame}
begin{tikzpicture}[remember picture, overlay,shift={(current page.south west)}]
draw (11.8,8) node{boxed{{Hugecronoseconds}}} ;
draw (12,7.2) node{/45s} ;
end{tikzpicture}
end{frame}
end{document}
Any help will be very apriciate. Thank you.
Edit for the answer of @samcarter
tikz-pgf beamer animate tdclock
I would like to create a beamer containing a progress bar for a timer looking like this :
(these images are from powerpoint)
It's for my student, each slide is a question so I would like to be able to make a progress bar like above with a different timer on each slide.
I've tried to use the tikz and animate package but couldn't make something similar.
The best solution that I found is to use the tdclock package to make a chrono but it is impossible to countdown so we can't realy easily see how much time left.
Here is a compilable code :
documentclass[french]{beamer}
usepackage{babel}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usetheme{Warsaw}
usecolortheme{beaver}
usepackage{tikz}
usepackage[font=Times,timeinterval=1, timeduration=2,resetatpages=all]{tdclock}
begin{document}
initclock
begin{frame}
begin{tikzpicture}[remember picture, overlay,shift={(current page.south west)}]
draw (11.8,8) node{boxed{{Hugecronoseconds}}} ;
draw (12,7.2) node{/45s} ;
end{tikzpicture}
end{frame}
end{document}
Any help will be very apriciate. Thank you.
Edit for the answer of @samcarter
tikz-pgf beamer animate tdclock
tikz-pgf beamer animate tdclock
edited Dec 19 '18 at 19:57
samcarter
87.1k795279
87.1k795279
asked Dec 19 '18 at 18:05
ZanziZanzi
19710
19710
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The easiest way to produce shadings is pgf
(or tikz
). This can also be used to create a loop over n different iterations of the shading. Beamer can then be used to automatically show each slide for 1 second using transduration{1}
(this assumes your computer is infinitely fast and does not need any time to render the slides. You might have to replace 1 with a slightly smaller time.)
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0textwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0175textwidth)=(rgb:green,50;-green,x;red,x);
color(0.1textwidth+x*0.0175textwidth)=(white);
color(textwidth)=(white)
}
begin{pgfpicture}{0pt}{0pt}{textwidth}{1em}
pgfpathrectangle{pgfpointorigin}{pgfpoint{textwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9textwidth,y=0.5em] {x s / 50s}
end{pgfpicture}
}}
end{frame}
end{document}
Quick hack to move it at the top of the page:
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}[t]
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0paperwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0179paperwidth)=(rgb:green,50;-green,x;red,x);
color(0.1paperwidth+x*0.0179paperwidth)=(white);
color(paperwidth)=(white)
}
begin{tikzpicture}[remember picture, overlay,xshift=-1cm,yshift=0.3cm]
pgfpathrectangle{pgfpointorigin}{pgfpoint{paperwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9paperwidth,y=0.5em] {x s / 50s}
end{tikzpicture}
}}
end{frame}
end{document}
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
|
show 1 more 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%2f466583%2ftimer-chrono-countdown-and-progress-bar%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
The easiest way to produce shadings is pgf
(or tikz
). This can also be used to create a loop over n different iterations of the shading. Beamer can then be used to automatically show each slide for 1 second using transduration{1}
(this assumes your computer is infinitely fast and does not need any time to render the slides. You might have to replace 1 with a slightly smaller time.)
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0textwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0175textwidth)=(rgb:green,50;-green,x;red,x);
color(0.1textwidth+x*0.0175textwidth)=(white);
color(textwidth)=(white)
}
begin{pgfpicture}{0pt}{0pt}{textwidth}{1em}
pgfpathrectangle{pgfpointorigin}{pgfpoint{textwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9textwidth,y=0.5em] {x s / 50s}
end{pgfpicture}
}}
end{frame}
end{document}
Quick hack to move it at the top of the page:
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}[t]
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0paperwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0179paperwidth)=(rgb:green,50;-green,x;red,x);
color(0.1paperwidth+x*0.0179paperwidth)=(white);
color(paperwidth)=(white)
}
begin{tikzpicture}[remember picture, overlay,xshift=-1cm,yshift=0.3cm]
pgfpathrectangle{pgfpointorigin}{pgfpoint{paperwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9paperwidth,y=0.5em] {x s / 50s}
end{tikzpicture}
}}
end{frame}
end{document}
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
|
show 1 more comment
The easiest way to produce shadings is pgf
(or tikz
). This can also be used to create a loop over n different iterations of the shading. Beamer can then be used to automatically show each slide for 1 second using transduration{1}
(this assumes your computer is infinitely fast and does not need any time to render the slides. You might have to replace 1 with a slightly smaller time.)
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0textwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0175textwidth)=(rgb:green,50;-green,x;red,x);
color(0.1textwidth+x*0.0175textwidth)=(white);
color(textwidth)=(white)
}
begin{pgfpicture}{0pt}{0pt}{textwidth}{1em}
pgfpathrectangle{pgfpointorigin}{pgfpoint{textwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9textwidth,y=0.5em] {x s / 50s}
end{pgfpicture}
}}
end{frame}
end{document}
Quick hack to move it at the top of the page:
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}[t]
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0paperwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0179paperwidth)=(rgb:green,50;-green,x;red,x);
color(0.1paperwidth+x*0.0179paperwidth)=(white);
color(paperwidth)=(white)
}
begin{tikzpicture}[remember picture, overlay,xshift=-1cm,yshift=0.3cm]
pgfpathrectangle{pgfpointorigin}{pgfpoint{paperwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9paperwidth,y=0.5em] {x s / 50s}
end{tikzpicture}
}}
end{frame}
end{document}
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
|
show 1 more comment
The easiest way to produce shadings is pgf
(or tikz
). This can also be used to create a loop over n different iterations of the shading. Beamer can then be used to automatically show each slide for 1 second using transduration{1}
(this assumes your computer is infinitely fast and does not need any time to render the slides. You might have to replace 1 with a slightly smaller time.)
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0textwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0175textwidth)=(rgb:green,50;-green,x;red,x);
color(0.1textwidth+x*0.0175textwidth)=(white);
color(textwidth)=(white)
}
begin{pgfpicture}{0pt}{0pt}{textwidth}{1em}
pgfpathrectangle{pgfpointorigin}{pgfpoint{textwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9textwidth,y=0.5em] {x s / 50s}
end{pgfpicture}
}}
end{frame}
end{document}
Quick hack to move it at the top of the page:
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}[t]
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0paperwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0179paperwidth)=(rgb:green,50;-green,x;red,x);
color(0.1paperwidth+x*0.0179paperwidth)=(white);
color(paperwidth)=(white)
}
begin{tikzpicture}[remember picture, overlay,xshift=-1cm,yshift=0.3cm]
pgfpathrectangle{pgfpointorigin}{pgfpoint{paperwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9paperwidth,y=0.5em] {x s / 50s}
end{tikzpicture}
}}
end{frame}
end{document}
The easiest way to produce shadings is pgf
(or tikz
). This can also be used to create a loop over n different iterations of the shading. Beamer can then be used to automatically show each slide for 1 second using transduration{1}
(this assumes your computer is infinitely fast and does not need any time to render the slides. You might have to replace 1 with a slightly smaller time.)
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0textwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0175textwidth)=(rgb:green,50;-green,x;red,x);
color(0.1textwidth+x*0.0175textwidth)=(white);
color(textwidth)=(white)
}
begin{pgfpicture}{0pt}{0pt}{textwidth}{1em}
pgfpathrectangle{pgfpointorigin}{pgfpoint{textwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9textwidth,y=0.5em] {x s / 50s}
end{pgfpicture}
}}
end{frame}
end{document}
Quick hack to move it at the top of the page:
documentclass{beamer}
usepackage{tikz}
begin{document}
begin{frame}[t]
transduration{1}
foreach x in {0,...,50}{only<+>{
pgfdeclarehorizontalshading{myshade}{1em}{%
color(0paperwidth)=(rgb:green,50;-green,x;red,x);
color(x*0.0179paperwidth)=(rgb:green,50;-green,x;red,x);
color(0.1paperwidth+x*0.0179paperwidth)=(white);
color(paperwidth)=(white)
}
begin{tikzpicture}[remember picture, overlay,xshift=-1cm,yshift=0.3cm]
pgfpathrectangle{pgfpointorigin}{pgfpoint{paperwidth}{1em}}
pgfusepath{clip}
pgftext[left,base]{pgfuseshading{myshade}}
pgftext[x=.9paperwidth,y=0.5em] {x s / 50s}
end{tikzpicture}
}}
end{frame}
end{document}
edited Dec 19 '18 at 20:22
answered Dec 19 '18 at 19:34
samcartersamcarter
87.1k795279
87.1k795279
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
|
show 1 more comment
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
This is amazing! Great work! Thank you very much. Unfortunatly I have an error message at this end of the timer :"This page content an error".
– Zanzi
Dec 19 '18 at 19:40
1
1
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
@Zanzi It compiles fine for me. Can you show your .log file?
– samcarter
Dec 19 '18 at 19:41
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
It is not inside my tex editor that the error comes up but inside Adobe Reader, I make a screenshot but I can't share it inside the comment section so I will add it at the end of my post.
– Zanzi
Dec 19 '18 at 19:51
1
1
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
@Zanzi Ah, I guess I might know what is going on, some rounding error in adobe reader. Try my updated answer.
– samcarter
Dec 19 '18 at 19:57
1
1
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
@Zanzi Please see my update
– samcarter
Dec 19 '18 at 20:22
|
show 1 more 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%2f466583%2ftimer-chrono-countdown-and-progress-bar%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