Browse Source

Added \TaskCompletion command

I didn't see any way to draw tees for task completion, so I added a
command for that.
Clara Hobbs 6 years ago
parent
commit
fbc791e4a0
2 changed files with 23 additions and 3 deletions
  1. 3
    2
      README.md
  2. 20
    1
      rtsched.sty

+ 3
- 2
README.md View File

4
 
4
 
5
 Author: Giuseppe Lipari (g.lipari@sssup.it)
5
 Author: Giuseppe Lipari (g.lipari@sssup.it)
6
 	Antoine Bertout (bertout.antoine@gmail.com)
6
 	Antoine Bertout (bertout.antoine@gmail.com)
7
-Version: 2.0
8
-Date:    2015/05/01
7
+	Clayton G. Hobbs (clay@lakeserv.net)
8
+Version: 2.1 (WIP)
9
+Date:    2018/09/12
9
 
10
 
10
 This package contains the rtsched package for drawing GANTT charts
11
 This package contains the rtsched package for drawing GANTT charts
11
 (chronograms). The package can be useful for drawing real-time timing
12
 (chronograms). The package can be useful for drawing real-time timing

+ 20
- 1
rtsched.sty View File

1
   %% rtsched.sty
1
   %% rtsched.sty
2
   %% Copyright 2005 Giuseppe Lipari
2
   %% Copyright 2005 Giuseppe Lipari
3
   %% Copyright 2015 Antoine Bertout <bertout.antoine@gmail.com> Transition from PSTricks to TikZ/PGF.
3
   %% Copyright 2015 Antoine Bertout <bertout.antoine@gmail.com> Transition from PSTricks to TikZ/PGF.
4
+  %% Copyright 2018 Clayton G. Hobbs <clay@lakeserv.net>
4
   % This work may be distributed and/or modified under the
5
   % This work may be distributed and/or modified under the
5
   % conditions of the LaTeX Project Public License, either version 1.3
6
   % conditions of the LaTeX Project Public License, either version 1.3
6
   % of this license or (at your option) any later version.
7
   % of this license or (at your option) any later version.
22
 \typeout{Easily draw real-time schedules in TeX/Latex.}
23
 \typeout{Easily draw real-time schedules in TeX/Latex.}
23
 \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
24
 \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
24
 \typeout{(c) 2015, Antoine Bertout (bertout.antoine@gmail.com)}
25
 \typeout{(c) 2015, Antoine Bertout (bertout.antoine@gmail.com)}
25
-\typeout{Version 2.0}
26
+\typeout{(c) 2018, Clayton G. Hobbs (clay@lakeserv.net)}
27
+\typeout{Version 2.1 (WIP)}
26
 
28
 
27
 \RequirePackage{tikz}
29
 \RequirePackage{tikz}
28
 \usetikzlibrary{shadows, patterns}
30
 \usetikzlibrary{shadows, patterns}
67
 \def\RTDefLineStyle{solid}
69
 \def\RTDefLineStyle{solid}
68
 \def\RTDefExecHeight{1}
70
 \def\RTDefExecHeight{1}
69
 \def\RTArrowStyle{stealth}
71
 \def\RTArrowStyle{stealth}
72
+\def\RTTeeStyle{|}
70
 %arrow style for deadlines, arrivals and horizontal axes
73
 %arrow style for deadlines, arrivals and horizontal axes
71
 % -{Triangle 45}[length=x] with length is a more modern arrow style but requires arrows.meta tikz library (available on latest texlive but rarely up to date on linux distribution)
74
 % -{Triangle 45}[length=x] with length is a more modern arrow style but requires arrows.meta tikz library (available on latest texlive but rarely up to date on linux distribution)
72
 %-stealth is a predefined more classical arrow style
75
 %-stealth is a predefined more classical arrow style
358
  }
361
  }
359
 }
362
 }
360
 
363
 
364
+%
365
+% TaskCompletion
366
+% Task completion: draws a tee at the specified slot
367
+% par 1  : task number from 1 to n
368
+% par 2  : slot number from 0 to l-1
369
+\newcommand{\TaskCompletion}[3][nocommand=1]{
370
+  \setkeys{RT}{#1}%
371
+  \@compute@yy{#2}
372
+  \@compute@xx{#3}
373
+  \yyy = \yy \advance \yyy by 2\sy
374
+  \begin{pgfonlayer}{foreground}
375
+  \draw [\RTLineStyle, \RTLineColor, thick, -\RTTeeStyle] (\xx,\yy) -- (\xx,\yyy);
376
+  \end{pgfonlayer}
377
+  \@RTExecDefaultValues
378
+}
379
+
361
 %
380
 %
362
 % TaskDeadline
381
 % TaskDeadline
363
 % Task deadline: draws a down arrow at the specified slot
382
 % Task deadline: draws a down arrow at the specified slot

Loading…
Cancel
Save