Consider the following MWE:
Code: Select all
\documentclass[danish]{article}
\usepackage{babel}
\usepackage{auto-pst-pdf,pstricks-add}
\begin{document}
\begin{pspicture}(0,-6)(15,2)
\psset{unit=0.75cm}
\psaxes[
xLabels={,Lake Placid,,Sarajevo,,Calgary,,Albertville,Lillehammer,,Nagano,,Salt Lake City,,Torino,},
xLabelsRot=90,
yAxis=false
]{->}(15,0)
\multido{\iA=1+2,\iB=8+2,\iC=1984+4,\iD=1994+4}{4}{%
\rput(\iA,1){\psrotate(0.55,0.05){90}{$\iC$}}
\rput(\iB,1){\psrotate(0.55,0.05){90}{$\iD$}}
}
\end{pspicture}
\end{document}
pdflatex -shell-escape <filename>.tex
.)The above example is exactly what I want but I it will get somewhat more complicated if the number of olympics on every side the periode where it switched from
year x (mod 4) = 0
to
year x (mod 4) = 2
is not the same. Is there a way to generalise the code in the above example in order to get around this?
Thank you in advance!