diff options
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/PfCScratch.tex')
-rw-r--r-- | macros/latex/contrib/profcollege/latex/PfCScratch.tex | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/macros/latex/contrib/profcollege/latex/PfCScratch.tex b/macros/latex/contrib/profcollege/latex/PfCScratch.tex new file mode 100644 index 0000000000..3f1e8679d2 --- /dev/null +++ b/macros/latex/contrib/profcollege/latex/PfCScratch.tex @@ -0,0 +1,45 @@ +%%%% +% Scratch +%%%% +\newlength{\longbarreheight} +\setlength{\longbarreheight}{2.1ex+3pt} + +\newlength{\longbarredepth} +\setlength{\longbarredepth}{0.9ex+3pt} +\def\longbarre{\vrule height\longbarreheight depth\longbarredepth width0pt}% + +\def\barre{\vrule height2.1ex depth.9ex width0pt}% +\def\demibarre{\vrule height1.4ex depth.6ex width0pt}% + +\setKVdefault[Scratch]{Impression=false,Numerotation=false,Echelle=1,Naturel=false}% + +\ifluatex +\NewDocumentEnvironment{Scratch}{o +b}{% + \useKVdefault[Scratch]% + \setKV[Scratch]{#1}% + \mplibforcehmode% + \ifboolKV[Scratch]{Naturel}{}{\myfontScratch}% + \begin{mplibcode}% + boolean Naturel; + Naturel=\useKV[Scratch]{Naturel}; + if Naturel: input PfCPseudo; print:=true; else: input PfCScratch; print:=\useKV[Scratch]{Impression}; fi; + NumeroteLignes:=\useKV[Scratch]{Numerotation};% + #2% + picture recap;% + recap:=currentpicture scaled \useKV[Scratch]{Echelle};% + currentpicture:=nullpicture;% + draw recap;% + \end{mplibcode}% + }{} +\else% +\NewDocumentEnvironment{Scratch}{o +b}{% + \setKV[Scratch]{#1}% + \begin{mpost}[mpsettings={boolean Naturel;Naturel=\useKV[Scratch]{Naturel};if Naturel: input PfCPseudo; print:=true; else: input PfCScratchpdf; print:=\useKV[Scratch]{Impression}; fi;NumeroteLignes:=\useKV[Scratch]{Numerotation};Echelle:=\useKV[Scratch]{Echelle};}]% + #2% + picture recap;% + recap:=currentpicture scaled Echelle;% + currentpicture:=nullpicture;% + draw recap;% + \end{mpost} +}{}% +\fi%
\ No newline at end of file |