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}
5
  • @alice19 Not so long ago, @cfr proposed a fantastic solution for an alternative using Tikz -- the so-called chronos, an alternative for chronosys. With that you can do \begin{tikzpicture} [ chronos={% start date={{-800}-01-01}, end date={{-14}-01-01}, step years=50, only text, timeline width=100mm, timeline marks, timeline mark eras, timeline year={font=\scriptsize}, lines/.style={draw=none}, events/.append style={rotate=-45, anchor=west}, event distance=-2.5pt, } ] \chronosevent{{-753}}[text=gray]{Rome's Foundation} \end{tikzpicture}. Feb 1, 2019 at 18:00
  • @samcarter apparently we both looked into the same reference ;) Feb 1, 2019 at 18:01
  • 1
    @Raaja Well, it's a good reference :) Feb 1, 2019 at 18:02
  • @samcarter yes indeed. Feb 1, 2019 at 18:04

1 Answer 1

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

6
  • @alice19 Pleased to know that your problem is solved! Feb 2, 2019 at 18:02
  • I'm embarrassed to ask but is there any way to make this for a date range? For example, if something is dates to 750-740 BC?
    – alice19
    Apr 2, 2019 at 13:40
  • @alice19 You should not be embarrassed at all.! It's a pleasure for me. Answer updated. Apr 2, 2019 at 20:42
  • Thank you so much :) Now however if I have two dates that are rather close together they overlap each other. Shall I ask a new question about this?
    – alice19
    Apr 3, 2019 at 14:17
  • @alice19 I think you should ask a new question. Apr 3, 2019 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .