diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-12 23:15:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-12 23:15:00 +0000 |
commit | 53294dc853fcb5b5af183beab9077a73a71160ef (patch) | |
tree | b1515a8911e955c056a0f7396d7dd201bc799008 /Master | |
parent | 8efbd8524f4dc27ab2975f3909060acf836d534c (diff) |
context-gantt (12sep11)
git-svn-id: svn://tug.org/texlive/trunk@23915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
10 files changed, 8 insertions, 273 deletions
diff --git a/Master/texmf-dist/doc/context/third/gantt/README b/Master/texmf-dist/doc/context/third/gantt/README deleted file mode 100644 index 4f98c254616..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/README +++ /dev/null @@ -1,22 +0,0 @@ -Modulename : t-gantt -Author : Adam Reviczky -License : Public Domain - -Description ------------ - -Drawing Gantt charts. - -Usage ------ - -\usemodule[gantt] - -\starttext -... \startgantt ...\stopgantt ... -\stoptext - -Options -------- - -- style diff --git a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-1.tex b/Master/texmf-dist/doc/context/third/gantt/examples/gantt-1.tex deleted file mode 100644 index d4723a8f0ba..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\usemodule[gantt] -%\usemodule[gantt][style=mp] -%\usemodule[gantt][style=tikz] -\setuppagenumbering[location=] - -\starttext - \startgantt{7}{12} - \startganttitle - \numtitle{1}{1}{12}{1} - \stopganttitle - \ganttbar{a task}{0}{2} - \ganttbarcon{a consecutive task}{2}{4} - \ganttbarcon{another consecutive task}{8}{2} - \ganttbar{another task}{2}{2} - \ganttbar{another task}{4}{2} - \ganttbar{another task}{4}{2} - \ganttcon{4}{4}{4}{6} - \stopgantt -\stoptext diff --git a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-2.tex b/Master/texmf-dist/doc/context/third/gantt/examples/gantt-2.tex deleted file mode 100644 index b601c410e69..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-2.tex +++ /dev/null @@ -1,25 +0,0 @@ -\usemodule[gantt] -%\usemodule[gantt][style=mp] -%\usemodule[gantt][style=tikz] -\setuppagenumbering[location=] - -\starttext - \startgantt{3}{12} - \startganttitle - \titleelement{Jan}{1} - \titleelement{Feb}{1} - \titleelement{Mar}{1} - \titleelement{Apr}{1} - \titleelement{May}{1} - \titleelement{Jun}{1} - \titleelement{Jul}{1} - \titleelement{Aug}{1} - \titleelement{Sep}{1} - \titleelement{Oct}{1} - \titleelement{Nov}{1} - \titleelement{Dec}{1} - \stopganttitle - \ganttbar{Task 1}{0}{2} - \ganttbarcon{a consecutive task}{2}{4} - \stopgantt -\stoptext diff --git a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-3.tex b/Master/texmf-dist/doc/context/third/gantt/examples/gantt-3.tex deleted file mode 100644 index 2cb1d626751..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-3.tex +++ /dev/null @@ -1,19 +0,0 @@ -\usemodule[gantt] -%\usemodule[gantt][style=mp] -%\usemodule[gantt][style=tikz] -\setuppagenumbering[location=] - -\starttext - \startgantt{4}{12} - \startganttitle - \numtitle{2010}{1}{2012}{4} - \stopganttitle - \startganttitle - \numtitle{1}{1}{4}{1} - \numtitle{1}{1}{4}{1} - \numtitle{1}{1}{4}{1} - \stopganttitle - \ganttbar{Task 1}{0}{2} - \ganttbarcon{a consecutive task}{2}{4} - \stopgantt -\stoptext diff --git a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-4.tex b/Master/texmf-dist/doc/context/third/gantt/examples/gantt-4.tex deleted file mode 100644 index af51441ab8a..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-4.tex +++ /dev/null @@ -1,22 +0,0 @@ -\usemodule[gantt] -%\usemodule[gantt][style=mp] -%\usemodule[gantt][style=tikz] -\setuppagenumbering[location=] - -\starttext - \startgantt{10}{12} - \startganttitle - \numtitle{1}{1}{12}{1} - \stopganttitle - \ganttbar{a task}{0}{2} - \ganttbarcon{a consecutive task}{2}{4} - \ganttbarcon{another consecutive task}{8}{2} - \ganttmilestone[color=cyan]{Milestone with color!}{4} - \ganttbar{another task}{2}{2} - \ganttbar[color=cyan]{another coloured task}{4}{4} - \ganttbar{another task}{4}{2} - \ganttcon{4}{5}{4}{7} - \ganttmilestonecon{A connected Milestone}{7} - \ganttbarcon{another consecutive task}{8}{2} - \stopgantt -\stoptext diff --git a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-5.tex b/Master/texmf-dist/doc/context/third/gantt/examples/gantt-5.tex deleted file mode 100644 index e50fa825231..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/examples/gantt-5.tex +++ /dev/null @@ -1,32 +0,0 @@ -\usemodule[gantt] -%\usemodule[gantt][style=mp] -%\usemodule[gantt][style=tikz] -\setuppapersize[landscape][landscape] -\setuplayout[scale=0.8] -\setuppagenumbering[location=] - -\starttext - \startgantt[xunitlength=0.5cm,fontsize=\tfx,titlefontsize=\tfx,drawledgerline=true]{10}{48} - \startganttitle - \titleelement{2009}{7} - \numtitle{2010}{1}{2012}{12} - \titleelement{2013}{5} - \stopganttitle - \startganttitle - \numtitle{6}{1}{12}{1} - \numtitle{1}{1}{12}{1} - \numtitle{1}{1}{12}{1} - \numtitle{1}{1}{12}{1} - \numtitle{1}{1}{5}{1} - \stopganttitle - \ganttbar{task 1}{2}{17} - \ganttgroup{a group of tasks}{6}{18} - \ganttbar{task 2}{5}{10} - \ganttbar[color=blue]{task 3}{15}{3} - \ganttbar{task 4}{20}{3} - \ganttcon{15}{4}{20}{6} - \ganttbar{task 5}{15}{5} - \ganttbarcon[color=red]{task 6}{20}{5} - \ganttbarcon{task 7}{30}{5} - \stopgantt -\stoptext diff --git a/Master/texmf-dist/doc/context/third/gantt/gantt.txt b/Master/texmf-dist/doc/context/third/gantt/gantt.txt deleted file mode 100644 index 3ec64a526ad..00000000000 --- a/Master/texmf-dist/doc/context/third/gantt/gantt.txt +++ /dev/null @@ -1,58 +0,0 @@ -Gantt is a module for drawing Gantt charts via metapost or pgf/tikz. - -== Description == -In the following you will find a short description of environments and commands: - -=== Gantt === -The gantt environment draws the canvas of a gantt figure. -\startgantt[…]{no of Tasks to plot}{no of time slots} -The optional argument […] can be filled in a key=value syntax, using one or more of the following keys: -* sf - scale factor for metapost (default: 1) -* xunitlength - length of one time slot (default: 1cm) -* fontsize - fontsize of labels (default: \tf) -* titlefontsize - fontsize of title section (default: \tfx) -* drawledgerline - Switch to enable/disable the drawing of horizontal ledger lines (default value: false) - -=== Ganttitle === -This is the environment for drawing the title section. -\startganttitle (…) \stopganttitle - -=== Titleelement === -This draws one element of the title. -\titleelement{label}{length} - -=== Numtitle === -This draws a numbered sequence of title elements. -\numtitle{start number}{increment}{end number}{length of each title element} - -=== Ganttbar === -This draws a single, unconnected bar for representing a task. -\ganttbar[pattern=value,color=value]{label}{start}{length} -where the optional comma separated arguments are: -* <pattern> - is a tikz pattern (e.g. north east lines (default), north west lines, crosshatch, crosshatch dots, grid, …) -* <color> - a color of the pattern (e.g. black (default), red, green blue gray, dark gray) - -=== Ganttcon === -This draws an arrow between the bars specified by coordinates. -\ganttcon{startx}{starty}{endx}{endy} - -=== Ganttbarcon === -This draws a single bar and connects the bar with the previous bar for consecutive tasks. -\ganttbarcon[pattern=value,color=value]{label}{start}{length} -The optional pattern argument are the same as for \ganttbar. - -=== Ganttgroup === -This draws a bar to group tasks. -\ganttgroup{label}{start}{length} - -=== Ganttmilestone === -This draws a milestone using a diamond. -\ganttmilestone[color=value]{label}{start} -The optional color argument argument is: -* <color> - a color of the pattern (e.g. black (default), red, green blue gray, dark gray) - -=== Ganttmilestonecon === -This draws a milestone using a diamond and connects the milestone with the previous bar or milestone. -\ganttmilestonecon[color=value]{label}{start} -The optional color argument argument is: -* <color> - a color of the pattern (e.g. black (default), red, green blue gray, dark gray) diff --git a/Master/texmf-dist/tex/context/third/gantt/gantt-s-mp.tex b/Master/texmf-dist/tex/context/third/gantt/gantt-s-mp.tex index 9fd632be8f0..d4368f213e1 100644 --- a/Master/texmf-dist/tex/context/third/gantt/gantt-s-mp.tex +++ b/Master/texmf-dist/tex/context/third/gantt/gantt-s-mp.tex @@ -1,6 +1,6 @@ %D \module %D [ file=t-gantt, -%D version=2011.09.04, +%D version=2011.09.11, %D title=\CONTEXT\ User Module, %D subtitle=Drawing Gantt charts, %D author=Adam Reviczky, @@ -19,78 +19,10 @@ \definesystemvariable{gantt} -% \startMPinclusions -% % temporary solution for a pattern substitute -% input hatching; -% \stopMPinclusions - -% temporary solution until hatching.mp is in ConTeXt standalone -\startMPextensions -%%% addto clip hatchfill hatchfill_ -%%% numeric color -%%% length withcolor -% This is HATCHING.MP file defining a set of METAPOST macros for -% hatching interior of closed paths. -% -% Made in BOP, Gda\'nsk, Poland -% E-mail contact: B.Jackowski@gust.org.pl -% Public domain software (no copyrights, copylefts, copyups, copydowns, etc.) -% Current version: 11.07.2000 -- ver 0.1 (pre-release) -% Current version: 21.09.2000 -- ver 0.11 (ending semicolon -% added in |extra_beginfig|; |hatchfill_| introduced in order -% to make possible something like |def fill = hatchfill enddef| -def hatchfill_ expr c = addto currentpicture contour c _op_ enddef; - -vardef hatchfill text p = - save c_,p_; path p_; color c_[\\]; c_.num:=0; - save withcolor_; let withcolor_:=withcolor; - def withcolor = ; c_[incr c_.num]:= enddef; - p_:=p; let withcolor:=withcolor_; - for i_:=c_.num downto 1: % find the least ``true'' fill - c_.num':=i_; exitif bluepart(c_[i_])>0; - endfor - if c_.num>0: - for i_:=c_.num' upto c_.num: - if bluepart(c_[i_])<0: draw hatched(p_)c_[i_]; - else: hatchfill_ p_ withcolor c_[i_]; fi - endfor - else: hatchfill_ p_; fi -enddef; - -vardef hatched(expr o) primary c = - save a_, b_, d_, l_, i_, r_, za_, zb_, zc_, zd_; - path b_; picture r_; pair za_, zb_, zc_, zd_; - r_:=image( - a_:=redpart(c) mod 180; l_:=greenpart(c); d_:=-bluepart(c); - b_:=o rotated -a_; - b_:=if a_>=90: (lrcorner b_--llcorner b_--ulcorner b_--urcorner b_--cycle) - else: (llcorner b_--lrcorner b_--urcorner b_--ulcorner b_--cycle) fi - rotated a_; - za_:=point 0 of b_; zb_:=point 1 of b_; - zc_:=point 2 of b_; zd_:=point 3 of b_; - if hatch_match>0: - n_:=round(length(zd_-za_)/l_); if n_<2: n_:=2; fi; l_:=length(zd_-za_)/n_; - else: n_:=length(zd_-za_)/l_; fi - % show (greenpart(c), l_); - for i_:=if hatch_match>0: 1 else: 0 fi upto ceiling n_-1: - draw_hatched_band((i_/n_)[zd_,za_],(i_/n_)[zc_,zb_],a_,l_,d_); - endfor - ); - clip r_ to o; r_ -enddef; - -def draw_hatched_band(expr za,zb,a,l,d) = % normally, |a| and |l| are ignored - draw za--zb withpen pencircle scaled d _hop_; -enddef; - -def hatchoptions(text t) = def _hop_ = t enddef enddef; - -newinternal hatch_match; hatch_match:=1; -hatchoptions(); extra_beginfig:=extra_beginfig & ";hatchoptions();"; - -endinput -%%\end -\stopMPextensions +\startMPinclusions + % temporary solution for a pattern substitute + input hatching; +\stopMPinclusions \newcount\ganttnum \newcount\gantttitlenum diff --git a/Master/texmf-dist/tex/context/third/gantt/gantt-s-tikz.tex b/Master/texmf-dist/tex/context/third/gantt/gantt-s-tikz.tex index 4401a617c9e..a8e56f33707 100644 --- a/Master/texmf-dist/tex/context/third/gantt/gantt-s-tikz.tex +++ b/Master/texmf-dist/tex/context/third/gantt/gantt-s-tikz.tex @@ -1,9 +1,9 @@ %D \module %D [ file=t-gantt-tikz, -%D version=2011.09.04, +%D version=2011.09.11, %D title=\CONTEXT\ User Module, %D subtitle=Drawing Gantt charts, -%D author={Adam Reviczky}, +%D author=Adam Reviczky, %D date=\currentdate, %D copyright=Adam Reviczky, %D license=Public Domain] diff --git a/Master/texmf-dist/tex/context/third/gantt/t-gantt.tex b/Master/texmf-dist/tex/context/third/gantt/t-gantt.tex index 089e24d191e..eecb1dab929 100644 --- a/Master/texmf-dist/tex/context/third/gantt/t-gantt.tex +++ b/Master/texmf-dist/tex/context/third/gantt/t-gantt.tex @@ -1,6 +1,6 @@ %D \module %D [ file=t-gantt, -%D version=2011.09.04, +%D version=2011.09.11, %D title=\CONTEXT\ Module, %D subtitle=Gantt Module, %D author=Adam Reviczky, |