Style file for drawing timing diagrams in LaTeX, forked from https://github.com/glipari/rtsched
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

rtsched-beamer-doc.tex 2.7KB

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