%%%
% Allumettes
%%%
\setKVdefault[Allumettes]{Impression=false,Echelles=false}%
\defKV[Allumettes]{Echelle=\setKV[Allumettes]{Echelles}}%

\ifluatex
  \NewDocumentEnvironment{Allumettes}{o +b}{%
    \useKVdefault[Allumettes]%
    \setKV[Allumettes]{#1}%
    \mplibforcehmode%
    \begin{mplibcode}%
      input PfCAllumettes;
      %
      boolean print,Echelles;
      print=\useKV[Allumettes]{Impression};
      Echelles=\useKV[Allumettes]{Echelles};
      if Echelles:
      Echelle=\useKV[Allumettes]{Echelle};
      DefinirUnite(Echelle);
      else:
      Echelle=1;
      fi;
      %
      #2%
    \end{mplibcode}%
  }{}
\else%
  \NewDocumentEnvironment{Allumettes}{o +b}{%
    \setKV[Allumettes]{#1}%
    \begin{mpost}[mpsettings={input PfCAllumettes;boolean print,Echelles;print=\useKV[Allumettes]{Impression};Echelles=\useKV[Allumettes]{Echelles};if Echelles:Echelle=\useKV[Allumettes]{Echelle};DefinirUnite(Echelle);else:Echelle=1;fi;}]%
      #2%
    \end{mpost}
  }{}%
\fi%