2

I'd like the timeline as shown, except the -ve year labels replaced with BC. I can't seem to find how to do it.

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

\startchronology
[startyear=-800,stopyear=-14, arrow=false, height=0.2em, dateselevation=10pt]
\chronoevent{-753}{Rome's foundation}
\stopchronology

\end{document}
alice19
  • 746

1 Answers1

4
\documentclass{article}
\usepackage{chronosys}

\newcommand{\mychronodatestyle}[1]{

\pgfmathparse{equal(sign(#1),-1)? int(abs(#1)):#1 }
\pgfmathresult
\pgfmathparse{equal(sign(#1),-1)? "BC":}
 ~\pgfmathresult
 }


 \catcode`\!=11
 \def\eventyear{\!chreventyear}
 \catcode`\!=12

 \newcommand{\myeventdatestyle}[1]{
 \pgfmathparse{equal(sign(\eventyear),-1)? int(abs(\eventyear)):"#1"}
\pgfmathresult
 \pgfmathparse{equal(sign(\eventyear),-1)? "BC":}
 ~\pgfmathresult
 }



\begin{document}


\startchronology
[startyear=-800,stopyear=-14, arrow=false, height=0.2em, dateselevation=10pt,
datesstyle=\mychronodatestyle
]
\chronoevent[datestyle=\myeventdatestyle ]
{12/-753}{Rome's foundation}

\chronoperiode[datesstyle=\mychronodatestyle,dateselevation=2pt]{-500}{-200}{important event}
\stopchronology

\end{document}

enter image description here