From 05f8146ef2eea2cd71b9c96583c6d893e6c76af5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 25 Mar 2024 03:03:04 +0000 Subject: CTAN sync 202403250302 --- .../contrib/profcollege/latex/ProfCollege.sty | 116 +++++++++++++++------ 1 file changed, 82 insertions(+), 34 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 dd1f5c9237..d09cfda988 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{2024/01/22}% +\def\filedate{2024/03/24}% \let\PfCfiledate\filedate% -\def\fileversion{0.99-z-z}% +\def\fileversion{0.99-A-b}% \let\PfCfileversion\fileversion% \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]% @@ -14,6 +14,20 @@ \newif\if@shellescape \@shellescapetrue% \newif\if@amssymb \@amssymbtrue% +% +\newif\if@Euro \@Eurotrue +\newif\if@CFA \@CFAfalse +\newif\if@CFP \@CFPfalse +\newif\if@CHF \@CHFfalse +\newif\if@US \@USfalse +\newif\if@UK \@UKfalse + +\DeclareOption{CFA}{\@Eurofalse\@CFAtrue}% +\DeclareOption{CFP}{\@Eurofalse\@CFPtrue}% +\DeclareOption{CHF}{\@Eurofalse\@CHFtrue}% +\DeclareOption{UK}{\@Eurofalse\@UKtrue}% +\DeclareOption{US}{\@Eurofalse\@UStrue}% +% \DeclareOption{nonshellescape}{\@shellescapefalse}% \DeclareOption{nonamssymb}{\@amssymbfalse}% \ProcessOptions\relax% @@ -25,8 +39,8 @@ % mathématiques \RequirePackage{siunitx}% \sisetup{% - locale=FR,% - mode = match, propagate-math-font = true,% + locale=FR,%mode = match, + propagate-math-font = true,% reset-math-version = false, reset-text-family = false,% reset-text-series = false, reset-text-shape = false,% text-family-to-math = true, text-series-to-math = true,% @@ -48,6 +62,30 @@ \DeclareSIUnit{\EuRo}{€}% \DeclareSIUnit{\Dollar}{\$}% \DeclareSIUnit{\LivreSterling}{£}% +\DeclareSIUnit{\PfCCFA}{F.C.F.A.}% +\DeclareSIUnit{\PfCCFP}{F.C.F.P.}% +\DeclareSIUnit{\PfCCHF}{CHF}% + +% +\if@CFA% + \DeclareSIUnit{\DeviseDefaut}{F.C.F.A.}% +\fi% +\if@CFP% + \DeclareSIUnit{\DeviseDefaut}{F.C.F.P.}% +\fi% +\if@CHF% + \DeclareSIUnit{\DeviseDefaut}{CHF}% +\fi% +\if@Euro% + \DeclareSIUnit{\DeviseDefaut}{€}% +\fi% +\if@US% + \DeclareSIUnit{\DeviseDefaut}{\Dollar}% +\fi% +\if@UK% + \DeclareSIUnit{\DeviseDefaut}{\LivreSterling}% +\fi% + \RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs %\PassOptionsToPackage{table,svgnames}{xcolor} @@ -88,7 +126,6 @@ \RequirePackage{multido}% \RequirePackage{xlop}% -\RequirePackage{xfp}% \RequirePackage{tcolorbox}% \tcbuselibrary{breakable,external,fitting,hooks,magazine,poster,raster,skins,theorems,listings,listingsutf8} @@ -98,7 +135,7 @@ %https://tex.stackexchange.com/questions/58656/best-way-to-draw-a-chevron-diagram-using-tikz \usetikzlibrary{calc,shapes,arrows,tikzmark,chains,positioning,shapes.symbols,babel,fit,backgrounds}% -\RequirePackage{suffix}%pour la commande étoilée +%\RequirePackage{suffix}%pour la commande étoilée \RequirePackage{multicol}% @@ -107,7 +144,7 @@ \RequirePackage{stackengine}% \RequirePackage[thicklines]{cancel}% -\RequirePackage{fontawesome5}%Pour l'environnement Twitter +\RequirePackage{fontawesome5}% \RequirePackage{pifont}%Pour la commande \Autonomie \RequirePackage{nicematrix}% \NiceMatrixOptions{allow-duplicate-names}% @@ -115,14 +152,14 @@ \let\myoldmulticolumn\multicolumn% \AtBeginEnvironment{tabular}{\let\multicolumn\myoldmulticolumn}% -\RequirePackage{multirow}% +%\RequirePackage{multirow}% \RequirePackage{longtable} \RequirePackage{fmtcount}% \FCloadlang{french}% % https://stackoverflow.com/questions/3391103/how-to-make-the-grayed-round-box-using-tiks -\RequirePackage{environ}% +%\RequirePackage{environ}% %%%%% Quelques besoins particuliers @@ -254,28 +291,6 @@ \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}% @@ -305,7 +320,6 @@ \kern\z@}% \NewDocumentCommand\PfCdotover{}{\leavevmode\cleaders\hb@xt@ .22em{\hss $\cdot$\hss}\hfill\kern\z@}% - \makeatother% \NewDocumentCommand\pointilles{o}{% @@ -519,6 +533,37 @@ \reademptyitems% }% +\newcommand\MelangeListeNewTwo[2]{% + % #1 Liste à mélanger + % #2 Nombre d'éléments à conserver + \setsepchar{,}\ignoreemptyitems% + \readlist*\ListeInter{#1}% +% \xdef\faa{}% Liste construite + \xdef\fii{}% Liste détruite + % on crée les #2 premieres solutions. + \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% + \xintifboolexpr{\ListeInterlen>1}{% + \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% + \ifnum\fpeval{##1}=1\relax + \xdef\faa{\ListeInter[\Alea]}% + \else + \xdef\faa{\faa,\ListeInter[\Alea]}% + \fi + \xdef\fii{}% + \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% + \xintifboolexpr{##2 == \Alea}{% + }{% + \xdef\fii{\fii \ListeInter[##2],}% + }% + }% + }{% + \xdef\faa{\faa \ListeInter[1]}% + }% + \readlist*\ListeInter{\fii}% + }% + \reademptyitems% +}% + %%% % Smiley %%% https://tex.stackexchange.com/questions/3695/smileys-in-latex/227226 @@ -708,12 +753,15 @@ \setsepchar[*]{,*/}\ignoreemptyitems \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{,} +\setsepchar{,}\reademptyitems %Internationalisation \def\PfCSymbolTimes{\times}% \def\PfCSymbolDiv{\div}% +\input{PfCTicketCaisse} +\input{PfCRecyclage} +\input{PfCDontCountDots} \input{PfCConversion} \input{PfCCritere} \input{PfCLego} @@ -842,7 +890,7 @@ %%% \newcommand\Puissances[2]{% \ensuremath{% - \xintifboolexpr{#2==0}{1}{\xintifboolexpr{#2>0}{\xdef\TotalP{\fpeval{#2-1}}#1\multido{\i=1+1}{\TotalP}{\times#1}}{\xdef\TotalP{\fpeval{-#2-1}}\frac{1}{#1\multido{\i=1+1}{\TotalP}{\times#1}}}}% + \xintifboolexpr{#2==0}{1}{\xintifboolexpr{#2>0}{\xdef\TotalP{\fpeval{#2-1}}#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}{\xdef\TotalP{\fpeval{-#2-1}}\frac{1}{#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}}}% }% }% -- cgit v1.2.3