summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex
blob: bc9cf03276657354304e31fd8126557270a7d25f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
%% $Id: pst-func-doc.tex 86 2009-01-29 10:34:00Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
    headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
\usepackage{pst-gantt}
\let\pstganttFV\fileversion
\usepackage{pstricks-add}
\usepackage{lscape}
\lstset{explpreset={pos=l,width=0.4\linewidth,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
    escapechar=?}
%
\begin{document}

\title{\texttt{pst-gantt}}
\subtitle{gantt charts; v.\pstganttFV}
\author{Denis Girou\\Herbert Vo\ss}
\docauthor{Herbert Vo\ss}
\date{\today}
\maketitle

\tableofcontents

\clearpage

\begin{abstract}
\noindent
\LPack{pst-gantt} loads by default the following packages: \LPack{pst-node}, 
\LPack{pst-grad}, \LPack{pst-xkey}, and, of course \LPack{pstricks}.
All should be already part of your local \TeX\ installation. If not, or in case
of having older versions, go to \url{http://www.CTAN.org/} and load the newest version.

\vfill\noindent
%Thanks to: \\
%and last but not least \url{http://mathworld.wolfram.com}

\end{abstract}

\section{Environments and Macros}

The main environemnt is \Lenv{PstGanttChart} with the following syntax:

\begin{BDef}
\LBEG{PstGanttChart}\OptArgs\Largb{vertical units}\Largb{horizontal units}\\
\ldots
\LEND{PstGanttChart}\\[5pt]
\Lcs{PstGanttTask}\OptArgs\Largb{Start}\Largb{End}
\end{BDef}




\begingroup
\begin{LTXexample}
\newpsstyle{Important}{fillstyle=solid,fillcolor=red}
\newpsstyle{NotImportant}{fillstyle=vlines}
\begin{PstGanttChart}{5}{7}
\PstGanttTask{0}{3}
\PstGanttTask{2}{1}
\PstGanttTask[TaskStyle=Important,
    TaskInsideLabel=Important]{2}{5}
\PstGanttTask[TaskStyle=NotImportant]{4}{2}
\PstGanttTask{5}{2}
\end{PstGanttChart}
\end{LTXexample}
\endgroup
\xLkeyset{fillstyle=vlines}\xLenv{PstGanttChart}\xLcs{PstGanttTask}\xLkeyword{TaskStyle}
\xLkeyword{TaskInsideLabel}
% Example 2
%

\begingroup
\begin{LTXexample}
\newpsstyle{Important}{fillstyle=solid,fillcolor=red}
\newpsstyle{NotImportant}{fillstyle=vlines}
\begin{PstGanttChart}[yunit=2]{5}{7}
\PstGanttTask{0}{3}
\PstGanttTask{2}{1}
\PstGanttTask[TaskStyle=Important,%
  TaskInsideLabel=Important]{2}{5}
\PstGanttTask[TaskStyle=NotImportant]{4}{2}
\PstGanttTask{5}{2}
\end{PstGanttChart}
\end{LTXexample}
\endgroup
\xLkeyset{fillstyle=vlines}\xLenv{PstGanttChart}\xLcs{PstGanttTask}\xLkeyword{TaskStyle}
\xLkeyword{TaskInsideLabel}

\vspace{1cm}
%
% Example 3
%

\begingroup
\begin{LTXexample}[pos=t]
\newpsstyle{Important}{fillstyle=solid,fillcolor=red}
\newpsstyle{NotImportant}{fillstyle=vlines}
\begin{PstGanttChart}[unit=2,TaskOutsideLabelMaxSize=1,
   ChartShowIntervals]{5}{7}
\PstGanttTask[TaskOutsideLabel={Task 1}]{0}{3}
\PstGanttTask[TaskOutsideLabel={Task 2},TaskUnitType=Day]{15}{3}%3 days start at 15
\PstGanttTask[TaskStyle=Important,TaskOutsideLabel={Task 3},
  TaskInsideLabel={\Large\textcolor{white}{\textbf{Important}}}]{2}{5}
\PstGanttTask[TaskStyle=NotImportant,TaskOutsideLabel={Task 4}]{4}{2}
\PstGanttTask[TaskOutsideLabel={Task 5}]{5}{2}
\end{PstGanttChart}
\end{LTXexample}
\endgroup
\xLkeyset{fillstyle=vlines}\xLenv{PstGanttChart}\xLcs{PstGanttTask}\xLkeyword{TaskStyle}
\xLkeyword{TaskOutsideLabel}\xLkeyword{TaskOutsideLabelMaxSize}\xLkeyword{ChartShowIntervals}
\xLkeyword{TaskInsideLabel}\xLkeyset{TaskUnitType=Day}


%
% Example 4
%
\psset{unit=1cm}
\begin{LTXexample}[pos=t]
\begin{PstGanttChart}[yunit=1.5,
  ChartUnitIntervalName=KW,ChartUnitBasicIntervalName=KW,
  ChartModulo,ChartModuloValue=52,
  TaskUnitIntervalValue=14,TaskUnitType=KW,ChartStartInterval=49,
  ChartShowIntervals]{4}{8}
 \PstGanttTask[TaskInsideLabel={Task 1}]{0}{1}
 \PstGanttTask[TaskInsideLabel={Task 2}]{3}{4} 
  \PstGanttTask[TaskInsideLabel={Task 3}]{2}{2}
  \PstGanttTask[TaskInsideLabel={Task 4}]{3}{5}
\end{PstGanttChart}
\end{LTXexample}
\xLkeyword{ChartModulo}
\xLkeyword{ChartModuloValue}
\xLkeyword{ChartStartInterval}

%
% Example 5
%
\begin{LTXexample}[pos=t]
\begin{PstGanttChart}[yunit=2,ChartUnitIntervalName=Month,
  TaskUnitIntervalValue=30,TaskUnitType=Month,ChartShowIntervals]{3}{4}
\PstGanttTask[TaskInsideLabel={Task 1}]{0}{1}
\PstGanttTask[TaskInsideLabel={Task 2},TaskUnitType=Day]{24}{40}% 40 days start at 24
\PstGanttTask[TaskInsideLabel={Task 3}]{2}{2}
\end{PstGanttChart}
\end{LTXexample}
\xLkeyset{TaskUnitType=Day}\xLkeyset{TaskUnitType=Month}\xLkeyset{ChartUnitIntervalName=Month}
\xLkeyset{TaskUnitIntervalName=Month}\xLkeyset{TaskUnitIntervalValue=Month}\xLkeyword{ChartShowIntervals}

%
% Example 6
%
\begin{LTXexample}
\begin{PstGanttChart}[yunit=1.5,
  ChartUnitIntervalName=Year,
  ChartUnitBasicIntervalName=Month,
  TaskUnitIntervalValue=12,
  TaskUnitType=Year,
  ChartShowIntervals]{4}{4}
\PstGanttTask[TaskInsideLabel={Task 1}]{0}{1}
\PstGanttTask[TaskInsideLabel={Task 2},
    TaskUnitType=Month]{6}{24}% 24 months start at 6
\PstGanttTask[TaskInsideLabel={Task 3}]{2}{2}
\PstGanttTask[TaskInsideLabel={Task 4}]{3}{1}
\end{PstGanttChart}
\end{LTXexample}
\xLkeyword{yunit}
\xLkeyword{ChartUnitIntervalName=Year}
\xLkeyword{ChartUnitBasicIntervalName=Month}
\xLkeyword{TaskUnitIntervalValue=12}
\xLkeyword{TaskUnitType=Year}
\xLkeyword{ChartShowIntervals}




\begin{landscape}
\definecolor{LightCyan}   {rgb}{0.88,1.,1.}
\definecolor{Orange}      {rgb}{1.,0.65,0.}
\definecolor{PaleGreen}   {rgb}{0.6,0.98,0.6}
\definecolor{Pink}        {rgb}{1.,0.75,0.8}
\psset{gradmidpoint=0,fillstyle=gradient,gradbegin=LightCyan,gradend=white}
\newpsstyle{TaskStyleA}{gradbegin=cyan,gradend=blue}
\newpsstyle{TaskStyleB}{gradbegin=red,gradend=Pink}
\newpsstyle{TaskStyleC}{gradbegin=yellow,gradend=Orange}
\newpsstyle{TaskStyleD}{gradbegin=green,gradend=PaleGreen}

\begin{PstGanttChart}[yunit=2.5,xunit=3.5,ChartUnitIntervalName=Semaine,
                      ChartUnitBasicIntervalName=Jour,TaskUnitType=Jour,
                      TaskOutsideLabelMaxSize=14,ChartShowIntervals]{8}{43}
  \psset{gradangle=90,TaskStyle=TaskStyleA}
  \PstGanttTask[TaskOutsideLabel={\'Etude}]{0}{10}
  \PstGanttTask[TaskOutsideLabel={R\'edaction dossier}]{6}{7}
  \PstGanttTask[TaskOutsideLabel={Relecture et corrections}]{14}{2}
  \PstGanttTask[TaskOutsideLabel={Soumission},TaskStyle=TaskStyleB]{17}{1}
  \psset{TaskStyle=TaskStyleC}
  \PstGanttTask[TaskOutsideLabel={R\'ealisation}]{25}{14}
  \PstGanttTask[TaskOutsideLabel={Tests}]{35}{6}
  \PstGanttTask[TaskOutsideLabel={V\'erification}]{39}{3}
  \PstGanttTask[TaskOutsideLabel={Recette},TaskStyle=TaskStyleD]{42}{1}
\end{PstGanttChart}
\end{landscape}

\begin{lstlisting}
\definecolor{LightCyan}   {rgb}{0.88,1.,1.}
\definecolor{Orange}      {rgb}{1.,0.65,0.}
\definecolor{PaleGreen}   {rgb}{0.6,0.98,0.6}
\definecolor{Pink}        {rgb}{1.,0.75,0.8}
\psset{gradmidpoint=0,fillstyle=gradient,gradbegin=LightCyan,gradend=white}
\newpsstyle{TaskStyleA}{gradbegin=cyan,gradend=blue}
\newpsstyle{TaskStyleB}{gradbegin=red,gradend=Pink}
\newpsstyle{TaskStyleC}{gradbegin=yellow,gradend=Orange}
\newpsstyle{TaskStyleD}{gradbegin=green,gradend=PaleGreen}

\begin{PstGanttChart}[yunit=2.5,xunit=3.5,ChartUnitIntervalName=Semaine,
                      ChartUnitBasicIntervalName=Jour,TaskUnitType=Jour,
                      TaskOutsideLabelMaxSize=14,ChartShowIntervals]{8}{43}
  \psset{gradangle=90,TaskStyle=TaskStyleA}
  \PstGanttTask[TaskOutsideLabel={\'Etude}]{0}{10}
  \PstGanttTask[TaskOutsideLabel={R\'edaction dossier}]{6}{7}
  \PstGanttTask[TaskOutsideLabel={Relecture et corrections}]{14}{2}
  \PstGanttTask[TaskOutsideLabel={Soumission},TaskStyle=TaskStyleB]{17}{1}
  \psset{TaskStyle=TaskStyleC}
  \PstGanttTask[TaskOutsideLabel={R\'ealisation}]{25}{14}
  \PstGanttTask[TaskOutsideLabel={Tests}]{35}{6}
  \PstGanttTask[TaskOutsideLabel={V\'erification}]{39}{3}
  \PstGanttTask[TaskOutsideLabel={Recette},TaskStyle=TaskStyleD]{42}{1}
\end{PstGanttChart}
\end{lstlisting}

\section{List of all optional arguments for \texttt{pst-gantt}}

\xkvview{family=pst-gantt,columns={key,type,default}}

\bgroup
\raggedright
\nocite{*}
\bibliographystyle{plain}
\bibliography{pst-gantt-doc}
\egroup

\printindex



\end{document}