Style file for drawing timing diagrams in LaTeX, forked from https://github.com/glipari/rtsched
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rtsched-beamer-doc.tex 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. \documentclass[dvips]{beamer}
  2. \usepackage{rtsched}
  3. \usepackage[english]{babel}
  4. \usepackage[latin1]{inputenc}
  5. \title{An example of using the \texttt{rtsched} package with Beamer}
  6. \author{Giuseppe Lipari}
  7. \institute[Scuola Superiore Sant'Anna]{Scuola Superiore Sant'Anna -- Pisa}
  8. \usetheme{Madrid}
  9. \begin{document}
  10. \begin{frame}
  11. \titlepage
  12. \end{frame}
  13. \begin{frame}
  14. \frametitle{An example with fixed priority}
  15. \transduration<2-15>{.5}
  16. \begin{itemize}
  17. \item After you click on this slides, an animation will start where
  18. every move in the schedule is shown for half a second.
  19. \end{itemize}
  20. \begin{figure}
  21. \centering
  22. \begin{RTGrid}[width=.7\textwidth]{2}{20}
  23. %% the first job of task 1 arrives at time 0,
  24. %% with a relative deadline of 4
  25. \only<+->{
  26. \TaskArrDead{1}{0}{4}
  27. \TaskArrDead{2}{0}{4}
  28. }
  29. \TaskExecution<+->{1}{0}{1}
  30. \TaskExecution<+->{2}{1}{4}
  31. \TaskArrDead<+->{1}{4}{4}
  32. \TaskExecution<+->{1}{4}{5}
  33. \TaskArrDead<+->{2}{6}{4}
  34. \TaskExecution<+->{2}{6}{8}
  35. \TaskArrDead<+->{1}{8}{4}
  36. \TaskExecution<+->{1}{8}{9}
  37. \TaskExecution<+->{2}{9}{10}
  38. \only<+->{
  39. \TaskArrDead{1}{12}{4}
  40. \TaskArrDead{2}{12}{4}
  41. }
  42. \TaskExecution<+->{1}{12}{13}
  43. \TaskExecution<+->{2}{13}{16}
  44. \TaskArrDead<+->{1}{16}{4}
  45. \TaskExecution<+->{1}{16}{17}
  46. \end{RTGrid}
  47. \end{figure}
  48. \begin{itemize}
  49. \item<+-> You can now click to move to the next slide
  50. \end{itemize}
  51. \end{frame}
  52. \begin{frame}
  53. \frametitle{A simple RTBox to highlight part of the schedule}
  54. \transduration<2-22>{.2}
  55. \begin{itemize}
  56. \item Now, when you click an animation will start that shows a
  57. hatched box from time 6 to time 10 in ``slow motion''
  58. \end{itemize}
  59. \begin{figure}
  60. \centering
  61. \begin{RTGrid}[width=.7\textwidth]{2}{20}
  62. \multido{\i=2+1,\n=6+.2}{20} {
  63. \RTBox<\i>{6}{\n}
  64. }
  65. \RTBox<23>{6}{10}
  66. \multido{\n=0+4}{5}{ % 5 instances of period 4
  67. \TaskArrDead{1}{\n}{4} % draw the arrival and deadline
  68. \TaskExecDelta{1}{\n}{1} % draw execution (highest priority),
  69. % from \n to \n+1
  70. }
  71. \multido{\n=0+6}{3}{ % 3 instances of period 6
  72. \TaskArrDead{2}{\n}{6} % draw the arrival and deadline
  73. }
  74. % no simple formula for lowest priority, sorry!
  75. \TaskExecution{2}{1}{4}
  76. \TaskExecution{2}{6}{8}
  77. \TaskExecution{2}{9}{10}
  78. \TaskExecution{2}{13}{16}
  79. \end{RTGrid}
  80. \end{figure}
  81. \begin{itemize}
  82. \item<23> Again, you can now click to move to next animation
  83. \end{itemize}
  84. \end{frame}
  85. \end{document}
  86. %%% Local Variables:
  87. %%% mode: latex
  88. %%% TeX-master: t
  89. %%% End: