summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty')
-rw-r--r--graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty19
1 files changed, 13 insertions, 6 deletions
diff --git a/graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty b/graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty
index e3d94f4c0a..6c2e6270b6 100644
--- a/graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty
+++ b/graphics/pgf/contrib/rouequestions/tex/RoueQuestions.sty
@@ -1,7 +1,8 @@
% Author : M. Vignal
% License : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
-\ProvidesPackage{RoueQuestions}[2023/06/27 0.0.2 Aide pour générer des roues de questions]
+\ProvidesPackage{RoueQuestions}[2023/07/19 0.0.3 Aide pour générer des roues de questions]
\RequirePackage{tikz}
+\RequirePackage{tkz-euclide}
\RequirePackage{simplekv}
\RequirePackage{listofitems}
\RequirePackage{ifthen}
@@ -9,7 +10,7 @@
\setKVdefault[roueQuestions]{
Titre = {},
Consigne = {},
- Conseil = {},
+ Conseil = {Cette partie est encollée et placée sous la consigne de la première roue.},
LineWidth = 2pt,
RayonCentral= 6,
RayonTotal = 8,
@@ -61,7 +62,7 @@
c{}{
%\filldraw[blue] (-7,-7) rectangle (7,7);
%ajout image
- \node[opacity=\ImageOpacite] (centre) at(0,0) {\includegraphics[]{\Image}};
+ \ifboolKV[roueQuestions]{Solution}{}{\node[opacity=\ImageOpacite] (centre) at(0,0) {\includegraphics[]{\Image}};}
}
}
\end{scope}
@@ -93,11 +94,17 @@
\draw[\couleurExt, line width={\useKV[roueQuestions]{LineWidth}}] (\angle*\n:\RayonTotal) -- (\angle*\n+\angle:\RayonTotal) ;
% texte de l'onglet
% angle de rotation du texte = 180 - \angle/2
- \pgfmathparse{270 + \angle*\n - \angle/2}\let\angleTexte\pgfmathresult
- \node[rotate=\angleTexte] at (\angle*\n-\angle/2:\RayonTexte) {\listeequations[\n]};
+ \tkzDefPoint(\angle*\n:\RayonCentral){A\n} \tkzDefPoint(\angle*\n+\angle:\RayonCentral){B\n}
+ \tkzDefPoint(\angle*\n:\RayonTotal){C\n} \tkzDefPoint(\angle*\n+\angle:\RayonTotal){D\n}
+ \tkzDefMidPoint(A\n,B\n) \tkzGetPoint{M\n} \tkzDefMidPoint(C\n,D\n) \tkzGetPoint{N\n} \tkzDefMidPoint(M\n,N\n) \tkzGetPoint{P\n}
+% \tkzDrawPoints(A\n,B\n,M\n,C\n,D\n,N\n,P\n) \tkzLabelPoints(A\n,B\n,M\n,C\n,D\n,N\n,P\n)
+% \pgfmathparse{270 + \angle*\n - \angle/2}\let\angleTexte\pgfmathresult
+% \node[rotate=\angleTexte] at (\angle*\n-\angle/2:\RayonTexte) {\listeequations[\n]};
+ \pgfmathparse{\angle*\n + \angle/2-90}\let\angleTexte\pgfmathresult
+ \tkzLabelPoint[centered](P\n){\rotatebox{\angleTexte}{\listeequations[\n]}} %
}
\node at(0,2*\RayonCentral/3) {\textbf{\useKV[roueQuestions]{Titre}}};
- \node[text width=\LargeurTexte cm,text justified] at(0,0) {\useKV[roueQuestions]{Consigne}};
+ \node[text width=\LargeurTexte cm,text justified] at(0,0) {\ifboolKV[roueQuestions]{Solution}{\useKV[roueQuestions]{Conseil}}{\useKV[roueQuestions]{Consigne}}};
\end{tikzpicture}
}
\newcommand{\rouesQuestions}[3][]{%