diff options
author | Karl Berry <karl@freefriends.org> | 2023-05-02 20:28:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-05-02 20:28:48 +0000 |
commit | 0d88fa810742d90f84743ad83193ea4ab3c38251 (patch) | |
tree | 4dcde1706412e58df3686b93ab2d6c49e686291b /Master/texmf-dist/metapost | |
parent | b946d2b6f571f16ffa402663a474fafe1f501d4e (diff) |
profcollege (2may23)
git-svn-id: svn://tug.org/texlive/trunk@66990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/profcollege/PfCConstantes.mp | 16 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/profcollege/PfCScratch.mp | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/metapost/profcollege/PfCConstantes.mp b/Master/texmf-dist/metapost/profcollege/PfCConstantes.mp index 02895dcf8c4..bdef5781f1c 100644 --- a/Master/texmf-dist/metapost/profcollege/PfCConstantes.mp +++ b/Master/texmf-dist/metapost/profcollege/PfCConstantes.mp @@ -18,3 +18,19 @@ orangevif=(1,0.25,0.1); vert=(0,1,0); jaune=rouge+vert; gris=0.8*white; + +%coloriage et lumière +vardef Hsv(expr CC)=%CC couleur donnée en hsv d'après http://en.wikipedia.org/wiki/HSL_color_space + save $; + color $; + SSw:=floor(redpart(CC)/60); + SSh:=SSw mod 6; + SSf:=(redpart(CC)/60)-floor(SSw); + SSs:=greenpart((CC)); + SSv:=bluepart((CC)); + SSp:=SSv*(1-SSs); + SSq:=SSv*(1-SSf*SSs); + SSt:=SSv*(1-(1-SSf)*SSs); + if SSh=0: $=(SSv,SSt,SSp) elseif SSh=1:$=(SSq,SSv,SSp) elseif SSh=2:$=(SSp,SSv,SSt) elseif SSh=3:$=(SSp,SSq,SSv) elseif SSh=4:$=(SSt,SSp,SSv) elseif SSh=5:$=(SSv,SSp,SSq) fi; + $ +enddef; diff --git a/Master/texmf-dist/metapost/profcollege/PfCScratch.mp b/Master/texmf-dist/metapost/profcollege/PfCScratch.mp index 3c6826777a7..b3edc8af1f3 100644 --- a/Master/texmf-dist/metapost/profcollege/PfCScratch.mp +++ b/Master/texmf-dist/metapost/profcollege/PfCScratch.mp @@ -14,6 +14,7 @@ pair _coinnum;%milieu côté gauche pour placer la numérotation des lignes numeric Nblignes; Nblignes:=1; pair DebutListe; DebutListe=(0,0); boolean NumeroteLignes; NumeroteLignes=false; +boolean NumeroteFinBloc; NumeroteFinBloc=false; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% couleurs color CoulLignes; CoulLignes:=black; @@ -1711,6 +1712,10 @@ $=image( _coinprec:=(llcorner $); _coinprec:=_coinprec+(0,eb); numblocrep:=numblocrep-1; +if NumeroteFinBloc=true: + label(TEX("\footnotesize"&decimal(Nblignes)&""),_coinprec+(-3*eb,2*eb)); + Nblignes:=Nblignes+1; +fi; $ enddef; |