# LaTeX chronology change end of timeline

The only thing that bothers me is the little arrow at the end of the timeline.

Could someone tell me how to get the end of the line looking like the beginning?

Code:

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


Problem:

The timeline arrow is hard coded in the sty-file as [|->]. You can change it globally by setting >=| but that means all your tikzpictures will have | as the default arrow tip.

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


As noted by Schweinebacke the \tikzset can be put inside {...} which makes the changes local.

{
\tikzset{>=|}
\begin{chronology}[5]{1983}{2010}{\textwidth}
\event{1984}{one}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}
}

• Almost simultaneous the same idea. You can limit the effect of \tikzset either by using it in the document body inside an extra group (e.g. {…\tikzset{>=|}\begin{chronology}…\end{chronology}}) or by patching it into the (begin of the) environment (as shown in my answer). – Schweinebacke Aug 8 '17 at 18:03
• @Schweinebacke, I have added the grouping alternative. But your patching alternative is nicer:-) – StefanH Aug 8 '17 at 18:24

Unfortunately there is not a configuration option for this. But you can patch \chronology@iii to replace the line ending:

\documentclass{article}
\usepackage{chronology}
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\chronology@iii}{->}{-|}{}{\failure}
\makeatother
\begin{document}
\begin{chronology}[5]{1983}{2010}{\textwidth}
\event{1984}{one}
\event[1985]{1986}{two}
\event{\decimaldate{25}{12}{2001}}{three}
\end{chronology}
\end{document}


or the chronology environment:

\documentclass{article}
\usepackage{chronology}
\usepackage{xpatch}
\xpretocmd{\chronology}{\tikzset{>=|}}{}{\failure}

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