2

I'm using the chronosys package to create a frequency spectrum and this is what I have come up with so far:

\chronoperiodecoloralternation{red,blue,green,green}
\definechronoperiode{MyPeriod}[dates=false,arrow=false,textdepth=-60pt,textwidth=30pt,ifcolorbox=false]
\startchronology
[startyear=1,stopyear=20,startdate=false,stopdate=false]
\chronoperiode[dates=false]{1}{3}{Period 1}
\chronoperiode[dates=false]{3}{10}{Period 2}
\chronoperiode[dates=false]{10}{20}{Period 3}
\chronoMyPeriod[]{14}{17}{Description 1}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{1}{a}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{3}{b}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{10}{c}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{15}{d}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{18}{e}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{20}{f}
\stopchronology

Unfortunately, this code produces two "period borders" in my timeline right below the "Description 1" part. How to remove them?

Edit:

This is the resulting figure: Resulting timeframe with bars

I would like to get rid of the two vertical bars before and after "d".

4
  • a handrawn sketch of the desired answer would be helpful
    – js bibra
    Aug 17 '20 at 11:44
  • Please, can you edit your question putting a complete code and an image? Thank you very much.
    – Sebastiano
    Aug 17 '20 at 12:17
  • Thanks for your replies. I just added an image for clarity.
    – Hagbard
    Aug 17 '20 at 12:58
  • 1
    I have a feeling that it was this feature of chronosys that caused me to abandon it and just use tikz directly. Aug 17 '20 at 13:34
1

Those lines are hard-coded in the \dochronoperiode macro. You can patch them out using xpatch:

\documentclass{article}
\usepackage{chronosys}
\usepackage{xpatch}
\catcode`\@=11%
\catcode`\!=11%
\xpatchcmd{\dochronoperiode}
  {\begingroup{%
     \dimen@i\dimexpr\!chrperiodtopheight-\!chrperiodbottomdepth\relax
     \!chrusecolor{\!chr!periodeschwarzodergr@u}%
     \kern-0.2pt\relax\vrule height\dimen@i width0.4pt\relax  \kern-0.2pt\relax
     \kern\dimen@\relax
     \kern-0.2pt\relax\vrule height\dimen@i width0.4pt\relax  \kern-0.2pt\relax
   \kern-\dimen@\relax}%
   \endgroup}
  {}
  {}
  {}
\catcode`\@=12%
\catcode`\!=12%
\begin{document}
\chronoperiodecoloralternation{red,blue,green,green}
\definechronoperiode{MyPeriod}[dates=false,arrow=false,textdepth=-60pt,textwidth=30pt,ifcolorbox=false]
\startchronology
[startyear=1,stopyear=20,startdate=false,stopdate=false]
\chronoperiode[dates=false]{1}{3}{Period 1}
\chronoperiode[dates=false]{3}{10}{Period 2}
\chronoperiode[dates=false]{10}{20}{Period 3}
\chronoMyPeriod[]{14}{17}{Description 1}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{1}{a}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{3}{b}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{10}{c}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{15}{d}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{18}{e}
\chronoevent[date=false,markdepth=-20pt,textwidth=2pt]{20}{f}
\stopchronology
\end{document}

Output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.