浏览代码

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 年前
父节点
当前提交
fbc791e4a0
共有 2 个文件被更改,包括 23 次插入3 次删除
  1. 3
    2
      README.md
  2. 20
    1
      rtsched.sty

+ 3
- 2
README.md 查看文件

@@ -4,8 +4,9 @@
4 4
 
5 5
 Author: Giuseppe Lipari (g.lipari@sssup.it)
6 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 11
 This package contains the rtsched package for drawing GANTT charts
11 12
 (chronograms). The package can be useful for drawing real-time timing

+ 20
- 1
rtsched.sty 查看文件

@@ -1,6 +1,7 @@
1 1
   %% rtsched.sty
2 2
   %% Copyright 2005 Giuseppe Lipari
3 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 5
   % This work may be distributed and/or modified under the
5 6
   % conditions of the LaTeX Project Public License, either version 1.3
6 7
   % of this license or (at your option) any later version.
@@ -22,7 +23,8 @@
22 23
 \typeout{Easily draw real-time schedules in TeX/Latex.}
23 24
 \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
24 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 29
 \RequirePackage{tikz}
28 30
 \usetikzlibrary{shadows, patterns}
@@ -67,6 +69,7 @@ Please update pgf to version 2.10 minimum!\MessageBreak
67 69
 \def\RTDefLineStyle{solid}
68 70
 \def\RTDefExecHeight{1}
69 71
 \def\RTArrowStyle{stealth}
72
+\def\RTTeeStyle{|}
70 73
 %arrow style for deadlines, arrivals and horizontal axes
71 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 75
 %-stealth is a predefined more classical arrow style
@@ -358,6 +361,22 @@ Please update pgf to version 2.10 minimum!\MessageBreak
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 381
 % TaskDeadline
363 382
 % Task deadline: draws a down arrow at the specified slot

正在加载...
取消
保存