summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/proflycee/tex/ProfLycee.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/proflycee/tex/ProfLycee.sty')
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty65
1 files changed, 58 insertions, 7 deletions
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 71079843e3..d88ec5e849 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,9 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2022/04/24 - v1.0.9 - Aide pour l'utilisation de LaTeX en lycée]
+\ProvidesPackage{ProfLycee}[2022/04/28 - v1.1.1 - Aide pour l'utilisation de LaTeX en lycée]
+% 1.1.1 Modification mineure de l'environnement CF, avec prise de charge de la taille du texte !
+% 1.1.0 Ajout d'une commande tetraPL pour un tetraèdre dans un environnement TikZ
% 1.0.9 Ajout d'une commande pavePL pour un pave droit dans un environnement TikZ
% 1.0.8 Ajout d'une commande liencapytale pour créer un cartouche "comme sur capytale"
% 1.0.7 Option [build] pour placer les fichiers temporaires dans un répertoire build (désactivée par défaut)
@@ -234,13 +236,13 @@
\draw[\CFcouleur] (A0\CFL) rectangle (A5\CFL) ;
%LA COMMANDE EN ROUGE
\IfStrEq{\CFposcmd}{centre}%si poscmd=center
- {\draw (C2\CFL) node[\CFcoulcmd] {#2} ;}
+ {\draw (C2\CFL) node[\CFcoulcmd,font=\CFtaille] {#2} ;}
{}
\IfStrEq{\CFposcmd}{gauche}%si poscmd=left
- {\draw (C1\CFL) node[right,\CFcoulcmd] {#2} ;}
+ {\draw (C1\CFL) node[right,\CFcoulcmd,font=\CFtaille] {#2} ;}
{}
\IfStrEq{\CFposcmd}{right}%si poscmd=right
- {\draw (C3\CFL) node[left,\CFcoulcmd] {#2} ;}
+ {\draw (C3\CFL) node[left,\CFcoulcmd,font=\CFtaille] {#2} ;}
{}
%LA LIGNE DE SÉPARATION
\ifboolKV[paramfenxcas]{sep}%si sep=true
@@ -248,13 +250,13 @@
{}
%LE RÉSULTAT
\IfStrEq{\CFposres}{centre}%si posrep=center
- {\draw (R2\CFL) node[\CFcoulres] {#3} ;}
+ {\draw (R2\CFL) node[\CFcoulres,font=\CFtaille] {#3} ;}
{}
\IfStrEq{\CFposres}{gauche}%si posrep=left
- {\draw (R1\CFL) node[right,\CFcoulres] {#3} ;}
+ {\draw (R1\CFL) node[right,\CFcoulres,font=\CFtaille] {#3} ;}
{}
\IfStrEq{\CFposres}{right}%si posrep=right
- {\draw (R3\CFL) node[left,\CFcoulres] {#3} ;}
+ {\draw (R3\CFL) node[left,\CFcoulres,font=\CFtaille] {#3} ;}
{}
\ifboolKV[paramfenxcas]{sep}%si sep=true
{\draw[\CFcouleur] (A1\CFL) -- (A4\CFL);}%
@@ -745,4 +747,53 @@
(\PaveD)--(\PaveH) ;}
}
+%============TétraèdreTikZ============= OK !!
+\defKV[paramstetra]{%
+ largeur=\xdef\PFTetraLg{#1},%
+ profondeur=\xdef\PFTetraPf{#1},%
+ hauteur=\xdef\PFTetraHt{#1},%
+ alpha=\xdef\PFTetraAlpha{#1},%
+ beta=\xdef\PFTetraBeta{#1},%
+ sommets=\def\PFTetraSommets{#1},%
+ epaisseur=\xdef\PFTetraThick{#1}
+}
+\setKVdefault[paramstetra]{%
+ aff=false,%
+ plein=false,%
+ largeur=4,%
+ profondeur=1.25,%
+ hauteur=3,%
+ alpha=40,%
+ beta=60,%
+ epaisseur=thick,%
+ sommets=A§B§C§D,%
+}
+
+\newcommand\tetraPL[1][]{%
+ \useKVdefault[paramstetra]%
+ \setKV[paramstetra]{#1}%
+ \setsepchar{§}%
+ \readlist\PFListeSommets\PFTetraSommets
+ \itemtomacro\PFListeSommets[1]\TetraA
+ \itemtomacro\PFListeSommets[2]\TetraB
+ \itemtomacro\PFListeSommets[3]\TetraC
+ \itemtomacro\PFListeSommets[4]\TetraD
+ %les nœuds du tétraèdre
+ \coordinate (\TetraA) at (0,0) ;
+ \coordinate (\TetraB) at ($(\TetraA) + ({-\PFTetraAlpha}:{\PFTetraPf})$) ;
+ \coordinate (\TetraC) at ({\PFTetraLg},0) ;
+ \coordinate (\TetraD) at ($(\TetraA) + ({\PFTetraBeta}:{\PFTetraHt})$) ;
+ \ifboolKV[paramstetra]{aff}
+ {\draw (\TetraA) node[left] {\TetraA} ;
+ \draw (\TetraB) node[below] {\TetraB} ;
+ \draw (\TetraC) node[right] {\TetraC} ;
+ \draw (\TetraD) node[above] {\TetraD} ;}
+ {}%on affiche rien
+ \draw[\PFTetraThick] (\TetraA)--(\TetraD)--(\TetraC)--(\TetraB)--cycle
+ (\TetraD)--(\TetraB) ;
+ \ifboolKV[paramstetra]{plein}
+ {}
+ {\draw[dashed,\PFTetraThick] (\TetraA)--(\TetraC) ;}
+}
+
\endinput \ No newline at end of file