%%% % Frise temporelle %%% \setKVdefault[ClesFrise]{Longueur=8cm,Fleches=false,Ecart=5mm,Sup=false}% \newtoks\toklistefrise% \def\UpdatetoksFrise#1/#2/#3\nil{\addtotok\toklistefrise{"#1","#2","#3",}}% \newcommand\Frise[2][]{% \useKVdefault[ClesFrise]% \setKV[ClesFrise]{#1}% \setsepchar[*]{,*/}\ignoreemptyitems% \readlist*\ListeTempo{#2}% \toklistefrise{}% \foreachitem\compteur\in\ListeTempo{\expandafter\UpdatetoksFrise\compteur\nil} \MPDessineFrise{\the\toklistefrise}% } \newcommand\MPDessineFrise[1]{% \ifluatex \mplibforcehmode \begin{mplibcode} Longueur:=\useKV[ClesFrise]{Longueur}; Ecart:=\useKV[ClesFrise]{Ecart}; boolean Fleches; Fleches=\useKV[ClesFrise]{Fleches}; boolean Sup; Sup=\useKV[ClesFrise]{Sup}; pair A[],B; A0=(0,0); B-A0=(Longueur,0); n=0; for p_=#1: n:=n+1; endfor; for k=1 upto ((n div 3)-2): A[k]=(k/((n div 3)-1))[A0,B]; endfor; A[(n div 3)-1]=B; if Sup: for k=0 upto ((n div 3)-1): trace (u*(0,-0.1)--u*(0,0.1)) shifted A[k]; endfor; % on définit les points milieu des fleches path Fleche[]; pair C[]; for k=0 upto ((n div 3)-3): Fleche[k]=(A[k]{dir-30}..{dir30}A[k+1]) shifted((0,-Ecart)); C[k]=point (0.5*length Fleche[k]) of Fleche[k]; endfor; Fleche[(n div 3)-2]=%(A[(n div 3)-3]{dir-30}..{dir30}A[(n div 3)-1]) shifted((0,-Ecart)); chemin(A[(n div 3)-3]+(0,-Ecart),A[(n div 3)-3]+(0,-4*Ecart),A[(n div 3)-1]+(0,-4*Ecart),A[(n div 3)-1]+(0,-Ecart)); C[(n div 3)-1]=point (0.5*length Fleche[(n div 3)-2]) of Fleche[(n div 3)-2]; Fleche[(n div 3)-1]=(A[(n div 3)-1]{dir-150}..{dir150}A[(n div 3)-2]) shifted((0,-Ecart)); C[(n div 3)-2]=point (0.5*length Fleche[(n div 3)-1]) of Fleche[(n div 3)-1]; % maxx:=n; trace segment(A0,A[(n div 3)-2]); trace segment(A[(n div 3)-2],A[(n div 3)-1]) dashed evenly; n:=0; labeloffset:=labeloffset*2; for p_=#1: n:=n+1; if n