summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pst-gantt/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.pdfbin107522 -> 119854 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex106
-rw-r--r--Master/texmf-dist/tex/generic/pst-gantt/pst-gantt.tex23
4 files changed, 97 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-gantt/Changes b/Master/texmf-dist/doc/generic/pst-gantt/Changes
index c1d33e7d412..d5e4e4f6d74 100644
--- a/Master/texmf-dist/doc/generic/pst-gantt/Changes
+++ b/Master/texmf-dist/doc/generic/pst-gantt/Changes
@@ -1,4 +1,6 @@
..... pst-gantt.tex
+0.21 2010-02-23 - add optional arguments
+ ChartModulo and ChartModuloValue
0.20 2009-05-12 - first CTAN version
diff --git a/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.pdf b/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.pdf
index 88bc952e2fc..0fb61b9a4be 100644
--- a/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex b/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex
index c5c64403b4c..cb75404a4d5 100644
--- a/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-gantt/pst-gantt-doc.tex
@@ -6,8 +6,8 @@
\let\pstGanntFV\fileversion
\usepackage{pstricks-add}
\usepackage{lscape}
-\lstset{pos=t,wide=true,language=PSTricks,
- morekeywords={},basicstyle=\footnotesize\ttfamily}
+\lstset{explpreset={pos=l,width=0.4\linewidth,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
+ escapechar=?}
%
\begin{document}
@@ -29,17 +29,27 @@
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.
-{\itshape If \LPack{pstricks-add} is loaded together with the package \LPack{pst-func} then the \Lkeyword{InsideArrow}
- of the \Lcs{psbezier} macro doesn't work!}
-
\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}
@@ -52,10 +62,13 @@ of having older versions, go to \url{http://www.CTAN.org/} and load the newest v
\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}
@@ -68,59 +81,92 @@ of having older versions, go to \url{http://www.CTAN.org/} and load the newest v
\PstGanttTask{5}{2}
\end{PstGanttChart}
\end{LTXexample}
+\endgroup
+\xLkeyset{fillstyle=vlines}\xLenv{PstGanttChart}\xLcs{PstGanttTask}\xLkeyword{TaskStyle}
+\xLkeyword{TaskInsideLabel}
\vspace{1cm}
%
% Example 3
%
-\begin{LTXexample}
+\begingroup
+\begin{LTXexample}[pos=t]
\newpsstyle{Important}{fillstyle=solid,fillcolor=red}
\newpsstyle{NotImportant}{fillstyle=vlines}
\begin{PstGanttChart}[unit=2,TaskOutsideLabelMaxSize=1,
- ChartShowIntervals]{5}{7}
+ ChartShowIntervals]{5}{7}
\PstGanttTask[TaskOutsideLabel={Task 1}]{0}{3}
-\PstGanttTask[TaskOutsideLabel={Task 2},TaskUnitType=Day]
- {15}{3} % 3 days starting at day 15
+\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}
+ 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
%
-\begin{LTXexample}
-\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 starting at day 24
+\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 starting at month 6
- \PstGanttTask[TaskInsideLabel={Task 3}]{2}{2}
- \PstGanttTask[TaskInsideLabel={Task 4}]{3}{1}
+\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}
diff --git a/Master/texmf-dist/tex/generic/pst-gantt/pst-gantt.tex b/Master/texmf-dist/tex/generic/pst-gantt/pst-gantt.tex
index d0876e18139..5c2ea0b5cd4 100644
--- a/Master/texmf-dist/tex/generic/pst-gantt/pst-gantt.tex
+++ b/Master/texmf-dist/tex/generic/pst-gantt/pst-gantt.tex
@@ -29,8 +29,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-gantt}
%
-\def\fileversion{0.2}
-\def\filedate{2009/05/12}
+\def\fileversion{0.21}
+\def\filedate{2010/02/23}
\message{`pst-gantt' v\fileversion, \filedate\space (Denis Girou and Herbert Voss)}
%
% "pspicture" environment or not?
@@ -39,6 +39,14 @@
% Intervals to show?
\define@boolkey[psset]{pst-gantt}[Pst@]{ChartShowIntervals}[true]{}
\psset[pst-gantt]{ChartShowIntervals=false}
+\define@key[psset]{pst-gantt}{ChartStartInterval}[1]{\def\psk@GanttStartInterval{#1}}
+\psset[pst-gantt]{ChartStartInterval=1}
+%
+\define@boolkey[psset]{pst-gantt}[Pst@]{ChartModulo}[true]{}
+\psset[pst-gantt]{ChartModulo=false}
+\define@key[psset]{pst-gantt}{ChartModuloValue}[52]{\def\psk@ChartModuloValue{#1}}
+\psset[pst-gantt]{ChartModuloValue=52}
+%
% Style for the tasks
\define@key[psset]{pst-gantt}{TaskStyle}[TaskStyleDefault]{\def\psk@GanttTaskStyle{#1}}
\psset[pst-gantt]{TaskStyle=TaskStyleDefault}
@@ -129,13 +137,20 @@
\advance\pst@dima\@ne pt
\pst@dimtonum{\pst@dima}{\pst@tempa}
%
- \multido{\iInterval=1+1,\iIntervalPos=1+\psk@GanttTaskUnitIntervalValue,
+ \multido{\iStartInterval=\psk@GanttStartInterval+1,\iInterval=1+1,
+ \iIntervalPos=1+\psk@GanttTaskUnitIntervalValue,
\nIntervalPos=\pst@tempa+\psk@GanttTaskUnitIntervalValue.0}{\pst@cnta}{%
\ifnum\iInterval=\pst@cnta
\psline(\iIntervalPos,0)(\iIntervalPos,1.5)
\psline[linestyle=dotted](\iIntervalPos,-\pst@cntb)(\iIntervalPos,0)
\else
- \rput(\nIntervalPos,1){\psk@GanttChartUnitIntervalName\space\iInterval}
+ \ifPst@ChartModulo
+ \pst@mod{\iStartInterval}{\psk@ChartModuloValue}\pst@iInterval%
+ \pst@cntm=\pst@iInterval \advance\pst@cntm by \@ne
+ \rput(\nIntervalPos,1){\psk@GanttChartUnitIntervalName\space\the\pst@cntm}
+ \else
+ \rput(\nIntervalPos,1){\psk@GanttChartUnitIntervalName\space\iStartInterval}
+ \fi
\psline(\iIntervalPos,0)(\iIntervalPos,1.5)
\psline[linestyle=dotted](\iIntervalPos,-\pst@cntb)(\iIntervalPos,0)
\fi}