From 4350559ab12f199a030eab3600548b05c191afc5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 14 Mar 2021 22:52:07 +0000 Subject: profcollege (14mar21) git-svn-id: svn://tug.org/texlive/trunk@58351 c570f23f-e606-0410-a88d-b1316a301751 --- .../metapost/profcollege/PfC-Afficheur.mp | 182 +++++++++++++++++++++ .../metapost/profcollege/PfC-Calculatrice.mp | 11 +- .../metapost/profcollege/PfC-Constantes.mp | 3 - .../texmf-dist/metapost/profcollege/PfC-LaTeX.mp | 7 +- .../metapost/profcollege/PfC-Svgnames.mp | 3 - 5 files changed, 190 insertions(+), 16 deletions(-) create mode 100644 Master/texmf-dist/metapost/profcollege/PfC-Afficheur.mp (limited to 'Master/texmf-dist/metapost') diff --git a/Master/texmf-dist/metapost/profcollege/PfC-Afficheur.mp b/Master/texmf-dist/metapost/profcollege/PfC-Afficheur.mp new file mode 100644 index 00000000000..166cd229792 --- /dev/null +++ b/Master/texmf-dist/metapost/profcollege/PfC-Afficheur.mp @@ -0,0 +1,182 @@ +u:=1cm; + +vardef Afficheur(expr nb,creux)= + pair Aa[]; + Aa1=u*(-0.5,-1); + Aa2-Aa1=u*(1,0); + Aa4-Aa2=u*(0,2); + Aa3=1/2[Aa2,Aa4]; + Aa5-Aa4=Aa1-Aa2; + Aa6-Aa3=Aa1-Aa2; + pair Bb[]; + Bb1=Aa1 xscaled0.7 yscaled 0.85; + Bb2=Aa2 xscaled0.7 yscaled 0.85; + Bb4=Aa4 xscaled0.7 yscaled 0.85; + Bb5=Aa5 xscaled0.7 yscaled 0.85; + Bb3=1/2[Bb2,Bb4]; + Bb6=1/2[Bb1,Bb5]; + Bb7=1/2[Bb6,Bb3]+(0,4); + Bb8=1/2[Bb6,Bb3]-(0,6); + pair Cc[]; + Cc1=u*(0.4,-0.85)+(0,-1); + ecarth:=1.5; + ecartv:=0.05; + path ASegment[]; + ASegment[1]=1/10[Bb1,Bb2]--9/10[Bb1,Bb2]; + ASegment[2]=1/10[Bb2,Bb3]--9/10[Bb2,Bb3]; + ASegment[3]=1/10[Bb3,Bb4]--9/10[Bb3,Bb4]; + ASegment[4]=1/10[Bb4,Bb5]--9/10[Bb4,Bb5]; + ASegment[5]=1/10[Bb5,Bb6]--9/10[Bb5,Bb6]; + ASegment[6]=1/10[Bb6,Bb1]--9/10[Bb6,Bb1]; + ASegment[7]=1/10[Bb6,Bb3]--9/10[Bb6,Bb3]; + color fondsegment; + fondsegment=0.2[LightSteelBlue,white]; + save $; + picture $; + $=image( + fill Aa1--Aa2--Aa4--Aa5--cycle withcolor LightSteelBlue; + draw Aa1--Aa2--Aa4--Aa5--cycle withcolor LightSteelBlue; + if creux=0: + fill (unitsquare scaled 2) shifted Cc1 withcolor fondsegment; + else: + fill (unitsquare scaled 2) shifted Cc1 withcolor Crimson; + fi; + if nb=1: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[2]; + draw ASegment[3]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[1]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(); + fi; + if nb=2: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[2]; + draw ASegment[5]; + drawoptions(); + fi; + if nb=3: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[5]; + draw ASegment[6]; + drawoptions(); + fi; + if nb=4: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[5]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[1]; + draw ASegment[4]; + draw ASegment[6]; + drawoptions(); + fi; + if nb=5: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[3]; + draw ASegment[6]; + drawoptions(); + fi; + if nb=6: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[3]; + drawoptions(); + fi; + if nb=7: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[1]; + draw ASegment[5]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(); + fi; + if nb=8: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(); + fi; + if nb=9: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[7]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[6]; + drawoptions(); + fi; + if nb=0: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[6]; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[7]; + drawoptions(); + fi; + if nb=10: + drawoptions(withpen pensquare scaled2 withcolor Crimson); + fill (unitsquare scaled 2) shifted Bb7 withcolor Crimson; + fill (unitsquare scaled 2) shifted Bb8 withcolor Crimson; + drawoptions(withpen pensquare scaled2 withcolor fondsegment); + draw ASegment[1]; + draw ASegment[2]; + draw ASegment[3]; + draw ASegment[4]; + draw ASegment[5]; + draw ASegment[6]; + draw ASegment[7]; + drawoptions(); + fi; + ); + $ +enddef; + +endinput; + diff --git a/Master/texmf-dist/metapost/profcollege/PfC-Calculatrice.mp b/Master/texmf-dist/metapost/profcollege/PfC-Calculatrice.mp index a6326e19258..92d4d3057d6 100644 --- a/Master/texmf-dist/metapost/profcollege/PfC-Calculatrice.mp +++ b/Master/texmf-dist/metapost/profcollege/PfC-Calculatrice.mp @@ -1,6 +1,3 @@ -%Author : Christophe Poulain -%Licence : Released under the LaTeX Project Public License v1.3c -% or later, see http://www.latex-project.org/lppl.txtf prologues:=3; path carre[]; @@ -174,7 +171,7 @@ vardef Test(expr cptk,cptnt)= fi; enddef; -vardef LCD(text nt)(text rep)= +vardef LCD(text nt)(text rep)(expr NB)= decahoriz:=0; nblignes:=nblignes+1; path Ecran; @@ -185,6 +182,12 @@ vardef LCD(text nt)(text rep)= BlocAffichage; Test(k,nt); endfor; + for k=1 upto NB: + nblignes:=nblignes+1; + Ecran:=(u*(0,-1)--u*(120,-1)--u*(120,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); + fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + endfor; nblignes:=nblignes+1; Ecran:=(u*(0,-1)--u*(120,-1)--u*(120,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; diff --git a/Master/texmf-dist/metapost/profcollege/PfC-Constantes.mp b/Master/texmf-dist/metapost/profcollege/PfC-Constantes.mp index b97bd8a4c0a..02895dcf8c4 100644 --- a/Master/texmf-dist/metapost/profcollege/PfC-Constantes.mp +++ b/Master/texmf-dist/metapost/profcollege/PfC-Constantes.mp @@ -1,6 +1,3 @@ -%Author : Christophe Poulain -%Licence : Released under the LaTeX Project Public License v1.3c -% or later, see http://www.latex-project.org/lppl.txtf %Constantes u:=1cm; v:=(sqrt3)/2; diff --git a/Master/texmf-dist/metapost/profcollege/PfC-LaTeX.mp b/Master/texmf-dist/metapost/profcollege/PfC-LaTeX.mp index daa206a603d..33d9848b634 100644 --- a/Master/texmf-dist/metapost/profcollege/PfC-LaTeX.mp +++ b/Master/texmf-dist/metapost/profcollege/PfC-LaTeX.mp @@ -1,16 +1,11 @@ -%Author : Christophe Poulain -%Licence : Released under the LaTeX Project Public License v1.3c -% or later, see http://www.latex-project.org/lppl.txtf vardef LATEX primary s = write "verbatimtex" to "mptextmp.mp"; write "%&latex" to "mptextmp.mp"; write "\documentclass[]{article}" to "mptextmp.mp"; + write "\usepackage{ProfCollege}" to "mptextmp.mp"; write "\usepackage[utf8]{inputenc}" to "mptextmp.mp"; write "\usepackage[T1]{fontenc}" to "mptextmp.mp"; write "\usepackage{fourier}" to "mptextmp.mp"; - write "\usepackage{mathtools,amssymb}" to "mptextmp.mp"; - write "\usepackage{siunitx}" to "mptextmp.mp"; - write "\sisetup{locale=FR,detect-all,output-decimal-marker={,},group-four-digits}" to "mptextmp.mp"; write "\usepackage[french]{babel}" to "mptextmp.mp"; write "\begin{document}" to "mptextmp.mp"; write "etex" to "mptextmp.mp"; diff --git a/Master/texmf-dist/metapost/profcollege/PfC-Svgnames.mp b/Master/texmf-dist/metapost/profcollege/PfC-Svgnames.mp index 3af1336dc33..3aa2cf23860 100644 --- a/Master/texmf-dist/metapost/profcollege/PfC-Svgnames.mp +++ b/Master/texmf-dist/metapost/profcollege/PfC-Svgnames.mp @@ -1,6 +1,3 @@ -%Author : Christophe Poulain -%Licence : Released under the LaTeX Project Public License v1.3c -% or later, see http://www.latex-project.org/lppl.txtf %D'après /usr/local/texlive/2020/texmf-dist/tex/latex/xcolor/svgnam.def color AliceBlue; AliceBlue = (.94,.972,1); color AntiqueWhite; AntiqueWhite = (.98,.92,.844); -- cgit v1.2.3