summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-07-05 03:01:22 +0000
committerNorbert Preining <norbert@preining.info>2024-07-05 03:01:22 +0000
commit7f4636810b5bf20c3c7de1e9b0d31a7eaa343c4e (patch)
tree8594600f517be70fb7765174bac8b69e815910c3 /macros/latex
parent747da039704983b2ca6d8d026c5c739b6827b5cb (diff)
CTAN sync 202407050301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx17
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin622167 -> 622160 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex14
-rw-r--r--macros/latex/contrib/profcollege/doc/profcollege-doc.pdf (renamed from macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf)bin10330568 -> 10823654 bytes
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex543
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex20
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCartographie.tex60
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex244
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex26
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex18
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCInfixRPN.sty538
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulJap.tex1
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex10
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex22
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex501
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPixelArt.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex185
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex62
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSolides.tex114
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTortueBase.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCUrneProba.tex928
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty50
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCMonde.mp75
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCObjets.mp53
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdfbin197707 -> 200069 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex100
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdfbin126738 -> 126842 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex16
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdfbin158322 -> 160890 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex16
-rw-r--r--macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty3
-rw-r--r--macros/latex/contrib/spbmark/README.md2
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin93123 -> 92648 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty11
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex111
-rw-r--r--macros/latex/contrib/unbtex/README.md8
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example.pdfbin581659 -> 592915 bytes
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example.tex27
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/anexo-b.tex3
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex10
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/capitulo3.tex10
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/capitulo4.tex4
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/referencias.bib4
-rw-r--r--macros/latex/contrib/unbtex/unbtex.cls85
45 files changed, 3453 insertions, 454 deletions
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 441d0bda0a..c4d3db2acc 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024cm)
+Easily typesetting Chinese theses or books (v2024cn)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 62519599eb..1f3f65eac1 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/06/24}{2024cm}
+\ProvidesExplClass{easybook}{2024/07/03}{2024cn}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/06/24}{2024cm}
+\ProvidesExplPackage{easybase}{2024/07/03}{2024cn}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1658,7 +1658,7 @@
{
tocformat = \IfBooleanT{#1}{\contentsmargin{0pt}},
tocindent = 0pt,
- tocrule = \IfBooleanTF{#1}{,~\thecontentspage}{\tocrule{$\cdot$}},
+ tocrule = \IfBooleanTF{#1}{,~\thecontentspage}{\cdottocrule},
toclabel =
{
\bool_if:NTF \l__eb_toc_entry_hang_bool
@@ -1729,7 +1729,7 @@
\eb@register@every@toc@option
}
\RegisterEveryTocOption{tocafter,tocindent,tocrule}
-\NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}}
+\NewDocumentCommand{\tocrule}{st-O{0.6pc}d()mO{}}
{
\normalsize\normalfont
\ttl@row@i[#3]{\IfValueTF{#4}{\scalebox{#4}{#5}}{#5}}#6
@@ -1746,6 +1746,7 @@
}
}
}
+\cs_set:Npn \cdottocrule { \tocrule{\textperiodcentered} }
\ctex_define:nn { toc }
{
lolskip .skip_set:N = \eb@toc@lol@skip,
@@ -1859,7 +1860,7 @@
{
tocformat = \addvspace{1pc}\sffamily,
tocindent = 0pt,
- tocrule = \tocrule{$\cdot$}[\bfseries],
+ tocrule = \cdottocrule[\bfseries],
tocline = \CTEXnumberline{#1}#2
},
section =
@@ -1869,8 +1870,8 @@
tocrule =
{
\bool_if:NTF \l__eb_class_mode_book_bool
- { \tocrule{$\cdot$} }
- { \tocrule{$\cdot$}[\bfseries] }
+ { \cdottocrule }
+ { \cdottocrule[\bfseries] }
}
},
subsection =
@@ -2633,7 +2634,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/06/24}{2024cm}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/03}{2024cn}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 09ef685a94..638c3e05b6 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 343669865a..43d4afb635 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024cm,
- date = 2024/06/24,
+ version = v2024cn,
+ date = 2024/07/03,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -619,9 +619,9 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\begin{cnltxlist}[itemsep = 0ex]
\keyval{headruleskip}{页眉线间距}\dtag\Default*{0pt}
\keyval{footruleskip}{页脚线间距}\dtag\Default*{3.5pt}
- \kvsplit{hdivide}{左边距,版心文本宽度,右边距}\default{}
+ \kvsplit{hdivide}{左边距,版心宽度,右边距}\default{}
\kvsplit{hmargin}{左边距,右边距}\default{}
- \keyval{textheight}{版心文本高度}\default{}
+ \keyval{textheight}{版心高度}\default{}
\keychoice{nofoot}{true,\fbox{false}}\default{}
\begin{ctexexam}
\ctexset[geo]
@@ -761,11 +761,11 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
fnmarktext-format = \circledtext
}
\end{ctexexam}
- \command{defupfntmark}[\marg{脚注正文标记格式}]
+ \command{defupfntmark}[\marg{正文标记格式}]
定义脚注正文标记的格式,与正文标记编号命令 \cs{theupfootnote} 配合使用。
- \command{defdownfntmark}[\marg{脚注内容标记格式}]
+ \command{defdownfntmark}[\marg{内容标记格式}]
定义脚注内容标记的格式,与内容标记编号命令 \cs{thedownfootnote} 配合使用。
- \command{deffntpara}[\marg{脚注段落文本格式}]
+ \command{deffntpara}[\marg{段落文本格式}]
定义脚注段落文本的格式的命令。脚注段落文本由脚注内容标记和文本两部分组成,段落格式定义中参数 \code{\#1} 代表内容文本。
\command{notminipage}[\marg{普通页内容}\marg{迷你页内容}]
用于在定义脚注标记的命令中判断当前脚注是否处于迷你页而输出不同的内容。
diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf
index dcd5987717..c684b9fff8 100644
--- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
+++ b/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex b/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex
new file mode 100644
index 0000000000..4113ae9a27
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex
@@ -0,0 +1,543 @@
+%%%
+% Arbre de calculs
+%%%
+\newtoks\toklistearbre%
+\newtoks\toklistearbrefractions%
+\newtoks\toklistearbreexpressions%
+
+\def\UpdatetoksArbreCalcul#1\nil{\IfDecimal{#1}{\addtotok\toklistearbre{#1,}}{\addtotok\toklistearbre{"#1",}}}%
+\def\UpdatetoksArbreFractions#1\nil{\addtotok\toklistearbrefractions{"#1",}}%
+\def\UpdatetoksArbreExpressions#1\nil{\addtotok\toklistearbreexpressions{"#1",}}%
+
+\setKVdefault[ArbreCalcul]{Correction=false,Couleur=LightSteelBlue,Substitue=7,Litteral=false,Largeur=8mm,LargeurC=8mm,Ecart=1.5cm,Hauteur=10mm,Lettre="x",CouleurDepart=LightGreen,Fractions=false,Nombres={},Expressions={},Etape=infinity}%
+\defKV[ArbreCalcul]{Fraction=\setKV[ArbreCalcul]{Fractions}}%
+
+\NewDocumentCommand\ArbreCalcul{om}{%
+ \useKVdefault[ArbreCalcul]%
+ \setKV[ArbreCalcul]{#1}%
+ \toklistearbre{}%
+ \toklistearbrefractions{}%
+ \toklistearbreexpressions{}%
+ \infixtoRPN{#2}%
+ \setsepchar{ }\ignoreemptyitems%
+ \readlist*\ListeNombres{\RPN}%
+ \reademptyitems%
+ \foreachitem\compteur\in\ListeNombres{\expandafter\UpdatetoksArbreCalcul\compteur\nil}%
+ \ifboolKV[ArbreCalcul]{Fractions}{%
+ \xdef\Foo{\useKV[ArbreCalcul]{Nombres}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeFractions{\Foo}%
+ \reademptyitems
+ \foreachitem\compteur\in\ListeFractions{\expandafter\UpdatetoksArbreFractions\compteur\nil}%
+ \BuildArbreCalculFraction{\the\toklistearbre}{\the\toklistearbrefractions}%
+ }{%
+ \ifboolKV[ArbreCalcul]{Litteral}{
+ \xdef\Foo{\useKV[ArbreCalcul]{Nombres}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeFractions{\Foo}%
+ \reademptyitems
+ \foreachitem\compteur\in\ListeFractions{\expandafter\UpdatetoksArbreFractions\compteur\nil}%
+ \xdef\Foo{\useKV[ArbreCalcul]{Expressions}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeExpressions{\Foo}%
+ \reademptyitems
+ \foreachitem\compteur\in\ListeExpressions{\expandafter\UpdatetoksArbreExpressions\compteur\nil}%
+% listarbre : \the\toklistearbre%
+%
+% listfracions : \the\toklistearbrefractions
+%
+% listexpressions : \the\toklistearbreexpressions
+ \BuildArbreCalculLitteral{\the\toklistearbre}{\the\toklistearbrefractions}{\the\toklistearbreexpressions}%
+ }{%
+ \BuildArbreCalcul{\the\toklistearbre}%
+ }%
+ }%
+}%
+
+\NewDocumentCommand\BuildArbreCalcul{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Correction,Litteral,Allume[];
+ Correction=\useKV[ArbreCalcul]{Correction};
+ Litteral=\useKV[ArbreCalcul]{Litteral};
+
+ NombreSubstitue=\useKV[ArbreCalcul]{Substitue};
+
+ etape=0;
+ Etape=\useKV[ArbreCalcul]{Etape};
+
+ color Evidence,CoulDepart;
+ Evidence=\useKV[ArbreCalcul]{Couleur};
+ CoulDepart=\useKV[ArbreCalcul]{CouleurDepart};
+
+ pair pointprec;
+
+ path base[];
+ base1=unitsquare xscaled \useKV[ArbreCalcul]{Largeur} yscaled 5mm;
+ base2=fullcircle scaled 5mm;
+ base3=unitsquare xscaled \useKV[ArbreCalcul]{LargeurC} yscaled 5mm;
+
+ vardef BlocCalcul(expr Ba,Bb,op,cha,chb)=%
+ % Ba point gauche
+ % Bb point droite
+ % op opération à afficher
+ etape:=etape+1;
+ save $;
+ picture $;
+ path cc[];
+ pair Bc;
+ Bc=(0.5*(xpart(Ba)+xpart(Bb)),if ypart(Bb)<ypart(Ba):ypart(Bb) else:ypart(Ba) fi -0.75u);
+ pointprec:=Bc+u*(0,-0.75);
+ $=image(
+ if Allume[numeropoint-1]=true:
+ cc1=base3 shifted (Ba-center base3);
+ else:
+ cc1=base1 shifted (Ba-center base1);
+ fi;
+ if Allume[numeropoint]=true:
+ cc2=base3 shifted (Bb-center base3);
+ else:
+ cc2=base1 shifted (Bb-center base1);
+ fi;
+
+ cc3=(fullcircle scaled 5mm) shifted Bc;
+ cc4=base3 shifted (pointprec-center base3);
+ if op="mul":
+ label(TEX("$\times$"),Bc);
+ ValeurPile[numeropoint-1]:=cha*chb;
+ elseif op="add":
+ label(TEX("$+$"),Bc);
+ ValeurPile[numeropoint-1]:=cha+chb;
+ elseif op="sub":
+ label(TEX("$\_$"),Bc);
+ ValeurPile[numeropoint-1]:=cha-chb;
+ elseif op="div":
+ label(TEX("$\div$"),Bc);
+ ValeurPile[numeropoint-1]:=cha/chb;
+ fi;
+ if Correction:
+ if etape<Etape+1:
+ fill cc4 withcolor Evidence;
+ label(TEX("\num{"&decimal(ValeurPile[numeropoint-1])&"}"),pointprec);
+ fi;
+ fi;
+ for l=1 upto 4:
+ trace cc[l];
+ endfor;
+ draw (Ba--Bc) cutbefore cc1 cutafter cc3;
+ draw (Bb--Bc) cutbefore cc2 cutafter cc3;
+ draw (Bc--pointprec) cutbefore cc3 cutafter cc4;
+ );
+ $
+ enddef;
+
+ numeric Valeurs[];
+ numeric Valeursa[];
+
+ string Operations[];
+
+ numeric numeropoint;
+ numeropoint=0;
+
+ numeric ValeurPile[];
+
+ vardef RecupDonnees(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if numeric p_:
+ Valeurs[n]=p_;
+ Operations[n]="";
+ else:
+ Valeurs[n]=infinity;
+ Operations[n]=p_;
+ fi;
+ endfor;
+ n:=n+1;
+ Operations[n]="stop";
+ nbtotal=n;
+ for k=1 upto nbtotal:
+ ValeurPile[k]=0;
+ endfor;
+ enddef;
+
+ pair A[];
+ ecart=\useKV[ArbreCalcul]{Ecart};
+
+ RecupDonnees(#1);
+
+ A[0]=(0,0);
+ k=0;
+ nbetape:=0;
+
+ for p_=#1:
+ k:=k+1;
+ if numeric p_:
+ numeropoint:=numeropoint+1;
+ if unknown A[numeropoint]:A[numeropoint]-A[numeropoint-1]=ecart*(1,0);Allume[numeropoint]=false; else:
+ A[numeropoint]:=A[numeropoint-1]+ecart*(1,0); Allume[numeropoint]:=false;
+ fi;
+ if Valeurs[k]=0:Valeursa[k]:=NombreSubstitue else: Valeursa[k]=Valeurs[k] fi;
+ if Operations[k+1]="neg":
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart; if Litteral:
+ label(TEX("$\useKV[ArbreCalcul]{Lettre}$"),A[numeropoint]);
+ else:
+ label(TEX("\num{"&decimal(-Valeursa[k])&"}"),A[numeropoint]);
+ fi;
+ else:
+ label(TEX("\num{"&decimal(-Valeursa[k])&"}"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=-Valeursa[k];
+ else:
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart;if Litteral:
+ label(TEX("$\useKV[ArbreCalcul]{Lettre}$"),A[numeropoint]);
+ else:
+ label(TEX("\num{"&decimal(Valeursa[k])&"}"),A[numeropoint]);
+ fi;
+ else:
+ label(TEX("\num{"&decimal(Valeursa[k])&"}"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=Valeursa[k];
+ fi;
+ elseif string p_:
+ if p_<>"neg":
+ trace BlocCalcul(A[numeropoint-1],A[numeropoint],Operations[k],ValeurPile[numeropoint-1],ValeurPile[numeropoint]);
+ A[numeropoint-1]:=pointprec;
+ Allume[numeropoint-1]:=true;
+ numeropoint:=numeropoint-1;
+ fi;
+ fi;
+ endfor;
+ \end{mplibcode}
+ \fi
+}%
+
+\NewDocumentCommand\BuildArbreCalculFraction{mm}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Correction,Allume[];
+ Correction=\useKV[ArbreCalcul]{Correction};
+
+ string Fraction;
+ Fraction=\useKV[ArbreCalcul]{Fraction};
+
+ color Evidence,CoulDepart;
+ Evidence=\useKV[ArbreCalcul]{Couleur};
+ CoulDepart=\useKV[ArbreCalcul]{CouleurDepart};
+
+ pair pointprec;
+
+ path base[];
+ base1=unitsquare xscaled \useKV[ArbreCalcul]{Largeur} yscaled \useKV[ArbreCalcul]{Hauteur};
+ base2=fullcircle scaled 5mm;
+ base3=unitsquare xscaled \useKV[ArbreCalcul]{LargeurC} yscaled \useKV[ArbreCalcul]{Hauteur};
+
+ vardef BlocCalcul(expr Ba,Bb,op,cha,chb)=%
+ % Ba point gauche
+ % Bb point droite
+ % op opération à afficher
+ etape:=etape+1;
+ save $;
+ picture $;
+ path cc[];
+ pair Bc;
+ Bc=(0.5*(xpart(Ba)+xpart(Bb)),if ypart(Bb)<ypart(Ba):ypart(Bb) else:ypart(Ba) fi -0.75u);
+ pointprec:=Bc+u*(0,-1.25);
+ $=image(
+ if Allume[numeropoint-1]=true:
+ cc1=base3 shifted (Ba-center base3);
+ else:
+ cc1=base1 shifted (Ba-center base1);
+ fi;
+ if Allume[numeropoint]=true:
+ cc2=base3 shifted (Bb-center base3);
+ else:
+ cc2=base1 shifted (Bb-center base1);
+ fi;
+ cc3=(fullcircle scaled 5mm) shifted Bc;
+ cc4=base3 shifted (pointprec-center base3);
+ if op="mul":
+ label(TEX("$\times$\MulFraction[Seul][3]{"&cha&"}{"&chb&"}[\ResultatMul]"),Bc);
+ ValeurPile[numeropoint-1]:="\ResultatMul";
+ elseif op="add":
+ label(TEX("$+$\AddFraction[Seul][3]{"&cha&"}{"&chb&"}[\ResultatAdd]"),Bc);
+ ValeurPile[numeropoint-1]:="\ResultatAdd";
+ elseif op="sub":
+ label(TEX("$\_$\SousFraction[Seul][3]{"&cha&"}{"&chb&"}[\ResultatSous]"),Bc);
+ ValeurPile[numeropoint-1]:="\ResultatSous";
+ elseif op="div":
+ label(TEX("$\div$\DivFraction[Seul][3]{"&cha&"}{"&chb&"}[\ResultatDiv]"),Bc);
+ ValeurPile[numeropoint-1]:="\ResultatDiv";
+ fi;
+ if Correction:
+ if etape<Etape+1:
+ fill cc4 withcolor Evidence;
+ label(TEX("$\displaystyle\tofrac{"&ValeurPile[numeropoint-1]&"}$"),pointprec);
+ fi;
+ fi;
+ for l=1 upto 4:
+ trace cc[l];
+ endfor;
+ draw (Ba--Bc) cutbefore cc1 cutafter cc3;
+ draw (Bb--Bc) cutbefore cc2 cutafter cc3;
+ draw (Bc--pointprec) cutbefore cc3 cutafter cc4;
+ );
+ $
+ enddef;
+
+ numeric Valeurs[];
+ string Valeursa[];
+
+ string Operations[];
+
+ numeric numeropoint;
+ numeropoint=0;
+
+ string ValeurPile[];
+
+ vardef RecupDonnees(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if numeric p_:
+ Valeurs[n]=p_;
+ Operations[n]="";
+ else:
+ Valeurs[n]=infinity;
+ Operations[n]=p_;
+ fi;
+ endfor;
+ n:=n+1;
+ Operations[n]="stop";
+ nbtotal=n;
+ for k=1 upto nbtotal:
+ ValeurPile[k]="0";
+ endfor;
+ enddef;
+
+ vardef RecupFractions(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Valeursa[n]=p_;
+ endfor;
+ enddef;
+
+ pair A[];
+ ecart=\useKV[ArbreCalcul]{Ecart};
+
+ RecupDonnees(#1);
+ RecupFractions(#2);
+
+ etape=0;
+ Etape=\useKV[ArbreCalcul]{Etape};
+
+ A[0]=(0,0);
+ k=0;
+ nbetape:=0;
+
+ for p_=#1:
+ k:=k+1;
+ if numeric p_:
+ numeropoint:=numeropoint+1;
+ if unknown A[numeropoint]:A[numeropoint]-A[numeropoint-1]=ecart*(1,0);Allume[numeropoint]=false; else:
+ A[numeropoint]:=A[numeropoint-1]+ecart*(1,0); Allume[numeropoint]:=false;
+ fi;
+ if Valeurs[k]=0:Valeursa[Valeurs[k]]:=\useKV[ArbreCalcul]{Fraction} fi;
+ if Operations[k+1]="neg":
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart;
+ label(TEX("$\displaystyle\tofrac{"&-Valeursa[Valeurs[k]]&"}$"),A[numeropoint]);
+ else:
+ label(TEX("$\displaystyle\tofrac{"&-Valeursa[Valeurs[k]]&"}$"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=decimal(-Valeursa[Valeurs[k]]);
+ else:
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart;
+ label(TEX("$\displaystyle\tofrac{"&Valeursa[Valeurs[k]]&"}$"),A[numeropoint]);
+ else:
+ label(TEX("$\displaystyle\tofrac{"&Valeursa[Valeurs[k]]&"}$"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=Valeursa[Valeurs[k]];
+ fi;
+ elseif string p_:
+ if p_<>"neg":
+ trace BlocCalcul(A[numeropoint-1],A[numeropoint],Operations[k],ValeurPile[numeropoint-1],ValeurPile[numeropoint]);
+ A[numeropoint-1]:=pointprec;
+ Allume[numeropoint-1]:=true;
+ numeropoint:=numeropoint-1;
+ fi;
+ fi;
+ endfor;
+ \end{mplibcode}
+ \fi
+}%
+
+\NewDocumentCommand\BuildArbreCalculLitteral{mmm}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Correction,Allume[];
+ Correction=\useKV[ArbreCalcul]{Correction};
+
+ color Evidence,CoulDepart;
+ Evidence=\useKV[ArbreCalcul]{Couleur};
+ CoulDepart=\useKV[ArbreCalcul]{CouleurDepart};
+
+ pair pointprec;
+
+ path base[];
+ base1=unitsquare xscaled \useKV[ArbreCalcul]{Largeur} yscaled \useKV[ArbreCalcul]{Hauteur};
+ base2=fullcircle scaled 5mm;
+ base3=unitsquare xscaled \useKV[ArbreCalcul]{LargeurC} yscaled \useKV[ArbreCalcul]{Hauteur};
+
+ vardef BlocCalcul(expr Ba,Bb,op,cha,chb)=%
+ % Ba point gauche
+ % Bb point droite
+ % op opération à afficher
+ etape:=etape+1;
+ save $;
+ picture $;
+ path cc[];
+ pair Bc;
+ Bc=(0.5*(xpart(Ba)+xpart(Bb)),if ypart(Bb)<ypart(Ba):ypart(Bb) else:ypart(Ba) fi -0.75u);
+ pointprec:=Bc+u*(0,-1.25);
+ $=image(
+ if Allume[numeropoint-1]=true:
+ cc1=base3 shifted (Ba-center base3);
+ else:
+ cc1=base1 shifted (Ba-center base1);
+ fi;
+ if Allume[numeropoint]=true:
+ cc2=base3 shifted (Bb-center base3);
+ else:
+ cc2=base1 shifted (Bb-center base1);
+ fi;
+ cc3=(fullcircle scaled 5mm) shifted Bc;
+ cc4=base3 shifted (pointprec-center base3);
+ if op="mul":
+ label(TEX("$\times$"),Bc);
+ ValeurPile[numeropoint-1]:="";
+ elseif op="add":
+ label(TEX("$+$"),Bc);
+ ValeurPile[numeropoint-1]:="";
+ elseif op="sub":
+ label(TEX("$\_$"),Bc);
+ ValeurPile[numeropoint-1]:="";
+ elseif op="div":
+ label(TEX("$\div$"),Bc);
+ ValeurPile[numeropoint-1]:="";
+ fi;
+ if Correction:
+ if etape<Etape+1:
+ fill cc4 withcolor Evidence;
+ label(TEX("$"&Valeursc[etape]&"$"),pointprec);
+ fi;
+ fi;
+ for l=1 upto 4:
+ trace cc[l];
+ endfor;
+ draw (Ba--Bc) cutbefore cc1 cutafter cc3;
+ draw (Bb--Bc) cutbefore cc2 cutafter cc3;
+ draw (Bc--pointprec) cutbefore cc3 cutafter cc4;
+ );
+ $
+ enddef;
+
+ numeric Valeurs[];
+ string Valeursa[];
+ string Valeursc[];
+
+ string Operations[];
+
+ numeric numeropoint;
+ numeropoint=0;
+
+ string ValeurPile[];
+
+ vardef RecupDonnees(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if numeric p_:
+ Valeurs[n]=p_;
+ Operations[n]="";
+ else:
+ Valeurs[n]=infinity;
+ Operations[n]=p_;
+ fi;
+ endfor;
+ n:=n+1;
+ Operations[n]="stop";
+ nbtotal=n;
+ for k=1 upto nbtotal:
+ ValeurPile[k]="0";
+ endfor;
+ enddef;
+
+ vardef RecupFractions(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Valeursa[n]=p_;
+ endfor;
+ enddef;
+
+ vardef RecupCorrections(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Valeursc[n]=p_;
+ endfor;
+ enddef;
+
+ pair A[];
+ ecart=\useKV[ArbreCalcul]{Ecart};
+
+ RecupDonnees(#1);
+ RecupFractions(#2);
+ RecupCorrections(#3);
+
+ etape=0;
+ Etape=\useKV[ArbreCalcul]{Etape};
+
+ A[0]=(0,0);
+ k=0;
+ nbetape:=0;
+
+ for p_=#1:
+ k:=k+1;
+ if numeric p_:
+ numeropoint:=numeropoint+1;
+ if unknown A[numeropoint]:A[numeropoint]-A[numeropoint-1]=ecart*(1,0);Allume[numeropoint]=false; else:
+ A[numeropoint]:=A[numeropoint-1]+ecart*(1,0); Allume[numeropoint]:=false;
+ fi;
+ if Valeurs[k]=0:Valeursa[Valeurs[k]]:=\useKV[ArbreCalcul]{Lettre} fi;
+ if Operations[k+1]="neg":
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart;
+ label(TEX("$"&-Valeursa[Valeurs[k]]&"$"),A[numeropoint]);
+ else:
+ label(TEX("$"&-Valeursa[Valeurs[k]]&"$"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=decimal(-Valeursa[Valeurs[k]]);
+ else:
+ if Valeurs[k]=0:fill (base1 shifted (A[numeropoint]-center base1)) withcolor CoulDepart;
+ label(TEX("$"&Valeursa[Valeurs[k]]&"$"),A[numeropoint]);
+ else:
+ label(TEX("$"&Valeursa[Valeurs[k]]&"$"),A[numeropoint]);
+ fi;
+ ValeurPile[numeropoint]:=Valeursa[Valeurs[k]];
+ fi;
+ elseif string p_:
+ if p_<>"neg":
+ trace BlocCalcul(A[numeropoint-1],A[numeropoint],Operations[k],ValeurPile[numeropoint-1],ValeurPile[numeropoint]);
+ A[numeropoint-1]:=pointprec;
+ Allume[numeropoint-1]:=true;
+ numeropoint:=numeropoint-1;
+ fi;
+ fi;
+ endfor;
+ \end{mplibcode}
+ \fi
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex b/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
index fdf037ef81..e3660cff1e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
@@ -1,4 +1,4 @@
-\setKVdefault[CalculsFractions]{Couleurs=false,Negatif=false}%
+\setKVdefault[CalculsFractions]{Couleurs=false,Negatif=false,Seul=false}%
\defKV[CalculsFractions]{Couleur=\setKV[CalculsFractions]{Couleurs}\setKV[ClesSimplification]{Couleur=#1}}%
\NewDocumentCommand\tofrac{m}{%
@@ -50,7 +50,7 @@
\xdef\PfCNumD{1}%
}{%
\StrCut{#5}{/}\PfCNumC\PfCNumD%
- }
+ }%
\xdef\PfCAddFoo{\PfCNumA/\PfCNumB,\PfCNumC/\PfCNumD}%
\setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\ListeFractions{\PfCAddFoo}%
@@ -69,6 +69,7 @@
\xdef\PfCAddDenoSimp{\fpeval{\PfCAddDenoFin/\PfCAddPgcd}}%
\xdef\PfCAddSumSimp{\PfCAddNumSimp/\PfCAddDenoSimp}%
\IfValueT{#6}{\xdef#6{\PfCAddSumSimp}}%
+ \ifboolKV[CalculsFractions]{Seul}{}{%
% Partie affichage
\ensuremath{%
\IfValueTF{#3}{%
@@ -103,6 +104,7 @@
}{\tofrac{#4}\PfCFractionOp\tofrac{#5}
}%
}%
+ }%
}%
\NewDocumentCommand\SousFraction{oommo}{%
@@ -127,17 +129,18 @@
\xdef\PfCMulFoo{\PfCNumA/\PfCNumB,\PfCNumC/\PfCNumD}%
\setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\ListeFractions{\PfCMulFoo}%
- \reademptyitems
+ \reademptyitems%
\setsepchar{,}%
% Calculs
- \xdef\PfCMulNumFin{\fpeval{(\ListeFractions[1,1])*(\ListeFractions[2,1])}}
- \xdef\PfCMulDenoFin{\fpeval{\ListeFractions[1,2]*\ListeFractions[2,2]}}
+ \xdef\PfCMulNumFin{\fpeval{(\ListeFractions[1,1])*(\ListeFractions[2,1])}}%
+ \xdef\PfCMulDenoFin{\fpeval{\ListeFractions[1,2]*\ListeFractions[2,2]}}%
\PGCD{\fpeval{abs(\PfCMulNumFin)}}{\fpeval{abs(\PfCMulDenoFin)}}\xdef\PfCMulPgcd{\pgcd}%
\xdef\PfCMulNumSimp{\fpeval{\PfCMulNumFin/\PfCMulPgcd}}%
\xdef\PfCMulDenoSimp{\fpeval{\PfCMulDenoFin/\PfCMulPgcd}}%
\xdef\PfCMulPdtSimp{\PfCMulNumSimp/\PfCMulDenoSimp}%
\IfValueT{#5}{\xdef#5{\PfCMulPdtSimp}}%
- \ensuremath{%
+ \ifboolKV[CalculsFractions]{Seul}{}{%
+ \ensuremath{%
\IfValueTF{#2}{%
\ifnum#2=3\relax
\ifboolKV[CalculsFractions]{Negatif}{%
@@ -154,7 +157,8 @@
\fi
\fi
}{\tofrac{#3}\times\tofrac{#4}
- }
+ }%
+ }%
}%
}%
@@ -186,6 +190,7 @@
\xdef\PfCDivDenoSimp{\fpeval{\PfCDivDenoFin/\PfCDivPgcd}}%
\xdef\PfCDivPdtSimp{\PfCDivNumSimp/\PfCDivDenoSimp}%
\IfValueT{#5}{\xdef#5{\PfCDivPdtSimp}}%
+ \ifboolKV[CalculsFractions]{Seul}{}{%
\ensuremath{%
\IfValueTF{#2}{%
\ifnum#2=4\relax
@@ -207,4 +212,5 @@
}{\tofrac{#3}\div\tofrac{#4}
}
}%
+ }%
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCCartographie.tex b/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
index 2b5ef28fbc..e23001bbcc 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
@@ -1,7 +1,7 @@
%%%
% Cartographie
%%%
-\setKVdefault[Cartographie]{Echelle=1,Carte=false,All=false,Europe=false,Asie=false,Amsud=false,Amnord=false,Amcentre=false,Caraibes=false,Afrique=false,AfficheEchelle=false,PaysSeul=false,VillesSup=false,VillesSupI=false,Capitales=false,Impression=false,Fleuves=false,CouleurFond=ciel,Largeur=12,Hauteur=12,Arborescence="/usr/local/texlive/2023/texmf-dist/metapost/profcollege/",Projection=false,TypeProjection="mercator",CouleurPays=Cornsilk,Pasl=2,PasL=2,Codes=false,Epaisseur=2,ModeleCouleur=5,Boussole=false,Allegee=1}
+\setKVdefault[Cartographie]{Echelle=1,Carte=false,All=false,Europe=false,Asie=false,Amsud=false,Amnord=false,Amcentre=false,Caraibes=false,Afrique=false,AfficheEchelle=false,PaysSeul=false,VillesSup=false,VillesSupI=false,Capitales=false,Impression=false,Fleuves=false,CouleurFond=ciel,Largeur=12,Hauteur=12,Arborescence="/usr/local/texlive/2023/texmf-dist/metapost/profcollege/",Projection=false,TypeProjection="mercator",CouleurPays=Cornsilk,Pasl=2,PasL=2,Codes=false,Epaisseur=2,ModeleCouleur=5,Boussole=false,Allegee=1,Maillage=false}
\defKV[Cartographie]{EchelleCarte=\setKV[Cartographie]{Carte}}
\defKV[Cartographie]{Pays=\setKV[Cartographie]{PaysSeul}}
\defKV[Cartographie]{Villes=\setKV[Cartographie]{VillesSup}}
@@ -13,8 +13,8 @@
\useKVdefault[Cartographie]%
\setKV[Cartographie]{#1}%
\mplibforcehmode%
+ \mplibnumbersystem{double}%
\ifboolKV[Cartographie]{Projection}{%
- \mplibnumbersystem{double}%
\begin{mplibcode}
input PfCMonde;
string arborescence;
@@ -217,9 +217,8 @@
Villes(\useKV[Cartographie]{VillesI});
fi;
\end{mplibcode}
- \mplibnumbersystem{scaled}%
}{%
-% \mplibforcehmode
+ % \mplibforcehmode
\begin{mplibcode}
input PfCMonde;
@@ -253,9 +252,11 @@
fi;
else:
couleurfond:=\useKV[Cartographie]{CouleurFond};
+ color couleurimpression;
+ couleurimpression:=Cornsilk;
if Impression:
noncolore:=true;
- payscolor:=0.85white;
+ payscolor:=couleurimpression;%0.85white
couleurfond:=white;
couleurfleuve:=couleurfond;
fi;
@@ -314,8 +315,7 @@
elseif t=8:lrt
fi
enddef;
-
-
+
if Carte:
Echelle:=\useKV[Cartographie]{AfficheEchelle};
figure(-0.5u*LargeurCadre,-0.5u*HauteurCadre,0.5u*LargeurCadre,0.5u*HauteurCadre);
@@ -365,11 +365,53 @@
fi;
else:
- draw(0,0)--(50,50);
- mappemonde(#2,#3);
+ boolean maillagecoord;
+ maillagecoord=\useKV[Cartographie]{Maillage};
+ if VillesSupI:
+ lacs:=false;
+ fi;
+
+ mappemonde(#2,#3);
+
+ vardef Villes(text t)=
+ pair CoordVille;
+ string NomVille;
+ n:=0;
+ for p_:=t:
+ n:=n+1;
+ if n=1:
+ %nblec:=p;
+ else:
+ if pair p_:
+ CoordVille:=Projgeo(rayon*(cosd(ypart(p_))*cosd(xpart(p_)),cosd(ypart(p_))*sind(xpart(p_)),sind(ypart(p_))));
+ elseif string p_:
+ NomVille:=p_;
+ else:
+ marque_p:="croix";
+ pointe(CoordVille);
+ label.position(p_)(TEX(""&NomVille&""),CoordVille);
+ fi;
+ fi;
+ endfor;
+ drawoptions();
+ enddef;
+
+
+ if Codes:
+ \useKV[Cartographie]{Traces};
+ fi;
+ if VillesSupI:
+ Villes(\useKV[Cartographie]{VillesI});
+ label.ulft(TEX("\tiny\ang{0}"),Projgeo(rayon*(1,0,0)));
+ label.ulft(TEX("\tiny\ang{10}"),Projgeo(rayon*(cosd(10),0,sind(10))));
+ fill (fullcircle scaled 0.75mm) shifted Projgeo(rayon*(cosd(10),0,sind(10)));
+ label.llft(TEX("\tiny\ang{10}"),Projgeo(rayon*(cosd(10),sind(10),0)));
+ fill (fullcircle scaled 0.75mm) shifted Projgeo(rayon*(cosd(10),sind(10),0));
+ fi;
fi;
\end{mplibcode}
}
+ \mplibnumbersystem{scaled}%
\else
\PackageWarning{ProfCollege}{"La commande Cartographie n'est compatible qu'avec LuaLaTeX."}
\fi
diff --git a/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex b/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
index 6fc7a94593..f39b93ea46 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
@@ -1,7 +1,7 @@
%%%
% QCM
%%%
-\setKVdefault[ClesQCM]{Reponses=3,Solution=false,Stretch=1,Largeur=60pt,Couleur=gray!15,Titre=false,Nom=R\'eponse,NomV=Vrai,NomF=Faux,Alph=false,AlphT=false,VF=false,Depart=1,Alterne=false,Noms={A/B/C},Multiple=false,Parties={Yeux,Nez,Bouche},CouleurAlt=gray!15,Seul=false}%
+\setKVdefault[ClesQCM]{Reponses=3,Solution=false,Stretch=1,Largeur=60pt,Couleur=gray!15,Titre=false,Nom=R\'eponse,NomV=Vrai,NomF=Faux,Alph=false,AlphT=false,VF=false,Depart=1,Alterne=false,Noms={A/B/C},Multiple=false,Parties={Yeux,Nez,Bouche},CouleurAlt=gray!15,Seul=false,ACompleter=false}%
\newlength{\LargeurQCM}%
\newlength{\PfCLargeurQCM}%
\newcounter{QuestionQCM}%
@@ -12,6 +12,8 @@
\setcounter{TotalQCMSeul}{0}%
\setcounter{TotalQCMSeulSol}{0}%
%
+\def\PfCTexteReponseEleve{Ma réponse}%
+%
\setKVdefault[QCMSeul]{Melange=false,Solution=false,EnColonne=false,LabelLettre=false}%
\defKV[QCMSeul]{Colonnes=\setKV[QCMSeul]{EnColonne}}%
%
@@ -90,150 +92,162 @@
%
\ifdef{\QCM}{%
\PackageWarning{ProfCollege}{La commande \noexpand\QCM étant définie par la classe du document, ProfCollege modifie sa commande \noexpand\QCM en \noexpand\QCMPfC.}%
- \newcommand\QCMPfC[2][]{%
- \useKVdefault[ClesQCM]%
- \setKV[ClesQCM]{#1}%
- \ifboolKV[ClesQCM]{Seul}{%
- \QCMSeul[#1]{#2}%
+\newcommand\QCMPfC[2][]{%
+ \useKVdefault[ClesQCM]%
+ \setKV[ClesQCM]{#1}%
+ \ifboolKV[ClesQCM]{Seul}{%
+ \QCMSeul[#1]{#2}%
+ }{%
+ \colorlet{PfCCouleurAlterneQCM}{\useKV[ClesQCM]{CouleurAlt}}%
+ \setcounter{QuestionQCM}{\fpeval{\useKV[ClesQCM]{Depart}-1}}%
+ \setcounter{TitreQCM}{0}
+ \setsepchar[*]{,*&}\ignoreemptyitems%
+ \readlist*\ListeQCM{#2}%
+ \renewcommand{\arraystretch}{\useKV[ClesQCM]{Stretch}}%
+ \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
+ \ifboolKV[ClesQCM]{Multiple}{%
+ \setlength{\LargeurQCM}{\fpeval{(\linewidth-\useKV[ClesQCM]{Reponses}*(3*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
+ \xdef\ListeNom{\useKV[ClesQCM]{Noms}}%
+ \setsepchar[*]{/}%
+ \readlist*\ListeNomsMul{\ListeNom}%
+ \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
+ \cline{2-\NBcases}%
+ \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ListeNomsMul[##2]}%
+ \\
+ \hline%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
+ \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{\ListeQCM[##1,\fpeval{##2+1}]==1}{$\boxtimes$}{$\square$}}{$\square$}%
+ }\\
+ }%
+ \hline%
+ \end{tabular}%
+ \renewcommand{\arraystretch}{1}%
}{%
- \colorlet{PfCCouleurAlterneQCM}{\useKV[ClesQCM]{CouleurAlt}}%
- \setcounter{QuestionQCM}{\fpeval{\useKV[ClesQCM]{Depart}-1}}%
- \setcounter{TitreQCM}{0}
- \setsepchar[*]{,*&}\ignoreemptyitems%
- \readlist*\ListeQCM{#2}%
- \renewcommand{\arraystretch}{\useKV[ClesQCM]{Stretch}}%
- \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
- \ifboolKV[ClesQCM]{Multiple}{%
- \setlength{\LargeurQCM}{\fpeval{(\linewidth-\useKV[ClesQCM]{Reponses}*(3*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
- \xdef\ListeNom{\useKV[ClesQCM]{Noms}}%
- \setsepchar[*]{/}%
- \readlist*\ListeNomsMul{\ListeNom}%
+ \ifboolKV[ClesQCM]{VF}{%
+ \setKV[ClesQCM]{Reponses=2}%
+ \setlength{\PfCLargeurQCM}{\useKV[ClesQCM]{Largeur}}%
+ \setlength{\LargeurQCM}{\linewidth-6\tabcolsep-2\PfCLargeurQCM-4\arrayrulewidth}%
+ \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
\begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
\cline{2-\NBcases}%
- \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ListeNomsMul[##2]}%
- \\
+ \multicolumn{1}{c|}{}&\useKV[ClesQCM]{NomV}&\useKV[ClesQCM]{NomF}\\
\hline%
\xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
\stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{\ListeQCM[##1,\fpeval{##2+1}]==1}{$\boxtimes$}{$\square$}}{$\square$}%
- }\\
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{##2==\ListeQCM[##1,2]}{$\boxtimes$}{$\square$}}{$\square$}%
+ }\\
}%
\hline%
- \end{tabular}%
- \renewcommand{\arraystretch}{1}%
+ \end{tabular}
}{%
- \ifboolKV[ClesQCM]{VF}{%
- \setKV[ClesQCM]{Reponses=2}%
- % \renewcommand{\arraystretch}{\useKV[ClesQCM]{Stretch}}%
- \setlength{\PfCLargeurQCM}{\useKV[ClesQCM]{Largeur}}%
- \setlength{\LargeurQCM}{\linewidth-6\tabcolsep-2\PfCLargeurQCM-4\arrayrulewidth}%
- \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
- \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
- \cline{2-\NBcases}%
- \multicolumn{1}{c|}{}&\useKV[ClesQCM]{NomV}&\useKV[ClesQCM]{NomF}\\
- \hline%
- \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
- \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{##2==\ListeQCM[##1,2]}{$\boxtimes$}{$\square$}}{$\square$}%
- }\\
- }%
- \hline%
- \end{tabular}
+ \ifboolKV[ClesQCM]{ACompleter}{%
+ \xdef\PfCTotalCases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
}{%
- \setlength{\LargeurQCM}{\fpeval{(\linewidth-2*\tabcolsep-\useKV[ClesQCM]{Reponses}*(2*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
- \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
- \ifboolKV[ClesQCM]{Titre}{\cline{2-\NBcases}%
- \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\stepcounter{TitreQCM}\useKV[ClesQCM]{Nom} \ifboolKV[ClesQCM]{AlphT}{\Alph{TitreQCM}}{##2}}%
- \\
- }{}
- \hline%
- \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
- \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\PfCSolCellColor{##1}{##2}}{}\ListeQCM[##1,##2+1]%
- }\\
- }%
- \hline%
- \end{tabular}%
+ \xdef\PfCTotalCases{\useKV[ClesQCM]{Reponses}}%
}%
+ \setlength{\LargeurQCM}{\fpeval{(\linewidth-2*\tabcolsep-\PfCTotalCases*(2*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
+ \xdef\NumeroReponse{\fpeval{\useKV[ClesQCM]{Reponses}+2}}%
+ \begin{tabular}{|p{\LargeurQCM}|*{\PfCTotalCases}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
+ % \ifboolKV[ClesQCM]{Titre}{\cline{2-\NBcases}%
+ \ifboolKV[ClesQCM]{Titre}{\cline{2-\fpeval{\PfCTotalCases+1}}%
+ \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\stepcounter{TitreQCM}\useKV[ClesQCM]{Nom} \ifboolKV[ClesQCM]{AlphT}{\Alph{TitreQCM}}{##2}}\ifnum\fpeval{\PfCTotalCases-\useKV[ClesQCM]{Reponses}}>0\relax\uppercase{&}\PfCTexteReponseEleve\fi%
+ \\
+ }{}%
+ \hline%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
+ \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\PfCSolCellColor{##1}{##2}}{}\ListeQCM[##1,\fpeval{##2+1}]
+ }\ifnum\fpeval{\PfCTotalCases-\useKV[ClesQCM]{Reponses}}>0\relax\uppercase{&}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\fi\\
+ }%
+ \hline%
+ \end{tabular}%
}%
- \renewcommand{\arraystretch}{1}%
}%
+ \renewcommand{\arraystretch}{1}%
}%
+}%
}{%
- \newcommand\QCM[2][]{%
- \useKVdefault[ClesQCM]%
- \setKV[ClesQCM]{#1}%
- \ifboolKV[ClesQCM]{Seul}{%
- \QCMSeul[#1]{#2}%
+\newcommand\QCM[2][]{%
+ \useKVdefault[ClesQCM]%
+ \setKV[ClesQCM]{#1}%
+ \ifboolKV[ClesQCM]{Seul}{%
+ \QCMSeul[#1]{#2}%
+ }{%
+ \colorlet{PfCCouleurAlterneQCM}{\useKV[ClesQCM]{CouleurAlt}}%
+ \setcounter{QuestionQCM}{\fpeval{\useKV[ClesQCM]{Depart}-1}}%
+ \setcounter{TitreQCM}{0}
+ \setsepchar[*]{,*&}\ignoreemptyitems%
+ \readlist*\ListeQCM{#2}%
+ \renewcommand{\arraystretch}{\useKV[ClesQCM]{Stretch}}%
+ \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
+ \ifboolKV[ClesQCM]{Multiple}{%
+ \setlength{\LargeurQCM}{\fpeval{(\linewidth-\useKV[ClesQCM]{Reponses}*(3*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
+ \xdef\ListeNom{\useKV[ClesQCM]{Noms}}%
+ \setsepchar[*]{/}%
+ \readlist*\ListeNomsMul{\ListeNom}%
+ \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
+ \cline{2-\NBcases}%
+ \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ListeNomsMul[##2]}%
+ \\
+ \hline%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
+ \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{\ListeQCM[##1,\fpeval{##2+1}]==1}{$\boxtimes$}{$\square$}}{$\square$}%
+ }\\
+ }%
+ \hline%
+ \end{tabular}%
+ \renewcommand{\arraystretch}{1}%
}{%
- \colorlet{PfCCouleurAlterneQCM}{\useKV[ClesQCM]{CouleurAlt}}%
- \setcounter{QuestionQCM}{\fpeval{\useKV[ClesQCM]{Depart}-1}}%
- \setcounter{TitreQCM}{0}
- \setsepchar[*]{,*&}\ignoreemptyitems%
- \readlist*\ListeQCM{#2}%
- \renewcommand{\arraystretch}{\useKV[ClesQCM]{Stretch}}%
- \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
- \ifboolKV[ClesQCM]{Multiple}{%
- \setlength{\LargeurQCM}{\fpeval{(\linewidth-\useKV[ClesQCM]{Reponses}*(3*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
- \xdef\ListeNom{\useKV[ClesQCM]{Noms}}%
- \setsepchar[*]{/}%
- \readlist*\ListeNomsMul{\ListeNom}%
+ \ifboolKV[ClesQCM]{VF}{%
+ \setKV[ClesQCM]{Reponses=2}%
+ \setlength{\PfCLargeurQCM}{\useKV[ClesQCM]{Largeur}}%
+ \setlength{\LargeurQCM}{\linewidth-6\tabcolsep-2\PfCLargeurQCM-4\arrayrulewidth}%
+ \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
\begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
\cline{2-\NBcases}%
- \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ListeNomsMul[##2]}%
- \\
+ \multicolumn{1}{c|}{}&\useKV[ClesQCM]{NomV}&\useKV[ClesQCM]{NomF}\\
\hline%
\xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
\stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{\ListeQCM[##1,\fpeval{##2+1}]==1}{$\boxtimes$}{$\square$}}{$\square$}%
- }\\
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{##2==\ListeQCM[##1,2]}{$\boxtimes$}{$\square$}}{$\square$}%
+ }\\
}%
\hline%
- \end{tabular}%
- \renewcommand{\arraystretch}{1}%
+ \end{tabular}
}{%
- \ifboolKV[ClesQCM]{VF}{%
- \setKV[ClesQCM]{Reponses=2}%
- \setlength{\PfCLargeurQCM}{\useKV[ClesQCM]{Largeur}}%
- \setlength{\LargeurQCM}{\linewidth-6\tabcolsep-2\PfCLargeurQCM-4\arrayrulewidth}%
- \xdef\NBcases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
- \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
- \cline{2-\NBcases}%
- \multicolumn{1}{c|}{}&\useKV[ClesQCM]{NomV}&\useKV[ClesQCM]{NomF}\\
- \hline%
- \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
- \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\xintifboolexpr{##2==\ListeQCM[##1,2]}{$\boxtimes$}{$\square$}}{$\square$}%
- }\\
- }%
- \hline%
- \end{tabular}
+ \ifboolKV[ClesQCM]{ACompleter}{%
+ \xdef\PfCTotalCases{\fpeval{\useKV[ClesQCM]{Reponses}+1}}%
}{%
- \setlength{\LargeurQCM}{\fpeval{(\linewidth-2*\tabcolsep-\useKV[ClesQCM]{Reponses}*(2*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
- \xdef\NumeroReponse{\fpeval{\useKV[ClesQCM]{Reponses}+2}}%
- \begin{tabular}{|p{\LargeurQCM}|*{\useKV[ClesQCM]{Reponses}}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
- \ifboolKV[ClesQCM]{Titre}{\cline{2-\NBcases}%
- \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\stepcounter{TitreQCM}\useKV[ClesQCM]{Nom} \ifboolKV[ClesQCM]{AlphT}{\Alph{TitreQCM}}{##2}}%
- \\
- }{}%
- \hline%
- \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
- \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
- &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\PfCSolCellColor{##1}{##2}}{}\ListeQCM[##1,\fpeval{##2+1}]%
- }\\
- }%
- \hline%
- \end{tabular}%
+ \xdef\PfCTotalCases{\useKV[ClesQCM]{Reponses}}%
}%
+ \setlength{\LargeurQCM}{\fpeval{(\linewidth-2*\tabcolsep-\PfCTotalCases*(2*\tabcolsep+\useKV[ClesQCM]{Largeur}))}pt}%
+ \xdef\NumeroReponse{\fpeval{\useKV[ClesQCM]{Reponses}+2}}%
+ \begin{tabular}{|p{\LargeurQCM}|*{\PfCTotalCases}{>{\centering\arraybackslash}p{\useKV[ClesQCM]{Largeur}}|}}%
+ % \ifboolKV[ClesQCM]{Titre}{\cline{2-\NBcases}%
+ \ifboolKV[ClesQCM]{Titre}{\cline{2-\fpeval{\PfCTotalCases+1}}%
+ \multicolumn{1}{c|}{}\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\stepcounter{TitreQCM}\useKV[ClesQCM]{Nom} \ifboolKV[ClesQCM]{AlphT}{\Alph{TitreQCM}}{##2}}\ifnum\fpeval{\PfCTotalCases-\useKV[ClesQCM]{Reponses}}>0\relax\uppercase{&}\PfCTexteReponseEleve\fi%
+ \\
+ }{}%
+ \hline%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
+ \stepcounter{QuestionQCM}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Alph}{\textbf{\Alph{QuestionQCM}}/}{\textbf{\theQuestionQCM/}}~\ListeQCM[##1,1]\xintFor* ##2 in {\xintSeq {1}{\useKV[ClesQCM]{Reponses}}}\do{%
+ &\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\ifboolKV[ClesQCM]{Solution}{\PfCSolCellColor{##1}{##2}}{}\ListeQCM[##1,\fpeval{##2+1}]
+ }\ifnum\fpeval{\PfCTotalCases-\useKV[ClesQCM]{Reponses}}>0\relax\uppercase{&}\ifboolKV[ClesQCM]{Alterne}{\modulo{\theQuestionQCM}{2}\ifnum\remainder=0\cellcolor{PfCCouleurAlterneQCM}\fi}{}\fi\\
+ }%
+ \hline%
+ \end{tabular}%
}%
- \renewcommand{\arraystretch}{1}%
}%
+ \renewcommand{\arraystretch}{1}%
}%
}%
+}%
\NewDocumentCommand\PfCSolCellColor{mm}{%
\xdef\PfCFooSolColor{\ListeQCM[#1,\NumeroReponse]}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex b/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
index df5743e439..fc1674d37f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
@@ -4,25 +4,27 @@
\newtoks\tokPfCEngrenages%
\def\UpdatetoksEngrenages#1/#2\nil{\addtotok\tokPfCEngrenages{#1,#2,}}%
-\setKVdefault[Engrenages]{Couleur=LightSteelBlue,Unite=3mm,ListeCouleurs={LightSteelBlue}}
+\setKVdefault[Engrenages]{Couleur=LightSteelBlue,Unite=3mm,ListeCouleurs={?}}%
+%\defKV[Engrenages]{Couleur=\setKV[Engrenages]{ListeCouleurs=#1}}%
\NewDocumentCommand\Engrenages{o m}{%
\newtoks\toklistecouleur%
\toklistecouleur{}%
- \tokPfCEngrenages{}
+ \tokPfCEngrenages{}%
\useKVdefault[Engrenages]%
\setKV[Engrenages]{#1}%
\setsepchar[*]{,*/}%
\ignoreemptyitems
\readlist*\ListePfCEngrenages{#2}%
- \setsepchar{,}
- \xdef\PfCFooEngrenages{}
+ \setsepchar{,}%
+ \xdef\PfCFooEngrenages{}%
\foreachitem\compteur\in\ListePfCEngrenages{%
\xdef\PfCFooEngrenages{\PfCFooEngrenages \ListePfCEngrenages[\compteurcnt,1],\ListePfCEngrenages[\compteurcnt,2],}%
}%
\xdef\ListeAvantCouleurs{\useKV[Engrenages]{ListeCouleurs}}%
\readlist*\ListeCouleur{\ListeAvantCouleurs}%
\foreachitem\couleur\in\ListeCouleur{\expandafter\UpdateCoul\couleur\nil}%
+ %\setKV[Engrenages]{Couleurs=\ListeCouleur[1]}%
\BuildEngrenages{\PfCFooEngrenages}{\the\toklistecouleur}%
}%
@@ -102,19 +104,19 @@
fi;
endfor;
);
-}
+}%
\NewDocumentCommand\BuildEngrenages{mm}{%
- \ifluatex
- \mplibforcehmode
- \begin{mplibcode}
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
input PfCEngrenages;
\BuildEngrenagesCode{#1}{#2}
trace EngrenageFinal;
- \end{mplibcode}
- \else
+ \end{mplibcode}%
+ \else%
\begin{mpost}[mpsettings={input PfCEngrenages;\BuildEngrenagesCode{#1}{#2}}]
trace EngrenageFinal;
- \end{mpost}
- \fi
+ \end{mpost}%
+ \fi%
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex b/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
index 77c683b148..5b95ddb02e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
@@ -58,24 +58,30 @@
}%
}{%
\ifboolKV[ClesAffine]{Retrouve}{%
- On sait que $\useKV[ClesAffine]{Nom}$ est une fonction affine. Donc elle s'\'ecrit sous la forme : \[\useKV[ClesAffine]{Nom}(\useKV[ClesAffine]{Variable})=\useKV[ClesAffine]{CoefDir}\useKV[ClesAffine]{Variable}+\useKV[ClesAffine]{OrdoOrig}\]
- Or, $\useKV[ClesAffine]{Nom}(\num{#2})=\num{#3}$ et $\useKV[ClesAffine]{Nom}(\num{#4})=\num{#5}$. Par cons\'equent, d'apr\`es la propri\'et\'e des accroissements :
+ \xdef\OrdOrigine{\fpeval{#3-(#3-#5)*#2/(#2-#4)}}%%
+ On sait que $\useKV[ClesAffine]{Nom}$ est une fonction affine. Donc elle s'\'ecrit sous la forme : \[\useKV[ClesAffine]{Nom}(\useKV[ClesAffine]{Variable})=\useKV[ClesAffine]{CoefDir}\useKV[ClesAffine]{Variable}+\useKV[ClesAffine]{OrdoOrig}.\]
+ Or, $\useKV[ClesAffine]{Nom}(\num{#2})=\num{#3}$ et $\useKV[ClesAffine]{Nom}(\num{#4})=\num{#5}$. \ifnum\fpeval{#3-#5}=0
+ Les images de \num{#2} et \num{#4} sont égales à \num{#3}. La fonction affine cherchée est donc constante et s'écrit :
+ \[\useKV[ClesAffine]{Nom}:\useKV[ClesAffine]{Variable}\mapsto\num{\OrdOrigine}.\]
+ \else
+ Par cons\'equent, d'apr\`es la propri\'et\'e des accroissements :
\begin{align*}
\useKV[ClesAffine]{CoefDir}&=\frac{\useKV[ClesAffine]{Nom}(\num{#2})-\useKV[ClesAffine]{Nom}(\num{#4})}{\num{#2}-\xintifboolexpr{#4<0}{(\num{#4})}{\num{#4}}}\\
\useKV[ClesAffine]{CoefDir}&=\frac{\num{#3}-\xintifboolexpr{#5<0}{(\num{#5})}{\num{#5}}}{\num{\fpeval{#2-#4}}}\\
\useKV[ClesAffine]{CoefDir}&=\frac{\num{\fpeval{#3-#5}}}{\num{\fpeval{#2-#4}}}%\\
\SSimpliTest{\fpeval{#3-#5}}{\fpeval{#2-#4}}\ifthenelse{\boolean{Simplification}}{\\\useKV[ClesAffine]{CoefDir}&=\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}}{}%
\end{align*}
- La fonction $\useKV[ClesAffine]{Nom}$ s'\'ecrit alors sous la forme $\displaystyle\useKV[ClesAffine]{Nom}(\useKV[ClesAffine]{Variable})=\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\useKV[ClesAffine]{Variable}+\useKV[ClesAffine]{OrdoOrig}$.
+ \def\PfCQuotientAffine{\fpeval{(#3-#5)/(#2-#4)}}%
+ La fonction $\useKV[ClesAffine]{Nom}$ s'\'ecrit alors sous la forme $\displaystyle\useKV[ClesAffine]{Nom}(\useKV[ClesAffine]{Variable})=\ifnum\fpeval{abs(\PfCQuotientAffine)}=1\relax\Affichage[Lettre={\useKV[ClesAffine]{Variable}}]{0}{\PfCQuotientAffine}{0}\else\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\useKV[ClesAffine]{Variable}\fi+\useKV[ClesAffine]{OrdoOrig}$.
\\De plus, comme $\useKV[ClesAffine]{Nom}(\num{#2})=\num{#3}$, alors :
\begin{align*}
- \SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\times\xintifboolexpr{#2<0}{(\num{#2})}{\num{#2}}+\useKV[ClesAffine]{OrdoOrig}&=\num{#3}\\
+ \ifnum\PfCQuotientAffine=1\relax\else\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\times\xintifboolexpr{#2<0}{(\num{#2})}{\num{#2}}+\useKV[ClesAffine]{OrdoOrig}\uppercase{&}=\num{#3}\\\fi
\SSimplifie{\fpeval{(#3-#5)*#2}}{\fpeval{#2-#4}}+\useKV[ClesAffine]{OrdoOrig}&=\num{#3}\\
\useKV[ClesAffine]{OrdoOrig}&=\num{\fpeval{#3-(#3-#5)*#2/(#2-#4)}}
\end{align*}
- \xdef\OrdOrigine{\fpeval{#3-(#3-#5)*#2/(#2-#4)}}
La fonction affine $\useKV[ClesAffine]{Nom}$ cherch\'ee est :
- \[\useKV[ClesAffine]{Nom}:\useKV[ClesAffine]{Variable}\mapsto\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\useKV[ClesAffine]{Variable}\xintifboolexpr{\OrdOrigine==0}{}{\xintifboolexpr{\OrdOrigine>0}{+\num{\OrdOrigine}}{-\num{\fpeval{0-\OrdOrigine}}}}\]
+ \[\useKV[ClesAffine]{Nom}:\useKV[ClesAffine]{Variable}\mapsto\ifnum\fpeval{abs(\PfCQuotientAffine)}=1\relax\Affichage[Lettre={\useKV[ClesAffine]{Variable}}]{0}{\PfCQuotientAffine}{\OrdOrigine}\else\SSimplifie{\fpeval{#3-#5}}{\fpeval{#2-#4}}\useKV[ClesAffine]{Variable}\xintifboolexpr{\OrdOrigine==0}{}{\xintifboolexpr{\OrdOrigine>0}{+\num{\OrdOrigine}}{-\num{\fpeval{0-\OrdOrigine}}}}\fi.\]
+ \fi
}{%
%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCInfixRPN.sty b/macros/latex/contrib/profcollege/latex/PfCInfixRPN.sty
new file mode 100644
index 0000000000..a0851a5dd5
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCInfixRPN.sty
@@ -0,0 +1,538 @@
+%%
+%% This is file `infix-RPN.tex',
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Package `infix-RPN.tex'
+%%
+%% Main code:
+%% Jean-Côme Charpentier <jean-come.charpentier@wanadoo.fr>
+%%
+%% Contributions by
+%% Christophe Jorssen <christophe.jorssen@libre.fr.invalid>
+%% `libre' is the french word for `free' :-)
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory CTAN:/macros/latex/base/lppl.txt.
+%%
+%% DESCRIPTION:
+%% `infix-RPN' is a package to convert infix expressions to
+%% Reverse Polish Notation
+%%
+%%
+\def\RCS$#1: #2 ${\expandafter\def\csname RCS#1\endcsname{#2}}
+\RCS$Revision: 1.7 $
+\RCS$Date: 2004-07-06 23:41:52+02 $
+
+\def\fileversion{0.11}
+\csname infixRPNLoaded\endcsname
+\let\infixRPNLoaded\endinput
+\message{`infix-RPN' v\fileversion\space (Rev \RCSRevision, \RCSDate), J.-C.Charpentier/C.Jorssen}
+
+\edef\PfCopAtCode{\the\catcode`\@}
+\edef\PfCopHatCode{\the\catcode`\^}
+\edef\PfCopUnderscoreCode{\the\catcode`\_}
+\catcode`\@=11\relax
+\catcode`\^=12\relax
+\catcode`\_=11\relax
+
+\def\s@pow{exp}
+\def\s@lpar{(}
+\def\s@rpar{)}
+\def\s@comma{,}
+
+\def\DeclareNewPSOperator{%
+ \bgroup
+ \catcode`\_=11\relax
+ \DeclareNewPSOperator@i
+}
+
+\def\DeclareNewPSOperator@i#1{%
+ \expandafter\ifx\csname PS@operator@list\endcsname\relax
+ \gdef\PS@operator@list{#1}%
+ \else
+ \xdef\PS@operator@list{#1,\PS@operator@list}%
+ \fi
+ \expandafter\gdef\csname s@#1\endcsname{#1}%
+ \egroup
+}
+
+\DeclareNewPSOperator{add}
+\DeclareNewPSOperator{sub}
+\DeclareNewPSOperator{mul}
+\DeclareNewPSOperator{div}
+\DeclareNewPSOperator{exp}
+\DeclareNewPSOperator{abs}
+\DeclareNewPSOperator{sin}
+\DeclareNewPSOperator{cos}
+\DeclareNewPSOperator{atan}
+\DeclareNewPSOperator{neg}
+\DeclareNewPSOperator{ceiling}
+\DeclareNewPSOperator{floor}
+\DeclareNewPSOperator{truncate}
+\DeclareNewPSOperator{sqrt}
+\DeclareNewPSOperator{ln}
+\DeclareNewPSOperator{log}
+
+
+\newcount\@parenthesis
+\newcount\token@cpt
+\newif\if@begin@token
+\newif\if@in@number
+\newif\if@in@decimal
+\newif\if@in@name
+\newif\if@sign
+\def\@tokencreate#1{%
+ \expandafter\xdef\csname PfCop@token\the\token@cpt\endcsname{#1}%
+ \global\advance\token@cpt\@ne
+ \expandafter\global
+ \expandafter\let\csname PfCop@token\the\token@cpt\endcsname\relax
+ \global\advance\token@cpt\m@ne
+}
+\def\@tokenappend#1{%
+ \expandafter\xdef\csname PfCop@token\the\token@cpt\endcsname
+ {\csname PfCop@token\the\token@cpt\endcsname#1}%
+}
+\def\@tokensingle#1{%
+ \edef\@arg{#1}%
+ \if@in@name
+ \global\advance\token@cpt\@ne
+ \@in@namefalse
+ \fi
+ \if@in@number
+ \global\advance\token@cpt\@ne
+ \@in@numberfalse
+ \@in@decimalfalse
+ \fi
+ \ifx\@arg\s@add
+ \if@sign
+ % ignore + sign
+ \global\advance\token@cpt\m@ne
+ \else
+ \@tokencreate{#1}%
+ \fi
+ \else\ifx\@arg\s@sub
+ \if@sign
+ \@tokencreate{\s@neg}%
+ \else
+ \@tokencreate{#1}%
+ \fi
+ \else
+ \@tokencreate{#1}%
+ \fi\fi
+ \global\advance\token@cpt\@ne
+}
+\def\@tokenuse#1{%
+ \expandafter\ifx\csname PfCop@token#1\endcsname\s@comma%
+ \else
+ \xdef\RPN{\RPN\space\csname PfCop@token#1\endcsname}%
+ \fi
+}
+
+\let\endscanline\relax
+\def\scan@line{%
+ \begingroup
+ \catcode`\ =12
+ \@parenthesis=\z@
+ \@in@numberfalse
+ \@in@decimalfalse
+ \@in@namefalse
+ \global\token@cpt=\@ne
+ \global\@signtrue
+ \scan@@line
+}
+\def\scan@@line#1{\scan@@@line#1\endscanline\endgroup}
+\def\scan@@@line#1#2\endscanline{%
+ \PfCop@testchar{#1}%
+ \ifPfCop@isdigit
+ \global\@signfalse
+ \if@in@number
+ \@tokenappend{#1}%
+ \else \if@in@name
+ \@in@namefalse
+ \@in@numbertrue
+ \@tokenappend{#1}%
+ \else
+ \@in@numbertrue
+ \@tokencreate{#1}%
+ \fi\fi
+ \fi
+ \ifPfCop@isplus
+ \@tokensingle{\s@add}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@isminus
+ \@tokensingle{\s@sub}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@ismultiply
+ \@tokensingle{\s@mul}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@isdivide
+ \@tokensingle{\s@div}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@ispower
+ \@tokensingle{\s@pow}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@isdecimalsep
+ \global\@signfalse
+ \if@in@decimal
+ \errmessage{Syntax error: number with multiple separators!}%
+ \else \if@in@number
+ \@in@decimaltrue
+ \@tokenappend{.}%
+ \else
+ \@tokencreate{.}%
+ \@in@numbertrue
+ \@in@decimaltrue
+ \fi\fi
+ \fi
+ \ifPfCop@iscomma
+ \@tokensingle{,}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@islparenthesis
+ \@tokensingle{(}%
+ \global\@signtrue
+ \fi
+ \ifPfCop@isrparenthesis
+ \global\@signfalse
+ \@tokensingle{)}%
+ \fi
+ \ifPfCop@isspace
+ \if@in@number
+ \@in@numberfalse
+ \@in@decimalfalse
+ \global\advance\token@cpt\@ne
+ \else \if@in@name
+ \@in@namefalse
+ \global\advance\token@cpt\@ne
+ \fi\fi
+ \fi
+ \ifPfCop@isother
+ \global\@signfalse
+ \if@in@name
+ \@tokenappend{#1}%
+ \else \if@in@number
+ \@in@numberfalse
+ \@in@decimalfalse
+ \@in@nametrue
+ \@tokenappend{#1}%
+ \else
+ \@in@nametrue
+ \@tokencreate{#1}%
+ \fi\fi
+ \fi
+ \def\arg{#2}%
+ \ifx\empty\arg
+ \let\next\relax
+ \else
+ \let\next\scan@@@line
+ \fi
+ \expandafter\next\arg\endscanline
+}
+\count255=`\0 \edef\PfCop@numbegin{\the\count255}
+\count255=`\9 \edef\PfCop@numend{\the\count255}
+\count255=`\+ \edef\PfCop@plus{\the\count255}
+\count255=`\- \edef\PfCop@minus{\the\count255}
+\count255=`\* \edef\PfCop@multiply{\the\count255}
+\count255=`\/ \edef\PfCop@divide{\the\count255}
+\count255=`\^ \edef\PfCop@power{\the\count255}
+\count255=`\. \edef\PfCop@dot{\the\count255}
+\count255=`\, \edef\PfCop@comma{\the\count255}
+\count255=`\( \edef\PfCop@lparenthesis{\the\count255}
+\count255=`\) \edef\PfCop@rparenthesis{\the\count255}
+\edef\PfCop@space{32}
+\newif\ifPfCop@isdigit
+\newif\ifPfCop@isplus
+\newif\ifPfCop@isminus
+\newif\ifPfCop@ismultiply
+\newif\ifPfCop@isdivide
+\newif\ifPfCop@ispower
+\newif\ifPfCop@isdecimalsep
+\newif\ifPfCop@iscomma
+\newif\ifPfCop@islparenthesis
+\newif\ifPfCop@isrparenthesis
+\newif\ifPfCop@isspace
+\newif\ifPfCop@isother
+\def\PfCop@testchar#1{%
+ \PfCop@isdigitfalse
+ \PfCop@isplusfalse
+ \PfCop@isminusfalse
+ \PfCop@ismultiplyfalse
+ \PfCop@isdividefalse
+ \PfCop@ispowerfalse
+ \PfCop@isdecimalsepfalse
+ \PfCop@iscommafalse
+ \PfCop@islparenthesisfalse
+ \PfCop@isrparenthesisfalse
+ \PfCop@isspacefalse
+ \PfCop@isotherfalse
+ \count255=`#1\relax
+ \ifnum\count255=\PfCop@plus \relax
+ \PfCop@isplustrue
+ \else \ifnum\count255=\PfCop@minus \relax
+ \PfCop@isminustrue
+ \else \ifnum\count255=\PfCop@multiply \relax
+ \PfCop@ismultiplytrue
+ \else \ifnum\count255=\PfCop@divide \relax
+ \PfCop@isdividetrue
+ \else \ifnum\count255=\PfCop@power \relax
+ \PfCop@ispowertrue
+ \else \ifnum\count255=\PfCop@dot \relax
+ \PfCop@isdecimalseptrue
+ \else \ifnum\count255=\PfCop@comma \relax
+ \PfCop@iscommatrue
+ \else \ifnum\count255=\PfCop@lparenthesis \relax
+ \PfCop@islparenthesistrue
+ \else \ifnum\count255=\PfCop@rparenthesis \relax
+ \PfCop@isrparenthesistrue
+ \else \ifnum\count255=\PfCop@space \relax
+ \PfCop@isspacetrue
+ \else \ifnum\count255<\PfCop@numbegin \relax
+ \PfCop@isothertrue
+ \else \ifnum\count255>\PfCop@numend \relax
+ \PfCop@isothertrue
+ \else \PfCop@isdigittrue
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+\def\search@term#1#2{%
+ \begingroup
+ \count1=#1\relax
+ \count255=#2\relax
+ \ifnum\count1=\count255
+ \@tokenuse{#1}%
+ \else
+ \count5=\count255
+ \count7=\count1
+ \advance\count7\m@ne
+ \count3=\z@
+ \loop
+ \ifnum\count5>\count7
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@rpar\relax
+ \advance\@parenthesis\@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@lpar\relax
+ \advance\@parenthesis\m@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@add\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@sub\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@comma\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \advance\count5\m@ne
+ \repeat
+ \ifnum\count3=\z@
+ \ifnum\@parenthesis=\z@
+ \search@factor{\the\count1}{\the\count255}%
+ \else
+ \errmessage{Syntax error: unbalanced parenthesis!}%
+ \fi
+ \else
+ \advance\count3\m@ne
+ \search@term{\the\count1}{\the\count3}%
+ \advance\count3\tw@
+ \search@term{\the\count3}{\the\count255}%
+ \advance\count3\m@ne
+ \@tokenuse{\the\count3}%
+ \fi
+ \fi
+ \endgroup
+}
+\def\search@factor#1#2{%
+ \begingroup
+ \count1=#1\relax
+ \count255=#2\relax
+ \ifnum\count1=\count255
+ \@tokenuse{\the\count1}%
+ \else
+ \count5=\count255
+ \count7=\count1
+ \advance\count7\m@ne
+ \count3=\z@
+ \loop
+ \ifnum\count5>\count7
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@rpar\relax
+ \advance\@parenthesis\@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@lpar\relax
+ \advance\@parenthesis\m@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@mul\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@div\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \advance\count5\m@ne
+ \repeat
+ \ifnum\count3=\z@
+ \ifnum\@parenthesis=\z@
+ \search@power{\the\count1}{\the\count255}%
+ \else
+ \errmessage{! Syntax error: unbalanced parenthesis}%
+ \fi
+ \else
+ \advance\count3\m@ne
+ \search@factor{\the\count1}{\the\count3}%
+ \advance\count3\tw@
+ \search@factor{\the\count3}{\the\count255}%
+ \advance\count3\m@ne
+ \@tokenuse{\the\count3}%
+ \fi
+ \fi
+ \endgroup
+}
+\def\search@power#1#2{%
+ \begingroup
+ \count1=#1\relax
+ \count255=#2\relax
+ \ifnum\count1=\count255
+ \@tokenuse{#1}%
+ \else
+ \count5=\count255
+ \count7=\count1
+ \advance\count7\m@ne
+ \count3=\z@
+ \loop
+ \ifnum\count5>\count7
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@rpar\relax
+ \advance\@parenthesis\@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@lpar\relax
+ \advance\@parenthesis\m@ne
+ \fi
+ \expandafter\ifx\csname PfCop@token\the\count5\endcsname\s@pow\relax
+ \ifnum\@parenthesis=\z@
+ \count3=\count5
+ \count5=\z@
+ \fi
+ \fi
+ \advance\count5\m@ne
+ \repeat
+ \ifnum\count3=\z@
+ \ifnum\@parenthesis=\z@
+ \search@primary{\the\count1}{\the\count255}%
+ \else
+ \errmessage{Syntax error: unbalanced parenthesis}%
+ \fi
+ \else
+ \advance\count3\m@ne
+ \search@power{\the\count1}{\the\count3}%
+ \advance\count3\tw@
+ \search@power{\the\count3}{\the\count255}%
+ \advance\count3\m@ne
+ \@tokenuse{\the\count3}%
+ \fi
+ \fi
+ \endgroup
+}
+\def\search@primary#1#2{%
+ \begingroup
+ \count1=#1\relax
+ \count255=#2\relax
+ \ifnum\count1=\count255
+ \@tokenuse{#1}%
+ \else
+ \edef\current@cnt{#1}%
+ \expandafter\compare@PS@operator\PS@operator@list,\@nil
+ \expandafter\ifx\csname PfCop@token#1\endcsname\s@lpar\relax
+ \expandafter\ifx\csname PfCop@token#2\endcsname\s@rpar\relax
+ \advance\count1\@ne
+ \advance\count255\m@ne
+ \search@term{\the\count1}{\the\count255}%
+ \else
+ \errmessage{Syntax error: Garbage after parenthesis
+ (tokens '#1' to '#2')}%
+ \fi
+ \fi
+ \fi
+ \endgroup
+}
+
+%\let\@nil\relax
+%\let\@nil\@empty
+
+%\def\compare@PS@operator#1,#2\@nil{%
+% \def\@tempa{#1}%
+% \def\@tempb{#2}%
+% \expandafter\ifx\csname PfCop@token\current@cnt\endcsname\@tempa%
+% \advance\count1\@ne
+% \search@primary{\the\count1}{\the\count255}%
+% \advance\count1\m@ne
+% \@tokenuse{\the\count1}%
+% \fi
+% \ifx\@tempb\empty
+% \let\next\relax
+% \let\@tempb\relax
+% \else
+% \let\next\compare@PS@operator
+% \fi
+% \expandafter\next\@tempb\@nil
+%}
+
+\let\@nil\undefined
+
+\def\compare@PS@operator#1,#2\@nil{%
+ \def\@tempa{#1}%
+ \def\@tempb{#2}%
+ \expandafter\ifx\csname PfCop@token\current@cnt\endcsname\@tempa%
+ \advance\count1\@ne
+ \search@primary{\the\count1}{\the\count255}%
+ \advance\count1\m@ne
+ \@tokenuse{\the\count1}%
+ \fi
+ \ifx\@tempb\empty
+ \let\next\@gobble
+ \else
+ \let\next\compare@PS@operator
+ \fi
+ \expandafter\next\@tempb\@nil
+}
+
+
+\def\infixtoRPN{%
+ \begingroup
+ \catcode`\ =12
+ \catcode`\^=12
+ \infixt@RPN
+}
+\def\infixt@RPN#1{%
+ \xdef\@expression{#1}%
+ \endgroup
+ \def\RPN{}%
+ \expandafter\scan@line\expandafter{\@expression}%
+ \expandafter\ifx\csname PfCop@token\the\token@cpt\endcsname\relax
+ \advance\token@cpt\m@ne
+ \fi
+ \search@term{1}{\the\token@cpt}%
+}
+
+\catcode`\@=\PfCopAtCode\relax
+\catcode`\^=\PfCopHatCode\relax
+\catcode`\_=\PfCopUnderscoreCode\relax
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
index e0457471e1..bdb59526f0 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
@@ -229,5 +229,6 @@
endfor;
fi;
\end{mplibcode}
+ \mplibnumbersystem{scaled}
\fi
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex b/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
index 56a7ad6943..7851f36ba7 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
@@ -6,7 +6,7 @@
\def\UpdatetoksPuzzleA#1\nil{\addtotok\toklistepuzzlea{"#1",}}%
-\setKVdefault[ClesPuzzleMul]{Solution=false,Unite=1cm,Couleur=LightSteelBlue}
+\setKVdefault[ClesPuzzleMul]{Solution=false,Unite=1cm,Couleur=LightSteelBlue,Cube=false}
\NewDocumentCommand\PuzzleMul{om}{%
\useKVdefault[ClesPuzzleMul]%
@@ -17,8 +17,12 @@
\xdef\HauteurPuzzle{\PfCListePuzzlelen}%
\toklistepuzzlea{}%
\foreachitem\compteur\in\PfCListePuzzle{\expandafter\UpdatetoksPuzzleA\compteur\nil}%
- \BuildPuzzle{\the\toklistepuzzlea}%
-}
+ \ifboolKV[ClesPuzzleMul]{Cube}{%
+ \BuildPuzzleEspace{\the\toklistepuzzlea}%
+ }{%
+ \BuildPuzzle{\the\toklistepuzzlea}%
+ }%
+}%
\def\BuildPuzzleCode{%
def PreDrawPuzzle ( expr ww, hh, uu ) =
diff --git a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
index 117c2a0905..4fe05bc4d0 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
@@ -22,18 +22,20 @@
\setKV[TraceG]{#1}%
\tokPfCListeDesFonctions{}%
\tokPfCListeDesNomsFonctions{}%
- \xdef\PfCFooFn{\useKV[ClesFonction]{Calcul}}
- \xdef\PfCFooNomFn{\useKV[TraceG]{NomCourbe}}
+ \xdef\PfCFooFn{\useKV[ClesFonction]{Calcul}}%
+ \xdef\PfCFooNomFn{\useKV[TraceG]{NomCourbe}}%
\ifx\bla\PfCFooFn\bla%
- \else
- \readlist*\ListeDesFonctions{\PfCFooFn}
+ \else%
+ \setsepchar{,}\ignoreemptyitems
+ \readlist*\ListeDesFonctions{\PfCFooFn}%
+ \reademptyitems
\foreachitem\compteur\in\ListeDesFonctions{\expandafter\UpdatePfCListeDesFonctions\compteur\nil}%
- \fi
- \ifx\bla\PfCFooNomFn\bla
- \else
- \readlist*\ListeDesNomsFonctions{\PfCFooNomFn}
+ \fi%
+ \ifx\bla\PfCFooNomFn\bla%
+ \else%
+ \readlist*\ListeDesNomsFonctions{\PfCFooNomFn}%
\foreachitem\compteur\in\ListeDesNomsFonctions{\expandafter\UpdatePfCListeDesNomsFonctions\compteur\nil}%
- \fi
+ \fi%
\tokPfCLabelX{}%
\tokPfCLabelY{}%
\addtotok\tokPfCLabelX{"\useKV[TraceG]{LabelX}"}%
@@ -79,7 +81,7 @@
\MPCourbeNew{\PfCFooListePoints}%
}%
}%
- }
+ }%
}{%
\setsepchar{,}\ignoreemptyitems%
\readlist*\ListeFonction{#2}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
index dfbd3a5d23..6628d3d505 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
@@ -1,7 +1,9 @@
%%%
% Patrons de pavés droits et cubes
%%%
-\setKVdefault[ClesPatron]{Cube,Arete=1cm,ListeCouleurs={white},Pave=false,Largeur=2cm,Hauteur=1.5cm,Profondeur=1cm,Codes=false}%
+\setKVdefault[ClesPatron]{Cube,Arete=1cm,ListeCouleurs={white},Pave=false,Largeur=2cm,Hauteur=1.5cm,Profondeur=1cm,Codes=false,AColorier=false}%
+%EcartColorier est en nombre de parts pour le cube, en mm pour le pavé.
+\defKV[ClesPatron]{EcartColorier=\setKV[ClesPatron]{AColorier}}%
\defKV[ClesPatron]{Traces=\setKV[ClesPatron]{Codes}}%
\newtoks\toklistepatron%
@@ -30,7 +32,7 @@
}%
}%
-\setsepchar{,}\ignoreemptyitems
+\setsepchar{,}\ignoreemptyitems%
\readlist*\ListePatronsCube{%
{ooxo,xxxx,ooxo},%
{oxoo,xxxx,xooo},%
@@ -78,7 +80,7 @@
{poho,lpho,poho,lohp},%
{poho,loho,plhl,loho},%
{poho,loho,plho,lohp},%
- {poho,loho,poho,lphp},%
+ {poho,loho,poho,lphp},%20
{phlh,holo,polo,holo},%
{phlo,holp,polo,holo},%
{phlo,holo,polh,holo},%
@@ -88,17 +90,17 @@
{polo,hplo,polo,holp},%
{polo,holo,phlh,holo},%
{polo,holo,phlo,holp},%
- {polo,holo,polo,hplp},%
+ {polo,holo,polo,hplp},%30
{hlpo,lopo,hopl,pool},%
{hopo,lhpo,hopl,pool},%
{hopo,lopo,hlph,pool},%
{lhpo,hopo,loph,pooh},%
{lopo,hlpo,loph,pooh},%
- {lopo,hopo,lhoh,pooh},%
+ {lopo,hopo,lhph,pooh},%
{plho,loho,pohl,hool},%
{poho,lpho,pohl,hool},%
{poho,loho,plhl,hool},%
- {lpho,poho,lohp,hoop},%
+ {lpho,poho,lohp,hoop},%40
{loho,plho,lohp,hoop},%
{loho,poho,lphp,hoop},%
{phlo,holo,polh,looh},%
@@ -108,23 +110,23 @@
{holo,phlo,holp,loop},%
{holo,polo,hplp,loop},%
{hpo,lpo,hpl,pol,hol},%
- {lpo,hpo,lph,poh,loh},%
- {pho,plo,phl,hol,pol},%
+ {lpo,hpo,lph,poh,loh},%50
+ {pho,lho,phl,hol,pol},%
{hpoo,lpho,pohl,hool},%
{lpoo,hplo,polh,looh},%
- {phoo,lhpo,hopl,pool}
-}
+ {phoo,lhpo,hopl,pool}%
+}%
\readlist*\ListePatronsPaveCouleurs{%
- {Orange,Crimson,Orange,LightGreen,Crimson,LightGreen},
- {Orange,Crimson,LightGreen,Orange,Crimson,LightGreen},
- {Orange,Crimson,LightGreen,Crimson,Orange,LightGreen},
- {Orange,Crimson,LightGreen,Crimson,LightGreen,Orange},
- {Crimson,Orange,LightGreen,Orange,Crimson,LightGreen},
- {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen},
- {Crimson,Orange,LightGreen,Crimson,LightGreen,Orange},
- {Crimson,LightGreen,Orange,Crimson,Orange,LightGreen},
- {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},
+ {Orange,Crimson,Orange,LightGreen,Crimson,LightGreen},%
+ {Orange,Crimson,LightGreen,Orange,Crimson,LightGreen},%
+ {Orange,Crimson,LightGreen,Crimson,Orange,LightGreen},%
+ {Orange,Crimson,LightGreen,Crimson,LightGreen,Orange},%
+ {Crimson,Orange,LightGreen,Orange,Crimson,LightGreen},%
+ {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen},%
+ {Crimson,Orange,LightGreen,Crimson,LightGreen,Orange},%
+ {Crimson,LightGreen,Orange,Crimson,Orange,LightGreen},%
+ {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},%
{Crimson,LightGreen,Crimson,Orange,LightGreen,Orange},%10
{LightGreen,Crimson,LightGreen,Orange,Crimson,Orange},%
{LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},%
@@ -169,9 +171,277 @@
{Crimson,Orange,Crimson,LightGreen,Orange,LightGreen},%
{Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},%
{LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},%
- {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen}%
+ {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen}%
+}%
+\reademptyitems%
+
+\def\MPPatronPaveCode{%
+ Largeur=\useKV[ClesPatron]{Largeur};
+ Hauteur=\useKV[ClesPatron]{Hauteur};
+ Profondeur=\useKV[ClesPatron]{Profondeur};
+ %
+ pair C[],M[],N[],O[],P[];
+ %
+ color Col[],CoulDefaut;
+ CoulDefaut=white;
+ %
+ boolean Codes,Allume[][],AColorier;
+ Codes=\useKV[ClesPatron]{Codes};
+ AColorier=\useKV[ClesPatron]{AColorier};
+ if AColorier:
+ EcartColorier=\useKV[ClesPatron]{EcartColorier}*1mm;
+ fi;
+ %
+ numeric DecalCol[];
+ %
+ vardef Allumage(text t)=
+ nblignes:=0;
+ for p_=t:
+ Long:=length p_;
+ nblignes:=nblignes+1;
+ for k=0 upto Long-1:
+ Allume[nblignes][k]=false;
+ endfor;
+ endfor;
+ enddef;
+ %
+ vardef LectureLargeur(text t)=
+ for p_=t:
+ Long:=length p_;
+ endfor;
+ for k=1 upto Long-1:
+ for p_=t:
+ if substring(k,k+1) of p_="o":
+ if k=1:
+ if (substring(0,1) of p_="h") and (substring(1,2) of p_="p"):
+ DecalCol[k]:=Largeur;
+ fi;
+ if (substring(0,1) of p_="h") and (substring(1,2) of p_="l"):
+ DecalCol[k]:=Profondeur;
+ fi;
+ if (substring(0,1) of p_="p") and (substring(1,2) of p_="h"):
+ DecalCol[k]:=Largeur;
+ fi;
+ if (substring(0,1) of p_="p") and (substring(1,2) of p_="l"):
+ DecalCol[k]:=Hauteur;
+ fi;
+ if (substring(0,1) of p_="l") and (substring(1,2) of p_="h"):
+ DecalCol[k]:=Profondeur;
+ fi;
+ if (substring(0,1) of p_="l") and (substring(1,2) of p_="p"):
+ DecalCol[k]:=Hauteur;
+ fi;
+ fi;
+ elseif substring(k,k+1) of p_="l":
+ DecalCol[k]:=Largeur;
+ elseif substring(k,k+1) of p_="h":
+ DecalCol[k]:=Hauteur;
+ elseif substring(k,k+1) of p_="p":
+ DecalCol[k]:=Profondeur;
+ fi;
+ endfor;
+ endfor;
+ enddef;
+ %
+ vardef Patron(text t)=
+ path PathPave;
+ nblignes:=-1;
+ NBLignes:=0;
+ nbcol:=0;
+ nbfaces:=0;
+ for p_=t:
+ Long:=length p_;
+ nbcolonnes:=0;
+ NBColonnes:=0;
+ if substring(0,1) of p_="h":
+ YEchelle:=Hauteur;
+ elseif substring(0,1) of p_="l":
+ YEchelle:=Largeur;
+ elseif substring(0,1) of p_="p":
+ YEchelle:=Profondeur;
+ fi;
+ nblignes:=nblignes-YEchelle;
+ NBLignes:=NBLignes+1;
+ for k=1 upto Long-1:
+ if substring(k,k+1) of p_="o":
+ if k=1:
+ PathPave:=(unitsquare scaled 0) shifted ((0,-1));
+ fi;
+ elseif substring(k,k+1) of p_="l":
+ nbcol:=nbcol+1;
+ PathPave:=(unitsquare xscaled Largeur yscaled YEchelle) shifted ((nbcolonnes,nblignes));
+ Allume[NBLignes][NBColonnes]:=true;
+ nbfaces:=nbfaces+1;
+ C[nbfaces]=center PathPave;
+ M[nbfaces]=point(0) of PathPave;
+ N[nbfaces]=point(1) of PathPave;
+ O[nbfaces]=point(2) of PathPave;
+ P[nbfaces]=point(3) of PathPave;
+ elseif substring(k,k+1) of p_="h":
+ nbcol:=nbcol+1;
+ PathPave:=(unitsquare xscaled Hauteur yscaled YEchelle) shifted ((nbcolonnes,nblignes));
+ Allume[NBLignes][NBColonnes]:=true;
+ nbfaces:=nbfaces+1;
+ C[nbfaces]=center PathPave;
+ M[nbfaces]=point(0) of PathPave;
+ N[nbfaces]=point(1) of PathPave;
+ O[nbfaces]=point(2) of PathPave;
+ P[nbfaces]=point(3) of PathPave;
+ elseif substring(k,k+1) of p_="p":
+ nbcol:=nbcol+1;
+ PathPave:=(unitsquare xscaled Profondeur yscaled YEchelle) shifted ((nbcolonnes,nblignes));
+ Allume[NBLignes][NBColonnes]:=true;
+ nbfaces:=nbfaces+1;
+ C[nbfaces]=center PathPave;
+ M[nbfaces]=point(0) of PathPave;
+ N[nbfaces]=point(1) of PathPave;
+ O[nbfaces]=point(2) of PathPave;
+ P[nbfaces]=point(3) of PathPave;
+ fi;
+ if (unknown Col[nbcol]):
+ else:
+ if Col[nbcol]=white:
+ else:
+ if AColorier=false:
+ fill PathPave withcolor Col[nbcol];
+ fi;
+ fi;
+ fi;
+ if nbfaces>0:
+ trace M[nbfaces]--P[nbfaces];
+ trace N[nbfaces]--O[nbfaces];
+ trace P[nbfaces]--O[nbfaces];
+ trace M[nbfaces]--N[nbfaces];
+ fi;
+ nbcolonnes:=nbcolonnes+DecalCol[k];
+ NBColonnes:=NBColonnes+1;
+ endfor;
+ endfor;
+ enddef;
+ %
+ vardef EffectuerTraces=
+ if Codes:
+ \useKV[ClesPatron]{Traces};
+ fi;
+ enddef;
+}%
+
+\def\MPPatronPave#1#2{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ \MPPatronPaveCode
+ n:=0;
+ for p_=#2:
+ n:=n+1;
+ if color p_:
+ Col[n]=p_;
+ else:
+ Col[n]=CoulDefaut;
+ fi;
+ endfor;
+ %
+ LectureLargeur(#1);
+ Allumage(#1);
+ if AColorier:
+ drawoptions(dashed evenly);
+ fi;
+ Patron(#1);
+ if AColorier:
+ drawoptions();
+ toto:=0;
+ for l=1 upto NBLignes:
+ for k=0 upto NBColonnes-1:
+ if Allume[l][k]:
+ toto:=toto+1;
+ % trait vertical gauche
+ if k=0:
+% trace M[toto]--P[toto];
+ tpoints:=floor(abs(M[toto]-P[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[M[toto],P[toto]])--((t/tpoints)[M[toto],P[toto]]+(2*unitvector(P[toto]-M[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l][k-1]=false:
+ % trace M[toto]--P[toto] dashed evenly;
+ tpoints:=floor(abs(M[toto]-P[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[M[toto],P[toto]])--((t/tpoints)[M[toto],P[toto]]+(2*unitvector(P[toto]-M[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+% % trait vertical droit
+ if k=Long-1:
+ % trace N[toto]--O[toto] dashed evenly;
+ tpoints:=floor(abs(N[toto]-O[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[N[toto],O[toto]])--((t/tpoints)[N[toto],O[toto]]+(2*unitvector(O[toto]-N[toto])) rotated 90);
+ endfor;
+ else:
+ if Allume[l][k+1]=false:
+ %% trace N[toto]--O[toto] dashed evenly;
+ tpoints:=floor(abs(N[toto]-O[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[N[toto],O[toto]])--((t/tpoints)[N[toto],O[toto]]+(2*unitvector(O[toto]-N[toto])) rotated 90);
+ endfor;
+ fi;
+ fi;
+% % trait horizontal haut
+ if l=1:
+ % trace P[toto]--O[toto] dashed evenly;
+ tpoints:=floor(abs(P[toto]-O[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[P[toto],O[toto]])--((t/tpoints)[P[toto],O[toto]]+(2*unitvector(O[toto]-P[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l-1][k]=false:
+ % trace P[toto]--O[toto] dashed evenly;
+ tpoints:=floor(abs(P[toto]-O[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[P[toto],O[toto]])--((t/tpoints)[P[toto],O[toto]]+(2*unitvector(O[toto]-P[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+% % trait horizontal bas
+ if l=NBLignes:
+ %% trace M[toto]--N[toto] dashed evenly;
+ tpoints:=floor(abs(M[toto]-N[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[M[toto],N[toto]])--((t/tpoints)[M[toto],N[toto]]+(2*unitvector(M[toto]-N[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l+1][k]=false:
+ %% trace M[toto]--N[toto] dashed evenly;
+ tpoints:=floor(abs(M[toto]-N[toto])/EcartColorier);
+ for t=1 upto tpoints-1:
+ trace ((t/tpoints)[M[toto],N[toto]])--((t/tpoints)[M[toto],N[toto]]+(2*unitvector(M[toto]-N[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+ fi;
+ endfor;
+ endfor;
+ fi;
+ EffectuerTraces;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={\MPPatronPaveCode;}]
+ n:=0;
+ for p_=#2:
+ n:=n+1;
+ if color p_:
+ Col[n]=p_;
+ else:
+ Col[n]=CoulDefaut;
+ fi;
+ endfor;
+ %
+ LectureLargeur(#1);
+ Patron(#1);
+ EffectuerTraces;
+ \end{mpost}
+ \fi
}%
-\reademptyitems
\def\MPPatronCubeCode{%
Arete=\useKV[ClesPatron]{Arete};
@@ -181,6 +451,185 @@
color Col[],CoulDefaut;
CoulDefaut=white;
%
+ boolean Codes,Allume[][],AColorier;
+ Codes=\useKV[ClesPatron]{Codes};
+ AColorier=\useKV[ClesPatron]{AColorier};
+ if AColorier:
+ EcartColorier=\useKV[ClesPatron]{EcartColorier};
+ fi;
+ %
+ vardef Allumage(text t)=
+ nblignes:=-1;
+ for p_=t:
+ Long:=length p_;
+ nblignes:=nblignes+1;
+ for k=0 upto Long-1:
+ Allume[nblignes][k]=false;
+ endfor;
+ endfor;
+ enddef;
+ %
+ vardef Patron(text t)=
+ nblignes:=-1;
+ nbcol:=0;
+ nbfaces:=0;
+ for p_=t:
+ Long:=length p_;
+ nblignes:=nblignes+1;
+ nbcolonnes:=0;
+ for k=0 upto Long-1:
+ nbcolonnes:=nbcolonnes+1;
+ if substring(k,k+1) of p_="x":
+ Allume[nblignes][k]:=true;
+ nbfaces:=nbfaces+1;
+ nbcol:=nbcol+1;
+ if (unknown Col[nbcol]):
+ else:
+ if Col[nbcol]=white:
+ else:
+ if AColorier=false:
+ fill ((unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes))) withcolor Col[nbcol];
+ fi;
+ fi;
+ fi;
+ C[nbfaces]=(center unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes));
+ M[nbfaces]=point(0) of ((unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes)));
+ N[nbfaces]=point(1) of ((unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes)));
+ O[nbfaces]=point(2) of ((unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes)));
+ P[nbfaces]=point(3) of ((unitsquare scaled Arete) shifted (Arete*(nbcolonnes,-nblignes)));
+ trace M[nbfaces]--P[nbfaces];
+ trace N[nbfaces]--O[nbfaces];
+ trace P[nbfaces]--O[nbfaces];
+ trace M[nbfaces]--N[nbfaces];
+ fi;
+ endfor;
+ endfor;
+ enddef;
+ %
+ vardef EffectuerTraces=
+ if Codes:
+ \useKV[ClesPatron]{Traces};
+ fi;
+ enddef;
+}%
+
+\def\MPPatronCube#1#2{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ \MPPatronCubeCode
+ %
+ n:=0;
+ for p_=#2:
+ n:=n+1;
+ if color p_:
+ Col[n]=p_;
+ else:
+ Col[n]=CoulDefaut;
+ fi;
+ endfor;
+ %
+ Allumage(#1);
+ if AColorier:
+ drawoptions(dashed withdots scaled 0.5);
+ fi;
+ Patron(#1);
+ if AColorier:
+ drawoptions();
+ toto:=0;
+ for l=0 upto nblignes:
+ for k=0 upto Long-1:
+ if Allume[l][k]:
+ toto:=toto+1;
+ % trait vertical gauche
+ if k=0:
+% trace M[toto]--P[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[M[toto],P[toto]])--((t/EcartColorier)[M[toto],P[toto]]+(2*unitvector(P[toto]-M[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l][k-1]=false:
+% trace M[toto]--P[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[M[toto],P[toto]])--((t/EcartColorier)[M[toto],P[toto]]+(2*unitvector(P[toto]-M[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+ % trait vertical droit
+ if k=Long-1:
+ % trace N[toto]--O[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[N[toto],O[toto]])--((t/EcartColorier)[N[toto],O[toto]]+(2*unitvector(O[toto]-N[toto])) rotated 90);
+ endfor;
+ else:
+ if Allume[l][k+1]=false:
+% trace N[toto]--O[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[N[toto],O[toto]])--((t/EcartColorier)[N[toto],O[toto]]+(2*unitvector(O[toto]-N[toto])) rotated 90);
+ endfor;
+ fi;
+ fi;
+ % trait horizontal haut
+ if l=0:
+% trace P[toto]--O[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[P[toto],O[toto]])--((t/EcartColorier)[P[toto],O[toto]]+(2*unitvector(O[toto]-P[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l-1][k]=false:
+% trace P[toto]--O[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[P[toto],O[toto]])--((t/EcartColorier)[P[toto],O[toto]]+(2*unitvector(O[toto]-P[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+ % trait horizontal bas
+ if l=nblignes:
+% trace M[toto]--N[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[M[toto],N[toto]])--((t/EcartColorier)[M[toto],N[toto]]+(2*unitvector(M[toto]-N[toto])) rotated -90);
+ endfor;
+ else:
+ if Allume[l+1][k]=false:
+% trace M[toto]--N[toto] dashed evenly;
+ for t=1 upto EcartColorier-1:
+ trace ((t/EcartColorier)[M[toto],N[toto]])--((t/EcartColorier)[M[toto],N[toto]]+(2*unitvector(M[toto]-N[toto])) rotated -90);
+ endfor;
+ fi;
+ fi;
+ fi;
+ endfor;
+ endfor;
+ fi;
+ EffectuerTraces;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={\MPPatronCubeCode;}]
+ %
+ n:=0;
+ for p_=#2:
+ n:=n+1;
+ if color p_:
+ Col[n]=p_;
+ else:
+ Col[n]=CoulDefaut;
+ fi;
+ endfor;
+ %
+ Patron(#1);
+ EffectuerTraces;
+ \end{mpost}
+ \fi
+}
+
+\def\MPPatronCubeCodeold{%
+ Arete=\useKV[ClesPatron]{Arete};
+ %
+ pair C[],M[],N[],O[],P[];
+ %
+ color Col[],CoulDefaut;
+ CoulDefaut=white;
+ %
boolean Codes;
Codes=\useKV[ClesPatron]{Codes};
vardef Patron(text t)=
@@ -221,7 +670,7 @@
enddef;
}%
-\def\MPPatronCube#1#2{%
+\def\MPPatronCubeold#1#2{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
@@ -259,7 +708,7 @@
\fi
}
-\def\MPPatronPaveCode{%
+\def\MPPatronPaveCodeold{%
Largeur=\useKV[ClesPatron]{Largeur};
Hauteur=\useKV[ClesPatron]{Hauteur};
Profondeur=\useKV[ClesPatron]{Profondeur};
@@ -330,7 +779,7 @@
for k=1 upto Long-1:
if substring(k,k+1) of p_="o":
if k=1:
- PathPave:=(unitsquare scaled 0);
+ PathPave:=(unitsquare scaled 0) shifted ((0,-1));
fi;
elseif substring(k,k+1) of p_="l":
nbcol:=nbcol+1;
@@ -380,7 +829,7 @@
enddef;
}%
-\def\MPPatronPave#1#2{%
+\def\MPPatronPaveold#1#2{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
@@ -397,7 +846,7 @@
%
LectureLargeur(#1);
Patron(#1);
- EffectuerTraces;
+ %EffectuerTraces;
\end{mplibcode}
\else
\begin{mpost}[mpsettings={\MPPatronPaveCode;}]
diff --git a/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex b/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
index 77eecfcb42..df380d48ee 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
@@ -26,9 +26,11 @@
}%
}%
}{%
- \quotient{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}%
- \modulo{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}%
-% quotient = \the\intquotient -- remainder = \the\remainder :
+% \quotient{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}%
+% \modulo{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}%
+ \quotient{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Largeur}/\useKV[ClesPixelArt]{LargeurD}}}%
+ \modulo{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Largeur}/\useKV[ClesPixelArt]{LargeurD}}}%
+% quotient = \the\intquotient -- remainder = \the\remainder :\\
\BuildPixelArtGeant{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}{\the\intquotient}{\the\remainder}%
}%
}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex b/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex
new file mode 100644
index 0000000000..dc6a39b7a5
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex
@@ -0,0 +1,185 @@
+%%%
+% Probabilité et fréquence
+%%%
+\setKVdefault[PfCFrequence]{Couleur=false,Lancers=1,Legende=false}%
+\defKV[PfCFrequence]{ListeCouleurs=\setKV[PfCFrequence]{Couleur}}%
+\defKV[PfCFrequence]{Legendes=\setKV[PfCFrequence]{Legende}\setsepchar{,}\reademptyitems\readlist*\PfMListeLegendes{#1}\reademptyitems}%
+
+\newtoks\tokPfMListeObjets%
+\newtoks\tokPfMListeLegendes%
+\def\UpdatetoksObj#1\nil{\addtotok\tokPfMListeObjets{#1,}}%
+\def\UpdatetoksLegendes#1\nil{\addtotok\tokPfMListeLegendes{"#1",}}%
+
+\NewDocumentCommand\ProbaFrequence{om}{%
+ % #1 options
+ % #2 répartition
+ \tokPfMListeObjets{}%
+ \tokPfMListeLegendes{}%
+ \useKVdefault[PfCFrequence]%
+ \setKV[PfCFrequence]{#1}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\PfMListeObjets{#2}%
+ \reademptyitems%
+ \foreachitem\compteur\in\PfMListeObjets{\expandafter\UpdatetoksObj\compteur\nil}%
+ \ifboolKV[PfCFrequence]{Legende}{%
+ \foreachitem\compteur\in\PfMListeLegendes{\expandafter\UpdatetoksLegendes\compteur\nil}%
+ }{}%
+ \BuildFrequence{\the\tokPfMListeObjets}{\the\tokPfMListeLegendes}%
+}%
+
+\NewDocumentCommand\BuildFrequence{mm}{%
+ \ifluatex
+ \mplibnumbersystem{decimal}%
+ \begin{Geometrie}[CoinBG={u*(-5,0)},CoinHD={u*(7.5,7.5)}]%6 en ordonnee
+ Lancers = \useKV[PfCFrequence]{Lancers};
+ LegendeVide=0;
+ %
+ color Col[];
+ if \useKV[PfCFrequence]{Couleur}:
+ n:=0;
+ for p_=\useKV[PfCFrequence]{ListeCouleurs}:
+ n:=n+1;
+ if color p_:
+ Col[n]=p_;
+ else:
+ LegendeVide:=n;
+ fi;
+ endfor;
+ fi;
+ %
+ string Legende[];
+ vardef EcrireLegendes(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if p_="":
+ LegendeVide:=n;
+ else:
+ Legende[n]=p_;
+ fi;
+ endfor;
+ n:=0;
+ enddef;
+ %
+ vardef LectureDonnees(text t)=
+ numeric A[];
+ numeric SommeTotale;
+ SommeTotale=0;
+ n:=0;
+ for p_=t:
+ n:=incr(n);
+ A[n]=p_;
+ SommeTotale:=SommeTotale+p_;
+ endfor;
+ total:=n;
+ enddef;
+ %
+ LectureDonnees(#1);
+ if \useKV[PfCFrequence]{Legende}:
+ EcrireLegendes(#2);
+ fi;
+ %
+ numeric borne[];
+ borne0=0;
+ for k=1 upto total:
+ borne[k]=borne[k-1]+A[k];
+ endfor;
+ %
+ x.u:=5mm;
+ y.u:=5mm;
+ quad.u:=5mm;
+ unites(1/(170*Lancers),5);
+ origine((1,4));
+ % grille
+ for k=1 upto 11:
+ draw (pp(0,0)--pp(0,1.1)) shifted(pp(k*Lancers*100,0)-pp(0,0)) withcolor gris;
+ draw (pp(0,0)--pp(Lancers*(1000+100),0)) shifted(pp(0,k/10)-pp(0,0)) withcolor gris;
+ endfor;
+ % axe
+ drawarrow pp(0,0)--pp(0,1.1);
+ drawarrow pp(0,0)--pp(Lancers*(1000+100),0);
+ % tiret
+ for k=1 upto 10:
+ draw (pp(k*Lancers*100,0)+u*(0,-0.05))--(pp(k*Lancers*100,0)+u*(0,0.05));
+ endfor;
+ numeric nb[],freq[];
+ pair Freq[][];
+ for k=1 upto total:
+ nb[k]:=0;
+ freq[k]=0;
+ endfor;
+ %
+ for k=1 upto (Lancers*1000):
+ nn:=floor(uniformdeviate(SommeTotale))+1;
+ if nn=0:
+ message("il est nul...");
+ fi;
+ for l=1 upto total:
+ if (nn>borne[l-1]) and (nn<borne[l]+1):
+ nb[l]:=nb[l]+1;
+ fi;
+ freq[l]:=nb[l]/k;
+ Freq[l][k]=pp(k,freq[l]);
+ endfor;
+ endfor;
+ %
+ def Style=enddef;
+ def Stylea=dashed evenly enddef;
+ def Styleb=dashed withdots scaled 1/2 enddef;
+ def Stylec=dashed dashpattern(on 1 off 1) enddef;
+ def Styled=dashed withdots scaled 1/4 enddef;
+ def Stylee=dashed dashpattern(on 6 off2) enddef;
+ parc:=0;
+ for l=1 upto total:
+ if \useKV[PfCFrequence]{Couleur}=false:
+ if (l mod 6)=1:
+ elseif (l mod 6)=2:
+ drawoptions(Stylea);
+ elseif (l mod 6)=3:
+ drawoptions(Styleb);
+ elseif (l mod 6)=4:
+ drawoptions(Stylec);
+ elseif (l mod 6)=5:
+ drawoptions(Styled);
+ else:
+ drawoptions(Stylee);
+ fi;
+ if \useKV[PfCFrequence]{Legende}:
+ parc:=incr(parc);
+ if l<>LegendeVide:
+ draw pp(Lancers*400*((parc-1) mod 3),-0.25-0.1*((parc-1) div 3))--pp(Lancers*400*((parc-1) mod 3)+125,-0.25-0.1*((parc-1) div 3));
+ label.rt(TEX(Legende[l]),pp(Lancers*400*((parc-1) mod 3)+125,-0.25-0.1*((parc-1) div 3)));
+ else:
+ parc:=parc-1;
+ fi;
+ fi;
+ fi;
+ %
+ if l<>LegendeVide:
+ if Lancers<1:
+ trace Freq[l][1]
+ for k=2 upto (1000*Lancers):
+ --Freq[l][k]
+ endfor withcolor if unknown Col[l]:black else:Col[l] fi;
+ else:
+ trace Freq[l][1]
+ for k=5 step 4 until (1000*Lancers):
+ --Freq[l][k]
+ endfor withcolor if unknown Col[l]:black else:Col[l] fi;
+ fi;
+ fi;
+ endfor;
+ drawoptions();
+ for k=1 upto 10 :
+ label.bot(TEX("\scriptsize\num{"&decimal((100*k)*Lancers)&"}"),pp(Lancers*100k,0));
+ endfor;
+ for k=2 step 2 until 10:
+ label.lft(TEX("\scriptsize\num{"&decimal(k/10)&"}"),pp(0,k/10));
+ endfor;
+ label.llft(TEX("\scriptsize 0"),pp(0,0));
+ label.urt(TEX("Fréquence"),pp(0,1));
+ label.bot(TEX("Nombre de lancers"),pp(0.5*Lancers*(1000+200),-0.075));
+ \end{Geometrie}
+ \mplibnumbersystem{scaled}
+ \fi
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex b/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
index 9745bb144c..aaf9a67f20 100644
--- a/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
@@ -4,6 +4,9 @@
\setKVdefault[ClesRelie]{Solution=false,LargeurG=5cm,LargeurD=2cm,Stretch=1.5,Ecart=2cm,Couleur=black}%
\defKV[ClesRelie]{Graine=\PfCGraineAlea{#1}}%
+\newcounter{NbRelie}%
+\newcounter{NbRelieD}
+
\NewDocumentCommand\Relie{som}{%
\useKVdefault[ClesRelie]%
\setKV[ClesRelie]{#2}%
@@ -33,7 +36,13 @@
\itemtomacro\ListeRelie[##1,1]\untest%
\ifx\bla\untest\bla%
\else%
- \tikz[remember picture,overlay]{\draw[PfCRelieCouleurTrace] (RelieG-##1) -- (RelieD-\ListeRelie[##1,3]);}%
+ \itemtomacro\ListeRelie[##1,3]\Foo
+ \setsepchar{-}\ignoreemptyitems%
+ \readlist*\ListeRelieReponses{\Foo}%
+ \reademptyitems
+ \foreachitem\compteur\in\ListeRelieReponses{%
+ \tikz[remember picture,overlay]{\draw[PfCRelieCouleurTrace] (RelieG-##1) -- (RelieD-\ListeRelieReponses[\compteurcnt]);}%
+ }
\fi
}%
}{%
@@ -41,49 +50,39 @@
}%
}%
-\newcommand\Relieold[2][]{%
- \useKVdefault[ClesRelie]%
- \setKV[ClesRelie]{#1}%
- \setsepchar[*]{,*/}\reademptyitems%
- \readlist*\ListeRelie{#2}%
- \ignoreemptyitems
- \buildtabrelie%
- \ifboolKV[ClesRelie]{Solution}{%
- \colorlet{PfCRelieCouleurTrace}{\useKV[ClesRelie]{Couleur}}%
- \xintFor* ##1 in {\xintSeq {1}{\ListeRelielen}}\do{%
- \itemtomacro\ListeRelie[##1,1]\untest
- \ifx\bla\untest\bla%
- \else
- \tikz[remember picture,overlay]{\draw[PfCRelieCouleurTrace] (RelieG-##1) -- (RelieD-\ListeRelie[##1,3]);}%
- \fi
- }%
- }{%
- }%
-}%
-
-\newcounter{NbRelie}%
-
\def\buildtabrelie{%
\setcounter{NbRelie}{0}%
+ \setcounter{NbRelieD}{0}%
\renewcommand{\arraystretch}{\useKV[ClesRelie]{Stretch}}%
- \begin{tabular}{p{\useKV[ClesRelie]{LargeurG}}cp{\useKV[ClesRelie]{Ecart}}>{\tikz[remember
- picture]{\node[name=RelieD-\theNbRelie,inner
- sep=0pt]{};\fill[] (RelieD-\theNbRelie) circle[radius=1.5pt]}}cp{\useKV[ClesRelie]{LargeurD}}}%
- \xintFor* ##1 in {\xintSeq {1}{\ListeRelielen}}\do{\ListeRelie[##1,1]\itemtomacro\ListeRelie[##1,1]\untest%
-\ifx\bla\untest\bla%
+ \begin{tabular}{p{\useKV[ClesRelie]{LargeurG}}cp{\useKV[ClesRelie]{Ecart}}cp{\useKV[ClesRelie]{LargeurD}}}%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeRelielen}}\do{%
+ \ListeRelie[##1,1]\itemtomacro\ListeRelie[##1,1]\untest%
+ \ifx\bla\untest\bla%
\uppercase{&}\stepcounter{NbRelie}%
\else
\uppercase{&}\stepcounter{NbRelie}\tikz[remember
picture,overlay]{\node[name=RelieG-\theNbRelie,inner
sep=0pt]{};\fill[]
(RelieG-\theNbRelie) circle[radius=1.5pt];}
-\fi&&&\ListeRelie[##1,2]\\}%
+ \fi&&
+ \itemtomacro\ListeRelie[##1,2]\untest
+ \ifx\bla\untest\bla\else\stepcounter{NbRelieD}\tikz[remember
+ picture]{\node[name=RelieD-\theNbRelieD,inner
+ sep=0pt]{};\fill[] (RelieD-\theNbRelieD) circle[radius=1.5pt]}
+ \fi
+ &\itemtomacro\ListeRelie[##1,2]\untest%
+ \ifx\bla\untest\bla
+ \else
+ \ListeRelie[##1,2]
+ \fi\\}%
\end{tabular}%
- \setcounter{NbRelie}{0}%
+ %\setcounter{NbRelie}{0}%
+ %\setcounter{NbRelieD}{0}%
}%
\def\buildtabrelieauto{%
\setcounter{NbRelie}{0}%
+ \setcounter{NbRelieD}{0}%
\xdef\PfCFooListeNbQ{1}%
\xintFor* ##1 in{\xintSeq{2}{\ListeRelielen}}\do{%
\xdef\PfCFooListeNbQ{\PfCFooListeNbQ,##1}%
@@ -110,4 +109,5 @@
\fi&&&\itemtomacro\PfCListeReponsesMelangees[##1]\PfCNumReponses\ListeRelie[\PfCNumReponses,2]\\}%
\end{tabular}%
\setcounter{NbRelie}{0}%
-}% \ No newline at end of file
+}%
+
diff --git a/macros/latex/contrib/profcollege/latex/PfCSolides.tex b/macros/latex/contrib/profcollege/latex/PfCSolides.tex
index 9da7bce259..037b80e50f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSolides.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSolides.tex
@@ -1,11 +1,118 @@
%%%
% Solide et sections
%%%
-\setKVdefault[ClesSolides]{Nom=cube,Aretes,Sommets,Pointilles,Largeur=1.5,Hauteur=1,Profondeur=0.75,ListeSommets={A,B,C,D,E,F,G,H},Rho=1500,Phi=30,Theta=20,Distance=50,Code=false,Couleur=white,Anglex=0,RayonCone=1,HauteurCone=2,HauteurPyramide=2,SommetsPyramide=5,Reguliere=false,DecalageSommet={(0,0,0)},RayonCylindre=1,HauteurCylindre=2,RayonSphere=1,AutoLabel=true,Sections=false,CoefSection=0.3,Axes=false,PointsSection={M,N,O,P},RemplisSection=false,ObjetSection={0.5,E,H,0.25,F,G,G,B}}%
+\setKVdefault[ClesSolides]{Nom=cube,Aretes,Sommets,Pointilles,Largeur=1.5,Hauteur=1,Profondeur=0.75,ListeSommets={A,B,C,D,E,F,G,H},Rho=1500,Phi=30,Theta=20,Distance=50,Code=false,Couleur=white,Anglex=0,Arete=1,RayonCone=1,HauteurCone=2,HauteurPrisme=2,SommetsPrisme=6,HauteurPyramide=2,SommetsPyramide=5,Reguliere=false,DecalageSommet={(0,0,0)},RayonCylindre=1,HauteurCylindre=2,RayonSphere=1,AutoLabel=true,Sections=false,CoefSection=0.3,Axes=false,PointsSection={M,N,O,P},RemplisSection=false,ObjetSection={0.5,E,H,0.25,F,G,G,B}}%
\defKV[ClesSolides]{Traces=\setKV[ClesSolides]{Code}}%
\defKV[ClesSolides]{Section=\setKV[ClesSolides]{Sections}}%
\defKV[ClesSolides]{CouleurSection=\setKV[ClesSolides]{RemplisSection}}%
+\newcommand\MPSolidePrisme[4]{%
+ \ifluatex
+ \mplibnumbersystem{double}
+ \mplibforcehmode
+ \begin{mplibcode}
+ input PfCSolid;
+
+ boolean Pointilles,TraceArete,NommeSommets,Code,AutoLabel,Sections,RemplisSection;
+ AutoLabel:=\useKV[ClesSolides]{AutoLabel};
+ Pointilles=\useKV[ClesSolides]{Pointilles};
+ TraceArete=\useKV[ClesSolides]{Aretes};
+ NommeSommets=\useKV[ClesSolides]{Sommets};
+ Code=\useKV[ClesSolides]{Code};
+ Sections:=\useKV[ClesSolides]{Sections};
+ RemplisSection=\useKV[ClesSolides]{RemplisSection};
+ if RemplisSection:color CouleurSection;CouleurSection=\useKV[ClesSolides]{CouleurSection};fi;
+
+ color PfCOutColor;
+ PfCOutColor=Cornsilk;%\useKV[ClesSolides]{Couleur};
+
+ string Section;
+ if Sections:Section=\useKV[ClesSolides]{Section};fi;
+
+ %Initialisation
+ PfCRho=\useKV[ClesSolides]{Rho};
+ PfCPhi=\useKV[ClesSolides]{Phi};
+ PfCTheta=\useKV[ClesSolides]{Theta};
+ PfCDistance=\useKV[ClesSolides]{Distance};
+ anglerotationx=\useKV[ClesSolides]{Anglex};
+ hauteurprisme=\useKV[ClesSolides]{HauteurPrisme};
+ nombresommets=\useKV[ClesSolides]{SommetsPrisme};
+ Initialisation(PfCRho,PfCPhi,PfCTheta,PfCDistance);
+ typetrace:="3D";
+ typerepre:="persp";
+ eclairage:=false;
+ incolor:=white;
+ outcolor:=white;
+ if Pointilles=false:
+ pointilles:="non";
+ fi;
+
+ Ferme1:=true;
+
+ color A,B,C,D,E,F,G,H;
+ color Sommet[];
+
+ NbS:=nombresommets;
+
+ color TS[];
+
+ ecartangle=360/(NbS/2);
+ for k=1 upto (NbS/2):
+ repereangle:=(k-2)*ecartangle+(ecartangle*0.25+uniformdeviate(floor(ecartangle/2)));
+ TS[k]:=(cosd(repereangle),-sind(repereangle),0);
+ endfor;
+ TS[NbS/2+1]:=TS[1];
+
+ for k=1 upto (NbS/2):
+ TS[NbS/2+1+k]:=TS[k]+(0,0,hauteurprisme);
+ endfor;
+ TS[NbS+2]:=TS[NbS/2+2];
+
+ angx:=anglerotationx;
+ for k=1 upto (NbS+2):
+ TS[k]:=RotXYZ(TS[k]);
+ endfor;
+ angx:=0;
+
+ ObjetNew1(%
+ TS1, for k=2 upto (NbS+1):TS[k], endfor TS[NbS+2]
+ )(%
+ NbS/2, for p_=1 upto NbS/2:p_, endfor
+ NbS/2, for p_=NbS/2+1 downto NbS+2:p_, endfor
+ for p=1 upto NbS/2:
+ 4,p,p+1,NbS/2+1+p+1,NbS/2+1+p,%
+ endfor
+ );
+ %AffichageObjet1;
+
+ NF:=(NbS/2+2);
+ Fc[100*(NbS/2+1)]:=NbS/2;
+ for k=1 upto NbS/2:
+ Fc[100*(NbS/2+1)+k]:=k;
+ endfor;
+ Fc[100*(NbS/2+2)]:=NbS/2;
+ for k=1 upto NbS/2:
+ Fc[100*(NbS/2+2)+k]:=NbS+2-k;
+ endfor;
+ for l=1 upto NbS/2:
+ Fc[l*100]:=4;
+ %for k=1 upto 4:
+ Fc[l*100+1]:=l;Fc[l*100+4]:=l+1;Fc[l*100+3]:=NbS/2+1+l+1;Fc[l*100+2]:=NbS/2+1+l;
+ %Fc[101]:=1;Fc[102]:=2;Fc[103]:=6;Fc[104]:=5;
+ %endfor;
+ endfor;
+ DessineObjet;
+% picture Depart;
+% Depart=currentpicture;
+% currentpicture:=nullpicture;
+% for k=1 upto 8:
+% dotlabel.top(decimal(k),Projette(TS[k]));
+% endfor;
+ \end{mplibcode}
+ \mplibnumbersystem{scaled}
+ \fi
+}
+
\newcommand\MPSolideCylindre[3]{%
\ifluatex
\mplibnumbersystem{double}
@@ -927,7 +1034,7 @@
\foreachitem\compteur\in\ListeNomSommet{\expandafter\UpdatetoksSolide\compteur\nil}%\the\toksolidelistesommets%
\IfStrEqCase{\useKV[ClesSolides]{Nom}}{%
{cube}{%
- \MPSolidePave{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{1,1,1}{\useKV[ClesSolides]{PointsSection}}{\useKV[ClesSolides]{ObjetSection}}%
+ \MPSolidePave{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{\useKV[ClesSolides]{Arete},\useKV[ClesSolides]{Arete},\useKV[ClesSolides]{Arete}}{\useKV[ClesSolides]{PointsSection}}{\useKV[ClesSolides]{ObjetSection}}%
}%
{pave}{%
\MPSolidePave{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{\useKV[ClesSolides]{Profondeur},\useKV[ClesSolides]{Largeur},\useKV[ClesSolides]{Hauteur}}{\useKV[ClesSolides]{PointsSection}}{\useKV[ClesSolides]{ObjetSection}}%
@@ -935,6 +1042,9 @@
{cone}{%
\MPSolideCone{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{\useKV[ClesSolides]{PointsSection}}%
}%
+ {prisme}{%
+ \MPSolidePrisme{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{}{\useKV[ClesSolides]{PointsSection}}%
+ }%
{pyramide}{%
\MPSolidePyramide{\useKV[ClesSolides]{ListeSommets}}{\the\toksolidelistesommets}{\useKV[ClesSolides]{DecalageSommet}}{\useKV[ClesSolides]{PointsSection}}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex b/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
index 949c781ce7..461a42fb71 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
@@ -18,9 +18,10 @@
Axes=false,%Affichage des axes ou pas
Origine={(0,0)},%Origine des axes
Cases=false,%Se déplace-t-on sur des cases ?
+ Trace=false%
}
\defKV[Tortue]{Etape=\setKV[Tortue]{Etapes}}%choix de l'étape d'arrêt
-
+\defKV[Tortue]{Traces=\setKV[Tortue]{Trace}}%
\newcounter{PfCTortue}
\setcounter{PfCTortue}{0}
@@ -178,6 +179,9 @@
\ifboolKV[Tortue]{Etapes}{%
\immediate\write\turtle@out{drawoptions(withcolor DarkGreen);label(btex \noexpand\Large\noexpand\ding{40} etex rotated RetiensAngle[Total] scaled 1.5,A[Total]);}%
}{\ifboolKV[Tortue]{TortueF}{\immediate\write\turtle@out{drawoptions(withcolor DarkGreen);label(btex \noexpand\Large\noexpand\ding{40} etex rotated RetiensAngle[k] scaled 1.5,A[k]);}}{}}%
+ \ifboolKV[Tortue]{Trace}{%
+ \immediate\write\turtle@out{\useKV[Tortue]{Traces}}%
+ }{}%
\immediate\closeout\turtle@out%
\restorecomparemode%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex b/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex
new file mode 100644
index 0000000000..895f96136c
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex
@@ -0,0 +1,928 @@
+%%%
+% Urne et probabilités
+%%%
+\newtoks\tokUrneListeCouleurs%
+\newtoks\tokUrneListeColonnes%
+\newtoks\tokUrneListeNombres%
+
+\def\UpdatetoksUrneCouleurs#1\nil{\addtotok\tokUrneListeCouleurs{#1,}}%
+\def\UpdatetoksUrneNombres#1\nil{\addtotok\tokUrneListeNombres{"#1",}}%
+\def\UpdatetoksUrneColonnes#1\nil{\addtotok\tokUrneListeColonnes{"#1",}}%
+
+\setKVdefault[PfCUrne]{Couleurs=false,Nombres=false,Pas=4,Echelle=1,Repartition={1,2,3},Double=false,RepartitionC={1,2,3},RepartitionN={1,2,3},Roue=false,Rayon=3,Tableau=false,SansRemise=false,Solution=false,Codes=false,CouleurLigne=0.85white,CouleurColonne=0.85white,Different=false,RepartitionLigne={1,2,3},RepartitionColonne={1,2,3},Impression,Casino=false}%
+\defKV[PfCUrne]{Traces=\setKV[PfCUrne]{Codes}}%
+\defKV[PfCUrne]{ListeCouleurs=\setKV[PfCUrne]{Couleurs}\setsepchar{,}\ignoreemptyitems\readlist*\ListeCouleursAv{#1}\reademptyitems}%
+\defKV[PfCUrne]{ListeNombres=\setKV[PfCUrne]{Nombres}\setsepchar{,}\ignoreemptyitems\readlist*\ListeNombresAv{#1}\reademptyitems}%
+\defKV[PfCUrne]{ListeColonne=\setsepchar{,}\ignoreemptyitems\readlist*\ListeCouleursAv{#1}\reademptyitems}%
+\defKV[PfCUrne]{ListeLigne=\setsepchar{,}\ignoreemptyitems\readlist*\ListeNombresAv{#1}\reademptyitems}%
+
+\NewDocumentCommand\BuildRoulette{}{%
+ \ifluatex
+ \begin{Geometrie}[Cadre="aucun"]
+ u:=\useKV[PfCUrne]{Echelle}*1cm;
+
+ color colzero,colrouge,coltoura,coltourb,colbarre;
+
+ boolean Impression;
+ Impression=\useKV[PfCUrne]{Impression};
+
+ if Impression=false:
+ colzero=green;
+ colrouge=red;
+ coltoura=(179,103,0)/256;
+ coltourb=(179,111,48)/256;%(184,114,50)/256;
+ colbarre=0.7529white;
+ else:
+ colzero=white;
+ colrouge=white;
+ coltoura=black;
+ coltourb=black;
+ colbarre=black;
+ fi;
+ pair O,A[],B[],C[],D[];
+ path cc[];
+ O=(0,0);
+ cc1=cercles(O,2u);
+ cc2=cercles(O,2.75u);
+ cc3=cercles(O,3.5u);
+ cc4=cercles(O,3.7u);
+ cc5=cercles(O,4u);
+ cc6=cercles(O,3.125u);
+ cc7=cercles(O,2.375u);
+ if Impression=false:
+ fill cc5 withcolor coltoura;
+ fill cc4 withcolor coltourb;
+ fill cc1 withcolor coltoura;
+ trace cc1 withpen pencircle scaled 1.05;
+ trace cc5 withpen pencircle scaled 1.05;
+ trace cc4 withpen pencircle scaled 1.05;
+ trace cc3 withpen pencircle scaled 1.05;
+ else:
+ fill cc5;
+ fill cc4 withcolor white;
+ trace cc1;
+ trace cc3;
+ fi;
+ for k=0 upto 38:
+ A[k]=pointarc(cc3,90-k*(360/37));
+ B[k]=pointarc(cc1,90-k*(360/37));
+ endfor;
+ na:=1;
+ for p_=32,15,19,4,21,2,25,17,34,6,27,13,36,11,30,8,23,10,5,24,16,33,1,20,14,31,9,22,18,29,7,28,12,35,3,26,0:
+ if (na mod 2)=0:
+ fill arccercle(A[na],A[na-1],O)--B[na-1]--reverse(arccercle(B[na],B[na-1],O))--cycle;
+ drawoptions(withcolor white);
+ label(TEX("\textbf{"&decimal(p_)&"}") rotated (-na*(360/37)),pointarc(cc6,90+0.5*(360/37)-na*(360/37)));
+ drawoptions();
+ else:
+ if p_=0:
+ fill arccercle(A[na],A[na-1],O)--B[na-1]--reverse(arccercle(B[na],B[na-1],O))--cycle withcolor colzero;
+ else:
+ fill arccercle(A[na],A[na-1],O)--B[na-1]--reverse(arccercle(B[na],B[na-1],O))--cycle withcolor colrouge;
+ fi;
+ if Impression=false:
+ drawoptions(withcolor white);
+ fi;
+ label(TEX("\textbf{"&decimal(p_)&"}") rotated (-na*(360/37)),pointarc(cc6,90+0.5*(360/37)-na*(360/37)));
+ if Impression=false:
+ drawoptions();
+ fi;
+ fi;
+ trace arccercle(A[na],A[na-1],O)--B[na-1]--reverse(arccercle(B[na],B[na-1],O))--cycle;
+ na:=na+1;
+ endfor;
+ trace cc2;
+ fill cercles(pointarc(cc7,90+0.5*(360/37)),0.125u);%dotlabel("",);
+ % barre
+ cc8=cercles(O,1.5u);
+ cc9=cercles(O,0.25u);
+ fill cc9 withcolor colbarre;
+ pair E[];
+ anglebase=floor(uniformdeviate(360));
+ E1=pointarc(cc8,anglebase);
+ E4=pointarc(cc8,anglebase+6);
+ E3=symetrie(E1,O);
+ E2=symetrie(E4,O);
+ E5=pointarc(cc8,anglebase+90);
+ E8=pointarc(cc8,anglebase+6+90);
+ E7=symetrie(E5,O);
+ E6=symetrie(E8,O);
+ fill polygone(E1,E2,E3,E4) withcolor colbarre;
+ fill polygone(E5,E6,E7,E8) withcolor colbarre;
+ pair F[];
+ F1=(E1--iso(E1,E2)) intersectionpoint cc9;
+ F2=(E4--iso(E3,E4)) intersectionpoint cc9;
+ F3=(E5--iso(E6,E5)) intersectionpoint cc9;
+ F4=(E8--iso(E7,E8)) intersectionpoint cc9;
+ F5=(E3--iso(E4,E3)) intersectionpoint cc9;
+ F6=(E2--iso(E2,E1)) intersectionpoint cc9;
+ F7=(E7--iso(E8,E7)) intersectionpoint cc9;
+ F8=(E6--iso(E6,E5)) intersectionpoint cc9;
+ trace E1--E4--F2--arccercle(F2,F3,O)--E5--E8--F4--arccercle(F4,F5,O)--E3--E2--F6--arccercle(F6,F7,O)--E7--E6--F8--arccercle(F8,F1,O)--cycle;
+ \end{Geometrie}
+ \fi
+}%
+
+\NewDocumentCommand\BuildTableauDoubleEntreeDifferent{mmmm}{%
+ % #1 : les labels en colonne
+ % #2 : les labels en ligne
+ % #3 : la répartition en colonne
+ % #4 : la répartition en ligne
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ u:=\useKV[PfCUrne]{Echelle}*1cm;
+ numeric RetiensNumC[],RetiensNumL[];
+ %
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNumL[n]=p_;
+ n:=n+1;
+ endfor;
+ totallignes=n;
+ enddef;
+ %
+ vardef RecupRepartitionC(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNumC[n]=p_;
+ n:=n+1;
+ endfor;
+ totalcolonnes=n;
+ enddef;
+ %
+ string Colonnes[];
+ vardef RecuperationColonnes(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Colonnes[n]=p_;
+ endfor;
+ enddef;
+ %
+ string Lignes[];
+ vardef RecuperationLignes(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Lignes[n]=p_;
+ endfor;
+ enddef;
+ %
+ boolean Solution, Codes;
+ Solution=\useKV[PfCUrne]{Solution};
+ Codes=\useKV[PfCUrne]{Codes};
+ %
+ color ColLigne,ColColonne;
+ ColLigne=\useKV[PfCUrne]{CouleurLigne};
+ ColColonne=\useKV[PfCUrne]{CouleurColonne};
+ %
+ RecupRepartitionC(#3);
+ RecupRepartition(#4);
+ RecuperationColonnes(#1);
+ RecuperationLignes(#2);
+
+ pair A[][],C[][];
+ for k=0 upto totallignes+1:
+ for l=0 upto totalcolonnes+1:
+ A[k][l]=(0,0) shifted(u*(l,-k));
+ C[k][l]=A[k][l] shifted(u*(0.5,-0.5));
+ endfor;
+ endfor;
+
+ fill polygone(A[0][1],A[0][totalcolonnes+1],A[1][totalcolonnes+1],A[1][1]) withcolor ColLigne;
+ fill polygone(A[1][0],A[totallignes+1][0],A[totallignes+1][1],A[1][1]) withcolor ColColonne;
+ for k=1 upto totalcolonnes:
+ label(TEX(Colonnes[RetiensNumC[k-1]]),iso(A[1][k],A[0][k+1]));
+ endfor;
+ for k=1 upto totallignes:
+ label(TEX(Lignes[RetiensNumL[k-1]]),iso(A[k][0],A[k+1][1]));
+ endfor;
+ %
+ for k=1 upto totallignes:
+ trace segment(A[k][0],A[k][totalcolonnes+1]);
+ endfor;
+ for k=1 upto totalcolonnes:
+ trace segment(A[0][k],A[totallignes+1][k]);
+ endfor;
+ trace A[1][0]--A[totallignes+1][0]--A[totallignes+1][totalcolonnes+1]--A[0][totalcolonnes+1]--A[0][1];
+ labeloffset:=labeloffset*4;
+ label.top(TEX("Tirage 1"),iso(A[0][1],A[0][totalcolonnes+1]));
+ label.lft(TEX("Tirage 2") rotated 90,iso(A[totallignes+1][0],A[1][0]));
+ labeloffset:=labeloffset/4;
+
+ path ccsol[][];
+
+ if Solution:
+ for k=1 upto totallignes:
+ for l=1 upto totalcolonnes:
+ label(TEX(Colonnes[RetiensNumC[l-1]]&"--"&Lignes[RetiensNumL[k-1]]),iso(A[k][l],A[k+1][l+1]));
+ endfor;
+ endfor;
+ fi;
+
+ if Codes:
+ \useKV[PfCUrne]{Traces};
+ fi;
+ \end{mplibcode}
+ \fi
+}%
+
+\NewDocumentCommand\BuildTableauDoubleEntree{mmm}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ u:=\useKV[PfCUrne]{Echelle}*1cm;
+ numeric RetiensNum[];
+ %
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNum[n]=p_;
+ n:=n+1;
+ endfor;
+ totalboules=n;
+ enddef;
+ %
+ color Col[];
+ vardef RecuperationCouleurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Col[n]=p_;
+ endfor;
+ enddef;
+ %
+ string Nombres[];
+ vardef RecuperationNombres(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Nombres[n]=p_;
+ endfor;
+ enddef;
+ %
+ numeric Pas,Rayon;
+ Pas=\useKV[PfCUrne]{Pas};
+ Rayon=\useKV[PfCUrne]{Rayon};
+ %
+ boolean Couleurs, Nombres, Roue, Solution, SansRemise, Codes;
+ Couleurs=\useKV[PfCUrne]{Couleurs};
+ Nombres=\useKV[PfCUrne]{Nombres};
+ Roue=\useKV[PfCUrne]{Roue};
+ Solution=\useKV[PfCUrne]{Solution};
+ SansRemise=\useKV[PfCUrne]{SansRemise};
+ Codes=\useKV[PfCUrne]{Codes};
+
+ color ColLigne,ColColonne;
+ ColLigne=\useKV[PfCUrne]{CouleurLigne};
+ ColColonne=\useKV[PfCUrne]{CouleurColonne};
+
+ RecupRepartition(#3);
+ if Couleurs:
+ RecuperationCouleurs(#1);
+ fi;
+ if Nombres:
+ RecuperationNombres(#2);
+ fi;
+
+ pair O;
+ pair A[][],C[][];
+ for k=0 upto totalboules+1:
+ for l=0 upto totalboules+1:
+ A[k][l]:=(0,0) shifted(u*(l,-k));
+ endfor;
+ endfor;
+
+ for k=0 upto totalboules:
+ for l=0 upto totalboules:
+ C[k][l]=A[k][l] shifted(u*(0.5,-0.5));
+ endfor;
+ endfor;
+
+ if Couleurs:
+ drawoptions(withpen pencircle scaled 0.75);
+ for k=1 upto totalboules:
+ fill cercles(iso(A[1][k],A[0][k+1]),0.35u) withcolor Col[RetiensNum[k-1]];
+ fill cercles(iso(A[k][0],A[k+1][1]),0.35u) withcolor Col[RetiensNum[k-1]];
+ trace cercles(iso(A[1][k],A[0][k+1]),0.35u);
+ trace cercles(iso(A[k][0],A[k+1][1]),0.35u);
+ endfor;
+ drawoptions();
+ else:
+ fill polygone(A[0][1],A[0][totalboules+1],A[1][totalboules+1],A[1][1]) withcolor ColLigne;
+ fill polygone(A[1][0],A[totalboules+1][0],A[totalboules+1][1],A[1][1]) withcolor ColColonne;
+ for k=1 upto totalboules:
+ label(TEX(Nombres[RetiensNum[k-1]]),iso(A[1][k],A[0][k+1]));
+ label(TEX(Nombres[RetiensNum[k-1]]),iso(A[k][0],A[k+1][1]));
+ endfor;
+ fi;
+ if SansRemise:
+ for k=1 upto totalboules:
+ draw 1/8[A[k][k],A[k+1][k+1]]--7/8[A[k][k],A[k+1][k+1]];
+ draw 1/8[A[k+1][k],A[k][k+1]]--7/8[A[k+1][k],A[k][k+1]];
+ endfor;
+ fi;
+ for k=1 upto totalboules:
+ trace segment(A[k][0],A[k][totalboules+1]);
+ trace segment(A[0][k],A[totalboules+1][k]);
+ endfor;
+ trace A[1][0]--A[totalboules+1][0]--A[totalboules+1][totalboules+1]--A[0][totalboules+1]--A[0][1];
+ labeloffset:=labeloffset*4;
+ label.top(TEX("Tirage 1"),iso(A[0][1],A[0][totalboules+1]));
+ label.lft(TEX("Tirage 2") rotated 90,iso(A[totalboules+1][0],A[1][0]));
+ labeloffset:=labeloffset/4;
+
+ path ccsol[][];
+
+ if Solution:
+ if Couleurs:
+ drawoptions(withpen pencircle scaled 0.75);
+ for k=1 upto totalboules:
+ for l=1 upto totalboules:
+ ccsol[k][l]=cercles(iso(A[k][l],A[k+1][l+1]),0.25u);
+ if SansRemise:
+ if k<>l:
+ fill arccercle(pointarc(ccsol[k][l],315),pointarc(ccsol[k][l],135),iso(A[k][l],A[k+1][l+1]))--iso(A[k][l],A[k+1][l+1])--cycle withcolor Col[RetiensNum[l-1]];
+ fill arccercle(pointarc(ccsol[k][l],135),pointarc(ccsol[k][l],315),iso(A[k][l],A[k+1][l+1]))--iso(A[k][l],A[k+1][l+1])--cycle withcolor Col[RetiensNum[k-1]];
+ trace segment(pointarc(ccsol[k][l],135),pointarc(ccsol[k][l],315));
+ trace ccsol[k][l];
+ fi;
+ else:
+ fill arccercle(pointarc(ccsol[k][l],315),pointarc(ccsol[k][l],135),iso(A[k][l],A[k+1][l+1]))--iso(A[k][l],A[k+1][l+1])--cycle withcolor Col[RetiensNum[l-1]];
+ fill arccercle(pointarc(ccsol[k][l],135),pointarc(ccsol[k][l],315),iso(A[k][l],A[k+1][l+1]))--iso(A[k][l],A[k+1][l+1])--cycle withcolor Col[RetiensNum[k-1]];
+ trace segment(pointarc(ccsol[k][l],135),pointarc(ccsol[k][l],315));
+ trace ccsol[k][l];
+ fi;
+ endfor;
+ endfor;
+ drawoptions();
+ else:
+ for k=1 upto totalboules:
+ for l=1 upto totalboules:
+ if SansRemise:
+ if k<>l:
+ label(TEX(Nombres[RetiensNum[l-1]]&"--"&Nombres[RetiensNum[k-1]]),iso(A[k][l],A[k+1][l+1]));
+ fi;
+ else:
+ label(TEX(Nombres[RetiensNum[l-1]]&"--"&Nombres[RetiensNum[k-1]]),iso(A[k][l],A[k+1][l+1]));
+ fi;
+ endfor;
+ endfor;
+ fi;
+ fi;
+
+ if Codes:
+ \useKV[PfCUrne]{Traces};
+ fi;
+ \end{mplibcode}
+ \fi
+}%
+
+\NewDocumentCommand\BuildUrne{mmm}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ u:=\useKV[PfCUrne]{Echelle}*1cm;
+ numeric RetiensNum[];
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNum[n]=p_;
+ n:=n+1;
+ endfor;
+ totalboules=n;
+ enddef;
+
+ color Col[];
+ vardef RecuperationCouleurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Col[n]=p_;
+ endfor;
+ enddef;
+
+ string Nombres[];
+ vardef RecuperationNombres(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Nombres[n]=p_;
+ endfor;
+ enddef;
+
+ numeric Pas,Rayon;
+ Pas=\useKV[PfCUrne]{Pas};
+ Rayon=\useKV[PfCUrne]{Rayon};
+
+ boolean Couleurs, Nombres, Roue;
+ Couleurs=\useKV[PfCUrne]{Couleurs};
+ Nombres=\useKV[PfCUrne]{Nombres};
+ Roue=\useKV[PfCUrne]{Roue};
+
+ RecupRepartition(#3);
+ if Couleurs:
+ RecuperationCouleurs(#1);
+ fi;
+ if Nombres:
+ RecuperationNombres(#2);
+ fi;
+
+ pair O;
+ pair A[],B[];
+
+ if Roue:
+ O=(0,0);
+ path cc;
+ cc=cercles(O,Rayon*u);
+ angd=180/totalboules;
+ angr=360/totalboules;
+ for k=1 upto totalboules:
+ A[k]=17/20[O,pointarc(cc,angd+(k-1)*angr)];
+ endfor;
+ drawarrow rotation((O+u*(0,1.35*Rayon))--(O+u*(0,1.1*Rayon)),O,angd);
+ % trace cc;
+ B[0]=pointarc(cc,0);
+ for k=1 upto totalboules:
+ B[k]=pointarc(cc,k*angr);
+ if Couleurs:
+ fill O--arccercle(B[k-1],B[k],O)--cycle withcolor if unknown Col[RetiensNum[k-1]]:white else: Col[RetiensNum[k-1]] fi;
+ else:
+ label(TEX(Nombres[RetiensNum[k-1]]),A[k]);
+ fi;
+ endfor;
+ trace cc;
+ for k=1 upto totalboules:
+ trace O--B[k];
+ endfor;
+ else:
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ A[rang]=u*(0.5,0.5)+u*(l,k);
+ if Couleurs:
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensNum[rang]]:white else: Col[RetiensNum[rang]] fi;
+ else:
+ label(TEX(Nombres[RetiensNum[rang]]),A[rang]);
+ fi;
+ %trace cercles(A[k*Pas+l],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ A[rang]=u*(0.5,0.5)+u*(k+0.5,totalboules div Pas-1+cosd(30));
+ if Couleurs:
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensNum[rang]]:white else: Col[RetiensNum[rang]] fi;
+ else:
+ label(TEX(Nombres[RetiensNum[rang]]),A[rang]);
+ fi;
+ %trace cercles(A[(totalboules div Pas)*Pas+k],0.5u);
+ endfor;
+ %
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ %
+ drawoptions(withpen pencircle scaled 1.2);
+ if totalboules<Pas:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0-(1-cosd(30)))--u*(Pas,0-(1-cosd(30)))--u*(Pas,(totalboules div Pas)+1.15);
+ else:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0)--u*(Pas,0)--u*(Pas,(totalboules div Pas)+1.15);
+ fi;
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={u:=\useKV[PfCUrne]{Echelle}*1cm;numeric Pas;Pas=\useKV[PfCUrne]{Pas}; boolean Couleurs, Nombres; Couleurs=\useKV[PfCUrne]{Couleurs}; Nombres=\useKV[PfCUrne]{Nombres};}]
+ numeric RetiensNum[];
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNum[n]=p_;
+ n:=n+1;
+ endfor;
+ totalboules=n;
+ enddef;
+
+ color Col[];
+ vardef RecuperationCouleurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Col[n]=p_;
+ endfor;
+ enddef;
+
+ string Nombres[];
+ vardef RecuperationNombres(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Nombres[n]=p_;
+ endfor;
+ enddef;
+
+ RecupRepartition(#3);
+ if Couleurs:
+ RecuperationCouleurs(#1);
+ fi;
+ if Nombres:
+ RecuperationNombres(#2);
+ fi;
+
+ pair A[];
+
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ A[rang]=u*(0.5,0.5)+u*(l,k);
+ if Couleurs:
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensNum[rang]]:white else: Col[RetiensNum[rang]] fi;
+ else:
+ label(LATEX(Nombres[RetiensNum[rang]]),A[rang]);
+ fi;
+ %trace cercles(A[k*Pas+l],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ A[rang]=u*(0.5,0.5)+u*(k+0.5,totalboules div Pas-1+cosd(30));
+ if Couleurs:
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensNum[rang]]:white else: Col[RetiensNum[rang]] fi;
+ else:
+ label(LATEX(Nombres[RetiensNum[rang]]),A[rang]);
+ fi;
+ %trace cercles(A[(totalboules div Pas)*Pas+k],0.5u);
+ endfor;
+ %
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ %
+ drawoptions(withpen pencircle scaled 1.2);
+ if totalboules<Pas:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0-(1-cosd(30)))--u*(Pas,0-(1-cosd(30)))--u*(Pas,(totalboules div Pas)+1.15);
+ else:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0)--u*(Pas,0)--u*(Pas,(totalboules div Pas)+1.15);
+ fi;
+ \end{mpost}
+ \fi
+}%
+
+\NewDocumentCommand\BuildUrneDouble{mmmm}{%
+ % #1 Liste Couleurs
+ % #2 Liste Nombres
+ % #3 Repartition des couleurs
+ % #4 Repartition des nombres
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ u:=\useKV[PfCUrne]{Echelle}*1cm;
+ numeric RetiensC[],RetiensNum[];
+ vardef RecupRepartitionC(text t)=
+ n:=0;
+ for p_=t:
+ RetiensC[n]=p_;
+ n:=n+1;
+ endfor;
+ totalboules=n;
+ enddef;
+
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNum[n]=p_;
+ n:=n+1;
+ endfor;
+ enddef;
+
+ color Col[];
+ vardef RecuperationCouleurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Col[n]=p_;
+ endfor;
+ enddef;
+
+ string Nombres[];
+ vardef RecuperationNombres(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Nombres[n]=p_;
+ endfor;
+ enddef;
+
+ numeric Pas,Rayon;
+ Pas=\useKV[PfCUrne]{Pas};
+ Rayon=\useKV[PfCUrne]{Rayon};
+
+ boolean Roue;
+ Roue=\useKV[PfCUrne]{Roue};
+
+ RecupRepartitionC(#3);
+ RecupRepartition(#4);
+ RecuperationCouleurs(#1);
+ RecuperationNombres(#2);
+
+ pair O;
+ pair A[],B[];
+
+ if Roue:
+ O=(0,0);
+ path cc;
+ cc=cercles(O,Rayon*u);
+ angd=180/totalboules;
+ angr=360/totalboules;
+ for k=1 upto totalboules:
+ A[k]=17/20[O,pointarc(cc,angd+(k-1)*angr)];
+ endfor;
+ B[0]=pointarc(cc,0);
+ for k=1 upto totalboules:
+ B[k]=pointarc(cc,k*angr);
+ fill O--arccercle(B[k-1],B[k],O)--cycle withcolor if unknown Col[RetiensC[k-1]]:white else: Col[RetiensC[k-1]] fi;
+ label(TEX(Nombres[RetiensNum[k-1]]),A[k]);
+ endfor;
+ trace cc;
+ for k=1 upto totalboules:
+ trace O--B[k];
+ endfor;
+ drawarrow rotation((O+u*(0,1.35*Rayon))--(O+u*(0,1.1*Rayon)),O,angd);
+ else:
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ A[rang]=u*(0.5,0.5)+u*(l,k);
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensC[rang]]:white else: Col[RetiensC[rang]] fi;
+ label(TEX(Nombres[RetiensNum[rang]]),A[rang]);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ A[rang]=u*(0.5,0.5)+u*(k+0.5,totalboules div Pas-1+cosd(30));
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensC[rang]]:white else: Col[RetiensC[rang]] fi;
+ label(TEX(Nombres[RetiensNum[rang]]),A[rang]);
+ endfor;
+ %
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ %
+ drawoptions(withpen pencircle scaled 1.2);
+ if totalboules<Pas:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0-(1-cosd(30)))--u*(Pas,0-(1-cosd(30)))--u*(Pas,(totalboules div Pas)+1.15);
+ else:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0)--u*(Pas,0)--u*(Pas,(totalboules div Pas)+1.15);
+ fi;
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={u:=\useKV[PfCUrne]{Echelle}*1cm;numeric RetiensC[],RetiensNum[];numeric Pas,Rayon;Pas=\useKV[PfCUrne]{Pas};Rayon=\useKV[PfCUrne]{Rayon};boolean Roue;Roue=\useKV[PfCUrne]{Roue};}]
+ vardef RecupRepartitionC(text t)=
+ n:=0;
+ for p_=t:
+ RetiensC[n]=p_;
+ n:=n+1;
+ endfor;
+ totalboules=n;
+ enddef;
+
+ vardef RecupRepartition(text t)=
+ n:=0;
+ for p_=t:
+ RetiensNum[n]=p_;
+ n:=n+1;
+ endfor;
+ enddef;
+
+ color Col[];
+ vardef RecuperationCouleurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Col[n]=p_;
+ endfor;
+ enddef;
+
+ string Nombres[];
+ vardef RecuperationNombres(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Nombres[n]=p_;
+ endfor;
+ enddef;
+
+ RecupRepartitionC(#3);
+ RecupRepartition(#4);
+ RecuperationCouleurs(#1);
+ RecuperationNombres(#2);
+
+ pair O;
+ pair A[],B[];
+
+ if Roue:
+ O=(0,0);
+ path cc;
+ cc=cercles(O,Rayon*1cm);
+ angd=180/totalboules;
+ angr=360/totalboules;
+ for k=1 upto totalboules:
+ A[k]=17/20[O,pointarc(cc,angd+(k-1)*angr)];
+ endfor;
+ B[0]=pointarc(cc,0);
+ for k=1 upto totalboules:
+ B[k]=pointarc(cc,k*angr);
+ fill O--arccercle(B[k-1],B[k],O)--cycle withcolor if unknown Col[RetiensC[k-1]]:white else: Col[RetiensC[k-1]] fi;
+ label(LATEX(Nombres[RetiensNum[k-1]]),A[k]);
+ endfor;
+ trace cc;
+ for k=1 upto totalboules:
+ trace O--B[k];
+ endfor;
+ else:
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ A[rang]=u*(0.5,0.5)+u*(l,k);
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensC[rang]]:white else: Col[RetiensC[rang]] fi;
+ label(LATEX(Nombres[RetiensNum[rang]]),A[rang]);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ A[rang]=u*(0.5,0.5)+u*(k+0.5,totalboules div Pas-1+cosd(30));
+ fill cercles(A[rang],0.5u) withcolor if unknown Col[RetiensC[rang]]:white else: Col[RetiensC[rang]] fi;
+ label(LATEX(Nombres[RetiensNum[rang]]),A[rang]);
+ endfor;
+ %
+ for k=0 upto (totalboules div Pas)-1:
+ for l=0 upto Pas-1:
+ rang:=k*Pas+l;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ endfor;
+ for k=0 upto (totalboules mod Pas)-1:
+ rang:=(totalboules div Pas)*Pas+k;
+ trace cercles(A[rang],0.5u);
+ endfor;
+ %
+ drawoptions(withpen pencircle scaled 1.2);
+ if totalboules<Pas:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0-(1-cosd(30)))--u*(Pas,0-(1-cosd(30)))--u*(Pas,(totalboules div Pas)+1.15);
+ else:
+ trace u*(0,(totalboules div Pas)+1.15)--u*(0,0)--u*(Pas,0)--u*(Pas,(totalboules div Pas)+1.15);
+ fi;
+ fi;
+ \end{mpost}
+ \fi
+}%
+
+\NewDocumentCommand\SchemaProba{o}{%
+ \useKVdefault[PfCUrne]%
+ \setKV[PfCUrne]{#1}%
+ \tokUrneListeCouleurs{}%
+ \tokUrneListeNombres{}%
+ \tokUrneListeColonnes{}%
+ \ifboolKV[PfCUrne]{Casino}{%
+ \BuildRoulette%
+ }{%
+ \ifboolKV[PfCUrne]{Tableau}{%
+ \ifboolKV[PfCUrne]{Different}{%
+ \xdef\PfCFooRepartitionC{\useKV[PfCUrne]{RepartitionColonne}}%
+ \xdef\PfCFooRepartitionL{\useKV[PfCUrne]{RepartitionLigne}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeRepartitionCAv{\PfCFooRepartitionC}%
+ \readlist*\ListeRepartitionLAv{\PfCFooRepartitionL}%
+ % Repartition : \showitems\ListeRepartitionAv[]%
+ \xdef\PfCFooListeRepartitionC{}%
+ \xdef\PfCFooListeRepartitionL{}%
+ \xdef\PfCTotalC{0}%
+ \xdef\PfCTotalL{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionCAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionCAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartitionC{\PfCFooListeRepartitionC,##1}%
+ \xdef\PfCTotalC{\fpeval{\PfCTotalC+1}}%
+ }%
+ }%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionLAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionLAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartitionL{\PfCFooListeRepartitionL,##1}%
+ \xdef\PfCTotalL{\fpeval{\PfCTotalL+1}}%
+ }%
+ }%
+ \foreachitem\compteur\in\ListeCouleursAv{\expandafter\UpdatetoksUrneColonnes\compteur\nil}%
+ \foreachitem\compteur\in\ListeNombresAv{\expandafter\UpdatetoksUrneNombres\compteur\nil}%
+ \BuildTableauDoubleEntreeDifferent{\the\tokUrneListeColonnes}{\the\tokUrneListeNombres}{\PfCFooListeRepartitionC}{\PfCFooListeRepartitionL}%
+ }{%
+ \xdef\PfCFooRepartition{\useKV[PfCUrne]{Repartition}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeRepartitionAv{\PfCFooRepartition}%
+ \xdef\PfCFooListeRepartition{}%
+ \xdef\PfCTotal{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartition{\PfCFooListeRepartition,##1}%
+ \xdef\PfCTotal{\fpeval{\PfCTotal+1}}%
+ }%
+ }%
+ \ifboolKV[PfCUrne]{Couleurs}{%
+ \foreachitem\compteur\in\ListeCouleursAv{\expandafter\UpdatetoksUrneCouleurs\compteur\nil}%
+ \BuildTableauDoubleEntree{\the\tokUrneListeCouleurs}{}{\PfCFooListeRepartition}%
+ }{%
+ \ifboolKV[PfCUrne]{Nombres}{%
+ \foreachitem\compteur\in\ListeNombresAv{\expandafter\UpdatetoksUrneNombres\compteur\nil}%
+ \BuildTableauDoubleEntree{}{\the\tokUrneListeNombres}{\PfCFooListeRepartition}%
+ }{}%
+ }%
+ }%
+ }{%
+ \ifboolKV[PfCUrne]{Double}{%
+ \xdef\PfCFooRepartitionC{\useKV[PfCUrne]{RepartitionC}}%
+ \xdef\PfCFooRepartitionN{\useKV[PfCUrne]{RepartitionN}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeRepartitionCAv{\PfCFooRepartitionC}%
+ \readlist*\ListeRepartitionNAv{\PfCFooRepartitionN}%
+ % Repartition : \showitems\ListeRepartitionAv[]%
+ \xdef\PfCFooListeRepartitionC{}%
+ \xdef\PfCFooListeRepartitionN{}%
+ \xdef\PfCTotalC{0}%
+ \xdef\PfCTotalN{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionCAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionCAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartitionC{\PfCFooListeRepartitionC,##1}%
+ \xdef\PfCTotalC{\fpeval{\PfCTotalC+1}}%
+ }%
+ }%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionNAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionNAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartitionN{\PfCFooListeRepartitionN,##1}%
+ \xdef\PfCTotalN{\fpeval{\PfCTotalN+1}}%
+ }%
+ }%
+ \MelangeListe{\PfCFooListeRepartitionC}{\PfCTotalC}%
+ \xdef\ListeRepartitionCouleurs{\faa}%
+ \foreachitem\compteur\in\ListeCouleursAv{\expandafter\UpdatetoksUrneCouleurs\compteur\nil}%
+ \MelangeListe{\PfCFooListeRepartitionN}{\PfCTotalN}%
+ \xdef\ListeRepartitionNombres{\faa}%
+ \foreachitem\compteur\in\ListeNombresAv{\expandafter\UpdatetoksUrneNombres\compteur\nil}%
+ \BuildUrneDouble{\the\tokUrneListeCouleurs}{\the\tokUrneListeNombres}{\ListeRepartitionCouleurs}{\ListeRepartitionNombres}%
+ }{%
+ \xdef\PfCFooRepartition{\useKV[PfCUrne]{Repartition}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeRepartitionAv{\PfCFooRepartition}%
+ % Repartition : \showitems\ListeRepartitionAv[]%
+ \xdef\PfCFooListeRepartition{}%
+ \xdef\PfCTotal{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeRepartitionAvlen}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\ListeRepartitionAv[##1]}}\do{%
+ \xdef\PfCFooListeRepartition{\PfCFooListeRepartition,##1}%
+ \xdef\PfCTotal{\fpeval{\PfCTotal+1}}%
+ }%
+ }%
+ \ifboolKV[PfCUrne]{Couleurs}{%
+ \MelangeListe{\PfCFooListeRepartition}{\PfCTotal}%
+ \xdef\ListeRepartitionCouleurs{\faa}%
+ \foreachitem\compteur\in\ListeCouleursAv{\expandafter\UpdatetoksUrneCouleurs\compteur\nil}%
+ % Couleurs :\\
+ % La répartition est : \ListeRepartitionCouleurs\\
+ % Les couleurs sont : \the\tokUrneListeCouleurs.\\
+ \BuildUrne{\the\tokUrneListeCouleurs}{}{\ListeRepartitionCouleurs}%
+ }{%
+ \ifboolKV[PfCUrne]{Nombres}{%
+ \MelangeListe{\PfCFooListeRepartition}{\PfCTotal}%
+ \xdef\ListeRepartitionNombres{\faa}%
+ \foreachitem\compteur\in\ListeNombresAv{\expandafter\UpdatetoksUrneNombres\compteur\nil}%
+ % Nombres :\\
+ % La répartition est : \ListeRepartitionNombres\\
+ % Les nombres sont : \the\tokUrneListeNombres.\\
+ \BuildUrne{}{\the\tokUrneListeNombres}{\ListeRepartitionNombres}%
+ }{}%
+ }%
+ }%
+}%
+}%
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index ca3b52ba9a..a6b767a3bf 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/05/18}%
+\def\filedate{2024/07/03}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-A-f}%
+\def\fileversion{0.99-A-g}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
@@ -124,7 +124,6 @@
\RequirePackage{listofitems}%
\RequirePackage{datatool}%
\RequirePackage{multido}%
-
\RequirePackage{xlop}%
\RequirePackage{tcolorbox}%
@@ -637,18 +636,18 @@
\tikzset{face/.style={shape=circle,minimum size=4ex,shading=radial,outer sep=0pt, inner color=white!50!yellow,outer color= yellow!70!orange}}
\newcommand\emoticon[2][]{%
-\scalebox{.5}{\begin{tikzpicture}
-\node[face,#1,draw,thick] (emoticon) {};
+\scalebox{.5}{\begin{tikzpicture}%
+\node[face,#1,draw,thick] (emoticon) {};%
%% The eyes are fixed.
\draw[fill=white] (-1ex,0ex) ..controls (-0.5ex,0.2ex)and(0.5ex,0.2ex)..(1ex,0.0ex) ..controls ( 1.5ex,1.5ex)and( 0.2ex,1.7ex)..(0ex,0.4ex) ..controls (-0.2ex,1.7ex)and(-1.5ex,1.5ex)..(-1ex,0ex)--cycle;
#2%
\end{tikzpicture}}%
-}
+}%
-\newcommand\pupils{
+\newcommand\pupils{%
%% standard pupils
-\fill[shift={(0.5ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
-\fill[shift={(-0.5ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);}
+\fill[shift={(0.5ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);%
+\fill[shift={(-0.5ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);}%
\def\RKsmallsmile{%
\emoticon{%
@@ -656,14 +655,14 @@
%% mouth
\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex);
}%\emoticon
-}
+}%
\def\RKsmile{%
\emoticon{%
\pupils
\draw[thick] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
}%\emoticon
-}
+}%
\def\RKbigsmile{%
\emoticon{%
@@ -671,7 +670,7 @@
%% mouth
\draw[thick] (-1.5ex,-0.5ex)..controls (-0.7ex,-1.7ex)and(0.7ex,-1.7ex)..(1.5ex,-0.5ex);
}%\emoticon
-}
+}%
\def\RKsad{%
\emoticon{%
@@ -681,7 +680,7 @@
%% mouth
\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
}%\emoticon
-}
+}%
\def\RKneutral{%
\emoticon{%
@@ -691,7 +690,7 @@
%% mouth
\draw[thick] (-0.5ex,-1ex)--(0.5ex,-1ex);
}%\emoticon
-}
+}%
\def\RKconfused{%
\emoticon{%
@@ -716,19 +715,19 @@
(-1.00ex,1.00ex)--(-1.20ex,1.10ex)
(-0.35ex,1.15ex)--(-0.25ex,1.35ex);
}%\emoticon
-}
+}%
\def\RKangry{%
\emoticon{%
%% pupils
-\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
-\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);%
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);%
%% mouth
-\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);%
%% eyebrows
-\draw[thick] (0.2ex,1.15ex)--(0.5ex,1.6ex)(-0.2ex,1.15ex)--(-0.5ex,1.6ex);
+\draw[thick] (0.2ex,1.15ex)--(0.5ex,1.6ex)(-0.2ex,1.15ex)--(-0.5ex,1.6ex);%
}%\emoticon
-}
+}%
\def\RKlookup{%
\emoticon{%
@@ -826,6 +825,8 @@
\def\PfCSymbolTimes{\times}%
\def\PfCSymbolDiv{\div}%
+\input{PfCUrneProba}
+\input{PfCProbaFrequence}
\input{PfCVisualisationMulDeci}
\input{PfCArbreChiffre}
\input{PfCAssemblagesSolides}
@@ -971,4 +972,11 @@
\input{PfCDomino}
\input{PfCProgrammeCalcul}
\input{PfCPapiers}
-\input{PfCScratch} \ No newline at end of file
+\input{PfCScratch}
+
+\RequirePackage{PfCInfixRPN}
+%\makeatletter
+%\let\@nil\@empty
+%\makeatother
+
+\input{PfCArbreCalcul} \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/metapost/PfCMonde.mp b/macros/latex/contrib/profcollege/metapost/PfCMonde.mp
index fb3064cefd..6cc7f15e45 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCMonde.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCMonde.mp
@@ -151,6 +151,15 @@ enddef;
vardef FZ(expr t,v)=rayon*sind(c*t)
enddef;
+vardef FXx(expr t,v)=rayon*cosd(t)*cosd(v)
+enddef;
+
+vardef FYy(expr t,v)=rayon*cosd(t)*sind(v)
+enddef;
+
+vardef FZz(expr t,v)=rayon*sind(t)
+enddef;
+
%Paramtres et macros de reprsentation
vardef Initialisation(expr r,t,p,d)=
Rho:=r;
@@ -227,6 +236,25 @@ vardef MaillageSphere=
MaillageS;
enddef;
+vardef MaillageSphereCoord=
+% InitialiseMaillage(((phim div 10)+1)*pi/12,((phip div 10)-1)*pi/12,pi/12,-pi,pi,pi/12);
+ InitialiseMaillage(-pi/2,pi/2,pi/18,-pi,pi,pi/12);
+ %MaillageS;
+ path Maillage[];
+ nbmor:=0;
+ for k=-90 step 10 until 90:
+ for l=-180 step 10 until 180:
+ nbl:=nbl+1;
+ if ProduitScalaire(1/2[(FXx(k,l),FYy(k,l),FZz(k,l)),(FXx(k+10,l+10),FYy(k+10,l+10),FZz(k+10,l+10))]-pte3,Oeil-pte3)>0:
+ nbmor:=nbmor+1;
+ Maillage[nbmor]=Projgeo((FXx(k,l),FYy(k,l),FZz(k,l)))..Projgeo((FXx(k,l+10),FYy(k,l+10),FZz(k,l+10)));
+ draw Maillage[nbmor] if k=0: withpen pencircle scaled 1 withcolor Crimson fi;
+ draw Projgeo((FXx(k,l),FYy(k,l),FZz(k,l)))..Projgeo((FXx(k+10,l),FYy(k+10,l),FZz(k+10,l))) if l=0:withpen pencircle scaled 1 withcolor LightSteelBlue fi;
+ fi;
+ endfor;
+ endfor;
+enddef;
+
boolean maille;
maille=false;
@@ -276,9 +304,19 @@ vardef lecture(expr nomfichier,fond)=
numeric ll;
ll:=0;
nbpts:=scantokens readfrom nomfichier;
- for k=1 upto (nbpts div 3):
+% for k=1 upto (nbpts div 3):
+% pair latlon;
+% latlon=((scantokens readfrom nomfichier)+(scantokens readfrom nomfichier)+(scantokens readfrom nomfichier))/3;
+ if nbpts<Allegee:
+ Alleg:=1;
+ else:
+ Alleg:=Allegee;
+ fi;
+ for k=1 upto (nbpts div Alleg):
pair latlon;
- latlon=((scantokens readfrom nomfichier)+(scantokens readfrom nomfichier)+(scantokens readfrom nomfichier))/3;
+ latlon=((scantokens readfrom nomfichier) for l=2 upto Alleg:
+ +(scantokens readfrom nomfichier)
+ endfor)/Alleg;
Coord[k]=rayon*(cosd(xpart(latlon/60))*cosd(ypart(latlon/60)),cosd(xpart(latlon/60))*sind(ypart(latlon/60)),sind(xpart(latlon/60)));
if ((xpart(latlon/60)>phim) and (xpart(latlon/60)<phip)):
if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0:
@@ -295,7 +333,7 @@ vardef lecture(expr nomfichier,fond)=
path pays;
if ll>0:
pays=Projgeo(Pays[1])
- for l=2 upto (nbpts div 3):
+ for l=2 upto (nbpts div Alleg):%(nbpts div 3):
--Projgeo(Pays[l])
endfor;
if noncolore=true:
@@ -303,7 +341,7 @@ vardef lecture(expr nomfichier,fond)=
else:
fill pays--cycle withcolor fond;
fi;
- draw pays;
+ draw pays withpen pencircle scaled 0.25;
clip currentpicture to cercles(pte3,pte1,pte3,pte1,pte4);
fi;
enddef;
@@ -319,9 +357,19 @@ vardef Lectureiles=
ll:=0;
nbpts:=scantokens readfrom nomfichiermul;
fond=scantokens readfrom nomfichiermul;
- for k=1 upto nbpts:
+ %if nbpts<Allegee:
+ Alleg:=1;
+ %else:
+ % Alleg:=2;%pas Allegee car sinon des artefacts apparaissent
+ %fi;
+ for k=1 upto (nbpts div Alleg):
pair latlon;
- latlon=scantokens readfrom nomfichiermul;
+ latlon=((scantokens readfrom nomfichiermul) for l=2 upto Alleg:
+ +(scantokens readfrom nomfichiermul)
+ endfor)/Alleg;
+% for k=1 upto nbpts:
+% pair latlon;
+% latlon=scantokens readfrom nomfichiermul;
Coord[k]=rayon*(cosd(xpart(latlon/60))*cosd(ypart(latlon/60)),cosd(xpart(latlon/60))*sind(ypart(latlon/60)),sind(xpart(latlon/60)));
if ((xpart(latlon/60)>phim) and (xpart(latlon/60)<phip)):
if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0:
@@ -337,7 +385,7 @@ vardef Lectureiles=
path pays;
if ll>0:
pays=Projgeo(Pays[1])
- for l=2 upto nbpts:
+ for l=2 upto (nbpts div Alleg):%nbpts:
--Projgeo(Pays[l])
endfor;
if noncolore=true:
@@ -345,9 +393,15 @@ vardef Lectureiles=
else:
fill pays--cycle withcolor fond;
fi;
- draw pays;
+ draw pays withpen pencircle scaled 0.25;
clip currentpicture to cercles(pte3,pte1,pte3,pte1,pte4);
fi;
+ % rustine pour tout lire chaque partie de Ile.dat
+ if Alleg>1:
+ for po=1 upto (nbpts mod Alleg):
+ poubelle:=scantokens readfrom nomfichiermul;
+ endfor;
+ fi;
endfor;
closefrom nomfichiermul;
enddef;
@@ -1641,6 +1695,11 @@ vardef mappemonde(expr longobs,latobs)=
MaillageSphere;
drawoptions();
fi;
+ if maillagecoord=true:
+ drawoptions(withpen pencircle scaled 0.25 withcolor couleurmaillage);
+ MaillageSphereCoord;
+ drawoptions();
+ fi;
if maille=true:
Maille;
fi;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCObjets.mp b/macros/latex/contrib/profcollege/metapost/PfCObjets.mp
index fd2fbe0f2d..5dac3c967d 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCObjets.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCObjets.mp
@@ -661,6 +661,55 @@ vardef DessineFusion=
endfor;
enddef;
+vardef DessineFusionCoul=
+ save _fusion;
+ picture _fusion;
+ tapj:=0;
+ color Fc[][];color cou[];
+ for l=1 upto nbobj:
+ for k=0 upto apj[l]:
+ cpt[tapj]:=tapj;
+ cou[tapj]:=Outcolor[l];
+ Fc[tapj].nb:=OTFc[l][k].nb;
+ for p=1 upto Fc[tapj].nb:
+ Fc[tapj][p]:=OTFc[l][k][p];
+ endfor;
+ Fc[tapj].iso:=OTFc[l][k].iso;
+ ALT[tapj]:=ALT[l][k];
+ Vue[tapj]:=Vue[l][k];
+ if Ferme[l]:
+ if Vue[tapj]=false:
+ tapj:=tapj-1;
+ fi;
+ fi;
+ tapj:=tapj+1;
+ endfor;
+ endfor;
+ tapj:=tapj-1;
+ QS(0,tapj);
+ for k=0 upto tapj:
+ fill for l=1 upto Fc[cpt[k]].nb:
+ Projette(Fc[cpt[k]][l])--
+ endfor
+ cycle withcolor if Vue[cpt[k]]:
+ abs(lumin(cpt[k]))*cou[cpt[k]] fi;
+ if traits:
+ draw for l=1 upto Fc[cpt[k]].nb:
+ Projette(Fc[cpt[k]][l])--
+ endfor
+ cycle withpen pencircle scaled0.25bp;
+ %add by cp 22/08/2011
+ else:
+ draw for l=1 upto Fc[cpt[k]].nb:
+ Projette(Fc[cpt[k]][l])--
+ endfor
+ cycle withcolor if Vue[cpt[k]]:
+ abs(lumin(cpt[k]))*cou[cpt[k]] fi;
+ %fin add
+ fi;
+ endfor;
+enddef;
+
vardef Objettore[](expr Rn,rn)=
Outcolor.@:=outcolor;
Incolor.@:=incolor;
@@ -1727,8 +1776,8 @@ vardef Objettetraedre[](expr ar)=
tcpt.@[0]:=0;
OTFc.@[0].nb:=3;
OTFc.@[0][1]:=Image(Sommet0);
- OTFc.@[0][2]:=Image(Sommet2);
- OTFc.@[0][3]:=Image(Sommet1);
+ OTFc.@[0][2]:=Image(Sommet1);
+ OTFc.@[0][3]:=Image(Sommet2);
OTFc.@[0].iso:=(OTFc.@[0][1]+OTFc.@[0][2]+OTFc.@[0][3])/3;
tcpt.@[1]:=1;
OTFc.@[1].nb:=3;
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
index 6e42e68df9..6f4fa467ef 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
index dde087fc1c..167d62e4f4 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
@@ -3,8 +3,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[french,a4paper,11pt]{article}
-\def\TPversion{0.1.7}
-\def\TPdate{22 juin 2024}
+\def\TPversion{0.1.8}
+\def\TPdate{4 juillet 2024}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[table,svgnames]{xcolor}
\usepackage{amsmath,amssymb}
@@ -148,7 +148,7 @@
\vspace{0.25cm}
-{$\blacktriangleright$~~Une commande pour afficher une matrice carrée (2x2, 3x3 ou 4x4) avec la syntaxe du package.}
+{$\blacktriangleright$~~Une commande pour afficher une matrice carrée (2×2, 3×3 ou 4×4) avec la syntaxe du package.}
\smallskip
@@ -156,15 +156,15 @@
\smallskip
-{$\blacktriangleright$~~Des commandes pour calculer le déterminant et l'inverse de matrices carrées (2x2, 3x3 ou 4x4).}
+{$\blacktriangleright$~~Des commandes pour calculer le déterminant et l'inverse de matrices carrées (2×2, 3×3 ou 4×4).}
\smallskip
-{$\blacktriangleright$~~Des commandes pour résoudre des systèmes linéaires (2x2, 3x3 ou 4x4).}
+{$\blacktriangleright$~~Des commandes pour résoudre des systèmes linéaires (2×2, 3×3 ou 4×4).}
\smallskip
-{$\blacktriangleright$~~Des commandes pour travailler sur des graphes probabilistes (2x2, 3x3 ou 4x4).}
+{$\blacktriangleright$~~Des commandes pour travailler sur des graphes probabilistes (2×2, 3×3 ou 4×4).}
\vspace{1cm}
@@ -207,7 +207,9 @@
\hrule
-\medskip
+\bigskip
+
+{\footnotesize\sffamily\itshape À mon papa.}
\newpage
@@ -240,8 +242,8 @@ La package \textit{propose} des outils pour travailler sur des matrices ou des s
À noter que les calculs -- en interne -- peuvent être effectués de deux manières :
\begin{itemize}
- \item via les packages \textsf{xint*} pour des formats \textbf{2x2} ou \textbf{3x3} (et dans une certaine mesure pour des \textbf{4x4}) ;
- \item via \textsf{python} et le package \textsf{pyluatex} (à charger manuellement du fait des options spécifiques) pour des formats \textbf{2x2}, \textbf{3x3} ou \textbf{4x4}.
+ \item via les packages \textsf{xint*} pour des formats \textbf{2×2} ou \textbf{3×3} (et dans une certaine mesure pour des \textbf{4×4}) ;
+ \item via \textsf{Python} et le package \textsf{pyluatex} (à charger manuellement du fait des options spécifiques) pour des formats \textbf{2×2}, \textbf{3×3} ou \textbf{4×4}.
\end{itemize}
Il n'est pas prévu -- pour le moment -- de travailler sur des matrices/systèmes plus grands, car l'idée est de pouvoir formater le résultat, ce qui se fait coefficient par coefficient.
@@ -252,7 +254,7 @@ L'utilisation de \textsf{pyluatex} nécessite une compilation adaptée, à savoi
\smallskip
-La méthode par \textsf{python} utilise quoi qu'il en soit le module \texttt{sympy}, qui doit donc être installé !
+La méthode par \textsf{Python} utilise quoi qu'il en soit le module \texttt{sympy}, qui doit donc être installé !
\end{warningblock}
\subsection{Packages utilisés, choix de formatage}
@@ -283,7 +285,7 @@ En marge de la présente documentation, compilée en \textsf{lualatex} avec \tex
\begin{itemize}
\item \texttt{ResolSysteme-exemples} pour les commandes disponibles en version classique (\textsf{xint}) ;
- \item \texttt{ResolSysteme-exemples-pyluatex} pour les commandes disponibles en version python (\textsf{pyluatex}).
+ \item \texttt{ResolSysteme-exemples-pyluatex} pour les commandes disponibles en version \textsf{Python} (\textsf{pyluatex}).
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{noteblock}
@@ -293,7 +295,7 @@ En marge de la présente documentation, compilée en \textsf{lualatex} avec \tex
\subsection{Chargement du package, et option}
\begin{importantblock}
-Le package peut donc se charger de deux manières différentes, suivant si l'utilisateur utilise \textsf{python} ou non. Les commandes \textit{classiques} sont disponibles même si \textsf{python} est utilisé.
+Le package peut donc se charger de deux manières différentes, suivant si l'utilisateur utilise \textsf{Python} ou non. Les commandes \textit{classiques} sont disponibles même si \textsf{Python} est utilisé.
\end{importantblock}
\begin{PresentationCode}{listing only}
@@ -314,18 +316,22 @@ D'autres solutions existent pour faire du calcul matriciel, on peut pas exemple
\smallskip
-L'idée est ici de proposer une version, adaptée à des dimensions classiques, avec formatage des calculs, sous forme de fraction irréductible notamment. Les formatages étant effectués \textit{a posteriori}, j'ai choisi de limiter ce package à des formats de taille raisonnable (\textbf{1x2} à \textbf{4x4}).
+L'idée est ici de proposer une version, adaptée à des dimensions classiques, avec formatage des calculs, sous forme de fraction irréductible notamment. Les formatages étant effectués \textit{a posteriori}, j'ai choisi de limiter ce package à des formats de taille raisonnable (\textbf{1×2} à \textbf{4×4}).
\end{noteblock}
\part{Historique}
+\verb|v0.1.8|~:~~~~Correction de bugs, améliorations dans la documentation.
+
+\verb|v0.1.7|~:~~~~Correction de bugs dans certains calculs avec des fractions.
+
\verb|v0.1.6|~:~~~~Correction de bugs dans certains calculs avec des fractions.
\verb|v0.1.6|~:~~~~Correction de bugs dans certains calculs.
\verb|v0.1.5|~:~~~~Inverse d'une matrice 4x4 et système 4x4 (même en normal).
-\verb|v0.1.4|~:~~~~Ajout de commandes pour du calcul matriciel sans python (de taille raisonnable) ;
+\verb|v0.1.4|~:~~~~Ajout de commandes pour du calcul matriciel sans \textsf{Python} (de taille raisonnable) ;
\verb| |~~~~~~commandes pour des graphes probabilistes.
@@ -333,7 +339,7 @@ L'idée est ici de proposer une version, adaptée à des dimensions classiques,
\verb| |~~~~~~inversion du comportement des commandes étoilées.
-\verb|v0.1.2|~:~~~~Ajout d'une commande d'affichage (formaté) d'une matrice 2x2, 3x3 ou 4x4.
+\verb|v0.1.2|~:~~~~Ajout d'une commande d'affichage (formaté) d'une matrice 2×2, 3×3 ou 4×4.
\verb|v0.1.1|~:~~~~Correction d'un bug avec le caractère \og ; \fg.
@@ -414,7 +420,7 @@ Les \textit{transformations} en fraction devraient pouvoir fonctionner avec des
\subsection{La commande}
\begin{cautionblock}
-Une commande (matricielle) est dédiée à l'affichage d'une matrice \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} (\textsf{python} est ici non nécessaire !) :
+Une commande (matricielle) est dédiée à l'affichage d'une matrice \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} (\textsf{Python} est ici non nécessaire !) :
\begin{itemize}
\item en saisissant les coefficients via une syntaxe propre au package (l'affichage est géré en interne par \textsf{nicematrix}) ;
@@ -485,8 +491,8 @@ L'idée est de proposer des commandes pour effectuer des calculs matriciels \tex
\item $(4\times4)\times(4\times4)$ ;
\item $(4\times4)\times(4\times1)$ ;
\end{itemize}
- \item le carré d'une matrice 2x2 ou 3x3 ou 4x4 ;
- \item la puissance d'une matrice 2x2 ou 3x3 ou 4x4 (via \textsf{python}).
+ \item le carré d'une matrice 2×2 ou 3×3 ou 4×4 ;
+ \item la puissance d'une matrice 2×2 ou 3×3 ou 4×4 (via \textsf{Python}).
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -576,7 +582,7 @@ $\MatricePuissancePY(1,1,1,1 § 5,-2,1,5 § 0,5,2,-1 § 0,1,1,1)(5)[Aff]$
Une commande est disponible pour calculer le déterminant d'une matrice :
\begin{itemize}
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4}.
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -585,7 +591,7 @@ Une commande est disponible pour calculer le déterminant d'une matrice :
%version classique
\DetMatrice(*)[option de formatage](matrice)
-%version python
+%version Python
\DetMatricePY(*)[option de formatage](matrice)
\end{PresentationCode}
@@ -633,7 +639,7 @@ est $\det(A)=\DetMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
Le dé. de $A=\AffMatrice(1,2 § 3,4)$ est
$\det(A)=\DetMatricePY(1,2 § 3,4)$.
\end{PresentationCode}
@@ -644,13 +650,13 @@ $\det(A)=\DetMatricePY[d](-1,0.5 § 1/2,4)$.
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
Le dét. de $A=\AffMatrice(-1,1/3,4 § 1/3,4,-1 § -1,0,0)$ est
$\det(A) \approx \DetMatricePY[dec=3](-1,1/3,4 § 1/3,4,-1 § -1,0,0)$.
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
Le dét. de $A=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$
est $\det(A)=\DetMatricePY(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{PresentationCode}
@@ -665,8 +671,8 @@ est $\det(A)=\DetMatricePY(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
Une commande (matricielle) disponible est pour calculer l'éventuelle inverse d'une matrice :
\begin{itemize}
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} également pour la version \textsf{python}.
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} également pour la version \textsf{Python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -675,7 +681,7 @@ Une commande (matricielle) disponible est pour calculer l'éventuelle inverse d'
%version classique
\MatriceInverse(*)[option de formatage]<options nicematrix>(matrice)[Clé]
-%version python
+%version Python
\MatriceInversePY(*)[option de formatage]<options nicematrix>(matrice)[Clé]
\end{PresentationCode}
@@ -714,7 +720,7 @@ $A^{-1}=\MatriceInverse[n]<cell-space-limits=2pt>(1,2,3 § 4,5,6 § 7,8,8)[Aff]$
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
L'inverse de $A=\AffMatrice(1,2 § 3,4)$ est
$A^{-1}=\MatriceInversePY[d]<cell-space-limits=2pt>(1,2 § 3,4)[Aff]$.
\end{PresentationCode}
@@ -727,7 +733,7 @@ $A^{-1}=
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
L'inv. de $A=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)$ est
$A^{-1}=
\MatriceInversePY[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)$.
@@ -740,17 +746,17 @@ $A^{-1}=
\subsection{Introduction}
\begin{cautionblock}
-\cmaj{0.1.4} Il existe des commandes pour travailler sur un graphe probabiliste (avec le package en version \textsf{python}) :
+\cmaj{0.1.4} Il existe des commandes pour travailler sur un graphe probabiliste (avec le package en version \textsf{Python}) :
\begin{itemize}
- \item afficher un état probabiliste (\textbf{1x2} ou \textbf{1x3} ou \textbf{1x4}, version normale ou version \textsf{python}) ;
- \item déterminer un état probabiliste à une certaine étape, uniquement en version \textsf{python}.
+ \item afficher un état probabiliste (\textbf{1×2} ou \textbf{1×3} ou \textbf{1×4}, version normale ou version \textsf{Python}) ;
+ \item déterminer un état probabiliste à une certaine étape, uniquement en version \textsf{Python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
\begin{PresentationCode}{listing only}
-%version classique ou python
+%version classique ou Python
\AffEtatProb[opt de formatage]<opts nicematrix>(matrice ligne)
\EtatProbPY[opt de formatage]<opts nicematrix>(état init)(mat de trans)(étape)
\end{PresentationCode}
@@ -847,8 +853,8 @@ $P_4 \approx \EtatProbPY[dec=3]
Il existe une commande (matricielle) pour déterminer l'éventuelle solution d'un système linéaire qui s'écrit matriciellement $A\times X=B$:
\begin{itemize}
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} également pour le package en version \textsf{python}.
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} également pour le package en version \textsf{Python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -857,7 +863,7 @@ Il existe une commande (matricielle) pour déterminer l'éventuelle solution d'u
%version classique
\SolutionSysteme(*)[opt de formatage]<opts nicematrix>(matriceA)(matriceB)[Clé]
-%version python
+%version Python
\SolutionSystemePY(*)[opt de formatage]<opts nicematrix>(matriceA)(matriceB)[Clé]
\end{PresentationCode}
@@ -882,6 +888,10 @@ Concernant cette commande, qui est à insérer dans un environnement \textit{mat
\item le dernier argument, \textit{optionnel} et entre \textsf{[...]}, permet -- grâce à la \textit{clé} \Cle{Matrice} -- de présenter le vecteur solution.
\end{itemize}
À noter que si la matrice n'est pas inversible, le texte \texttt{Matrice non inversible} est affiché.
+
+\smallskip
+
+Pour afficher le système via la commande \texttt{\textbackslash systeme}, le package \textsf{systeme} doit être chargé.
\end{tipblock}
\begin{PresentationCode}{}
@@ -891,7 +901,7 @@ La solution de $\systeme{3x+y-2z=-1,2x-y+z=4,x-y-2z=5}$ est $\mathcal{S}=%
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
La solution de $\systeme{x+y+z=-1,3x+2y-z=6,-x-y+2z=-5}$ est $\mathcal{S}=%
\left\lbrace \SolutionSystemePY(1,1,1 § 3,2,-1 § -1,-1,2)(-1,6,-5) \right\rbrace$.
\end{PresentationCode}
@@ -914,7 +924,7 @@ est $\mathcal{S}=
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=7}$
est $\mathcal{S}=%
\left\lbrace
@@ -938,8 +948,8 @@ La solution de $\systeme{x+2y=-5,4x+8y=1}$ est $\mathcal{S}=%
\cmaj{0.1.4} Il existe une commande (matricielle) pour déterminer l'éventuel état stable d'un graphe probabiliste :
\begin{itemize}
- \item \textbf{2x2} pour le package \textit{classique} ;
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} pour le package en version \textsf{python}.
+ \item \textbf{2×2} pour le package \textit{classique} ;
+ \item \textbf{2×2} ou \textbf{3×3} ou \textbf{4×4} pour le package en version \textsf{Python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -948,7 +958,7 @@ La solution de $\systeme{x+2y=-5,4x+8y=1}$ est $\mathcal{S}=%
%version classique
\EtatStable[opt de formatage]<opts nicematrix>(matriceA)
-%version python
+%version Python
\EtatStablePY[opt de formatage]<opts nicematrix>(matriceA)
\end{PresentationCode}
@@ -982,7 +992,7 @@ ou $\Pi = \EtatStable[dec](0.72,0.28 § 0.12,0.88)$.
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
L'état stable du gr. prob. de matrice
$M=\AffMatrice[dec](0.72,0.28 § 0.12,0.88)$
@@ -991,7 +1001,7 @@ ou $\Pi = \EtatStablePY[dec](0.72,0.28 § 0.12,0.88)$.
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
L'état stable du gr. prob. de matrice
$M=\AffMatrice[dec](0.9,0.03,0.07 § 0.30,0.43,0.27 § 0.14,0.07,0.79)$
@@ -1000,7 +1010,7 @@ ou $\Pi = \EtatStablePY[dec](0.9,0.03,0.07 § 0.30,0.43,0.27 § 0.14,0.07,0.79)$
\end{PresentationCode}
\begin{PresentationCode}{}
-%version python
+%version Python
L'état stable du gr. prob. de matrice
$M=\AffMatrice[dec]%
(0.1,0.2,0.3,0.4 § 0.25,0.25,0.25,0.25 § 0.15,0.15,0.2,0.5 § 0.3,0.3,0.2,0.2)$
@@ -1013,7 +1023,7 @@ est $\Pi \approx
\pagebreak
-\part{Fonctions python utilisées}
+\part{Fonctions Python utilisées}
\begin{cautionblock}
Les fonctions utilisées par les packages \textsf{pyluatex} ou \textsf{pythontex} sont données ci-dessous.
@@ -1022,7 +1032,7 @@ Elles sont accessibles en \textit{natif} une fois l'option \textsf{pyluatex} act
\end{cautionblock}
\begin{PresentationCodePython}{listing only}
-#variables symboliques (pour du 4x4 maxi)
+#variables symboliques (pour du 4×4 maxi)
import sympy as sy
x = sy.Symbol('x')
y = sy.Symbol('y')
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
index 8aa1f3642e..dfd7461c74 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
index 3527a58223..600ce6d1d3 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
@@ -2,7 +2,7 @@
% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]
\documentclass[french,a4paper,10pt]{article}
-\def\RSver{0.1.7}
+\def\RSver{0.1.8}
\usepackage[margin=1.5cm]{geometry}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[pyluatex]{ResolSysteme}
@@ -27,7 +27,7 @@
\sisetup{locale=FR,output-decimal-marker={,}}
\end{ShowCodeTeX}
-\section{Affichage d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Affichage d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
On considère les matrices $A=\AffMatrice(1,2 § 3,4)$
@@ -35,7 +35,7 @@ et $B=\AffMatrice[n](-1,-1/3,4 § 1/3,4,-1 § -1,0,0)$
et $C=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Déterminant d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Déterminant d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
Le déterminant de $A=\AffMatrice(1,2 § 3,4)$ est
@@ -57,7 +57,7 @@ Le dét. de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{pN
est $\det(A)=\DetMatricePY(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Calculs avec des matrices, 2x2 ou 3x3 ou 4x4}
+\section{Calculs avec des matrices, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
$\ProduitMatricesPY(1,2)(3 § 4)[Aff]$ et $\ProduitMatricesPY(1,2)(3,4 § 5,6)[Aff]$ \\
@@ -83,7 +83,7 @@ $\MatricePuissancePY(1,1,-1 § 5,-2,1 § 0,5,2)(3)[Aff]$ \\
$\MatricePuissancePY(1,1,1,1 § 5,-2,1,5 § 0,5,2,-1 § 0,1,1,1)(5)[Aff]$
\end{ShowCodeTeX}
-\section{Inverse d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Inverse d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
@@ -120,7 +120,7 @@ L'inverse de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{p
est $A^{-1}=\MatriceInversePY[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Résolution d'un système, 2x2 ou 3x3 ou 4x4}
+\section{Résolution d'un système, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
La solution de $\systeme{-9x-8y=-8,3x-6y=-7}$ est $\mathcal{S}=%
@@ -160,7 +160,7 @@ La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=
[Matrice]$
\end{ShowCodeTeX}
-\section{État probabiliste d'un graphe probabiliste, 2x2 ou 3x3 ou 4x4}
+\section{État probabiliste d'un graphe probabiliste, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
État initial : $P_0 = \AffEtatProb[t](1/3,2/3)$.
@@ -202,7 +202,7 @@ $P_4 \approx \EtatProbPY[dec=3]
(4)$
\end{ShowCodeTeX}
-\section{État stable d'un graphe probabiliste, 2x2 ou 3x3 ou 4x4}
+\section{État stable d'un graphe probabiliste, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
L'état stable du gr. prob. de matrice
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
index 59e5819a3a..bbf961d1a7 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
index ffec22fb9f..b228332dec 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
@@ -2,7 +2,7 @@
% !TeX TXS-program:compile = txs:///pdflatex
\documentclass[french,a4paper,10pt]{article}
-\def\RSver{0.1.7}
+\def\RSver{0.1.8}
\usepackage[margin=1.5cm]{geometry}
\usepackage{ResolSysteme}
\usepackage{systeme}
@@ -15,7 +15,7 @@
\part*{ResolSysteme (\RSver), version \og classique \fg{}}
-\section{Préambule sans utiliser python}
+\section{Préambule sans utiliser Python}
\begin{ShowCodeTeX}[listing only]
\documentclass[french,a4paper,10pt]{article}
@@ -25,7 +25,7 @@
\sisetup{locale=FR,output-decimal-marker={,}}
\end{ShowCodeTeX}
-\section{Affichage d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Affichage d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
On considère les matrices $A=\AffMatrice(1,2 § 3,4)$
@@ -33,7 +33,7 @@ et $B=\AffMatrice[n](-1,1/3,4 § 1/3,4,-1 § -1,0,0)$
et $C=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Calculs avec des matrices, 2x2 ou 3x3 ou 4x4}
+\section{Calculs avec des matrices, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
$\ProduitMatrices(1,2)(3 § 4)[Aff]$ et $\ProduitMatrices(1,2)(3,4 § 5,6)[Aff]$ \\
@@ -59,7 +59,7 @@ $\CarreMatrice(-5,6,8 § 1,4,-9 § 1,-1,1)[Aff]$\\
$\CarreMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)[Aff]$
\end{ShowCodeTeX}
-\section{Déterminant d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Déterminant d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
Le déterminant de $A=\AffMatrice(1,2 § 3,4)$ est
@@ -81,7 +81,7 @@ Le dét. de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{pN
est $\det(A)=\DetMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Inverse d'une matrice, 2x2 ou 3x3 ou 4x4}
+\section{Inverse d'une matrice, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
@@ -113,7 +113,7 @@ L'inverse de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{p
est $A^{-1}=\MatriceInverse[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section*{Résolution d'un système, 2x2 ou 3x3 ou 4x4}
+\section*{Résolution d'un système, 2×2 ou 3×3 ou 4×4}
\begin{ShowCodeTeX}
La solution de $\systeme{-9x-8y=-8,3x-6y=-7}$ est $\mathcal{S}=%
@@ -158,7 +158,7 @@ La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=
[Matrice]$
\end{ShowCodeTeX}
-\section{État stable d'une graphe probabiliste, 2x2}
+\section{État stable d'une graphe probabiliste, 2×2}
\begin{ShowCodeTeX}
L'état stable du gr. prob. de matrice
diff --git a/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty b/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
index a7e95078fa..5a8d27b31c 100644
--- a/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
+++ b/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
@@ -2,7 +2,8 @@
% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ResolSysteme}[2024/06/22 v0.1.7 Quelques commandes pour travailler avec des matrices et des sytemes lineaires]
+\ProvidesPackage{ResolSysteme}[2024/07/04 v0.1.8 Quelques commandes pour travailler avec des matrices et des sytemes lineaires]
+% 0.1.8 Correction de bugs dans certains calculs, amélioration de la documentation
% 0.1.7 Correction de bugs dans certains calculs
% 0.1.6 Correction de bugs dans certains calculs
% 0.1.5 Inverse d'une matrice en 4x4 (même en normal !) + Système 4x4 (en normal !)
diff --git a/macros/latex/contrib/spbmark/README.md b/macros/latex/contrib/spbmark/README.md
index 0fd0ff2371..510d3a365b 100644
--- a/macros/latex/contrib/spbmark/README.md
+++ b/macros/latex/contrib/spbmark/README.md
@@ -1,5 +1,5 @@
# The `spbmark` package
-Customize superscripts and subscripts (v1.46k)
+Customize superscripts and subscripts (v1.46l)
## Abstract
`spbmark` provides three commands `\super`, `\sub` and `\supersub` to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index f17405570b..c1a9613114 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index fa10c8410f..426e75dd7f 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -8,8 +8,8 @@
% The latest version of this license is in
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
-\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/06/21}{1.46k}
+\RequirePackage{xparse}
+\ProvidesExplPackage{spbmark}{2024/07/04}{1.46l}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -130,7 +130,12 @@
{ \tl_set_eq:NN \fnmarkfont \ftntm@font }
{ \tl_set_eq:NN \fnmarkfont \normalfont }
-\ProcessKeysOptions{spbmark/option}
+\cs_if_exist:NTF \ProcessKeyOptions
+ { \ProcessKeyOptions[spbmark/option] }
+ {
+ \RequirePackage{l3keys2e}
+ \ProcessKeysOptions{spbmark/option}
+ }
\tl_new:N \g__spb_mark_case_init_tl
\cs_new_protected:Npn \spb_local_case_init:nnn #1#2#3
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index 9da47d2151..6863c34e03 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -7,15 +7,15 @@
\setcnltx
{
package = spbmark,
- version = v1.46k,
- date = 2024/06/21,
+ version = v1.46l,
+ date = 2024/07/04,
authors = Qu Yi,
- info = Customize superscript and subscript,
+ info = Customize superscripts and subscripts,
email = toquyi@163.com,
url = https://github.com/texno3/spbmark,
abstract =
{
- \pkg*{spbmark} provides three commands \cs{super}, \cs{sub} and \cs{supersub} to improve the layout of superscript and subscript which can be adjusted the relative position and format, and can be used in text and math mode.
+ \pkg*{spbmark} provides three commands \cs{super}, \cs{sub} and \cs{supersub} to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
},
color-scheme = blue,
listings-options = {numbers = none,gobble = 2,lineskip = 1pt},
@@ -51,13 +51,13 @@
The following macro package options will redefine the script commands of the \LaTeX{} kernel. If you do not specify the values of boolean options, they default to \code{true}. These options can also be changed in the preamble area and main body using the global control command \cs{spbset}.
\begin{options}
\keychoice{text}{true,\fbox{false}}
- \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{textsp} and \code{textsb} to change the format of the text superscript and subscript.
+ \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{textsp} and \code{textsb} to change the format of the text superscripts and subscripts.
\keychoice{math}{true,\fbox{false}}
- \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscript and subscript.
+ \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscripts and subscripts.
\keychoice{math*}{true,\fbox{false}}\newtag{Exp\\v1.46j}%
- The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp*} and \code{mathsb*} to change the format of the math superscript and subscript.
+ The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands. The command \cs{defspbstyle} can be used to define the style \code{mathsp*} and \code{mathsb*} to change the format of the math superscripts and subscripts.
\keychoice{foot}{true,\fbox{false}}
- The format of the footnote mark match the superscript global move and format settings. \cs{defspbstyle} can be used to define the superscript style \code{fnmark} to change the format of the footnote mark.
+ The format of the footnote mark match the superscripts global move and format settings. \cs{defspbstyle} can be used to define the superscripts style \code{fnmark} to change the format of the footnote mark.
\begin{example}[code-only]
\defspbstyle{textsp}{vmove=-1pt,cmd=\bfseries}
\defspbstyle{mathsb}{hmove=0.5em}
@@ -73,19 +73,19 @@ The following macro package options will redefine the script commands of the \La
\spbset{all=false,math}
\end{example}
\keychoice{spcore}{\fbox{trad},none}\newtag{New\\v1.46k}%
- Kernel command case for text and math modes superscript. If \code{none} is selected, support for the superscript kernel command is removed, and the \option{cmd} and \option{vmove} options need to be set to control the size and offset of the superscript.
+ Kernel command case for text and math modes superscripts. If \code{none} is selected, support for the superscripts kernel command is removed, and the \option{cmd} and \option{vmove} options need to be set to control the size and offset of the superscripts.
\begin{example}[code-only]
\usepackage[spcore=none]{spbmark}
\usepackage{graphicx}
\spbset{spcmd=\scalebox{0.6},spvmove=5pt}
\end{example}
\keychoice{sbcore}{\fbox{trad},none}\newtag{New\\v1.46k}%
- Option for subscript kernel command case, similar to the \option{spcore} option.
+ Option for subscripts kernel command case, similar to the \option{spcore} option.
\end{options}
\section{User commands}
\label{sec:user commands}
-There are currently three commands to set superscript and subscript. Their format can be set temporarily using the optional parameters of the command, or set globally using a key-value list, see Section \ref{sec:global control interface}.
+There are currently three commands to print superscripts and subscripts. Their format can be set locally using the optional parameter of the command, or set globally using a key-value list, see Section \ref{sec:global control interface}.
\begin{commands}
\command{super}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
This is a superscript output command. The two \meta{kv list} are equivalent.
@@ -128,7 +128,7 @@ There are currently three commands to set superscript and subscript. Their forma
6A\supersub[hmove=-8pt]{examsuper}{sub}\hspace{\dimexpr(\maxwd-8pt)}B
\end{example}
\command{defspbstyle}[\marg{style name}\marg{kv list}]
- Defines the style of the superscript or subscript used for the \option{style} option.
+ Defines the style of the superscripts or subscripts used for the \option{style} option.
\command{spbifmath}[\marg{math code}\marg{text code}]
In some cases, \code{math} or \code{text} output modes require different code for format or move. This command can be used when using the \code{match} option or changing the output mode locally, whitch should be used in the move or format options. It can switch the corresponding code according to different output modes.
\command{spbshortkv}[\marg{short opt}\marg{key value}]
@@ -155,11 +155,11 @@ The options common to \meta{kv list} of the three commands are as follows. They
\keyval{cmd}{format cmds}
The format commands of superscript or subscript. The last command can take a parameter, which accepts superscript or subscript. Represents the format of superscript and subscript in the superscript and subscript commands.
\keyval{cmd+}{format cmds}
- Add code to the previous global superscript or subscript format commands.
+ Add code to the previous option \option{cmd}.
\keyval{height}{fixed length}
- The distance between the superscript or subscript baseline and the previous line. It is recommended that the superscript adjusts the height and the subscript adjusts the depth.
+ The height of the marker box above the baseline. It is recommended that the superscript adjusts the height and the subscript adjusts the depth.
\keyval{depth}{fixed length}
- The distance between the superscript or subscript baseline and the next line.
+ The depth of the marker box below the baseline.
\keyval{style}{style name}
Use the \meta{style name} defined by the \cs{defspbstyle} command to make it work global or local.
\keychoice{mode}{text,math,\fbox{match}}
@@ -185,71 +185,74 @@ The options common to \meta{kv list} of the three commands are as follows. They
\label{sec:global control interface}
\begin{commands}
\command{spbset}[\marg{key-value list}]
- \pkg*{spbmark} uses the \cs{spbset} command to control the global default format of superscript and subscript. These options also apply to \meta{kv list} of the above commands. The values ​set by it will be overwritten by the optional parameters of the superscript and other commands.
+ \pkg*{spbmark} uses the \cs{spbset} command to control the global default format of superscripts and subscripts. These options also apply to \meta{kv list} of the \textcolor{red}{above} print commands. The values set by it will be overwritten by the optional parameter of superscripts and subscripts commands.
+
+ Note that the relative length units in the options such as \code{ex} and \code{em} are for the \textcolor{red}{body} font size, not the marker itself.
+
+ The following list of keys control the format both of superscripts \emph{or} subscripts. They can also be used in the optional parameter of the \cs{super} or \cs{sub} command.
\end{commands}
-The following list of keys control the format both of superscript \emph{or} subscript.
\begin{options}
\keyval{spvmove}{fixed length}\Default{0pt}
- Extra vertical move of the superscript.
+ Extra vertical move of the superscripts.
\keyval{sphmove}{fixed length}\Default{0pt}
- Extra horizontal move of the superscript.
+ Extra horizontal move of the superscripts.
\keyval{sbvmove}{fixed length}\Default{0pt}
- Extra vertical move of the subscript.
+ Extra vertical move of the subscripts.
\keyval{sbhmove}{fixed length}\Default{0pt}
- Extra horizontal move of the subscript.
+ Extra horizontal move of the subscripts.
\opt{nohmove}
- Cancel the horizontal move of superscript and subscript at the same time.
+ Cancel the horizontal move of superscripts and subscripts at the same time.
\opt{novmove}
- Cancel the vertical move of superscript and subscript at the same time.
+ Cancel the vertical move of superscripts and subscripts at the same time.
\keyval{spcmd}{format cmds}
- The format commands of superscript. The last command in the code can take an argument, which is a superscript.
+ The format commands of superscripts. The last command in the code can take an argument, which is a superscripts.
\keyval{spcmd+}{format cmds}
- Add code to the previous global superscript format commands.
+ Add code to the previous option \option{spcmd}.
\keyval{sbcmd}{format cmds}
- The format commands of subscript. Similar to the \option{spcmd} option, but for subscript.
+ The format commands of subscripts. Similar to the \option{spcmd} option, but for subscripts.
\keyval{sbcmd+}{format cmds}
- Add code to the previous global subcript format commands.
+ Add code to the previous option \option{sbcmd}.
\keyval{spheight}{fixed length}
- The distance between the superscript baseline and the previous line.
+ The height of the superscript box above the baseline.
\keyval{spdepth}{fixed length}
- The distance between the superscript baseline and the next line.
+ The depth of the superscript box below the baseline.
\keyval{sbheight}{fixed length}
- The distance between the subscript baseline and the previous line.
+ The height of the subscript box above the baseline.
\keyval{sbdepth}{fixed length}
- The distance between the subscript baseline and the next line.
+ The depth of the subscript box below the baseline.
\keychoice{spthiswd}{auto,\fbox{keep}}
- Width processing mode after using this superscript. See Section \ref{sec:user commands} for the meaning of this option.
+ Width processing mode after using this superscripts. See Section \ref{sec:user commands} for the meaning of this option.
\keychoice{sbthiswd}{auto,\fbox{keep}}
- Width processing mode after using this subscript. See Section \ref{sec:user commands} for the meaning of this option.
+ Width processing mode after using this subscripts. See Section \ref{sec:user commands} for the meaning of this option.
\keyval{spregex}{regular expression}
- After the superscript command is used, the regular expression rules of the following tokens are matched. See Section \ref{sec:user commands} for the meaning of this option.
+ After the superscripts command is used, the regular expression rules of the following tokens are matched. See Section \ref{sec:user commands} for the meaning of this option.
\keyval{sbregex}{regular expression}
- Similar to the \option{spregex} option, but for subscript.
+ Similar to the \option{spregex} option, but for subscripts.
\end{options}
-If \option{sphmove} is positive, the superscript or subscript moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscript and superscript is \textcolor{red}{opposite}. For superscript, if \option{spvmove} is positive, the superscript moves up, conversely it moves down. For subscript, if \option{spvmove} is positive, the subscript moves down, conversely it moves up.
+If \option{sphmove} is positive, the superscripts or subscripts moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscripts and superscripts is \textcolor{red}{opposite}. For superscripts, if \option{spvmove} is positive, the superscripts moves up, conversely it moves down. For subscripts, if \option{spvmove} is positive, the subscripts moves down, conversely it moves up.
-The following list of keys control the format of superscript \emph{and} subscript.
+The following list of keys control the format of superscripts \emph{and} subscripts. They can also be used in the optional parameter of the \cs{supersub} command.
\begin{options}
\keyval{spbhmove}{fixed length}\Default{0pt}
- Extra vertical move of the superscript and the subscript.
+ Extra vertical move of the superscripts and the subscripts.
\kvsplit{spbcmd}{super cmds}{sub cmds}
- The format commands of superscript and subscript. The first part is in superscript format, and the latter part is in subscript format. They are separated by commas, or only the first part exists.
+ The format commands of superscripts and subscripts. The first part is in superscripts format, and the latter part is in subscripts format. They are separated by commas, or only the first part exists.
\kvsplit{spbcmd+}{super cmds}{sub cmds}
- Add code to the previous global superscript and subscript format commands.
+ Add code to the previous option \option{spbcmd}.
\keyval{spbheight}{fixed length}
- The distance between the superscript baseline and the previous line.
+ The height of the superscript box above the baseline.
\keyval{spbdepth}{fixed length}
- The distance between the subscript baseline and the next line.
+ The depth of the subscript box below the baseline.
\kvsplit{vsep}{super move}{sub move}\Default{0.6ex}
- The extra vertical distance between superscript and subscript. The front part is the movement amount of the superscript, and the latter part is the movement amount of the subscript. If only the front part means that both are vertically shifted by one-half of the current value.
+ The extra vertical distance between superscripts and subscripts. The front part is the movement amount of the superscripts, and the latter part is the movement amount of the subscripts. If only the front part means that both are vertically shifted by one-half of the current value.
\keychoice{halign}{\fbox{l},c,r}
- The alignment of superscript and subscript, which contains \code{l}, \code{c}, and \code{r} parameters respectively for left, center, and right alignment.
+ The alignment of superscripts and subscripts, which contains \code{l}, \code{c}, and \code{r} parameter respectively for left, center, and right alignment.
\end{options}
\section{Examples of use}
-Here is a list of the three commands, please pay attention to the usage of optional parameters. Note when the horizontal move is negative, the starting point is at the right end of the mark.
+Here is a list of the three commands, please pay attention to the usage of optional parameter. Note when the horizontal move is negative, the starting point is at the right end of the mark.
\begin{example}
\defspbstyle{fancy}{cmd=\color{purple}}
\spbset{spbcmd={\spbifmath{\mathtt}{\ttfamily},\color{blue}}}
@@ -261,7 +264,7 @@ Here is a list of the three commands, please pay attention to the usage of optio
\end{example}
\subsection{siunitx}
-It can also be used with the \pkg*{siunitx} package to output superscript and subscript in the unit:
+It can also be used with the \pkg*{siunitx} package to output superscripts and subscripts in the unit:
\begin{example}
\spbset{spcmd=\spbifmath{}{\color{purple}}}
\sisetup{text-superscript-command=\super}
@@ -272,13 +275,13 @@ It can also be used with the \pkg*{siunitx} package to output superscript and su
\end{example}
\subsection{realscripts}
-If the OpenType text font you are using does not have optical sizes, the superscript and subscript may not appear correctly. Loading the \pkg*{realscripts} package before the \pkg*{spbmark} package fixes this behavior.
+If the OpenType text font you are using does not have optical sizes, the superscripts and subscripts may not appear correctly. Loading the \pkg*{realscripts} package before the \pkg*{spbmark} package fixes this behavior.
\begin{example}[code-only]
\usepackage{realscripts,spbmark}
\end{example}
\subsection{altsubsup}
-The \pkg*{altsubsup} package allows to write alternate superscript and subscript in math mode with \code{\^{}}\oarg{mark} and \code{\_{}}\oarg{mark} dimensions. When the package is loaded using the \code{spbmark} option, the superscript and subscript mechanism of \pkg*{spbmark} is used, you can use \cs{defspbstyle} to define its superscript style \code{altsup} and subscript style \code{altsub}.
+The \pkg*{altsubsup} package allows to write alternate superscripts and subscripts in math mode with \code{\^{}}\oarg{mark} and \code{\_{}}\oarg{mark} dimensions. When the package is loaded using the \code{spbmark} option, the superscripts and subscripts mechanism of \pkg*{spbmark} is used, you can use \cs{defspbstyle} to define its superscripts style \code{altsup} and subscripts style \code{altsub}.
\begin{example}
\defspbstyle{altsup}{sphmove=-\llastwd,spthiswd=auto,spvmove=1pt}
$A_[bcd]^[e]B$
@@ -291,13 +294,13 @@ The \pkg*{altsubsup} package allows to write alternate superscript and subscript
If you need to use the original definitions of \cs{textsuperscript}, \cs{textsubscript}, \cs{sp} and \cs{sb} after using the \option{text} or \option{math} option, then you can use the following commands:
\begin{commands}
\command{spb@textsuperscript@save}[\marg{content}]
- Save the original definition of the \cs{textsuperscript} command, output superscript in the text mode.
+ Save the original definition of the \cs{textsuperscript} command, output superscripts in the text mode.
\command{spb@textsubscript@save}[\marg{content}]
- Save the original definition of the \cs{textsubscript} command, output subscript in the text mode.
+ Save the original definition of the \cs{textsubscript} command, output subscripts in the text mode.
\command{spb@math@super@save}[\marg{content}]
- Save the original definition of the \cs{sp} command, output superscript in the math mode.
+ Save the original definition of the \cs{sp} command, output superscripts in the math mode.
\command{spb@math@sub@save}[\marg{content}]
- Save the original definition of the \cs{sb} command, output subscript in the math mode.
+ Save the original definition of the \cs{sb} command, output subscripts in the math mode.
\end{commands}
\section{Known issues}
@@ -309,10 +312,10 @@ At present, the vertical and horizontal move are effective for the unit commands
\item Add option \option{math*}: The \code{\^{}} and \code{\_{}} tokens in the math mode are equivalent to the \cs{super} and \cs{sub} commands.
\end{version}
\begin{version}[v = 1.46k,date = 2024/06/21]
- \item Add options \option{spcore} and \option{sbcore}: Set kernel commands for superscript and subscript of text and math modes.
+ \item Add options \option{spcore} and \option{sbcore}: Set kernel commands for superscripts and subscripts of text and math modes.
\end{version}
\end{changelog}
\nocite{*}
-\AddToHook{cmd/printindex/before}{\clearpage}
+% \AddToHook{cmd/printindex/before}{\clearpage}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/unbtex/README.md b/macros/latex/contrib/unbtex/README.md
index 2293f91fe4..0d0f2325fa 100644
--- a/macros/latex/contrib/unbtex/README.md
+++ b/macros/latex/contrib/unbtex/README.md
@@ -1,6 +1,6 @@
# UnBTeX: A class for bachelor, master, and doctoral thesis at the
# University of Brasilia (UnB), Brazil.
-# Version 1.5.1 2024/03/02
+# Version 1.5.2 2024/07/04
Copyright (C) 2021-2024 by Henrique C. Ferreira <hcferreira@unb.br>
@@ -109,6 +109,12 @@ Here is a history of changes:
1.5.1 (2024-03-02):
. The approval sheet (folha de aprovação) has been changed
. The bottom margin size has been corrected to be consistently adhered to
+ 1.5.2 (2024-07-04):
+ . The length of the footnote separator line has been corrected according
+ to ABNT standards
+ . The left margin indentation of the citacao environment has been corrected
+ according to ABNT standards
+ . The left margin indentation of the references can be adjusted by the user
## Overleaf
diff --git a/macros/latex/contrib/unbtex/unbtex-example.pdf b/macros/latex/contrib/unbtex/unbtex-example.pdf
index f1498c6985..0b6493ed0b 100644
--- a/macros/latex/contrib/unbtex/unbtex-example.pdf
+++ b/macros/latex/contrib/unbtex/unbtex-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/unbtex/unbtex-example.tex b/macros/latex/contrib/unbtex/unbtex-example.tex
index 1ad0019003..33872900a5 100644
--- a/macros/latex/contrib/unbtex/unbtex-example.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example.tex
@@ -1,7 +1,7 @@
%%
%% UnBTeX: A class for bachelor, master, and doctoral thesis at the
%% University of Brasilia (UnB), Brazil
-%% Version 1.5.1 2024/03/02
+%% Version 1.5.2 2024/07/04
%% Copyright (C) 2021-2024 by Henrique C. Ferreira <hcferreira@unb.br>
%%
%% This class file may be distributed and/or modified under the conditions
@@ -55,7 +55,7 @@
% ---
% Diretório das figuras
-\graphicspath{{unbtex-example/figuras/}}
+\graphicspath{{unbtex-example/figuras}}
% ---
% ------------------------------------------------------------------------
@@ -67,7 +67,7 @@
% ---
% Título
% ---
-\titulo{Modelo de trabalho \\ acadêmico com UnB\TeX} % No idioma principal do texto
+\titulo{Modelo de trabalho\\ acadêmico com UnB\TeX} % No idioma principal do texto
% Insira \\ caso queira forçar quebras de linha no título
% Não utilize caixa alta para o título do trabalho e nem das seções (com exceção de siglas)
% ---
@@ -102,35 +102,35 @@
% ---
% Informações do trabalho
% ---
-\tipotrabalho{Projeto Final de Curso} % Dissertação de Mestrado; Tese de Doutorado (em português, mesmo que o trabalho seja em inglês)
+\tipotrabalho{Trabalho de Conclusão de Curso} % Dissertação de Mestrado; Tese de Doutorado (em português, mesmo que o trabalho seja em inglês)
%\tipotrabalho{Tese de Doutorado}
% ---
-\tipocurso{Engenharia de Controle e Automação} % Nome do curso de graduação ou do programa de pós-graduação, em português
+\tipocurso{Engenharia Elétrica} % Nome do curso de graduação ou do programa de pós-graduação, em português
%\tipocurso{Programa de Pós-Graduação em Engenharia Elétrica}
% ---
% Texto que aparece na folha de rosto e na folha de aprovação
-\preambulo{Projeto Final de Curso submetido como requisito parcial para obtenção do grau de Engenheiro de Controle e Automação.}
+\preambulo{Trabalho de Conclusão de Curso submetido como requisito parcial para obtenção do grau de Engenheiro Eletricista.}
%\preambulo{Tese de Doutorado submetida ao Programa de Pós-Graduação em Engenharia Elétrica da Universidade de Brasília como parte dos requisitos necessários para obtenção do grau de Doutor.}
% Consulte a secretaria/coordenação do curso para saber o que deve ser escrito no preâmbulo. Use português mesmo que o trabalho seja em inglês.
% ---
% Informação adicional para ser impressa na folha de rosto
\publicacao{} % Deixe o argumento vazio caso não haja
-%\publicacao{Publicação PPGEE 201/23} % Também imprime as informações no trabalho no topo da página da ficha catalográfica
+%\publicacao{Publicação PPGEE 201/23} % Também imprime as informações do trabalho no topo da página da ficha catalográfica
% ---
% ---
% Instituição
% ---
-\instituicao[Universidade de Brasília]{Faculdade de Tecnologia}{} % Use português mesmo que o trabalho seja em inglês
-%\instituicao[Universidade de Brasília]{Faculdade de Tecnologia}{Departamento de Engenharia Elétrica} % Caso queira incluir o departamento da unidade acadêmica
+%\instituicao[Universidade de Brasília]{Faculdade de Tecnologia}{} % Use português mesmo que o trabalho seja em inglês
+\instituicao[Universidade de Brasília]{Faculdade de Tecnologia}{Departamento de Engenharia Elétrica} % Caso queira incluir o departamento da unidade acadêmica
% ---
% ---
% Local e data da defesa
% ---
\local{Brasília}
-\dia{2}
-\mes{março}
+\dia{4}
+\mes{julho}
\ano{2024}
% ---
@@ -148,7 +148,7 @@
\membrodabancav{} % Deixe vazio se não tiver o quinto membro
\membrodabancavfuncao{Examinador externo}
% Comprimento da linha da assinatura (ajuste conforme necessidade)
-\setlength{\ABNTEXsignwidth}{9cm}
+\signlinewidth{9cm}
% ---
% ---
@@ -212,7 +212,7 @@ Agradecimentos do segundo autor.
% Primeiro autor
\begin{DedicatoriaAutorI}
-Este trabalho é dedicado às crianças adultas que, \\
+Este trabalho é dedicado às crianças adultas que,\\
quando pequenas, sonharam em se tornar cientistas.
\end{DedicatoriaAutorI}
@@ -334,6 +334,7 @@ Dedicatória do segundo autor.
% Referências bibliográficas
% ---
% Arquivo com as referências bibliográficas
+\bibhang{2.2em} % Recuo da margem esquerda da lista de referências
\bibliography{unbtex-example/referencias} % O estilo de citação é selecionado automaticamente
% ---
diff --git a/macros/latex/contrib/unbtex/unbtex-example/anexo-b.tex b/macros/latex/contrib/unbtex/unbtex-example/anexo-b.tex
index 63bad4c7b5..d482ac0000 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/anexo-b.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/anexo-b.tex
@@ -7,6 +7,9 @@ A \cpageref{marcaunb.1} foi extraída do \emph{manual de identidade visual}\foot
\cleardoublepage
\newcounter{includepdfpage} % para referenciar no texto páginas pdf incluídas
+\makepagestyle{simple}
+\makeevenhead{simple}{\footnotesize\thepage}{}{}
+\makeoddhead{simple}{}{}{\footnotesize\thepage}
\includepdf[
pages=-, % intervalo das páginas do arquivo pdf que serão incluídas
diff --git a/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex b/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
index 46eed2b2bc..1eb8ccc3b2 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
@@ -264,9 +264,7 @@ A \cref{sec:citacao} descreve o ambiente \texttt{citacao}, que pode receber como
A ficha catalográfica é um elemento pré-textual obrigatório para todos os trabalhos acadêmicos (teses, dissertações e trabalhos de conclusão de curso). No site da Biblioteca Central da UnB\footnote{\url{https://bce.unb.br/servicos/elaboracao-de-fichas-catalograficas/}} há mais informações a respeito. A classe UnB\TeX\ gera automaticamente a ficha catalográfica com as informações do trabalho, com opção de inclusão do código Cutter.
-A Tabela Cutter-Sanborn é uma codificação elaborada por Charles Ammi Cutter e, posteriormente, expandida por Kate F. Sanborn. Na Tabela Cutter-Sanborn é possível obter o código correspondente ao sobrenome do autor.
-
-Em vários sites da internet\footnote{\url{https://www.tabelacutter.com/}}\footnote{\url{https://cuttersonline.com.br/registrador-gratuito}} há ferramentas online para obtenção do código. Se o nome do primeiro autor do trabalho for, digamos, Carlos Lisboa, a entrada da ferramenta online deverá ser:
+A Tabela Cutter-Sanborn é uma codificação elaborada por Charles Ammi Cutter e, posteriormente, expandida por Kate F. Sanborn. Na Tabela Cutter-Sanborn é possível obter o código correspondente ao sobrenome do autor. Em vários sites da internet\footnote{\url{https://www.tabelacutter.com/}}\footnote{\url{https://cuttersonline.com.br/registrador-gratuito}} há ferramentas online para obtenção do código. Se o nome do primeiro autor do trabalho for, digamos, Carlos Lisboa, a entrada da ferramenta online deverá ser:
\begin{verbatim}
Lisboa, Carlos
\end{verbatim}
@@ -276,7 +274,7 @@ Nenhuma outra informação é necessária para gerar o código que, no caso dess
\end{verbatim}
Note que na ficha catalográfica gerada aparecerá \texttt{L769m}. A letra \textbf{L} maiúscula, correspondente à primeira letra do sobrenome \textbf{Lisboa}, é automaticamente adicionada na frente do número. A letra \textbf{m} minúscula, correspondente à primeira letra do título do trabalho (neste caso, \emph{Modelo de trabalho acadêmico com UnB\TeX}), é adicionada no final do número.
-Se seu nome for, por exemplo, Carlos de Souza, utilize
+Se o nome do autor for, por exemplo, Carlos de Souza, utilize
\begin{verbatim}
Souza, Carlos de
\end{verbatim}
@@ -289,12 +287,12 @@ como entrada da ferramenta online que gera o código Cutter. Caso não deseje im
\section{Inclusão de outros arquivos}\label{sec:include}
% ---
-É uma boa prática dividir o seu documento em diversos arquivos, e não apenas escrever tudo em um único. Esse recurso foi utilizado neste documento. Para incluir diferentes arquivos em um arquivo principal, de modo que cada arquivo incluído fique em uma página diferente, utilize o comando:
+É uma boa prática dividir o seu documento em diversos arquivos, e não apenas escrever tudo em um único. Para incluir diferentes arquivos em um arquivo principal, de modo que cada arquivo incluído fique em uma página diferente, utilize o comando:
\begin{verbatim}
\include{documento-a-ser-incluido} % sem a extensão .tex
\end{verbatim}
-Para incluir documentos sem que haja necessariamente quebra de páginas, utilize o comando:
+Para incluir documentos haver necessariamente quebra de páginas, utilize o comando:
\begin{verbatim}
\input{documento-a-ser-incluido} % sem a extensão .tex
\end{verbatim}
diff --git a/macros/latex/contrib/unbtex/unbtex-example/capitulo3.tex b/macros/latex/contrib/unbtex/unbtex-example/capitulo3.tex
index 30514e0f81..676cedb21c 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/capitulo3.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/capitulo3.tex
@@ -136,7 +136,7 @@ O pacote \textsf{subfig} foi utilizado para inserir as \cref{fig:subfigura_circu
\caption{Figura com subfiguras}
\label{fig:subfiguras}
\subfloat[Primeira subfigura]{\label{fig:subfigura_circuito} \centering
- \includegraphics[scale=1]{circuito.pdf}}
+ \includegraphics[scale=1]{circuito.pdf}}
\subfloat[Segunda subfigura]{\label{fig:subfigura_grafico} \hspace{0.4em}
\centering \includegraphics[scale=1.2]{diodocurva.pdf}}
\end{figure}
@@ -175,15 +175,13 @@ Caso queira utilizar as mesmas fontes tipográficas do texto para escrever dentr
\label{fig:psgrag}
\end{figure}
-Crie no Overleaf um novo projeto que tenha o conteúdo do \cref{cod:tex} dentro de um arquivo \texttt{tex} nomeado, por exemplo, como \texttt{blockdiagram.tex}. No menu do Overleaf, altere o compilador de \texttt{pdfLaTeX} para \texttt{LaTeX} e defina o arquivo \texttt{blockdiagram.tex} como principal. Coloque o arquivo \texttt{blockdiagram.eps} dentro do projeto e compile. A saída gerada, corresponde à \cref{fig:psfrag1}, deve ser salva como \texttt{blockdiagram.pdf}. Este arquivo poderá ser carregado no projeto do texto do trabalho (TCC, dissertação ou tese) que você estiver escrevendo com o UnB\TeX\ (que usa o \texttt{pdfLaTeX} como compilador).
-
-\lstinputlisting[numbers=none,float,caption={\texttt{blockdiagram.tex}},label={cod:tex}]{unbtex-example/codigos/blockdiagram.tex}
-
-Observe na \cref{fig:psfrag2} que o ``\texttt{g}'' é substituído por ``$G(s)$'' na \cref{fig:psfrag1}. Para tal, o \cref{cod:tex} utiliza o seguinte comando do pacote \textsf{psfrag}:
+Crie no Overleaf um novo projeto que tenha o conteúdo do \cref{cod:tex} dentro de um arquivo \texttt{tex} nomeado, por exemplo, como \texttt{blockdiagram.tex}. No menu do Overleaf, altere o compilador de \texttt{pdfLaTeX} para \texttt{LaTeX} e defina o arquivo \texttt{blockdiagram.tex} como principal. Coloque o arquivo \texttt{blockdiagram.eps} dentro do projeto e compile. A saída gerada, corresponde à \cref{fig:psfrag1}, deve ser salva como \texttt{blockdiagram.pdf}. Este arquivo poderá ser carregado no projeto do texto do trabalho (TCC, dissertação ou tese) que você estiver escrevendo com o UnB\TeX\ (que usa o \texttt{pdfLaTeX} como compilador). Observe na \cref{fig:psfrag2} que o ``\texttt{g}'' é substituído por ``$G(s)$'' na \cref{fig:psfrag1}. Para tal, o \cref{cod:tex} utiliza o seguinte comando do pacote \textsf{psfrag}:
\begin{verbatim}
\psfrag{g}[c][c]{\footnotesize $G(s)$}
\end{verbatim}
+\lstinputlisting[numbers=none,float,caption={\texttt{blockdiagram.tex}},label={cod:tex}]{unbtex-example/codigos/blockdiagram.tex}
+
O pacote \textsf{psfrag} funciona apenas com o compilador \texttt{LaTeX}, o que torna a criação de um novo projeto no Overleaf uma boa solução. Este projeto poderá ser aproveitado para gerar outras figuras do documento principal. Para mais informações sobre o pacote, consulte seu manual\footnote{Disponível em \url{http://mirrors.ctan.org/macros/latex/contrib/psfrag/pfgguide.pdf}}.
Evite o uso de figuras no formato \texttt{eps} no documento principal. Documentos que usam a classe UnB\TeX\ precisam ser compilados pelo \texttt{pdfLaTeX}, que inicialmente converte os arquivos \texttt{eps} para o formato \texttt{pdf}, exigindo maior tempo de processamento. O projeto auxiliar (\cref{cod:tex}) usa a classe \texttt{article} e admite compilador \texttt{LaTeX}, que não necessita de etapas adicionais para processar códigos que chamam arquivos \texttt{eps}. \ No newline at end of file
diff --git a/macros/latex/contrib/unbtex/unbtex-example/capitulo4.tex b/macros/latex/contrib/unbtex/unbtex-example/capitulo4.tex
index cb9577b192..71c5eaf5c6 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/capitulo4.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/capitulo4.tex
@@ -1,5 +1,5 @@
% ----------------------------------------------------------
-\chapter{Ambientes}
+\chapter{Ambientes do UnB\TeX}
% ----------------------------------------------------------
A classe UnB\TeX\ disponibiliza alguns ``ambientes'', ou seja, caixas de texto com formatação especial para certos tipos de elementos, que podem ser automaticamente numerados (por exemplo, \cref{thm:WYSIWYG}, \cref{exc:in}, \cref{alg:NNMPC}, etc.). Esses ambientes foram adaptados a partir do modelo de \citeonline{Castro2019}.
@@ -51,7 +51,7 @@ O WYSIWYG (ou ``What You See Is What You Get - O que você vê é o formato fina
\section{Algoritmo}
-O \cref{alg:NNMPC} é um pseudo-código para obtenção de um controlador preditivo baseado em modelo e em redes neurais.
+O \cref{alg:NNMPC} é um exemplo de pseudo-código.
\begin{algorithm}[htb]
%\linespread{1.0}\selectfont % espaçamento entre as linhas do algoritmo
diff --git a/macros/latex/contrib/unbtex/unbtex-example/referencias.bib b/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
index d247828400..699d20461f 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
+++ b/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
@@ -12,7 +12,7 @@
pages = {342--351}}
@article{van86,
- author = {{van}, Gigch, John P. and Leo L. Pipino},
+ author = {John P. van Gigch and Leo L. Pipino},
journal = {Future Computing Systems},
number = {1},
pages = {71-97},
@@ -53,7 +53,7 @@
@inproceedings{martin1997,
address = {Rio de Janeiro},
- author = {Martin, Neto, L. and C. Bayer and J. Mielniczuk},
+ author = {L. Martin{ }Neto and C. Bayer and J. Mielniczuk},
booktitle = {Resumos do [...]},
conference-number = {26},
conference-year = {1997},
diff --git a/macros/latex/contrib/unbtex/unbtex.cls b/macros/latex/contrib/unbtex/unbtex.cls
index 39f277761d..332fdce505 100644
--- a/macros/latex/contrib/unbtex/unbtex.cls
+++ b/macros/latex/contrib/unbtex/unbtex.cls
@@ -1,7 +1,7 @@
%%
%% UnBTeX: A class for bachelor, master, and doctoral thesis at the
%% University of Brasilia (UnB), Brazil
-%% Version 1.5.1 2024/03/02
+%% Version 1.5.2 2024/07/04
%% Copyright (C) 2021-2024 by Henrique C. Ferreira <hcferreira@unb.br>
%%
%% This class file may be distributed and/or modified under the conditions
@@ -21,7 +21,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{unbtex}[2024/03/02 v1.5.1 Modelo da Universidade de Brasília baseado em abnTeX2]
+\ProvidesClass{unbtex}[2024/07/04 v1.5.2 Modelo da Universidade de Brasília baseado em abnTeX2]
% ------------------------------------------------------------------------
% Opções para a classe
@@ -118,9 +118,20 @@
\setlength{\parindent}{3em} % Tamanho da indentação da primeira linha do parágrafo
\frenchspacing % Retira espaço extra entre as frases (após o ponto final)
\setlength{\parskip}{3pt plus 1pt minus 1pt} % Espaço entre parágrafos
+\pdfminorversion=7 % Configuração da versão do arquivo pdf produzido
+
+% Configurações das margens e cabeçalho
+\AtBeginDocument{
+\setlrmarginsandblock{3cm}{2cm}{*} % Margens esquerda e direita
+\setulmarginsandblock{3cm}{2cm}{*} % Margens superior e inferior
+\checkandfixthelayout[nearest] % Implementa as margens
+\pagestyle{myheadings} % Cabeçalho com linha e numeração da página
+}
+
+% Espaçamento para notas de rodapé
\setlength{\skip\footins}{20pt plus 2pt minus 2pt} % Espaço entre o texto e as notas de rodapé
\addtolength{\footnotesep}{2pt} % Espaço entre as notas de rodapé
-\pdfminorversion=7 % Configuração da versão do arquivo pdf produzido
+\renewcommand*{\footnoterule}{\kern-3pt \hrule width 5cm \kern 2.6pt} % Tamanho do traço superior (5cm)
% Ajusta espaço entre texto e figuras/tabelas
\setlength{\textfloatsep}{18pt plus 2pt minus 2pt} % Espaçamento entre texto e floats no topo/base da página
@@ -137,9 +148,6 @@
\renewcommand{\thefigure}{\thechapter.\arabic{figure}}\numberwithin{figure}{chapter}
\renewcommand{\thetable}{\thechapter.\arabic{table}}\numberwithin{table}{chapter}
-% Configuração do cabeçalho das páginas
-\pagestyle{myheadings} % Cabeçalho com linha e numeração da página
-
% Modifica o tamanho da fonte e espaçamento entre linhas no ambiente verbatim
\RequirePackage{fvextra}
\renewenvironment{verbatim}{\VerbatimEnvironment
@@ -385,16 +393,15 @@
\urlstyle{same}
}
% Gera as referências bibliográficas de acordo com as normas da ABNT
+\newcommand{\bibhang}[1]{\setlength{\bibindent}{#1}}
\IfStrEq{\bibsty}{alf}{% Estilo autor-data
-\newcommand{\recuo}{3em} % Indentação da lista de referências
-\RequirePackage[alf,recuo=\recuo,abnt-etal-list=0,abnt-etal-cite=3,abnt-emphasize=bf,bibjustif]{abntex2cite}
+\RequirePackage[alf,abnt-etal-list=0,abnt-etal-cite=3,abnt-emphasize=bf,bibjustif]{abntex2cite}
\renewcommand{\@biblabel}[1]{}%
\IfStrEq{\idioma}{brazil} % Seleciona o arquivo de estilo de citação
{\bibliographystyle{unbtexcite/unbtex-alf-pt}}{\bibliographystyle{unbtexcite/unbtex-alf-en}}
}{%
\IfStrEq{\bibsty}{num}{% Estilo numérico
-\newcommand{\recuo}{2.2em} % Aumente este valor se o número de referências for superior a 100
-\RequirePackage[num,recuo=\recuo,abnt-etal-list=0,abnt-emphasize=bf,bibjustif]{abntex2cite}
+\RequirePackage[num,abnt-etal-list=0,abnt-emphasize=bf,bibjustif]{abntex2cite}
\RequirePackage{cite} % Para ordenar, comprimir e colocar entre colchetes os números nas citações
\renewcommand{\@biblabel}[1]%
{%
@@ -408,7 +415,7 @@
{\setlength{\ABCIauxlen}{\minimumbiblabelwidth-\ABCIauxlen}}%
{\setlength{\ABCIauxlen}{0cm}}%
%{\biblabeltext\hspace{\ABCIauxlen}}%
-\parbox[t]{\recuo}{\raggedleft\biblabeltext\hspace{\ABCIauxlen}}%
+\parbox[t]{\bibindent}{\raggedleft\biblabeltext\hspace{\ABCIauxlen}}%
}}%
\renewcommand{\citeonline}[2][] % Redefine \citeonline como \cite
{\ifthenelse{\equal{#1}{}}{\cite{#2}}{\cite[#1]{#2}}}
@@ -465,19 +472,36 @@
indent=0pt,
entrynumberformat=\entrynumberwithprefix{\figurename},
dynnumwidth,
- %numsep=0em
]{tocline}{figure}
\DeclareTOCStyleEntry[
indent=0pt,
entrynumberformat=\entrynumberwithprefix{\tablename},
dynnumwidth,
- %numsep=0em
]{tocline}{table}
\newcommand\entrynumberwithprefix[2]{#1~#2\thinspace\hfill}
% ---
% ---
+% Citacao direta com mais de 3 linhas - ABNT NBR 10520/2002 - 5.3
+% Corrige tamanho do recuo do ambiente citacao do abntex2 para 4cm
+% ---
+\ifthenelse{\equal{\ABNTEXistwocolumn}{true}}{%
+ \setlength{\ABNTEXcitacaorecuo}{1.8cm}
+}{% else
+ \setlength{\ABNTEXcitacaorecuo}{4cm}
+}
+\renewenvironment*{citacao}[1][default]{%
+ \begin{adjustwidth}{\ABNTEXcitacaorecuo}{0mm}%
+ \ABNTEXfontereduzida%
+ \begin{SingleSpace}%
+ \ifthenelse{\not\equal{#1}{default}}{\itshape\selectlanguage{#1}}{}%
+}{%
+ \end{SingleSpace}%
+ \end{adjustwidth}}
+% ---
+
+% ---
% Define o texto dos rótulos de acordo com o idioma principal selecionado
% ---
\AtBeginDocument{
@@ -611,13 +635,14 @@
\renewcommand{\imprimircapa}{%
\hypersetup{pageanchor=false}
\setlrmargins{*}{*}{1} % Margens laterais iguais para a capa
-\checkandfixthelayout[nearest]
+\setulmarginsandblock{3cm}{2cm}{*}
+\checkandfixthelayout[fixed]
\begin{capa}%
\center
\AddToShipoutPicture*{\BackgroundPic}
\vspace*{7.5cm}
- {\LARGE{\sffamily{\bfseries\instituicaoi \\ \instituicaoii \\
- \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}}}\par}
+ {\LARGE\sffamily\bfseries\instituicaoi \\ \instituicaoii \\
+ \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}\par}
\vfill
\begin{center}
% Define o tamanho da fonte do título
@@ -641,7 +666,7 @@
% Reestabelece as margens
\setlrmarginsandblock{3cm}{2cm}{*}
\setulmarginsandblock{3cm}{2cm}{*}
-\checkandfixthelayout[fixed]
+\checkandfixthelayout[nearest]
\cleardoublepage
\hypersetup{pageanchor=true}
}
@@ -652,8 +677,7 @@
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
- \centering
- \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{capa_fundo.pdf}%
+ \centering \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{capa_fundo.pdf}%
\vfill
}
}
@@ -665,8 +689,8 @@
% ---
\renewcommand{\folhaderostocontent}{%
\begin{center}
- {\LARGE{\sffamily{\bfseries\instituicaoi \\ \instituicaoii \\
- \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}}}\par}
+ {\LARGE\sffamily\bfseries \instituicaoi \\ \instituicaoii \\
+ \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}\par}
\vfill\vfill
\begin{center}
@@ -712,7 +736,7 @@
\ifthenelse{\equal{\imprimirpublicacao}{}}{}{
\begin{OnehalfSpace}
{\noindent\sffamily\large REFERÊNCIA BIBLIOGRÁFICA}\par
-\noindent\MakeUppercase\autorisobrenome, \autorinome \ifthenelse{\equal{\autoriinome}{}}{.}{;~\MakeUppercase\autoriisobrenome, \autoriinome.} {\bfseries\StrDel{\imprimirtitulo}{\\ }}. \begin{otherlanguage*}{brazil}\imprimirtipotrabalho\ (\imprimircurso)\ifthenelse{\equal{\imprimirpublicacao}{}}{}{,~\imprimirpublicacao} -- \ifthenelse{\equal{\instituicaoiii}{}}{}{\instituicaoiii,~}\instituicaoii, \instituicaoi, \imprimirlocal, \thelastpage~p. \imprimirano.\end{otherlanguage*}
+\noindent\MakeUppercase\autorisobrenome, \autorinome \ifthenelse{\equal{\autoriinome}{}}{.}{;~\MakeUppercase\autoriisobrenome, \autoriinome.} {\bfseries\StrDel{\imprimirtitulo}{\\}}. \begin{otherlanguage*}{brazil}\imprimirtipotrabalho\ (\imprimircurso)\ifthenelse{\equal{\imprimirpublicacao}{}}{}{,~\imprimirpublicacao} -- \ifthenelse{\equal{\instituicaoiii}{}}{}{\instituicaoiii,~}\instituicaoii, \instituicaoi, \imprimirlocal, \thelastpage~p. \imprimirano.\end{otherlanguage*}
\end{OnehalfSpace}}
\IfInteger{\imprimircutter}{\setlength{\fboxsep}{10pt}}{\setlength{\fboxsep}{18pt}}
\vspace*{\fill}
@@ -724,7 +748,7 @@
\IfInteger{\imprimircutter}{\begin{tabular}{p{1.25cm} p{10.25cm}}}{} \cutter
\autorisobrenome, \autorinome. \\
\IfInteger{\imprimircutter}{\StrChar{\autorisobrenome}{1}\imprimircutter\StrChar{\imprimirtitulo}{1}[\SUBtemp]\MakeLowercase{\SUBtemp}}{} \cutter
-\hspace*{2em}\noindent \StrDel{\imprimirtitulo}{\\ } ~/ \begin{otherlanguage*}{brazil}{\autorinome\ \autorisobrenome; \ifthenelse{\equal{\autoriinome}{}}{}{\autoriinome\ \autoriisobrenome;} \MakeLowercase\orientname\ \orientnome\ \orientsobrenome \ifthenelse{\equal{\coorientnome}{}}{.}{;~\MakeLowercase\coorientname\ \coorientnome\ \coorientsobrenome.} \texttt{-{}-} \imprimirlocal, \imprimirano.}\end{otherlanguage*} \\ \cutter
+\hspace*{2em}\noindent \StrDel{\imprimirtitulo}{\\} ~/ \begin{otherlanguage*}{brazil}{\autorinome\ \autorisobrenome; \ifthenelse{\equal{\autoriinome}{}}{}{\autoriinome\ \autoriisobrenome;} \MakeLowercase\orientname\ \orientnome\ \orientsobrenome \ifthenelse{\equal{\coorientnome}{}}{.}{;~\MakeLowercase\coorientname\ \coorientnome\ \coorientsobrenome.} \texttt{-{}-} \imprimirlocal, \imprimirano.}\end{otherlanguage*} \\ \cutter
\hspace*{2em}\noindent \thelastpage~p. \\ \cutter
\\ \cutter
\hspace*{2em}\noindent\begin{otherlanguage*}{brazil}\imprimirtipotrabalho\ (\imprimircurso)\ \texttt{-{}-} \instituicaoi, \imprimirano.\end{otherlanguage*} \\ \cutter
@@ -742,18 +766,19 @@
% ---
% Imprime folha de aprovação
% ---
+\newcommand{\signlinewidth}[1]{\setlength{\ABNTEXsignwidth}{#1}}
\newcommand{\imprimirfolhadeaprovacao}{%
\begin{folhadeaprovacao}
\begin{center}
- {\Large{\sffamily{\bfseries\instituicaoi \\ \instituicaoii \\
- \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}}}\par}
+ {\Large\sffamily\bfseries\instituicaoi \\ \instituicaoii \\
+ \abntex@ifnotempty{\instituicaoiii}{\instituicaoiii}\par}
\vfill
\begin{center}
% Define o tamanho da fonte do título
- \autotitle[1]{\bfseries\StrDel{\imprimirtitulo}{\\ }}
+ \autotitle[1]{\bfseries\StrDel{\imprimirtitulo}{\\}}
\ifthenelse{\equal{\titleformat}{\large}}
- {\color{verdeunb}\Large\bfseries \StrDel{\imprimirtitulo}{\\ }\par}
- {\color{verdeunb}\titleformat\bfseries \StrDel{\imprimirtitulo}{\\ }\par}
+ {\color{verdeunb}\Large\bfseries \StrDel{\imprimirtitulo}{\\}\par}
+ {\color{verdeunb}\titleformat\bfseries \StrDel{\imprimirtitulo}{\\}\par}
\end{center}
\vfill
@@ -781,10 +806,6 @@
\abntex@ifnotempty{\membrodabancaivnome}{\assinatura{\textbf{\membrodabancaivnome} \\ \membrodabancaivfuncaonome}}
\abntex@ifnotempty{\membrodabancavnome}{\assinatura{\textbf{\membrodabancavnome} \\ \membrodabancavfuncaonome}}
}
-%\vfill
-% \begin{center}
-% {\sffamily\large\imprimirlocal \\ \imprimirano\par}
-% \end{center}
\end{center}
\end{folhadeaprovacao}
}