diff options
Diffstat (limited to 'macros/latex/contrib/postit/tex/postit.sty')
-rw-r--r-- | macros/latex/contrib/postit/tex/postit.sty | 519 |
1 files changed, 470 insertions, 49 deletions
diff --git a/macros/latex/contrib/postit/tex/postit.sty b/macros/latex/contrib/postit/tex/postit.sty index 76497257df..13dbd10ace 100644 --- a/macros/latex/contrib/postit/tex/postit.sty +++ b/macros/latex/contrib/postit/tex/postit.sty @@ -3,15 +3,32 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{postit}[2023/05/31 0.1.0 Utiliser des post-it] +\ProvidesPackage{postit}[2023/06/05 0.1.1 Utiliser des post-it] +%0.1.1 Ajout d'un \vphantom pour les mini-post-it + moteur de rendu tikz en supplément %0.1.0 Version initiale %------Packages utiles \RequirePackage{tcolorbox} \RequirePackage{simplekv} \RequirePackage{xstring} +\RequirePackage{settobox} %------Librairies \tcbuselibrary{skins} +\usetikzlibrary{calc,positioning,decorations,decorations.pathmorphing} + +%------variables utiles +\newsavebox{\maboitepostit} +\newlength{\HauteurEssaiTexte} +\def\OffsetOmbreA{3pt} +\def\OffsetOmbreB{2pt} +\def\OffsetOmbreC{1pt} +\def\MarginHGPostIt{0.25} +\def\MarginHDPostIt{0.55} +\def\MarginVHPostIt{3mm} +\def\MarginVBPostIt{2mm} +\def\LargeurStotch{2.5} +\def\HauteurScotch{1} +\def\PostItBorder{0.1mm} %------Clés \defKV[postit]{% @@ -25,7 +42,11 @@ Attache=\def\PostItDeco{#1},% AlignementV=\def\PostItAlignV{#1},% AlignementH=\def\PostItAlignH{#1},% - AlignementPostIt=\def\PostItAlignPostIt{#1} + AlignementPostIt=\def\PostItAlignPostIt{#1},% + Rendu=\def\PostItRender{#1},% + ExtraMargeDroite=\def\PostItExtraMargin{#1},% + Titre=\def\PostItTitre{#1},% + PoliceTitre=\def\PostItPoliceTitre{#1} } \setKVdefault[postit]{% @@ -36,41 +57,54 @@ EchelleAttache=1,% Ombre=true,% Hauteur=auto,% - DecalAttache=0cm,% + DecalAttache=0,% Attache=Punaise,% AlignementV=top,% AlignementH=justify,% AlignementPostIt=bottom,% Bordure=true,% - Coin=false + Coin=false,% + Rendu=tcbox,% + ExtraMargeDroite=0cm,% + Titre={},% + PoliceTitre=\normalfont\normalsize } %------Style principal tcolorbox \tcbset{testpostit/.style={% - on line,enhanced,colback=\PostItCoul!50,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% + on line,enhanced,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% + %colback=\PostItCoul!50,% finish={\CommandeDecoration},tikz={rotate=\PostItIncline,transform shape},% box align=\PostItAlignPostIt,% + interior style={top color=\PostItCoul!50,bottom color=\PostItCoul!33},% nobeforeafter }% } %------Gestion du coin \NewDocumentCommand\CoinPostIt{ }{% - \path[line width=\PostItBorder,fill=\PostItCoul!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[line width=\PostItBorder,fill=\PostItCoul!66] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); \path[line width=\PostItBorder,draw=\PostItCoul!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=\PostItCoul!50!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); } %------Gestion du trombone \NewDocumentCommand\TrombonePostIt{ }{% - \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip cm}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; \end{scope} } +%------Gestion du scotch +\NewDocumentCommand\ScotchPostIt{ }{% + \begin{scope}[shift={([xshift=\PostItDeclClip cm]frame.north)},scale={\PostItCoulScaleClip*0.65},line cap=round,rotate=3] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} +} + %------Gestion de la punaise \NewDocumentCommand\EpinglePostIt{ }{% - \begin{scope}[shift={([xshift=\PostItDeclClip,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40] + \begin{scope}[shift={([xshift=\PostItDeclClip cm,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40] \begin{scope}[rotate=-35] \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; @@ -81,58 +115,444 @@ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); - \end{scope} } %------Environnement principal -\NewDocumentEnvironment{PostIt}{ O{} D<>{} }% +\NewDocumentEnvironment{PostIt}{ O{} D<>{} +b }% {% \restoreKV[postit]% \setKV[postit]{#1}% - %choix de la déco et paramètrage - \def\CommandeDecoration{\EpinglePostIt}% - \def\MarginOffsetV{4mm}% - \IfStrEq{\PostItDeco}{Trombone}% - {\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% - {}% - \IfStrEq{\PostItDeco}{Non}% - {\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% - {}% - %cas de la bordure - \ifboolKV[postit]{Bordure}% - {% - \def\PostItBorder{0.1mm}% - \tcbset{bordure/.style={}}% - }% + \IfStrEq{\PostItRender}{tcbox}% {% - \def\PostItBorder{0mm}% - \tcbset{bordure/.style={frame hidden}}% - }% - %cas du coin - \ifboolKV[postit]{Coin}% + %choix de la déco et paramètrage + \def\CommandeDecoration{\EpinglePostIt}% + \def\MarginOffsetV{4mm}% + \IfStrEq{\PostItDeco}{Trombone}% + {\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {\def\CommandeDecoration{\ScotchPostIt}\def\MarginOffsetV{1mm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% + {}% + %cas de la bordure + \ifboolKV[postit]{Bordure}% + {% + \def\PostItBorder{0.1mm}% + \tcbset{bordure/.style={}}% + }% + {% + \def\PostItBorder{0mm}% + \tcbset{bordure/.style={frame hidden}}% + }% + %cas du coin + \ifboolKV[postit]{Coin}% + {% + \tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% + }% + {% + \tcbset{coincoin/.style={}}% + }% + %en fonction de hauteur auto ou non + \IfStrEq{\PostItHauteur}{auto}% + {% + \ifboolKV[postit]{Ombre}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV}]}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,top={2mm+\MarginOffsetV}]}% + }% + {% + \ifboolKV[postit]{Ombre}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% + }% + \IfStrEq{\PostItTitre}{}% + {}% + {% + \hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\% + }% + #3% + \end{tcolorbox}% + }{}% + \IfStrEq{\PostItRender}{tikz}% {% - \tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% - }% + \StrDel{\PostItLarg}{cm}[\PostItLarg]% + \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% + \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% + \def\TextePostIt{% + \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}% + #3% + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% + \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% + \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% + \IfStrEq{\PostItDeco}{Scotch}% + {\addtolength\HauteurEssaiTexte{0.4cm}}% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \IfStrEq{\PostItDeco}{Punaise}% + {\addtolength\HauteurEssaiTexte{0.6cm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \def\hauteur{\the\HauteurEssaiTexte}% + }% + {% + \def\hauteur{\PostItHauteur}% + }% + \def\OptionTikzPostIt{current bounding box.south}% + \IfStrEq{\PostItAlignPostIt}{center}% + {\def\OptionTikzPostIt{current bounding box.center}}{}% + \IfStrEq{\PostItAlignPostIt}{top}% + {\def\OptionTikzPostIt{current bounding box.north}}{}% + \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round] + %tracé + %ombre1/2/3 + \ifboolKV[postit]{Ombre}% + {% + \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreA,-\OffsetOmbreA)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreB,-\OffsetOmbreB)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreC,-\OffsetOmbreC)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + {}% + %postit + \ifboolKV[postit]{Bordure} + {% + \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + {% + \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {% + \IfStrEq{\PostItAlignV}{top} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{center} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{bottom} + {% + \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + %affichage de la punaise + \IfStrEq{\PostItDeco}{Punaise}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] + \begin{scope}[rotate=-35] + \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + }% + {}% + %affichage du trombone + \IfStrEq{\PostItDeco}{Trombone}% + {% + \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \end{scope} + }% + {}% + %affichage du scotch + \IfStrEq{\PostItDeco}{Scotch}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} + }% + {}% + \end{tikzpicture}% + }{}% + \IfStrEq{\PostItRender}{tikzv2}% {% - \tcbset{coincoin/.style={}}% - }% - %en fonction de hauteur auto ou non - \IfStrEq{\PostItHauteur}{auto}% - {% - \ifboolKV[postit]{Ombre}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV}]}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,top={2mm+\MarginOffsetV}]}% - }% - {% - \ifboolKV[postit]{Ombre}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% - }% + \StrDel{\PostItLarg}{cm}[\PostItLarg]% + \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% + \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% + \def\TextePostIt{% + \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}% + #3% + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% + \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% + \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% + \IfStrEq{\PostItDeco}{Scotch}% + {\addtolength\HauteurEssaiTexte{0.4cm}}% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \IfStrEq{\PostItDeco}{Punaise}% + {\addtolength\HauteurEssaiTexte{0.6cm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \def\hauteur{\the\HauteurEssaiTexte}% + }% + {% + \def\hauteur{\PostItHauteur}% + }% + \def\OptionTikzPostIt{current bounding box.south}% + \IfStrEq{\PostItAlignPostIt}{center}% + {\def\OptionTikzPostIt{current bounding box.center}}{}% + \IfStrEq{\PostItAlignPostIt}{top}% + {\def\OptionTikzPostIt{current bounding box.north}}{}% + \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round] + %tracé + %ombre1/2/3 + \ifboolKV[postit]{Ombre}% + {% + \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(2pt,-2pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-4pt,0)$) + to[out=89,in=-90] (0,0) ; + \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(1.25pt,-1.25pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-2.5pt,0)$) + to[out=89,in=-90] (0,0) ; + \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(0.5pt,-0.5pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-1pt,0)$) + to[out=89,in=-90] (0,0) ; + }% + {}% + %postit + \ifboolKV[postit]{Bordure} + {% + \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) + --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) + to[out=89,in=-90] (0,0) ; + }% + {% + \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) + --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) + to[out=89,in=-90] (0,0) ; + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {% + \IfStrEq{\PostItAlignV}{top} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{center} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{bottom} + {% + \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + %affichage de la punaise + \IfStrEq{\PostItDeco}{Punaise}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] + \begin{scope}[rotate=-35] + \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + }% + {}% + %affichage du trombone + \IfStrEq{\PostItDeco}{Trombone}% + {% + \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \end{scope} + }% + {}% + %affichage du scotch + \IfStrEq{\PostItDeco}{Scotch}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} + }% + {}% + \end{tikzpicture}% + }{}% }% -{% - \end{tcolorbox}% -} +{}% %------Style principal minitcbox \tcbset{testminipostit/.style={% @@ -148,6 +568,7 @@ \NewTCBox{\MiniPostIt}{ s O{yellow} }{% testminipostit,colback=#2!50,colframe=#2!50!black,rounded corners=southeast,arc is angular,arc=2mm,% + before upper=\vphantom{pL}, underlay={ \path[line width=0.1mm,fill=#2!80!black] ([yshift=2mm]interior.south east)--++(-0.25,-0.1)--++(0.05,-0.1); \path[line width=0.1mm,draw=#2!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=#2!50!black] ([yshift=2mm]interior.south east)--++(-0.25,-0.1)--++(0.05,-0.1); |