From aba7fb229e902758b312ecec84ab6f485c89ba66 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 7 Jan 2024 03:01:57 +0000
Subject: CTAN sync 202401070301

---
 .../contrib/profcollege/latex/ProfCollege.sty      | 79 ++++++++++++++++++----
 1 file changed, 65 insertions(+), 14 deletions(-)

(limited to 'macros/latex/contrib/profcollege/latex/ProfCollege.sty')

diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index 18b287fba4..5b62dc03b7 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -2,9 +2,9 @@
 % licence    : Released under the LaTeX Project Public License v1.3c
 % or later, see http://www.latex-project.org/lppl.txtf
 \NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2023/11/14}%
+\def\filedate{2023/12/01}%
 \let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-w}%
+\def\fileversion{0.99-z-y}%
 \let\PfCfileversion\fileversion%
 \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
 
@@ -68,16 +68,10 @@
 \else%
 \if@shellescape%
 \RequirePackage[shellescape,latex]{gmp}%inclusion de figures metapost "à la volée"%
-\gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}%
-\usempxclass{article}%
-\usempxpackage{ProfCollege}%
-\usempxpackage[utf8]{inputenc}%
-\usempxpackage[T1]{fontenc}%
-\usempxpackage{fourier}%
-\usempxpackage[french]{babel}%
-\usempxpackage{pifont}%
 \else%
+%
 \RequirePackage[latex]{gmp}%inclusion de figures metapost "à la volée"%
+\fi%
 \gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}%
 \usempxclass{article}%
 \usempxpackage{ProfCollege}%
@@ -87,7 +81,6 @@
 \usempxpackage[french]{babel}%
 \usempxpackage{pifont}%
 \fi%
-\fi%
 
 \RequirePackage{xintexpr}%
 \RequirePackage{listofitems}%
@@ -176,6 +169,10 @@
   }%
 }%
 
+\NewDocumentCommand\NumS{m}{%
+  \xintifboolexpr{#1==0}{}{\xintifboolexpr{#1>0}{+\num{#1}}{\num{#1}}}
+}%
+
 \newcounter{Marque}
 
 \NewDocumentCommand\AffichageTab{O{x}mmm}{%
@@ -225,7 +222,7 @@
   \fi%
 }%
 %encadrer avec des "sommets arrondis"
-\newsavebox{\logobox}%
+%\newsavebox{\logobox}%
 
 \newcommand\Logo[2]{%
 \setbox1=\hbox{\includegraphics[scale=#2]{#1}}%
@@ -248,6 +245,59 @@
 \end{tikzpicture}%
 }%
 
+\makeatletter
+\def\Suspensionfill{%
+\leavevmode
+\cleaders \hb@xt@\LongBoitePoint{\ldotp}\hfill
+\kern\z@}
+\makeatother
+
+\newlength{\LongBoitePoint}
+
+\NewDocumentCommand\PointsSuspensionold{sm}{%
+  \setbox2=\hbox{\ldotp}%
+  \setlength{\LongBoitePoint}{\wd2}%
+  \IfBooleanTF{#1}{%
+    \Suspensionfill%
+  }{%
+    \setbox1=\hbox{#2}%
+    \StrLen{#2}[\LongueurPoints]%
+    \ifmmode%
+      \mathinner{%
+        \xintFor* ##1 in {\xintSeq{1}{\LongueurPoints}}\do{%
+          \ldotp%
+        }%
+      }%
+    \else%
+      \xintFor* ##1 in {\xintSeq{1}{\fpeval{round(\wd1/\wd2)}}}\do{%
+        \ldotp%
+      }%
+    \fi%
+  }%
+}%
+
+\NewDocumentCommand\PointsSuspension{m}{%
+  \setbox2=\hbox{\ldotp}%
+  \setlength{\LongBoitePoint}{\wd2}%
+  \ifx\bla#1\bla%
+    \Suspensionfill%
+  \else%
+    \setbox1=\hbox{#1}%
+    \StrLen{#1}[\LongueurPoints]%
+    \ifmmode%
+      \mathinner{%
+        \xintFor* ##1 in {\xintSeq{1}{\LongueurPoints}}\do{%
+          \ldotp%
+        }%
+      }%
+    \else%
+      \xintFor* ##1 in {\xintSeq{1}{\fpeval{round(\wd1/\wd2)}}}\do{%
+        \ldotp%
+      }%
+    \fi%
+  \fi%
+}%
+
 \makeatletter%
 \NewDocumentCommand\Dotfill{}{%
 \leavevmode%
@@ -263,8 +313,8 @@
 }%
 
 \NewDocumentCommand\Lignespointilles{m}{%
-  \xintifboolexpr{#1>1}{%
-    \xintFor* ##1 in {\xintSeq {1}{#1}}\do{%
+  \xintifboolexpr{\fpeval{#1}>1}{%
+    \xintFor* ##1 in {\xintSeq {1}{\fpeval{#1}}}\do{%
       \pointilles\par%
     }%
   }{}%
@@ -660,6 +710,7 @@
 \readlist*\ListeMateriaux{aluminium/'/2.7,chêne/e~/0.69,bouleau/e~/0.65,sapin/e~/0.45,polystyrène/e~/1.04,porcelaine/la/2.5,acier/'/7.85,cuivre/e~/8.92,fer/e~/7.86,or/'/19.3,argent/'/10.5,bronze/e~/8.4,plomb/e~/11.35,marbre/e~/2.75,laiton/e~/7.3,titane/e~/4.5,PVC/e~/1.38}
 \setsepchar{,}
 
+\input{PfCConversion}
 \input{PfCCritere}
 \input{PfCLego}
 \input{PfCJeton}
-- 
cgit v1.2.3

