summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chronosys/docchronosys_en.tex
blob: 1a0277c23205f6d1ac1e7fb461055337d6e46710 (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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
% This is is the code for the english documentation of the `chronosys' package.
%
% The maintener of this work is Mathieu Long.
% email : mlong.tex@hotmail.fr
% the `chronosys' package consists in the 9 files :
%  -- `docchronosys_en.tex' and `docchronosys_en.pdf' (english manual)
%  -- `docchronosys_fr.tex' and `docchronosys_fr.pdf' (french manual)
%  -- README
%  -- `chronosys.tex' (file for plain TeX)
%  -- `chronosyschr.tex' (main file of the `chronosys' package)
%  -- `chronosys.sty' (file for LaTeX)
%  -- `x-chronosys.tex' (file for ConTeXt)
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is Mathieu Long.
%
\setupinteraction[title=Chronosys - Documentation, author=Mathieu Long, title=Chronosys documentation -english-, subtitle=Draw timelines]
\setupcolors[state=start]
\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,color=middlered]
\setupcapitals[sc=yes]
\setupindenting[yes,20pt]
\setuppagenumbering[location={bottom,right},left=--~]

\definetyping[typingTEX][option=TEX]
\setuptyping[typingTEX][color=darkblue]
\setupcolors[state=start]
\useURL[MetaPost_TUG][http://www.tug.org/docs/metapost/mpman.pdf]
\useURL[Tikz_CTAN][http://mirror.ctan.org/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf]
\starttext

\startmode[mkiv]
\def\METAPOST{MetaPost}
\stopmode 


\placebookmarks[chapter,section,subsection][chapter,section]
\usemodule[chronosys]
\startstandardmakeup\switchtobodyfont[myface,16pt]
\midaligned{Chronosys}
\midaligned{Draw timelines diagrams !}
\bigskip
\startchronology[width=\hsize,height=7ex,stopyear=\numexpr\year+38\relax,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[level=subsection,interaction=pagenumber]

\def\HeadTitle#1#2%
{\hbox to \hsize
{ \vbox{\hrule\par\noindent\vrule height1.15cm depth0pt\leaders\hrule\hskip10pt \lower5pt\vbox{\hbox{ #1\hskip10pt#2 }}\leaders\hrule\hfill\vrule height1.15cm depth0pt}
}}
\setuphead[chapter][command=\HeadTitle]
\setupbodyfont[14pt]
\parskip 1cm
\chapter{Introduction}

\type{Chronosys}  is distributed under the LaTeX Project Public License.You may use it for drawing timelines. It uses the \type{tikz}\footnote{for more informations on \type{tikz}, see \from[Tikz_CTAN]} package for drawing. You need to have \ETEX\ to use it. 
\blank
\unprotect
This package is version {\unprotect\chron@sysversion\protect}, others versions might be created later.
\bigskip
It is recommended not to load the \type{color.tex} file if you use plain \TeX.
\bigskip

You can load \type{chronosys} by~:
\startitemize[4]
\item \tex{usemodule[chronosys]} in \CONTEXT.
\item \tex{usepackage{chronosys}} in \LaTeX.
\item \tex{input chronosys} in plain \TeX.
\stopitemize

\subject{updates' history}
\startitemize[1]
\item 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.
\item 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.
\item 1.2 (actual version) : reduces the use of the module \type{tikz} at least possible, remove the former limitation of the impossibility of
switching the default value of \type{textwidth}. With \CONTEXT, added possibility using \METAPOST\footnote{for more informations on \METAPOST, see \from[MetaPost_TUG]} instead of \type{tikz} (and
 conversely, reuse \type {tikz} instead of \METAPOST{}) using the commands \tex{chronoswitchtomodeMP} and \tex{chronoswitchtomodeTikz}~; with  
the Mark IV version using \METAPOST{} default.

\stopitemize

\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 function: \tex{startchronology}}

The control sequence \tex{startchronology}\index{startchronology} is the first one you need to know.\footnote{There are \tex{begin}\arg{chronology} and \tex{end}\arg{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 \tex{stopchronology}\index{stopchronology}\footnote{or \tex{end}\arg{chronology}}, it ends the timeline.

\startalignment[middle]
\starttypingTEX
\stopchronology
\stoptypingTEX
\stopalignment

 Let's have a look on the result~:
\starttypingTEX
\startchronology
\stopchronology
\stoptypingTEX

\startchronology
\stopchronology
\bigskip
You can see the timeline is on all the page's width, furthermore it starts at {\os0} and ends at the current year {\os\the\year} when this document was compiled. \type{Chronosys} will compare these years with the events and periods you will give him (see \in[event] and \in[period]).
\blank[small]Now let's learn how to add events on the timeline.

\section[event]{Events: \tex{chronoevent}}

You can add events with \tex{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 instance:
\starttypingTEX
\startchronology
\chronoevent{1977}{\TeX's creation}
\stopchronology
\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:

\starttypingTEX 
\startchronology
\chronoevent{476}{Fall of the Roman empire}
\chronoevent{1492}{Discovery of America}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
\stoptypingTEX

\switchtobodyfont[9pt]
\startchronology
\chronoevent{476}{Fall of the Roman empire}
\chronoevent{1492}{Discovery of America}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
\switchtobodyfont[14pt]
\bigskip N.B.: the font size has been reduced to avoid label to overlap; a best way will be given further (see \in[eventoptions]).\blank

\type{Chronosys} won't generate any error if the event's date is out of the starting year and ending year, however it will be ignored. The way of customize 
the timeline, especially the starting year and ending year, will be seen further(see \in[startchronologyoptions]).

\section[period]{Periods: \tex{chronoperiode}}

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 \tex{chronoperiode}\index{chronperiode}.

\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{192}{476}{Eastern Roman Empire}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
\stoptypingTEX
\switchtobodyfont[9pt]
\startchronology
\chronoperiode{1000}{1999}{2\high{nd} Millennium}
\chronoperiode{192}{476}{Eastern Roman Empire}
\chronoevent{1969}{first steps on the Moon}
\stopchronology
\switchtobodyfont[14pt]
\blank
N.B.: on the period from {\os1000} to {\os1999}, blue on the timeline, we can now see the vertical straight under the frieze. You can disable it (see \in[eventoptions]), 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 \in[periodoptions] 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 \in[periodoptions]). 

\section[chronograduation]{Automatic graduation : \tex{chronograduation}}

Use \tex{chronograduation} to add a graduation on the timeline.

\startalignment[middle]
\starttypingTEX
\chronograduation[style][...=...]{1.}
\stoptypingTEX
\stopalignment

\starttabulate[|l|l|]
\NC \color[blue] \type{style} \NC \type{periode} \em or \type{event}\FR
\NC \color[blue] ...=... \NC options (see \in[chronoperiodsoptions] et \in[chronoeventsoptions]) \FR
\NC \color[blue] 1. \NC interval ({\em number})\FR
\stoptabulate

\starttypingTEX
\startchronology
\chronograduation{100}
\stopchronology
\startchronology
\chronograduation[periode][dateselevation=0pt]{100}
\stopchronology
\stoptypingTEX
\startchronology
\chronograduation[][]{100}
\stopchronology
\startchronology
\chronograduation[periode][dateselevation=\z@]{100}
\stopchronology

\chapter[Personnalisation]{Time-lines' customization}

\section{\tex{startchronology}}
\subsection{Example}
\tex{startchronology} can have an optional argument in brackets. 
For example: 

\starttypingTEX
\startchronology 
[startyear=-800,stopyear=500,
color=darkblue,height=7ex,width=\hsize]
\chronoevent{-753}{Rome's foundation}
\stopchronology
\stoptypingTEX
\startchronology 
[startyear=-800,stopyear=500,color=darkblue,height=7ex,width=\hsize]
\chronoevent{-753}{Rome's foundation}
\stopchronology
\bigskip

\subsection{Different options}
The different options of \tex{startchronology}\index{startchronology} are:
\startitemize
\head \type{startyear}\index{startyear} :\par starting year of the timeline. It needs to be a valid \type{number}. It is by default {\os0}
\head \type{stopyear}\index{stopyear} :\par ending year of the timeline. It also needs to be a valid \type{number}. It is the current year by default.
\head \type{color}\index{color} :\par colour of the frieze. It must be a valid \type{colour}. It is black by default.
\head \type{height}\index{height} :\par height of the frieze. It must be a valid \type{dimen} and it is \type{0.7pc} by default.
\head \type{width}\index{width} :\par width of the frieze. It must be a valid \type{dimen} and it is \tex{hsize}\footnote{\tex{textwidth} in \LaTeX} by default.
\head \type{datesstyle}\index{datessyle} :\par style to apply to dates. It must be a \type{control sequence} (it can take one argument, which will be the dates), is empty by default.
\head \type{dateselevation}\index{dateselevation} :\par height of the dates from the timeline, it must be a valid \type{dimen} and it is \type{20pt} par by default.
\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} :\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 timeline 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 timeline (\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 timeline 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 timeline on the page. You can choose between \type{right}, \type{center} and \type{left}. It is \type{center} by default.
 
\stopitemize 
\subsection[startchronologyoptions]{Summary}
\placetable[here][fig:startchronologyoptions]{\type{startchronology}'s options}
\starttable[|l|c|l|]
\HL\VL\use{3}\ReFormat[cB]{\tex{startchronology[}\em ...=...\type{]}}\VL\SR
\VL\type{startyear} \NC=\NC\type{<number>}
\VL\FR\VL
\type{stopyear} \NC=\NC\type{<number>}\VL\FR
\VL
\type{color} \NC=\NC\type{<colour>}\VL\FR
\VL
\type{height} \NC=\NC\type{<dimen>}\VL\FR
\VL
\type{width} \NC=\NC\type{<dimen>}\VL\FR
\VL
\type{datesstyle} \NC=\NC\type{<control sequence>} {\em or} \type{<control sequence#1>}\VL\FR
\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
\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
\VL\type{align} \NC=\NC\type{<right>} {\em or} \type{<center>} {\em or} \type{<left>}\VL\FR\HL
\stoptable

\page[yes]
\section{\tex{chronoperiode}}
\subsection{Example}
\tex{chronoperiode} can have an optional argument for the options' customization. 
\starttypingTEX
\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
\stoptypingTEX
\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

\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{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 \crlf\tex{chronoperiodecoloralternation}\index{chronoperiodecoloralternation}.

\startalignment[middle]
\starttypingTEX
\chronoperiodecoloralternation{1.}
\stoptypingTEX
\stopalignment

\starttabulate[|l|l|]
\NC\color[darkblue] 1. \NC colours ({\em\type{colour}, \type{colour},... \type{colour}})\FR
\stoptabulate

\blank[big]

Example:

\starttypingTEX
\chronoperiodecoloralternation{orange, darkgreen,
 violet, purple, cyan}
\startchronology
\chronoperiode[startdate=false]{0}{500}{}
\chronoperiode[startdate=false]{500}{1000}{}
\chronoperiode[startdate=false]{1000}{1500}{}
\stopchronology
\stoptypingTEX

\restartchronoperiodecolor
\startchronology
\chronoperiodecoloralternation{orange, darkgreen,
 violet, purple, cyan}
\chronoperiode[startdate=false]{0}{500}{}
\chronoperiode[startdate=false]{500}{1000}{}
\chronoperiode[startdate=false]{1000}{1500}{}
\stopchronology

You can also restart the alternation at the beginning or on a specific colour with\crlf
\tex{restartchronoperiodecolor}\index{restartchronoperiodecolor}.

\startalignment[middle]
\starttypingTEX
\restartchronoperiodecolor[...]
\stoptypingTEX
\stopalignment

\starttabulate[|l|l|]
\NC\color[darkblue] ... \NC name of a colour of the alternation ({\em colour})\FR
\stoptabulate

\subsection[chronoperiodsoptions]{Different options}

The different options of \tex{chronoperiode}\index{chronoperiode} are:

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

\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 valid \type{colour}. 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{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 valid \type{colour} 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.
\head \type{topheight}\index{topheight} : \par height of the top of the period on the timeline. It must be a valid \type{dimen} and it is equal to the \type{height of the timeline} by default.
\head \type{bottomdepth}\index{bottomdepth} : \par height of the bottom of the period on the timeline. It must be a valid \type{dimen} and it is \type{0pt} by default.
\stopitemize

\subsection[periodoptions]{Summary}

\placetable[here][fig:chronoperiodeoptions]{\type{chronoperiode}'s options}
\starttable[|l|c|l|]
\HL\VL\use{3}\ReFormat[cB]{\tex{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{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
\VL\type{ifcolorbox}\NC=\NC \type{<true>} {\em or} \type{<false>}\VL\FR
\VL\type{colorbox} \NC =\NC \type{<colour>} \VL\FR
\VL\type{topheight} \NC =\NC \type{<dimen>}\VL\FR
\VL\type{bottomdepth} \NC =\NC \type{<dimen>}\VL\FR\HL
\stoptable

\page[yes]

\section{\tex{chronoevent}}

\tex{chronoevent} can also have an optional argument for customization.

\subsection{Example}

\starttypingTEX
\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,
datesstyle=\it,datesseparation=/,conversionmonth=false,
icon=\MyIcon,year=false, textwidth=4.5cm]{15/3/-44}
{\qquad ides of March;\endgraf
assassination of Caesar}
\stopchronology
\stoptypingTEX
\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,datesstyle=\it,datesseparation=/,conversionmonth=false,icon=\MyIcon,year=false, textwidth=4.5cm]{15/3/-44}
{\qquad ides of March; \endgraf assassination of Caesar}
\stopchronology

\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 timeline. You can of course choose the colour of the box, and disable it if you need (see \in[chronoeventsoptions]).

\subsubsection[eventnewdate]{A new way for specifying the date}

You can specify with more precision the date with \tex{chronoevent}\index{chronoevent}. We saw that typing 
\tex{chronoevent}\arg{-44}\arg{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
 October\or November\or December\fi}
\startchronology[startyear=-44,
stopyear=-43,color=darkgreen,height=7ex]
\chronoevent{15/03/-44}{Assassination of Caesar}
\stopchronology
\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=-44,stopyear=-43,color=darkgreen,height=7ex]
\chronoevent{15/03/-44}{Assassination of Caesar}
\stopchronology
\blank

\subsection[chronoeventsoptions]{Different options}

Here are the different possible options\index{chronoevent}.
\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.
\head \type{mark}\index{mark} :\par boolean which indicate if a vertical straight has to be placed under the timeline at the event position. It must be either \type{true} or \type{false}. It is \type{true} by default.
\head \type{year}\index{year} :\par boolean which indicate if the year of the event has to be placed. It must be either \type{true} or \type{false}. It is \type{true} by default.
\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 timeline.  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 

\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 valid \type{colour} 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.
It must be a valid \type{dimen}.
\stopitemize 

\subsection[eventoptions]{Summary}

\placetable[here][fig:chronoeventoptions]{\type{chronoevent}'s options}
\starttable[|l|c|l|]
\HL\VL\use{3}\ReFormat[cB]{\tex{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{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
\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]


\chapter[permanentchanges]{Permanent changes}
\section[definecommands]{Creating new commands}

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

\startalignment[middle]
\starttypingTEX
\definechronoperiode{1.}[...=...]
\definechronoevent{1.}[...=...]
\stoptypingTEX
\stopalignment

\starttabulate[|l|l|]
\NC \color[blue] 1. \NC name for the creation of the new command\FR
\NC \color[blue] ...=... \NC options of the type of command defined (see \in[Personnalisation])\FR
\stoptabulate

\blank
N.B.: in \CONTEXT, the syntax is 

\startalignment[middle]
\starttypingTEX
\definechronoperiode[1.][...=...]
\definechronoevent[1.][...=...]
\stoptypingTEX
\stopalignment

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

\starttypingTEX
\definechronoperiode{MyPeriod}[color=yellow, textstyle=\it]
\definechronoevent{MyEvent}[textstyle=\it, barre=false]
\startchronology[color=darkgreen]
\chronoMyPeriod{100}{500}{Something}
\chronoMyEvent{800}{Anything else}
\stopchronology
\stoptypingTEX


\definechronoperiode[MyPeriod] [color=yellow, textstyle=\it]
\definechronoevent[MyEvent][textstyle=\it, barre=false]
\startchronology[color=darkgreen]
\chronoMyPeriod{100}{500}{Something}
\chronoMyEvent{800}{Anything else}
\stopchronology

\section[setupdefaultvalues]{Modify the default values}
You can apply changes on default values with using \tex{setupchronology},\crlf \tex{setupchronoevent} and \tex{setupchronoperiode}. You use the 
same name for each option you want to change. 
\index{setupchronology}\index{setupchronoevent} \index{setupchronoperiode}.

\startalignment[middle]
\starttypingTEX
\setupchrono<text>[...]{1.}
\stoptypingTEX
\stopalignment

\starttabulate[|l|l|]
\NC \color[blue] <text> \NC \type{periode} \em or \type{event} or \type{logy} or \type{graduation}\FR
\NC \color[blue] ...\NC name of the command to customize (except for \tex{setupchronology}, and\FR
\NC \NC for\tex{setupchronograduation} it is the style of the graduation ; see \in[definecommands])\FR
\NC \color[blue] 1. \NC options (see \in[Personnalisation])\FR
\stoptabulate

N.B.: Again, in \CONTEXT, the syntax is :

\startalignment[middle]
\starttypingTEX
\setupchrono<text>[...][1.]
\stoptypingTEX
\stopalignment

The option \type {name of the command to customize} is only available for \crlf \tex{setupchronoevent} and \tex{setupchronoperiode}, and in the case of \crlf\tex{setupchronograduation}  it matches the style of graduation (\type{event} or \type{period}).

If it is not given, the changes will affect \type {\chronoperiode} and \tex{chronoevent} , otherwise they will affect the command given in
option.

For example, 

\starttypingTEX
\setupchronology{startyear=1000,color=darkblue,stopdate=false}
\setupchronoperiode{color=darkgreen}
\setupchronoevent{textstyle=\it}
\setupchronograduation[event]{markdepth=2cm}
\startchronology
\chronograduation{250}
\chronoperiode{1050}{1450}{Anything you want}
\chronoevent{1600}{Anything else}
\chronoperiode{1800}{1899}{19\high{th} century}
\stopchronology
\stoptypingTEX

\setupchronology[startyear=1000,color=darkblue,stopdate=false]
\setupchronoperiode[color=darkgreen]
\setupchronoevent[textstyle=\it]
\setupchronograduation[event][markdepth=2cm]
\startchronology
\chronograduation{250}
\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 

\startalignment[middle]
\starttypingTEX
\setupchronoperiode{color=\chronoperiodcolor}
\stoptypingTEX
\stopalignment

\setupchronoperiode[color=\chronoperiodcolor]
\startchronology
\chronograduation{250}
\chronoperiode{1050}{1450}{Anything you want}
\chronoperiode{1800}{1899}{19\high{th} century}
\chronoevent{1600}{Anything else}
\stopchronology

\completeindex
\midaligned{\button{Go to table of contents}[content]}
\midaligned{\button{Exit}[ExitViewer]}
\stoptext