summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-17 00:00:42 +0000
committerKarl Berry <karl@freefriends.org>2012-01-17 00:00:42 +0000
commit06cb5c1303792dae4ef9a8828457c61a71985d49 (patch)
tree7eb719c1de1ba81f62dfa5c79c196ec4afbf70da /Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex
parente955c13e335a7a8784b649ca6f3304bda5ec9d3f (diff)
chronosys (16jan12)
git-svn-id: svn://tug.org/texlive/trunk@25125 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex')
-rw-r--r--Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex401
1 files changed, 256 insertions, 145 deletions
diff --git a/Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex b/Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex
index d4f3bc9e4a7..f20799416a1 100644
--- a/Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex
+++ b/Master/texmf-dist/doc/generic/chronosys/docchronosys_en.tex
@@ -1,3 +1,5 @@
+% interface=en tex=xetex
+
% This is is the english code for the documentation of the `chronosys' package.
%
% The maintener of this work is Mathieu Long.
@@ -23,61 +25,47 @@
%
% The Current Maintainer of this work is Mathieu Long.
%
-\setupinteraction[title=Chronosys - Documentation]
+\setupinteraction[title=Chronosys - Documentation, author=Mathieu Long, title=Chronosys documentation -english-, subtitle=Draw time-lines]
+\setupcolors[state=start]
+\beginXETEX
+\definetypeface[myface][rm][Xserif][Calibri]
+\definetypeface[myface][ss][Xsans][Calibri]
+\definetypeface[myface][tt][Xmono][Courier New-Bold]
+\setupbodyfont[myface]
+\endXETEX
+\unless\ifdefined\XeTeXpicfile \unless\ifdefined\directlua
+\setupoutput[pdftex]
+\fi\fi
+\setupheadertexts%
+[chapter][section]
+\setupheader[text][style=\ss]
+\enableregime[utf8]
\mainlanguage[en]
\setupbodyfont[14pt,regular]
\setuppapersize[B4]
-\setupinteraction[state=start,menu=on,color=middlered]
-\setupinteractionmenu[right][state=start]
+\setupinteraction[state=start,color=middlered]
\setupcapitals[sc=yes]
\setupindenting[yes,20pt]
\setuppagenumbering[location={bottom,right},left=--~]
-\startuniqueMPgraphic{LinearShade}
-fill (-\the\hsize/2,\the\vsize/2)--(\the\hsize/2,\the\vsize/2)--(\the\hsize/2,-\the\vsize/2)--(-\the\hsize/2,-\the\vsize/2)--cycle withcolor 0.825white;
-
-
-path p;
-picture mypicture;
-mypicture:=nullpicture;
-p:=(-2.5cm,0)--(2.5cm,0)--(2.5cm,-0.75cm)--(-2.5cm,-0.75cm)--cycle;
-color marron; marron:=(165/255,66/255,0);
-
-path sablier; sablier:= (-2.05cm,-0.75cm){down}..{dir -45}(-0.65cm,-4.25cm)..{down}(-0.35cm,-5.25cm)--(0.35cm,-5.25cm){up}..(0.65cm,-4.25cm){dir 45}..{up}(2.05cm,-0.75cm)--cycle;
-
-addto mypicture contour unitsquare scaled 3cm xscaled 2 shifted(-2cm,-6cm) withcolor yellow;
-clip mypicture to sablier xscaled 0.99; addto currentpicture also mypicture;
-
-fill (-0.35cm,-5.25cm){dir -45}..(-0.05cm,-5.55cm){down}..{down}(-0.05cm,-8cm){dir 225}..(-1.85cm,-10.5cm)--(1.85cm,-10.5cm)..{dir 135}(0.05cm,-8cm){up}..{up}(0.05cm,-5.55cm)..{dir 45}(0.35cm,-5.25cm)--cycle withcolor yellow;
-fill sablier--reverse sablier xscaled 0.85--cycle withcolor (96/255,204/255,1);
-fill sablier--reverse sablier xscaled 0.85--cycle reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor (96/255,204/255,1);
-draw sablier withcolor black;
-draw sablier reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor black;
-draw sablier xscaled 0.85 withcolor black;
-draw sablier xscaled 0.85 reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor black;
-
-fill p withcolor marron;
-fill p reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor marron;
-draw p withcolor black;
-draw p reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor black;
-
-\stopuniqueMPgraphic
-
-
-\defineoverlay[shaded][\useMPgraphic{LinearShade}]
-\setupbackgrounds[page][background={shaded}]
+\definetyping[typingTEX][option=TEX]
+\setuptyping[typingTEX][color=darkblue]
+\starttext
\placebookmarks[chapter,section,subsection][chapter,section]
\usemodule[chronosys]
-\startstandardmakeup\switchtobodyfont[16pt]
+\startstandardmakeup\switchtobodyfont[myface,16pt]
\midaligned{Chronosys}
\midaligned{Draw time-lines diagrams !}
\bigskip
\startchronology[width=\hsize,height=7ex,stopyear=2050,startyear=1982,color=darkgreen]
\chronoevent{2011}{\type{chronosys}'s creation}
\stopchronology
+\bigskip\bigskip
+\midaligned{Mathieu \sc Long}
+\midaligned{\color[darkgreen]mlong.tex@hotmail.fr}
\stopstandardmakeup
-\completecontent[alternative=c,interaction=all]
+\completecontent[level=subsection,interaction=pagenumber]
\def\HeadTitle#1#2%
{\hbox to \hsize
@@ -88,12 +76,12 @@ draw p reflectedabout ((-5cm,-5.25cm),(5cm,-5.25cm)) withcolor black;
\parskip 1cm
\chapter{Introduction}
-\type{Chronosys} is distributed under the LaTeX Project Public License. It uses the \type{tikz} package for drawing the time-lines.
+\type{Chronosys} is distributed under the LaTeX Project Public License.You may use it for drawing time-lines. It uses the \type{tikz} package for drawing. You need to have \ETEX\ to use it.
\blank
-This package is version {\unprotect\chron@sysversion\protect}, anothers versions might be created later.
+This package is version {\unprotect\chron@sysversion\protect}, others versions might be created later.
\bigskip
-It is recommanded not to load the \type{color.tex} file if you use plain \TeX.
+It is recommended not to load the \type{color.tex} file if you use plain \TeX.
\bigskip
You can load \type{chronosys} by~:
@@ -103,16 +91,42 @@ You can load \type{chronosys} by~:
\item \type{\input chronosys} in plain \TeX.
\stopitemize
+With the new version you can modify the alignment of the time-line on the page, the width of the labels of the events; it provides a better support
+of the events placed over the time-line, the possibility of colour the background of the labels of the periods and events and corrects problems of compatibility.
+
+\blank
+
+\hairline
+I wish to thank Gonçalo {\sc Pereira} for his idea about colouring in white the background of the labels of events and periods to avoid them to be mixed with other vertical straights.
+\blank
+\hrule
+
\chapter{First use}
-\section{Main fonction: \type{\startchronology}}
+\section{Main function: \type{\startchronology}}
+
+The control sequence \type{\startchronology}\index{startchronology} is the first one you need to know.\footnote{There are \type{\begin{chronology}} and \type{\end{chronology}} for \LaTeX}~: it starts the chronological frieze :
-The control sequence \type{\startchronology}\index{startchronology} is the first one you need to know.\footnote{There are \type{\begin{chronology}} and \type{\end{chronology}} for \LaTeX}~: it starts the chronological frieze.
+\startalignment[middle]
+\starttypingTEX
+\startchronology[...=...]
+\stoptypingTEX
+\stopalignment
+\leftaligned{\switchtobodyfont[12.4pt] See \in[startchronologyoptions] to have the different possible options}
\blank[small]
-The next one is \type{\stopchronology}\index{stopchronology}\footnote{or \type{\end{chronology}}}, it ends the time-line. Let's have a look on the result~:
-\starttyping
+The next one is \type{\stopchronology}\index{stopchronology}\footnote{or \type{\end{chronology}}}, it ends the time-line.
+
+\startalignment[middle]
+\starttypingTEX
+\stopchronology
+\stoptypingTEX
+\stopalignment
+
+ Let's have a look on the result~:
+\starttypingTEX
\startchronology
-\stopchronology\stoptyping
+\stopchronology
+\stoptypingTEX
\startchronology
\stopchronology
@@ -122,28 +136,40 @@ You can see the time-line is on all the page's width, furthermore it starts at {
\section[event]{Events: \type{\chronoevent}}
-You can add events with \type{\chronoevent}\index{chronoevent}. This control sequence needs two arguments: the first one is the date of the event\footnote{you can see further to see another way of specifying the date} and the second is the label of this event.
+You can add events with \type{\chronoevent}\index{chronoevent}. This control sequence needs two arguments: the first one is the date of the event\footnote{you can go to \in[eventnewdate] to see another way of specifying the date} and the second is the label of this event.
+
+\startalignment[middle]
+\starttypingTEX
+\chronoevent[...=...]{1.}{2.}
+\stoptypingTEX
+\stopalignment
+
+\starttabulate[|l|l|]
+\NC \color[darkblue]\tt...=...\NC options (see \in[eventoptions])\NC\NR
+\NC \color[darkblue]1. \NC date ({\em number})\NC\NR
+\NC \color[darkblue]2. \NC label \NC\NR
+\stoptabulate
\blank[small]
For example:
-\starttyping
+\starttypingTEX
\startchronology
\chronoevent{1977}{\TeX's creation}
\stopchronology
-\stoptyping
+\stoptypingTEX
\startchronology
\chronoevent{1977}{\TeX's creation}
\stopchronology
\bigskip
The event appears between {\os 0} et {\os\the\year}, proportionally with his gap with {\os0}. You can also give several events:
-\starttyping
+\starttypingTEX
\startchronology
\chronoevent{476}{Fall of the Roman empire}
\chronoevent{1492}{Discovery of America}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
-\stoptyping
+\stoptypingTEX
\switchtobodyfont[9pt]
\startchronology
@@ -161,13 +187,25 @@ the time-line, especially the starting year and ending year, will be seen furthe
You can also add one period (or several\footnote{If two periods are overlapping, the last one will overlap the other}) on the frieze with \type{\chronoperiode}\index{chronperiode}.
-\starttyping
+\startalignment[middle]
+\starttypingTEX
+\chronoperiode[...=...]{1.}{2.}{3.}
+\stoptypingTEX
+\stopalignment
+\starttabulate[|l|l|]
+\NC \tt\color[darkblue]...=...\NC options (see \in[periodoptions])\NC\NR
+\NC \color[darkblue]1. \NC date of the beginning ({\em number})\NC\NR
+\NC \color[darkblue]2. \NC date of the end ({\em number}) \NC\NR
+\NC\color[darkblue]3. \NC label \NC\NR
+\stoptabulate
+
+\starttypingTEX
\startchronology
\chronoperiode{1000}{1999}{2\high{nd} Millennium}
\chronoperiode{476}{1453}{Eastern Roman Empire}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
-\stoptyping
+\stoptypingTEX
\switchtobodyfont[9pt]
\startchronology
\chronoperiode{1000}{1999}{2\high{nd} Millennium}
@@ -185,13 +223,15 @@ The period appears automatically with colour, and the dates are also visible (se
\section{\type{\startchronology}}
\subsection{Example}
\type{\startchronology} can have an optional argument in brackets.
-For example:
-\starttyping
+For example:
+
+\starttypingTEX
\startchronology
-[startyear=-800,stopyear=500,color=darkblue,height=7ex,width=\hsize]
-\chronoevent{-753}{Rome's foundation}
+[startyear=–800,stopyear=500,
+color=darkblue,height=7ex,width=\hsize]
+\chronoevent{–753}{Rome's foundation}
\stopchronology
-\stoptyping
+\stoptypingTEX
\startchronology
[startyear=-800,stopyear=500,color=darkblue,height=7ex,width=\hsize]
\chronoevent{-753}{Rome's foundation}
@@ -211,11 +251,12 @@ The different options of \type{\startchronology}\index{startchronology} are:
\head \type{startdate}\index{startdate} :\par boolean which indicate if the starting year has to be placed. It must be either \type{true} or \type{false} and it is \type{true} by default.
\head \type{stopdate}\index{stopdate} :\par boolean which indicate if the ending year has to be placed. It must be either \type{true} or \type{false} and it is \type{true} by default.
\head \type{dates}\index{dates} :\par boolean which indicate if both dates have to be placed. It must be either \type{true} or \type{false} and it is \type{true} by default.
-\head\type{arrow}\index{arrow} :boolean which indicate if an arrowhead has to be placed. It must be either \type{true} or \type{false} and it is \type{true} by default.
+\head\type{arrow}\index{arrow} :\par boolean which indicate if an arrowhead has to be placed. It must be either \type{true} or \type{false} and it is \type{true} by default.
\head \type{arrowheight}\index{arrowheight} :\par height of the arrowhead. It must be a valid \type{dimen} and it is identical to the height of the time-line by default.
-\head \type{arrowwidth}\index{arrowwidth} :\par width of the arrowhead. It encroaches on the entire (\type{height}) width of the frieze It must be a valid \type{dimen} and it is 1/10 of the entire width of the time-line (\type{width}) by default.
+\head \type{arrowwidth}\index{arrowwidth} :\par width of the arrowhead. It encroaches on the entire (\type{height}) width of the frieze. It must be a valid \type{dimen} and it is 1/10 of the entire width of the time-line (\type{width}) by default.
\head \type{arrowcolor}\index{arrowcolor} :\par colour of the arrowhead. It must be a \type{colour} recognized by the \type{tikz} package. It is identical to the colour of the frieze by default.
\head \type{box}\index{box} :\par boolean which indicates if the time-line should be passed back with a black line. It must be either \type{true} or \type{false} and it is \type{false} by default.
+\head \type{align}\index{align} :\par alignment of the time-line on the page. You can choose between \type{right}, \type{center} and \type{left}. It is \type{center} by default.
\stopitemize
\subsection[startchronologyoptions]{Summary}
@@ -236,27 +277,31 @@ The different options of \type{\startchronology}\index{startchronology} are:
\VL
\type{dateselevation} \NC=\NC\type{<dimen>}\VL\FR
\VL
-\type{startdate} \NC=\NC\type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{stopdate} \NC=\NC\type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{dates} \NC=\NC\type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{arrow} \NC=\NC\type{<true>} \em or \type{<false>}\VL\FR
+\type{startdate} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{stopdate} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{dates} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{arrow} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\FR
\VL\type{arrowheight} \NC=\NC\type{<dimen>}\VL\FR
\VL\type{arrowwidth} \NC=\NC\type{<dimen>}\VL\FR
\VL\type{arrowcolor} \NC=\NC\type{<colour>}\VL\FR
-\VL\type{box} \NC=\NC\type{<true>} \em or \type{<false>}\VL\FR\HL
+\VL\type{box} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{align} \NC=\NC\type{<right>} {\em or} \type{<center>} {\em or} \type{<left>}\VL\FR\HL
\stoptable
+\page[yes]
\section{\type{\chronoperiode}}
\subsection{Example}
\type{\chronoperiode} can have an optional argument for the options' customization.
-\starttyping
-\startchronology[startyear=-800,stopyear=500,color=darkgreen]
-\chronoperiode[color=orange,stopdate=false,textstyle=\it]
-{-753}{-509}{Roman Royal period}
+\starttypingTEX
+\startchronology[startyear=–800,
+stopyear=500,color=darkgreen]
+\chronoperiode[color=orange,
+stopdate=false,textstyle=\it]
+{–753}{–509}{Roman Royal period}
\chronoperiode[color=cyan,textstyle=\bf,textdepth=35pt]
-{-509}{-27}{Roman Republic}
+{–509}{–27}{Roman Republic}
\stopchronology
-\stoptyping
+\stoptypingTEX
\startchronology[startyear=-800,stopyear=500,color=darkgreen]
\chronoperiode[color=orange,stopdate=false,textstyle=\it]
{-753}{-509}{Roman Royal period}
@@ -264,7 +309,11 @@ The different options of \type{\startchronology}\index{startchronology} are:
{-509}{-27}{Roman Republic}
\stopchronology
-\subsection{Different options}
+\subsection{The colour of the background}
+
+\type{Chronosys} colours the background of the label in white to erase the eventual vertical straights. You can disable it or change the colour if you want (see \in[chronoperiodsoptions]).
+
+\subsection[chronoperiodsoptions]{Different options}
The different options of \type{\chronoperiode}\index{chronoperiode} are:
@@ -272,104 +321,147 @@ The different options of \type{\chronoperiode}\index{chronoperiode} are:
\head \type{startdate}\index{startdate} :\par boolean. It indicate if the starting year has to be placed, and must be either \type{true} or \type{false}. It is \type{true} by default.
\head \type{stopdate}\index{stopdate} :\par boolean. It indicate if the ending year has to be placed, and must be either \type{true} or \type{false}. It is \type{true} by default.
\head \type{dates}\type{true}\index{dates} :\par boolean. It indicate if both dates have to be placed, and must be either \type{true} or \type{false}. It is \type{true} by default.
-\head \type{datesstyle}\index{datesstyle} : \par style to apply to the dates. It must be a \type{control sequence} ou \type{control sequence#1} and is empty by default.
-\head \type{textstyle}\index{textstyle} : \par style to apply to the label. It must be a \type{control sequence} ou \type{control sequence#1} and is empty by default.
+\head \type{datesstyle}\index{datesstyle} : \par style to apply to the dates. It must be a
+
+\noindent\type{control sequence} or \type{control sequence#1} and is empty by default.
+\head \type{textstyle}\index{textstyle} : \par style to apply to the label. It must be a \type{control sequence} or
+
+\noindent\type{control sequence#1} and is empty by default.
\head \type{color}\index{color} :\par colour of the period on the frieze. It must be a \type{colour} recognized by \type{tikz}. It alternates between blue, red, cyan, purple and yellow by default.
\head \type{dateselevation}\index{dateselevation} :\par height of the dates from the frieze. It must be a valid \type{dimen} and it is \type{0pt} by default.
-\head \type{dateselevation}\index{textdepth} :\par depth of the label from the frieze. It must be a valid \type{dimen} and it is \type{15pt} by default.
+\head \type{textdepth}\index{textdepth} :\par depth of the label from the frieze. It must be a valid \type{dimen} and it is \type{15pt} by default.
+\head \type{colorbox}\index{colorbox} :\par colour of the background of the text of the period. It must be a \type{colour} recognized by \type{tikz} and it is white by default.
+\head \type{ifcolorbox}\index{ifcolorbox} :\par boolean which indicates if the background of the text has to be coloured. It must be either \type{true} or \type{false}. It is \type{true} by default.
+\stopitemize
\subsection[periodoptions]{Summary}
\placetable[here][fig:chronoperiodeoptions]{\type{chronoperiode}'s options}
\starttable[|l|c|l|]
\HL\VL\use{3}\ReFormat[cB]{\type{\chronoperiode[}\em ...=...\type{]{...}{...}{...}}}\VL\SR
-\VL\type{startdate} \NC=\NC\type{<true>} \em or \type{<false>}\VL\LR
-\VL\type{stopdate} \NC=\NC\type{<true>} \em or \type{<false>}\VL\LR
-\VL\type{dates} \NC=\NC\type{<true>} \em or \type{<false>}\VL\LR
-\VL\type{datesstyle} \NC=\NC\type{<control sequence>} \em or \type{<control sequence#1>}\VL\LR
-\VL\type{textstyle} \NC=\NC\type{<control sequence>} \em or \type{<control sequence#1>}\VL\LR
+\VL\type{startdate} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\LR
+\VL\type{stopdate} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\LR
+\VL\type{dates} \NC=\NC\type{<true>} {\em or} \type{<false>}\VL\LR
+\VL\type{datesstyle} \NC=\NC\type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\LR
+\VL\type{textstyle} \NC=\NC\type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\LR
\VL\type{color} \NC=\NC\type{<colour>}\VL\LR
\VL\type{dateselevation} \NC=\NC\type{<dimen>}\VL\LR
-\VL\type{textdeph} \NC=\NC\type{<dimen>}\VL\LR\HL
+\VL\type{textdeph} \NC=\NC\type{<dimen>}\VL\LR
+\VL\type{ifcolorbox}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{colorbox} \NC =\NC \type{<colour>} \VL\FR\HL
\stoptable
\section{\type{\chronoevent}}
-\subsection[eventnewdate]{A new way for specifying the date}
+\type{\chronoevent} can also have an optional argument for customization.
-You can specify with more precision the date with \type{\chronoevent}\index{chronoevent}. We saw that typing
-\type{\chronoevent{-44}{Assassination of Caesar}} specified the year of the event, now we will saw the way of specifying
-the month and the day. You have to type \type{<day number>/<number of the month>/year}, only specifying the year is compulsory.
+\subsection{Example}
-You can give only the year as we saw before, the number of the month and the year or the day number and the number of the month and the year. The number of the month is automatically converted to the name of the month (in french by default). You can disable this conversion (see \in[eventoptions]).The control sequence of conversion is:
-\starttyping
-\def\chron@selectmonth#1{\ifcase#1\or janvier\or f\'evrier\or
- mars\or avril\or mai\or juin\or juillet\or ao\^ut\or septembre\or
- octobre\or novembre\or d\'ecembre\fi}
-\stoptyping
+\starttypingTEX
+\def\MyIcon{{\starttikzpicture \filldraw
+[color=orange](0,0)––(0,5pt)––(5pt,5pt)
+––(5pt,0)––cycle;\stoptikzpicture}}
-To change the language, you only need to redefine the control sequence, for example for english as:
-\starttyping
-\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
- March\or April\or May\or June\or July\or August\or September\or
- October\or November\or December\fi}
-\stoptyping
-\bigskip
-For example,
-\starttyping
\catcode`\@=11
\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
- March\or April\or May\or June\or July\or August\or September\or
- October\or November\or December\fi}
-\startchronology[startyear=-44,stopyear=-43,color=darkgreen,height=7ex]
-\chronoevent{15/03/-44}{Assassination of Caesar}
+ March\or April\or May\or June\or July\or August\or
+ September\or October\or November\or December\fi}
+
+\startchronology[startyear=–800,stopyear=500,
+color=darkgreen,height=7ex]
+\chronoevent[textstyle={\switchtobodyfont[sansserif]},
+datesstyle=\os,datesseparation=/,conversionmonth=false,
+icon=\MyIcon,year=false]{15/3/–44}
+{\vbox{\hbox{\qquad ides of March;}%
+\hbox{assassination of Caesar}}}
\stopchronology
-\stoptyping
+\stoptypingTEX
+\def\MyIcon{{\starttikzpicture \filldraw[color=orange](0,0)--(0,5pt)--(5pt,5pt)--(5pt,0)--cycle;\stoptikzpicture}}
\catcode`\@=11
\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
March\or April\or May\or June\or July\or August\or September\or
October\or November\or December\fi}
-\startchronology[startyear=-44,stopyear=-43,color=darkgreen,height=7ex]
-\chronoevent{15/03/-44}{Assassination of Caesar}
+\startchronology[startyear=-800,stopyear=500,color=darkgreen,height=7ex]
+\chronoevent[textstyle={\switchtobodyfont[sansserif]},datesstyle=\os,datesseparation=/,conversionmonth=false,icon=\MyIcon,year=false]{15/3/-44}
+{\vbox{\hbox{\qquad ides of March;}\hbox{assassination of Caesar}}}
\stopchronology
-\blank
-Furthermore, \type{\chronoevent} can also have an optional argument for customization.
-\subsection{Example}
-\starttyping
-\def\MyIcon{{\starttikzpicture \filldraw
-[color=orange](0,0)--(0,5pt)--(5pt,5pt)
---(5pt,0)--cycle;\stoptikzpicture}}
+\subsection{Specificities}
+\subsubsection{The colour box of the text}
+As for the periods, to avoid vertical straight to overlap the others labels, as you can see there, if you wanted to type :
+\starttypingTEX
+\startchronology
+\chronoevent{1500}{Label A}
+\chronoevent{1525}{Label B}
+\stopchronology
+\stoptypingTEX
+\startchronology
+\chronoevent{1500}{Label A}
+\chronoevent[markdepth=70pt,ifcolorbox=false]{1525}{Label B}
+\stopchronology
+\type{chronosys} place a white colour box behind the text, so that you can have
+
+\startchronology
+\chronoevent[markdepth=70pt]{1525}{Label B}
+\chronoevent{1500}{Label A}
+\stopchronology
+
+You should type the events from the one you want to place from the farthest to the nearest from the time-line. You can of course choose the colour of the box, and disable it if you need (see \in[chronoeventsoptions]).
+
+\subsubsection[nosetuptextwidthexplanation]{Width of the text}
+
+You can modify the width of the label, in the aim to cut the lines to avoid exceeding on the others labels. You do this with the option \type{textwidth}\index{textwidth} of \type{\chronovent}.
+However, this functionality is considered to be disabled, except if you specify this option. This is done in the aim to avoid problems about the alignment of the text. This option cannot have a default value (see \in[permanentchanges]).
+
+\subsubsection[eventnewdate]{A new way for specifying the date}
+
+You can specify with more precision the date with \type{\chronoevent}\index{chronoevent}. We saw that typing
+\type{\chronoevent{-44}{Assassination of Caesar}} specified the year of the event, now we will saw the way of specifying
+the month and the day. You have to type \type{<day number>/<number of the month>/year}, only specifying the year is compulsory.
+
+You can give only the year as we saw before, the number of the month and the year or the day number and the number of the month and the year. The number of the month is automatically converted to the name of the month (in French by default). You can disable this conversion (see \in[eventoptions]).The control sequence of conversion is:
+\starttypingTEX
+\def\chron@selectmonth#1{\ifcase#1\or janvier\or f\'evrier\or
+ mars\or avril\or mai\or juin\or juillet\or ao\^ut\or
+ septembre\or octobre\or novembre\or d\'ecembre\fi}
+\stoptypingTEX
+
+To change the language, you only need to redefine the control sequence, for example for English as:
+\starttypingTEX
+\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
+ March\or April\or May\or June\or
+ July\or August\or September\or
+ October\or November\or December\fi}
+\stoptypingTEX
+\bigskip
+For example,
+\starttypingTEX
\catcode`\@=11
\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
- March\or April\or May\or June\or July\or August\or September\or
+ March\or April\or May\or June\or
+ July\or August\or September\or
October\or November\or December\fi}
-
-\startchronology[startyear=-800,stopyear=500,
-color=darkgreen,height=7ex]
-\chronoevent[textstyle={\switchtobodyfont[sansserif]},
-datesstyle=\os,datesseparation=/,conversionmonth=false,
-icon=\MyIcon,year=false]{15/3/-44}
-{\vbox{\hbox{\qquad ides of March;}\hbox{assassination of Caesar}}}
+\startchronology[startyear=–44,
+stopyear=–43,color=darkgreen,height=7ex]
+\chronoevent{15/03/–44}{Assassination of Caesar}
\stopchronology
-\stoptyping
-\def\MyIcon{{\starttikzpicture \filldraw[color=orange](0,0)--(0,5pt)--(5pt,5pt)--(5pt,0)--cycle;\stoptikzpicture}}
+\stoptypingTEX
\catcode`\@=11
\def\chron@selectmonth#1{\ifcase#1\or January\or February\or
March\or April\or May\or June\or July\or August\or September\or
October\or November\or December\fi}
-\startchronology[startyear=-800,stopyear=500,color=darkgreen,height=7ex]
-\chronoevent[textstyle={\switchtobodyfont[sansserif]},datesstyle=\os,datesseparation=/,conversionmonth=false,icon=\MyIcon,year=false]{15/3/-44}
-{\vbox{\hbox{\qquad ides of March;}\hbox{assassination of Caesar}}}
+\startchronology[startyear=-44,stopyear=-43,color=darkgreen,height=7ex]
+\chronoevent{15/03/-44}{Assassination of Caesar}
\stopchronology
+\blank
-\subsection{Different options}
+\subsection[chronoeventsoptions]{Different options}
Here are the different possible options\index{chronoevent}.
-\startitemize
+\startitemize[1]
\head \type{barre}\index{barre} :\par boolean which indicate if a vertical straight has to be placed on the frieze at the event position. It must be either \type{true} or \type{false}. It is \type{true} by default.
\head \type{date}\index{date} :\par boolean which indicate if the date of the event has to be placed. It must be either \type{true} or \type{false}. It is \type{true} by default.
\head \type{conversionmonth}\index{conversionmonth} :\par boolean which indicate if the number of the month has to be converted to the name month. It must be either \type{true} or \type{false}. It is \type{true} by default.
@@ -378,10 +470,17 @@ Here are the different possible options\index{chronoevent}.
\head \type{icon}\index{icon} :\par symbol to add on the frieze at the event position. It can be a control sequence or some text, and it is empty by default.
\head \type{markdepth}\index{markdepth} : \par depth of the label of the event and of the vertical straight under the frieze. It must be a valid \type{dimen} and it is \type{10pt} by default.
\head \type{iconheight}\index{iconheight} :\par height of the icon on the time-line. It must be a valid \type{dimen} and it is half of the height of the frieze by default.
-\head \type{textstyle}\index{textstyle} :\par style to apply to the label. It must be a \type{control sequence} or \type{control sequence#1}.
+\head \type{textstyle}\index{textstyle} :\par style to apply to the label. It must be a \type{control sequence} or
+
+\noindent\type{control sequence#1}.
\head \type{datesseparation}\index{datesseparation} : symbol of separation of each element of the date. It can be a control sequence or some text and is a space by default.
\head \type{datestyle}\index{datestyle} :\par style to apply to the entire date with the symbols of separation. It must be a \type{control sequence} or \type{control sequence#1}.
\head \type{datesstyle}\index{datesstyle} :\par style to apply each element of the date without the symbols of separation. It must be a \type{control sequence} or \type{control sequence#1}.
+\head \type{colorbox}\index{colorbox} :\par colour of the background of the text and date of the event. It must be a \type{colour} recognized by \type{tikz} and it is white by default.
+\head \type{ifcolorbox}\index{ifcolorbox} :\par boolean which indicates if the background of the text and the date has to be coloured. It must be either \type{true} or \type{false}. It is \type{true} by default.
+\head \type{textwidth}\index{textwidth} :\par
+Width of the label on the page. Contrary to the other options, this one cannot have a default value and is disabled while the option is no given.
+It must be a valid \type{dimen}.
\stopitemize
\subsection[eventoptions]{Summary}
@@ -389,32 +488,38 @@ Here are the different possible options\index{chronoevent}.
\placetable[here][fig:chronoeventoptions]{\type{chronoevent}'s options}
\starttable[|l|c|l|]
\HL\VL\use{3}\ReFormat[cB]{\type{\chronoevent[}\em ...=...\type{]{...}{...}}}\VL\SR
-\VL\type{barre}\NC=\NC \type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{date}\NC=\NC \type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{conversionmonth}\NC=\NC \type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{mark}\NC=\NC \type{<true>} \em or \type{<false>}\VL\FR
-\VL\type{icon}\NC=\NC \type{<text>} \em or \type{<control sequence>} \bf\dots\VL\FR
-\VL\type{datesseparation}\NC=\NC \type{<text>} \em or \type{<control sequence>} \bf\dots\VL\FR
+\VL\type{barre}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{date}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{conversionmonth}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{mark}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{icon}\NC=\NC \type{<text>} {\em or} \type{<control sequence>} \bf\dots\VL\FR
+\VL\type{datesseparation}\NC=\NC \type{<text>} {\em or} \type{<control sequence>} \bf\dots\VL\FR
\VL\type{markdepth}\NC=\NC \type{<dimen>}\VL\FR
\VL\type{iconheight}\NC=\NC \type{<dimen>}\VL\FR
-\VL\type{textstyle}\NC=\NC \type{<control sequence>} \em or \type{<control sequence#1>}\VL\FR
-\VL\type{datestyle}\NC=\NC \type{<control sequence>} \em or \type{<control sequence#1>}\VL\FR
-\VL\type{datesstyle}\NC=\NC \type{<control sequence>} \em or \type{<control sequence#1>}\VL\FR\HL
+\VL\type{textstyle}\NC=\NC \type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\FR
+\VL\type{datestyle}\NC=\NC \type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\FR
+\VL\type{datesstyle}\NC=\NC \type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\FR
+\VL\type{ifcolorbox}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
+\VL\type{colorbox} \NC =\NC \type{<colour>} \VL\FR
+\VL\type{textwidth} \NC =\NC \type{<dimen>}\VL\FR\HL
\stoptable
\page[yes]
-\section{Permanent changes}
+\section[[permanentchanges]{Permanent changes}
You can apply changes on default values with using \type{\setupchronology}, \type{\setupchronoevent} and \type{\setupchronoperiode}.
\index{setupchronology}\index{setupchronoevent} \index{setupchronoperiode}
-You use the same name for each option you want to change. For example, \starttyping
+You use the same name for each option you want to change. The only exception is \type{textwidth} of \type{\chronoevent} (see \in[nosetuptextwidthexplanation]).
+For example,
+
+\starttypingTEX
\setupchronology{startyear=1000,color=darkblue,stopdate=false}
\setupchronoperiode{color=darkgreen}
\setupchronoevent{textstyle=\it}
\startchronology
\chronoperiode{1050}{1450}{Anything you want}
\chronoevent{1600}{Anything else}
-\chronoperiode{1800}{1899}{XIX\high{th} century}
+\chronoperiode{1800}{1899}{19\high{th} century}
\stopchronology
-\stoptyping
+\stoptypingTEX
\setupchronology{startyear=1000,color=darkblue,stopdate=false}
\setupchronoperiode{color=darkgreen}
@@ -422,14 +527,20 @@ You use the same name for each option you want to change. For example, \starttyp
\startchronology
\chronoperiode{1050}{1450}{Anything you want}
\chronoevent{1600}{Anything else}
+\chronoperiode{1800}{1899}{19\high{th} century}
\stopchronology\bigskip
\bigskip N.B.: if you want to reapply the automatic colour's alternation of the periods, use
-\noindent\type{\setupchronoperiode{color=\chron@periodcolor}}
+\startalignment[middle]
+\starttypingTEX
+\setupchronoperiode{color=\chron@periodcolor}
+\stoptypingTEX
+\stopalignment
+
\setupchronoperiode{color=\chron@periodcolor}
\startchronology
\chronoperiode{1050}{1450}{Anything you want}
-\chronoperiode{1800}{1899}{XIX\high{th} century}
+\chronoperiode{1800}{1899}{19\high{th} century}
\chronoevent{1600}{Anything else}
\stopchronology