[Tex/LaTex] problem with chronology package

chronologytimeline

I want to do a horizontal time line. I find this script:

\documentclass{article}
\usepackage{chronology}
\begin{document}
\begin{chronology}[5]{1983}{2010}{3ex}{\textwidth}
\event{1984}{one}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}
\end{document}

It should produces a horizontal time line. I get errors.

timeline-text.tex(4): Error: Missing number, treated as zero.
timeline-text.tex(4): Error: Illegal unit of measure (pt inserted).

Can you help? Also, some of the replies in the post where I got the code from: HERE says that the package does not accept more than one time line in the document? is this true?

Best Answer

The last argument is optional, not mandatory and so should use brackets. It is not quite clear what is its purpose but it seems to allow scaling: the timeline is created in the size of arg #5 and then scaled to arg #4 (this also means that arg #4 shouldn't be too small.

\documentclass{article}
\usepackage{chronology}
\begin{document}

\begin{chronology}[5]{1983}{2010}{\textwidth}
\event{1984}{oneD}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}

abc

\begin{chronology}[5]{1983}{2010}{10cm}[\textwidth]
\event{1984}{oneD}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}

abc

abc

\begin{chronology}[5]{1983}{2010}{10cm}[0.2\textwidth]
\event{1984}{oneD}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}

abc

\end{document}  

enter image description here