Chronosys

Draw timelines diagrams!

2050

2011

chronosys's creation

Mathieu Long

mlong.tex@hotmail.fr

###### Contents

* 1 Introduction
* 2 First use
	* 2.1 Main function: \startchronology
	* 2.2 Events: \chronoevent
	* 2.3 Periods: \chronoperiode
	* 2.4 Automatic graduation : \chronograduation
* 3 Time-lines' customization
	* 3.1 \startchronology
		* 3.1.1 Example
		* 3.1.2 Different options
		* 3.1.3 Summary
	* 3.2 \chronoperiode
		* 3.2.1 Example
		* 3.2.2 The colour of the background
		* 3.2.3 Colour s alternation
		* 3.2.4 Different options
		* 3.2.5 Summary
	* 3.3 \chronoevent
		* 3.3.1 Example
		* 3.3.2 Specificities
			* 3.3.2.1 The colour box of the text
			* 3.3.2.2 A new way for specifying the date
		* 3.3.3 Different options
		* 3.3.4 Summary
* 4 Permanent changes
	* 4.1 Creating new commands
	* 4.2 Modify the default values
* 5 Index

## Introduction

Chronosys is distributed under the LaTeX Project Public License.You may use it for drawing timelines. It uses the tikz1 package for drawing. You need to have \(\varepsilon\)-TeX to use it.

Footnote 1: for more informations on tikz, see [http://mirror.ctan.org/graphics/pgf/base/doc/generic/pgf](http://mirror.ctan.org/graphics/pgf/base/doc/generic/pgf) /pgfmanual.pdf

This package is version 1.2, others versions might be created later.

It is recommended not to load the color.tex file if you use plain TeX.

You can load chronosys by :

\usemodule[chronosys] in ConTeXt.

\usepackagechnosys in LaTeX.

\input chronosys in plain TeX.

updates' history

* 1.10 : added possibility to change the alignment of the timeline on the page, change the width of the text of the label of events, improved support for events placed above the frieze, added the ability to colour the text background of events and periods.
* 1.15 : added possibility to create owns new commands, to graduate automatically the timeline, change the alternation of colours periods and fixes some compatibility issues.
* 1.2 (actual version) : reduces the use of the module tikz at least possible, remove the former limitation of the impossibility of switching the default value of textwidth. With ConTeXt, added possibility using MetaPost2 instead of tikz (and conversely, reuse tikz instead of MetaPost) using the commands \chronoswitchtomodeMP and \chronoswitchtomodeTikz ; with the Mark IV version using MetaPost default.

Footnote 2: for more informations on MetaPost, see [http://www.tug.org/docs/metapost/mpman.pdf](http://www.tug.org/docs/metapost/mpman.pdf)

I wish to thank Goncalo 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.

First use Events: \chronoevent

2 First use

2.1 Main function: \startchronology

The control sequence \startchronology is the first one you need to know.3 : it starts the chronological frieze :

\startchronology[...=...]

See **3.1.3** to have the different possible options

The next one is \stopchronology4, it ends the timeline.

\stopchronology

Let's have a look on the result :

\startchronology

\stopchronology

0

You can see the timeline is on all the page's width, furthermore it starts at o and ends at the current year 2012 when this document was compiled. Chronosys will compare these years with the events and periods you will give him (see **2.2** and **2.3**).

Now let's learn how to add events on the timeline.

2.2 Events: \chronoevent

You can add events with \chronoevent. This control sequence needs two arguments: the first one is the date of the event5 and the second is the label of this event.

\chronoevent[...=...]{1.}{2.}

\[...=...\] options (see **3.3.4**)

\[1.\] date (number)

\[2.\] label 


2.date of the end (number)
3.label \startchronology \chronoperiodote{1000}{1999}{2\high{nd}Millennium} \chronoperiodote{192}{476}{Eastern Roman Empire} \chronoevent{1969}{first steps on the Moon} \stopchronology
0
192 476 1000 1999

Eastern Roman Empire 2nd Millennium 1969 first steps on the Moon

N.B.: on the period from 1000 to 1999, blue on the timeline, we can now see the vertical straight under the frieze. You can disable it (see 3.3.4), but if you want it you should place the events after the periods.

The period appears automatically with colour, and the dates are also visible (see 3.2.5 to disable them) and the label. The periods can be automatically coloured in 5 colours : blue, red, cyan, purple and yellow, except if the colour is identical to the frieze's one. Of course you can choose the colour of the period (see 3.2.5).

### Automatic graduation : \chronograduation

Use \chronograduation to add a graduation on the timeline.

\chronograduation[style][...=...]{1.}

style periodic or event...=... options (see 3.2.4 et 3.3.3)

1. interval (number)

\startchronology \chronograduation{100} \stopchronology \startchronology \chronograduation[periode][dateselevation=Opt]{100} \stopchronology

0
100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000


## 3 Time-lines' customization -------------------------------------------------

### 3.1 \startchronology

#### 3.1.1 Example

\startchronology can have an optional argument in brackets. For example:

\startchronology

[startyear=-800,stopyear=500,

color=darkblue,height=7ex,width=\hsize]

\chronoevent{-753}{Rome's foundation}

\stopchronology

-800

\stopchronology

-753

Rome's foundation

#### 3.1.2 Different options

The different options of \startchronology are:

* startyear :

starting year of the timeline. It needs to be a valid number. It is by default o
* stopyear :

ending year of the timeline. It also needs to be a valid number. It is the current year by default.
* color :

colour of the frieze. It must be a valid colour. It is black by default.
* height :

height of the frieze. It must be a valid dimen and it is 0.7pc by default.

* width : width of the frieze. It must be a valid dimen and it is \hsize7 by default.
* datesstyle : style to apply to dates. It must be a control sequence (it can take one argument, which will be the dates), is empty by default. Footnote 7: textwidth in LaTeX
* dateselevation : height of the dates from the timeline, it must be a valid dimen and it is 20pt par by default.
* startdate : boolean which indicate if the starting year has to be placed. It must be either true or false and it is true by default.
* stopdate : boolean which indicate if the ending year has to be placed. It must be either true or false and it is true by default.
* dates : boolean which indicate if both dates have to be placed. It must be either true or false and it is true by default.
* arrow : boolean which indicate if an arrowhead has to be placed. It must be either true or false and it is true by default.
* arrowheight : height of the arrowhead. It must be a valid dimen and it is identical to the height of the timeline by default.
* arrowwidth : width of the arrowhead. It encroaches on the entire (height) width of the frieze. It must be a valid dimen and it is 1/10 of the entire width of the timeline (width) by default.

* arrowcolor : colour of the arrowhead. It must be a colour recognized by the tikz package. It is identical to the colour of the frieze by default.
* box : boolean which indicates if the timeline should be passed back with a black line. It must be either true or false and it is false by default.
* align : alignment of the timeline on the page. You can choose between right, center and left. It is center by default.

#### Summary

\startchronology[...==...]

\startyear = <number>

\stopyear = <number>

\color = <colour>

height = <dimen>

width = <dimen>

\datesstyle = <control sequence> or <control sequence#1>

\dateselevation = <dimen>

\startdate = <true> or <false>

\stopdate = <true> or <false>

\dates = <true> or <false>

\arrow = <true> or <false>

\arrowheight = <dimen>

\arrowwidth = <dimen>

\arrowcolor = <colour>

\box = <true> or <false>

\begin{table}
\begin{tabular}{|l l l|} \hline  & \multicolumn{2}{|c|}{\(\backslash\)startchronology[...==...]} \\ \multicolumn{2}{|l}{startyear = <number>} \\ stopyear = & \textless{}number> \\ color = & \textless{}colour> \\ height = & \textless{}dimen> \\ width = & \textless{}dimen> \\ datesstyle = & \textless{}control sequence\textgreater{} or \textless{}control sequence\#1> \\ dateselevation = & \textless{}dimen> \\ startdate = & \textless{}true\textgreater{} or \textless{}false\textgreater{} \\ stopdate = & \textless{}true\textgreater{} or \textless{}false\textgreater{} \\ dates = & \textless{}true\textgreater{} or \textless{}false\textgreater{} \\ arrow = & \textless{}trimen> \\ arrowheight = & \textless{}dimen> \\ arrowcolor = & \textless{}colour> \\ box = & \textless{}true\textgreater{} or \textless{}false\textgreater{} \\ align = & \textless{}right\textgreater{} or \textless{}center\textgreater{} or \textless{}left\textgreater{} \\ \hline \end{tabular}
\end{table}
Table 3.1: Startchronology’s options

### 3.2 \chronoperiode

#### 3.2.1 Example

\chronoperiode can have an optional argument for the options' customization.

\startchronology[startyear=-800,stopyear=500, color=darkgreen, height=3cm] \chronoperiode[color=orange,bottomdepth=1cm, topheight=2cm, textstyle=\it, dateselevation=-15pt, ifcolorbox=false, box=true]{-753}{-509}{Roman Royal period} \chronoperiode[color=cyan,startdate=false, textstyle=\bf, textdepth=35pt, bottomdepth=1cm, topheight=2cm, ifcolorbox=false, dateselevation=-15pt, box=true]{-509}{-27}{Roman Republic} \stopchronology -800 500

#### 3.2.2 The colour of the background

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 3.2.4).

#### 3.2.3 Colours alternation

As we saw, the colour of the periods alternates between blue, red, cyan, purple and yellow. You can define your own colours alternation with \chronoperiodecoloralternation.

\chronoperiodecoloralternation{1.}

1. colours (colour, colour,... colour) Example:\chronoperiodecoloralternation{orange, darkgreen, violet, purple, cyan} \startchronology \chronoperiode[startdate=false]{0}{500}{} \chronoperiode[startdate=false]{500}{1000}{} \chronoperiode[startdate=false]{1000}{1500}{} \stopchronology

0

2012

You can also restart the alternation at the beginning or on a specific colour with \restartchronoperiodecolor.

 \restartchronoperiodecolor[...]

... name of a colour of the alternation (colour)

#### 3.2.4 Different options

The different options of \chronoperiode are:

* startdate : boolean. It indicate if the starting year has to be placed, and must be either true or false. It is true by default.
* stopdate : boolean. It indicate if the ending year has to be placed, and must be either true or false. It is true by default.
* datestrue : boolean. It indicate if both dates have to be placed, and must be either true or false. It is true by default.
* datestyle : style to apply to the dates. It must be a control sequence or control sequence#1 and is empty by default.
* textstyle : style to apply to the label. It must be a control sequence or control sequence#1 and is empty by default.
* color : colour of the period on the frieze. It must be a valid colour. It alternates between blue, red, cyan, purple and yellow by default.
* dateselevation : height of the dates from the frieze. It must be a valid dimen and it is Opt by default.
* textdepth : depth of the label from the frieze. It must be a valid dimen and it is 15pt by default.
* colorbox : colour of the background of the text of the period. It must be a valid colour and it is white by default.
* ifcolorbox : boolean which indicates if the background of the text has to be coloured. It must be either true or false. It is true by default.
* topheight : height of the top of the period on the timeline. It must be a valid dimen and it is equal to the height of the timeline by default.
* bottomdepth : height of the bottom of the period on the timeline. It must be a valid dimen and it is Opt by default.

#### 3.2.5 Summary

\chronoperiode[...=...]{...}{...}{...}

startdate = <true> \(or\) <false>

stopdate = <true> \(or\) <false>

dates = <true> \(or\) <false>

datesstyle = <control sequence> or <control sequence#1>

textstyle = <control sequence> or <control sequence#1>

color = <colour>

dateselevation = <dimen>

textdepth = <dimen>

ifcolorbox = <true> \(or\) <false>

colorbox = <colour>

topheight = <dimen>

bottomdepth = <dimen>

\begin{table}
\begin{tabular}{|c c c|} \hline \multicolumn{2}{|c|}{\(\backslash\)chronoperiode[...=...]{...}{...}{...}{...} \\ startdate & = & <true> \(or\) <false> \\ stopdate & = & <true> \(or\) <false> \\ dates & = & <true> \(or\) <false> \\ datesstyle & = & <control sequence> or <control sequence#1> \\ textstyle & = & <control sequence> or <control sequence#1> \\ color & = & <colour> \\ dateselevation & = & <dimen> \\ textdepth & = & <dimen> \\ ifcolorbox & = & <true> \(or\) <false> \\ colorbox & = & <colour> \\ topheight & = & <dimen> \\ bottomdepth & = & <dimen> \\ \hline \end{tabular}
\end{table}
Table 3.2: chronoperiode’s optionsTime-lines'customization \chronoevent

3.3 \chronoevent

\chronoevent can also have an optional argument for customization.

3.3.1 Example

 \def\MyIcon{{\color{orange}\vrule width 5pt height5pt\relax}}

 \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=\bf,  datestyle=\it,datsegaration=/,conversionmonth=false,  icon=\MyIcon,year=false, textwidth=4.5cm]{15/3/-44} {\quad ides of March;\endgraf  assassination of Caesar} \stopchronology

-800

500

#### 3.3.2 Specificities

3.3.2.1 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 :

 \startchronology \chronoevent{1500}{Label A} \chronoevent{1525}{Label B} \stopchronology

#### 3.3.2 A new way for specifying the date

You can specify with more precision the date with \chronoevent. We saw that typing \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 <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 **3.3.4**).The control sequence of conversion is:

\def\chrono@selectmonth#1{ifcase#1orjanvier\or f\'evrier\or mars\oravril\or mail\or juin\or juillet\or a\^{}ut\or septembre\or octobre\or novembre\or d\'ecembre\fi}

To change the language, you only need to redefine the control sequence, for example for English as:Time-lines' customization \chronoevent

 \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}

For example,

 \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} \stopchronology -44 -43

#### 3.3.3 Different options

Here are the different possible options.

* barre: boolean which indicate if a vertical straight has to be placed on the frieze at the event position. It must be either true or false. It is true by default.
* date: boolean which indicate if the date of the event has to be placed. It must be either true or false. It is true by default.
* conversionmonth: boolean which indicate if the number of the month has to be converted to the name month. It must be either true or false. It is true by default.

* mark : boolean which indicate if a vertical straight has to be placed under the timeline at the event position. It must be either true or false. It is true by default.
* year : boolean which indicate if the year of the event has to be placed. It must be either true or false. It is true by default.
* icon : 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.
* markdepth : depth of the label of the event and of the vertical straight under the frieze. It must be a valid dimen and it is 10pt by default.
* iconheight : height of the icon on the timeline. It must be a valid dimen and it is half of the height of the frieze by default.
* textstyle : style to apply to the label. It must be a control sequence or control sequence#1.
* 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.
* datestyle : style to apply to the entire date with the symbols of separation. It must be a control sequence or control sequence#1.
* datestyle : style to apply each element of the date without the symbols of separation. It must be a control sequence or control sequence#1.
* colorbox : colour of the background of the text and date of the event. It must be a valid colour and it is white by default.

* ifcolorbox : boolean which indicates if the background of the text and the date has to be coloured. It must be either true or false. It is true by default.
* textwidth : Width of the label on the page. It must be a valid dimen.

#### Summary

\chronoevent[...=...]{...}{...}

barre = <true> or <false> date = <true> or <false> conversionmonth = <true> or <false> mark = <true> or <false> icon = <text> or <control sequence>... datessegaration = <text> or <control sequence>... markdepth = <dimen> iconheight = <dimen> textstyle = <control sequence> or <control sequence#1> datesstyle = <control sequence> or <control sequence#1> ifcolorbox = <true> or <false> colorbox = <colour> textwidth = <dimen>

\begin{table}
\begin{tabular}{|l l l|} \hline  & \textbackslash{}chronoevent[...=...]{...}{...}{...} \\ barre & = & <true> or <false> \\ date & = & <true> or <false> \\ conversionmonth & = & <true> or <false> \\ mark & = & <true> or <false> \\ icon & = & <text> or <control sequence>... datessegaration = & <text> or <control sequence>... markdepth = & <dimen> iconheight = & <dimen> textstyle = & <control sequence> or <control sequence#1> datestyle = & <control sequence> or <control sequence#1> ifcolorbox = & <true> or <false> colorbox = & <colour> textwidth = & <dimen> \\ \hline \end{tabular}
\end{table}
Table 3: Chronoevent’s options4 Permanent changes

### Creating new commands

You can create your own commands to place events and periods on the timeline with \definechronoevent and \definechronoperiode.

\definechronoperiode{1.}[...=...]

\definechronoevent{1.}[...=...]

1. name for the creation of the new command

...=... options of the type of command defined (see **3**)

N.B.: in ConTeXt, the syntax is

\definechronoperiode[1.][...=...]

\definechronoevent[1.][...=...]

The commands \chrono<name of the command> are now defined. For instance,

\definechronoperiode[MyPeriod][color=yellow, textstyle=\it]

\definechronoevent[MyEvent][textstyle=\it, barre=false]

\startchronology[color=darkgreen]

\chronoMyPeriod{100}{500}{Something}

\chronoMyEvent{800}{Anything else}

0

100

500

_Something_

800

_Anything else_

### Modify the default values

You can apply changes on default values with using \setupchronology,

\setupchronoevent and \setupchronoperiode. You use the same name for each option you want to change..

\setupchrono<text>[...]{1.}


\begin{tabular}{c c c c} Permanent changes & Modify the default values \\
1000 & & & \\
1050 & 1450 & & 1800 & 1899 \\ Anything you want & & & 19\({}^{\rm th}\) century \\  & & 1600 & \\  & _Anything else_ & & \\
1250 & & 1500 & 1750 & 2000 \\ \end{tabular}


**Go to table of contents**

**Exit**