|
@@ -1,6 +1,6 @@
|
1
|
1
|
%% rtsched.sty
|
2
|
|
- %% Copyright 2005 M. G. Lipari
|
3
|
|
- %
|
|
2
|
+ %% Copyright 2005 Giuseppe Lipari
|
|
3
|
+ %% Copyright 2015 Antoine Bertout <bertout.antoine@gmail.com> Transition from PSTricks to TikZ/PGF.
|
4
|
4
|
% This work may be distributed and/or modified under the
|
5
|
5
|
% conditions of the LaTeX Project Public License, either version 1.3
|
6
|
6
|
% of this license or (at your option) any later version.
|
|
@@ -11,16 +11,17 @@
|
11
|
11
|
%
|
12
|
12
|
% This work has the LPPL maintenance status `maintained'.
|
13
|
13
|
%
|
14
|
|
- % The Current Maintainer of this work is G. Lipari
|
|
14
|
+ % The Current Maintainer of this work is Giuseppe Lipari
|
15
|
15
|
%
|
16
|
|
- % This work consists of the file pig.sty.
|
|
16
|
+ % This work consists of the file rtsched.sty.
|
17
|
17
|
|
18
|
18
|
|
19
|
19
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
20
|
|
-\ProvidesPackage{rtsched}[2005/01/01]
|
|
20
|
+\ProvidesPackage{rtsched}[2015/05/01]
|
21
|
21
|
\typeout{'rtsched' style for Latex and TikZ/PGF}
|
22
|
22
|
\typeout{Easily draw real-time schedules in TeX/Latex.}
|
23
|
23
|
\typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
|
|
24
|
+\typeout{(c) 2015, Antoine Bertout (bertout.antoine@gmail.com)}
|
24
|
25
|
\typeout{Version 2.0}
|
25
|
26
|
|
26
|
27
|
\RequirePackage{tikz}
|
|
@@ -51,7 +52,7 @@
|
51
|
52
|
\def\RTDefLineWidth{1pt}
|
52
|
53
|
\def\RTDefLineStyle{solid}
|
53
|
54
|
\def\RTDefExecHeight{1}
|
54
|
|
-\def\RTArrowStyle{-stealth} %arrow style for deadlines, arrivals and horizontal axes
|
|
55
|
+\def\RTArrowStyle{stealth} %arrow style for deadlines, arrivals and horizontal axes
|
55
|
56
|
% -{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)
|
56
|
57
|
%-stealth is a predefined more classical arrow style
|
57
|
58
|
|
|
@@ -184,7 +185,7 @@
|
184
|
185
|
\if\RTAxisInvisible\RTDefAxisInvisible
|
185
|
186
|
\begin{pgfonlayer}{foreground}
|
186
|
187
|
\foreach \i [evaluate = \i as \j using (\hy -3*\i*\sy)] in {0,...,\ntaskslessone}{
|
187
|
|
- \draw [very thick,\RTArrowStyle] (\sx,\j-3*\sy) -- (\RTWindowLength - \sx,\j-3*\sy);
|
|
188
|
+ \draw [very thick,-\RTArrowStyle] (\sx,\j-3*\sy) -- (\RTWindowLength - \sx,\j-3*\sy);
|
188
|
189
|
}
|
189
|
190
|
\end{pgfonlayer}
|
190
|
191
|
\fi
|
|
@@ -251,8 +252,7 @@
|
251
|
252
|
\@compute@yy{#2}
|
252
|
253
|
\@compute@xx{0}
|
253
|
254
|
\xxx = \RTWindowLength \advance \xxx by -\sx
|
254
|
|
- \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
255
|
|
- \psline[linecolor=\RTLineColor]{->}(\xx,\yy)(\xxx,\yy)%
|
|
255
|
+ \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
256
|
256
|
\@RTExecDefaultValues%
|
257
|
257
|
}
|
258
|
258
|
|
|
@@ -261,10 +261,10 @@
|
261
|
261
|
\@compute@yy{#2}
|
262
|
262
|
\@compute@xx{0}
|
263
|
263
|
\xxx = \RTWindowLength \advance \xxx by -\sx
|
264
|
|
- \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xxx,\yy);
|
|
264
|
+ \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yy);
|
265
|
265
|
\yyy = 3\sy \multiply \yyy by #3 \advance \yyy by \yy
|
266
|
266
|
\advance \yyy by -\sy
|
267
|
|
- \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
|
267
|
+ \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
268
|
268
|
\@RTExecDefaultValues%
|
269
|
269
|
}
|
270
|
270
|
|
|
@@ -287,7 +287,7 @@
|
287
|
287
|
\@compute@xx{#3}
|
288
|
288
|
\yyy = \yy \advance \yyy by 2\sy%
|
289
|
289
|
\begin{pgfonlayer}{foreground}
|
290
|
|
- \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
|
290
|
+ \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
291
|
291
|
\end{pgfonlayer}
|
292
|
292
|
|
293
|
293
|
\@RTExecDefaultValues%
|
|
@@ -303,11 +303,11 @@
|
303
|
303
|
\@compute@xx{#3}
|
304
|
304
|
\yyy = \yy \advance \yyy by 2\sy
|
305
|
305
|
\begin{pgfonlayer}{foreground}
|
306
|
|
- \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
|
306
|
+ \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
307
|
307
|
\end{pgfonlayer}
|
308
|
308
|
\advance \xx by #4\sx
|
309
|
309
|
\begin{pgfonlayer}{foreground}
|
310
|
|
- \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yyy) -- (\xx,\yy);
|
|
310
|
+ \draw [\RTLineColor, thick, -\RTArrowStyle] (\xx,\yyy) -- (\xx,\yy);
|
311
|
311
|
\end{pgfonlayer}
|
312
|
312
|
\@RTExecDefaultValues
|
313
|
313
|
}
|
|
@@ -322,7 +322,7 @@
|
322
|
322
|
\@compute@xx{#3}
|
323
|
323
|
\yyy = \yy \advance \yyy by 2\sy
|
324
|
324
|
\begin{pgfonlayer}{foreground}
|
325
|
|
- \draw [\RTLineColor, thick,<-] (\xx,\yy) -- (\xx,\yyy);
|
|
325
|
+ \draw [\RTLineColor, thick, \RTArrowStyle-] (\xx,\yy) -- (\xx,\yyy);
|
326
|
326
|
\end{pgfonlayer}
|
327
|
327
|
\@RTExecDefaultValues
|
328
|
328
|
}
|
|
@@ -333,9 +333,10 @@
|
333
|
333
|
\@compute@xx{#3}
|
334
|
334
|
\yyy = \yy \advance \yyy by \RTExecHeight\sy
|
335
|
335
|
\@compute@xxx{#4}
|
336
|
|
- \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
|
|
336
|
+ \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
|
337
|
337
|
\advance \xx by \xxx \xx = .5\xx
|
338
|
|
- \draw (\xx,\yy) node[above, font=\rtfont] {\RTNumberLabelSize \RTExecLabel};%\RTNumberLabelSize
|
|
338
|
+ \advance \yy by .5\RTExecHeight\sy
|
|
339
|
+ \draw (\xx,\yy) node[font=\rtfont] {\RTNumberLabelSize \RTExecLabel};%\RTNumberLabelSize
|
339
|
340
|
\@RTExecDefaultValues
|
340
|
341
|
}
|
341
|
342
|
%
|
|
@@ -349,7 +350,8 @@
|
349
|
350
|
\@compute@yy{#2}
|
350
|
351
|
\@compute@xx{#3}
|
351
|
352
|
\yyy = \yy \advance \yyy by \sy
|
352
|
|
- \node[above,font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize L(#4)}; %\RTNumberLabelSize
|
|
353
|
+ \advance \yyy by .5\sy
|
|
354
|
+ \node[font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize L(#4)}; %\RTNumberLabelSize
|
353
|
355
|
\@RTExecDefaultValues
|
354
|
356
|
}
|
355
|
357
|
%
|
|
@@ -363,7 +365,8 @@
|
363
|
365
|
\@compute@yy{#2}
|
364
|
366
|
\@compute@xx{#3}
|
365
|
367
|
\yyy = \yy \advance \yyy by \sy
|
366
|
|
- \node[above, font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize U(#4)}; %\RTNumberLabelSize
|
|
368
|
+ \advance \yyy by .5\sy
|
|
369
|
+ \node[font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize U(#4)}; %\RTNumberLabelSize
|
367
|
370
|
\@RTExecDefaultValues
|
368
|
371
|
}
|
369
|
372
|
%
|
|
@@ -396,7 +399,7 @@
|
396
|
399
|
\yyy = -3\sy \multiply \yyy by #3 \advance \yyy by \sy
|
397
|
400
|
\advance \yyy by \hy \advance \yyy by -\sy % \RTWindowHeight
|
398
|
401
|
\begin{pgfonlayer}{foreground}
|
399
|
|
- \draw [dashed, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
|
402
|
+ \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
|
400
|
403
|
\end{pgfonlayer}
|
401
|
404
|
\@RTExecDefaultValues
|
402
|
405
|
}
|
|
@@ -416,7 +419,7 @@
|
416
|
419
|
\advance \yyy by \hy %\advance \yyy by -\sy %\RTWindowHeight
|
417
|
420
|
\xxx = #5\sx \advance \xxx by \sx
|
418
|
421
|
\begin{pgfonlayer}{foreground}
|
419
|
|
- \draw [dashed, thick,\RTArrowStyle] (\xx,\yy) -- (\xxx,\yyy);
|
|
422
|
+ \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yyy);
|
420
|
423
|
\end{pgfonlayer}
|
421
|
424
|
|
422
|
425
|
}
|
|
@@ -465,7 +468,7 @@
|
465
|
468
|
\newcommand{\RowLabel}[3][nocommand=1]{
|
466
|
469
|
\setkeys{RT}{#1}%
|
467
|
470
|
\@compute@yy{#2}
|
468
|
|
- \advance \yy by 1.5\sy
|
|
471
|
+ \advance \yy by 2\sy
|
469
|
472
|
\xx = \RTRowLabelOffset %\advance \xx by \sx
|
470
|
473
|
\node[below left,font=\rtfont] at (-\xx , \yy) {\RTTaskLabelSize #3};%\RTTaskLabelSize
|
471
|
474
|
}
|
|
@@ -506,7 +509,6 @@
|
506
|
509
|
\@RTExecDefaultValues
|
507
|
510
|
}
|
508
|
511
|
|
509
|
|
-
|
510
|
512
|
\@ifclassloaded{beamer}{
|
511
|
513
|
\renewcommand<>{\TaskArrival}[3][nocommand=1]{
|
512
|
514
|
\only#4{\beameroriginal{\TaskArrival}[#1]{#2}{#3}}
|