| 1 |
% Author : C. Pierquet |
| 2 |
% licence : Released under the LaTeX Project Public License v1.3c |
| 3 |
% or later, see http://www.latex-project.org/lppl.txt |
| 4 |
|
| 5 |
\NeedsTeXFormat{LaTeX2e} |
| 6 |
\ProvidesPackage{postit}[2025/07/29 0.1.5 Display sticky notes in a doc] |
| 7 |
%0.1.5 Bugfix with spacing |
| 8 |
%0.1.4 Enhancements with AlignH |
| 9 |
%0.1.3 Nodes for tikz' link between postits |
| 10 |
%0.1.2 English version (keys & command) |
| 11 |
%0.1.1 Ajout d'un \vphantom pour les mini-post-it + moteur de rendu tikz en supplément |
| 12 |
%0.1.0 Version initiale |
| 13 |
|
| 14 |
%------Packages utiles |
| 15 |
\RequirePackage{tcolorbox} |
| 16 |
\RequirePackage{simplekv} |
| 17 |
\RequirePackage{xstring} |
| 18 |
\RequirePackage{settobox} |
| 19 |
\RequirePackage{varwidth} |
| 20 |
%------Librairies |
| 21 |
\tcbuselibrary{skins} |
| 22 |
\usetikzlibrary{calc,positioning,decorations,decorations.pathmorphing} |
| 23 |
\usetikzlibrary{babel} |
| 24 |
|
| 25 |
%------variables utiles |
| 26 |
\newsavebox{\maboitepostit} |
| 27 |
\newlength{\HauteurEssaiTexte} |
| 28 |
\def\OffsetOmbreA{3pt} |
| 29 |
\def\OffsetOmbreB{2pt} |
| 30 |
\def\OffsetOmbreC{1pt} |
| 31 |
\def\MarginHGPostIt{0.25} |
| 32 |
\def\MarginHDPostIt{0.55} |
| 33 |
\def\MarginVHPostIt{3mm} |
| 34 |
\def\MarginVBPostIt{2mm} |
| 35 |
\def\LargeurStotch{2.5} |
| 36 |
\def\HauteurScotch{1} |
| 37 |
\def\PostItBorder{0.1mm} |
| 38 |
|
| 39 |
%======Décorations |
| 40 |
%------Gestion du coin |
| 41 |
\NewDocumentCommand\CoinPostIt{ }{% |
| 42 |
\path[line width=\PostItBorder,fill=\PostItCoul!66] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); |
| 43 |
\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); |
| 44 |
} |
| 45 |
|
| 46 |
%------Gestion du trombone |
| 47 |
\NewDocumentCommand\TrombonePostIt{ }{% |
| 48 |
\begin{scope}[shift={([xshift={-1cm+\PostItDeclClip cm}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] |
| 49 |
\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) ; |
| 50 |
\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) ; |
| 51 |
\end{scope} |
| 52 |
} |
| 53 |
|
| 54 |
%------Gestion du scotch |
| 55 |
\NewDocumentCommand\ScotchPostIt{ }{% |
| 56 |
\begin{scope}[shift={([xshift=\PostItDeclClip cm]frame.north)},scale={\PostItCoulScaleClip*0.65},line cap=round,rotate=3] |
| 57 |
\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} ; |
| 58 |
\end{scope} |
| 59 |
} |
| 60 |
|
| 61 |
%------Gestion de la punaise |
| 62 |
\NewDocumentCommand\EpinglePostIt{ }{% |
| 63 |
\begin{scope}[shift={([xshift=\PostItDeclClip cm,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40] |
| 64 |
\begin{scope}[rotate=-35] |
| 65 |
\draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 66 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 67 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 68 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 69 |
\end{scope} |
| 70 |
\draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 71 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 72 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 73 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 74 |
\end{scope} |
| 75 |
} |
| 76 |
|
| 77 |
%======[FR] |
| 78 |
%------Clés |
| 79 |
\defKV[postit]{% |
| 80 |
Largeur=\def\PostItLarg{#1},% |
| 81 |
Couleur=\def\PostItCoul{#1},% |
| 82 |
CouleurAttache=\def\PostItCoulClip{#1},% |
| 83 |
EchelleAttache=\def\PostItCoulScaleClip{#1},% |
| 84 |
Inclinaison=\def\PostItIncline{#1},% |
| 85 |
Hauteur=\def\PostItHauteur{#1},% |
| 86 |
DecalAttache=\def\PostItDeclClip{#1},% |
| 87 |
Attache=\def\PostItDeco{#1},% |
| 88 |
AlignementV=\def\PostItAlignV{#1},% |
| 89 |
AlignementH=\def\PostItAlignH{#1},% |
| 90 |
AlignementPostIt=\def\PostItAlignPostIt{#1},% |
| 91 |
Rendu=\def\PostItRender{#1},% |
| 92 |
ExtraMargeDroite=\def\PostItExtraMargin{#1},% |
| 93 |
Titre=\def\PostItTitre{#1},% |
| 94 |
PoliceTitre=\def\PostItPoliceTitre{#1},% |
| 95 |
RappelPostIt=\def\PostItRappel{#1} |
| 96 |
} |
| 97 |
|
| 98 |
\setKVdefault[postit]{% |
| 99 |
Largeur=6cm,% |
| 100 |
Couleur=yellow,% |
| 101 |
CouleurAttache=red,% |
| 102 |
Inclinaison=0,% |
| 103 |
EchelleAttache=1,% |
| 104 |
Ombre=true,% |
| 105 |
Hauteur=auto,% |
| 106 |
DecalAttache=0,% |
| 107 |
Attache=Punaise,% |
| 108 |
AlignementV=top,% |
| 109 |
AlignementH=justify,% |
| 110 |
AlignementPostIt=bottom,% |
| 111 |
Bordure=true,% |
| 112 |
Coin=false,% |
| 113 |
Rendu=tcbox,% |
| 114 |
ExtraMargeDroite=0cm,% |
| 115 |
Titre={},% |
| 116 |
PoliceTitre=\normalfont\normalsize,% |
| 117 |
RappelPostIt=PostIt |
| 118 |
} |
| 119 |
|
| 120 |
%------Style principal tcolorbox |
| 121 |
\tcbset{testpostit/.style={% |
| 122 |
on line,enhanced,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% |
| 123 |
%colback=\PostItCoul!50,% |
| 124 |
finish={\CommandeDecoration},tikz={rotate=\PostItIncline,transform shape},% |
| 125 |
box align=\PostItAlignPostIt,% |
| 126 |
interior style={top color=\PostItCoul!50,bottom color=\PostItCoul!33},% |
| 127 |
nobeforeafter |
| 128 |
}% |
| 129 |
} |
| 130 |
|
| 131 |
%------Environnement principal |
| 132 |
\NewDocumentEnvironment{PostIt}{ O{} D<>{} +b }% |
| 133 |
{% |
| 134 |
\restoreKV[postit]% |
| 135 |
\setKV[postit]{#1}% |
| 136 |
\IfStrEq{\PostItRender}{tcbox}% |
| 137 |
{% |
| 138 |
%choix de la déco et paramètrage |
| 139 |
\def\CommandeDecoration{\EpinglePostIt}% |
| 140 |
\def\MarginOffsetV{4mm}% |
| 141 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 142 |
{\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% |
| 143 |
{}% |
| 144 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 145 |
{\def\CommandeDecoration{\ScotchPostIt}\def\MarginOffsetV{1mm}}% |
| 146 |
{}% |
| 147 |
\IfStrEq{\PostItDeco}{Non}% |
| 148 |
{\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% |
| 149 |
{}% |
| 150 |
%gestion des coins/noeuds |
| 151 |
\tcbset{noeudscoin/.style={remember,underlay={% |
| 152 |
\coordinate (\PostItRappel-N-O) at (frame.north west) ; |
| 153 |
\coordinate (\PostItRappel-N-E) at (frame.north east) ; |
| 154 |
\coordinate (\PostItRappel-S-E) at (frame.south east) ; |
| 155 |
\coordinate (\PostItRappel-S-O) at (frame.south west) ; |
| 156 |
\coordinate (\PostItRappel-N) at (frame.north) ; |
| 157 |
\coordinate (\PostItRappel-S) at (frame.south) ; |
| 158 |
\coordinate (\PostItRappel-E) at (frame.east) ; |
| 159 |
\coordinate (\PostItRappel-O) at (frame.west) ; |
| 160 |
}% |
| 161 |
}% |
| 162 |
}% |
| 163 |
%cas de la bordure |
| 164 |
\ifboolKV[postit]{Bordure}% |
| 165 |
{% |
| 166 |
\def\PostItBorder{0.1mm}% |
| 167 |
\tcbset{bordure/.style={}}% |
| 168 |
}% |
| 169 |
{% |
| 170 |
\def\PostItBorder{0mm}% |
| 171 |
\tcbset{bordure/.style={frame hidden}}% |
| 172 |
}% |
| 173 |
%cas du coin |
| 174 |
\ifboolKV[postit]{Coin}% |
| 175 |
{% |
| 176 |
\tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% |
| 177 |
}% |
| 178 |
{% |
| 179 |
\tcbset{coincoin/.style={}}% |
| 180 |
}% |
| 181 |
%en fonction de hauteur auto ou non |
| 182 |
\IfStrEq{\PostItHauteur}{auto}% |
| 183 |
{% |
| 184 |
\ifboolKV[postit]{Ombre}% |
| 185 |
{\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 186 |
{\begin{tcolorbox}[testpostit,#2,bordure,coincoin,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 187 |
}% |
| 188 |
{% |
| 189 |
\ifboolKV[postit]{Ombre}% |
| 190 |
{\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 191 |
{\begin{tcolorbox}[testpostit,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 192 |
}% |
| 193 |
\IfStrEq{\PostItTitre}{}% |
| 194 |
{}% |
| 195 |
{% |
| 196 |
\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\% |
| 197 |
}% |
| 198 |
#3% |
| 199 |
\end{tcolorbox}% |
| 200 |
}{}% |
| 201 |
\IfStrEq{\PostItRender}{tikz}% |
| 202 |
{% |
| 203 |
\StrDel{\PostItLarg}{cm}[\PostItLarg]% |
| 204 |
\StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% |
| 205 |
\def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% |
| 206 |
\def\TextePostIt{% |
| 207 |
\IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\}% |
| 208 |
#3% |
| 209 |
}% |
| 210 |
\IfStrEq{\PostItHauteur}{auto}% |
| 211 |
{% |
| 212 |
\IfStrEq{\PostItAlignH}{justify}% |
| 213 |
{% |
| 214 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 215 |
}% |
| 216 |
{}% |
| 217 |
\IfStrEq{\PostItAlignH}{center}% |
| 218 |
{% |
| 219 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\centering\TextePostIt}}% |
| 220 |
}% |
| 221 |
{}% |
| 222 |
\IfStrEq{\PostItAlignH}{left}% |
| 223 |
{% |
| 224 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedright\TextePostIt}}% |
| 225 |
}% |
| 226 |
{}% |
| 227 |
\IfStrEq{\PostItAlignH}{right}% |
| 228 |
{% |
| 229 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedleft\TextePostIt}}% |
| 230 |
}% |
| 231 |
{}% |
| 232 |
%\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 233 |
\settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% |
| 234 |
\addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% |
| 235 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 236 |
{\addtolength\HauteurEssaiTexte{0.4cm}}% |
| 237 |
{}% |
| 238 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 239 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 240 |
{}% |
| 241 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 242 |
{\addtolength\HauteurEssaiTexte{0.6cm}}% |
| 243 |
{}% |
| 244 |
\IfStrEq{\PostItDeco}{Non}% |
| 245 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 246 |
{}% |
| 247 |
\def\hauteur{\the\HauteurEssaiTexte}% |
| 248 |
}% |
| 249 |
{% |
| 250 |
\def\hauteur{\PostItHauteur}% |
| 251 |
}% |
| 252 |
\def\OptionTikzPostIt{current bounding box.south}% |
| 253 |
\IfStrEq{\PostItAlignPostIt}{center}% |
| 254 |
{\def\OptionTikzPostIt{current bounding box.center}}{}% |
| 255 |
\IfStrEq{\PostItAlignPostIt}{top}% |
| 256 |
{\def\OptionTikzPostIt{current bounding box.north}}{}% |
| 257 |
\begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round,remember picture] |
| 258 |
%tracé |
| 259 |
%ombre1/2/3 |
| 260 |
\ifboolKV[postit]{Ombre}% |
| 261 |
{% |
| 262 |
\draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] |
| 263 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 264 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreA,-\OffsetOmbreA)$) |
| 265 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 266 |
-- cycle ; |
| 267 |
\draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] |
| 268 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 269 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreB,-\OffsetOmbreB)$) |
| 270 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 271 |
-- cycle ; |
| 272 |
\draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] |
| 273 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 274 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreC,-\OffsetOmbreC)$) |
| 275 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 276 |
-- cycle ; |
| 277 |
}% |
| 278 |
{}% |
| 279 |
%postit |
| 280 |
\coordinate (\PostItRappel-N-O) at (0,0) ; |
| 281 |
\coordinate (\PostItRappel-N-E) at ($(\PostItRappel-N-O)+({\PostItLarg+\PostItExtraMargin},0)$) ; |
| 282 |
\coordinate (\PostItRappel-S-E) at ($(\PostItRappel-N-E)+({0.15},{-\hauteur+0.15})$) ; |
| 283 |
\coordinate (\PostItRappel-S-O) at ($(\PostItRappel-S-E)+({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})$) ; |
| 284 |
\coordinate (\PostItRappel-N) at ($(\PostItRappel-N-O)!0.5!(\PostItRappel-N-E)$) ; |
| 285 |
\coordinate (\PostItRappel-E) at ($(\PostItRappel-N-E)!0.5!(\PostItRappel-S-E)+(-0.08,0)$) ; |
| 286 |
\coordinate (\PostItRappel-S) at ($(\PostItRappel-S-E)!0.5!(\PostItRappel-S-O)+(0,-0.07)$) ; |
| 287 |
\coordinate (\PostItRappel-O) at ($(\PostItRappel-S-O)!0.5!(\PostItRappel-N-O)$) ; |
| 288 |
%bordure |
| 289 |
\ifboolKV[postit]{Bordure} |
| 290 |
{% |
| 291 |
\shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 292 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 293 |
to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) |
| 294 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 295 |
-- cycle ; |
| 296 |
}% |
| 297 |
{% |
| 298 |
\shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 299 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 300 |
to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) |
| 301 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 302 |
-- cycle ; |
| 303 |
}% |
| 304 |
\IfStrEq{\PostItHauteur}{auto}% |
| 305 |
{% |
| 306 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 307 |
{% |
| 308 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 309 |
}% |
| 310 |
{}% |
| 311 |
\IfStrEq{\PostItDeco}{Non}% |
| 312 |
{% |
| 313 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 314 |
}% |
| 315 |
{}% |
| 316 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 317 |
{% |
| 318 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 319 |
}% |
| 320 |
{}% |
| 321 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 322 |
{% |
| 323 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 324 |
}% |
| 325 |
{}% |
| 326 |
}% |
| 327 |
{% |
| 328 |
\IfStrEq{\PostItAlignV}{top} |
| 329 |
{% |
| 330 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 331 |
{% |
| 332 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 333 |
}% |
| 334 |
{}% |
| 335 |
\IfStrEq{\PostItDeco}{Non}% |
| 336 |
{% |
| 337 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 338 |
}% |
| 339 |
{}% |
| 340 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 341 |
{% |
| 342 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 343 |
}% |
| 344 |
{}% |
| 345 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 346 |
{% |
| 347 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 348 |
}% |
| 349 |
{}% |
| 350 |
}% |
| 351 |
{}% |
| 352 |
\IfStrEq{\PostItAlignV}{center} |
| 353 |
{% |
| 354 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 355 |
{% |
| 356 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 357 |
}% |
| 358 |
{}% |
| 359 |
\IfStrEq{\PostItDeco}{Non}% |
| 360 |
{% |
| 361 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 362 |
}% |
| 363 |
{}% |
| 364 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 365 |
{% |
| 366 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 367 |
}% |
| 368 |
{}% |
| 369 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 370 |
{% |
| 371 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 372 |
}% |
| 373 |
{}% |
| 374 |
}% |
| 375 |
{}% |
| 376 |
\IfStrEq{\PostItAlignV}{bottom} |
| 377 |
{% |
| 378 |
\draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 379 |
}% |
| 380 |
{}% |
| 381 |
}% |
| 382 |
%affichage de la punaise |
| 383 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 384 |
{% |
| 385 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] |
| 386 |
\begin{scope}[rotate=-35] |
| 387 |
\draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 388 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 389 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 390 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 391 |
\end{scope} |
| 392 |
\draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 393 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 394 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 395 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 396 |
\end{scope} |
| 397 |
}% |
| 398 |
{}% |
| 399 |
%affichage du trombone |
| 400 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 401 |
{% |
| 402 |
\begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] |
| 403 |
\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) ; |
| 404 |
\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) ; |
| 405 |
\end{scope} |
| 406 |
}% |
| 407 |
{}% |
| 408 |
%affichage du scotch |
| 409 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 410 |
{% |
| 411 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] |
| 412 |
\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} ; |
| 413 |
\end{scope} |
| 414 |
}% |
| 415 |
{}% |
| 416 |
\end{tikzpicture}% |
| 417 |
}{}% |
| 418 |
\IfStrEq{\PostItRender}{tikzv2}% |
| 419 |
{% |
| 420 |
\StrDel{\PostItLarg}{cm}[\PostItLarg]% |
| 421 |
\StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% |
| 422 |
\def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% |
| 423 |
\def\TextePostIt{% |
| 424 |
\IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\}% |
| 425 |
#3% |
| 426 |
}% |
| 427 |
\IfStrEq{\PostItHauteur}{auto}% |
| 428 |
{% |
| 429 |
\IfStrEq{\PostItAlignH}{justify}% |
| 430 |
{% |
| 431 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 432 |
}% |
| 433 |
{}% |
| 434 |
\IfStrEq{\PostItAlignH}{center}% |
| 435 |
{% |
| 436 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\centering\TextePostIt}}% |
| 437 |
}% |
| 438 |
{}% |
| 439 |
\IfStrEq{\PostItAlignH}{left}% |
| 440 |
{% |
| 441 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedright\TextePostIt}}% |
| 442 |
}% |
| 443 |
{}% |
| 444 |
\IfStrEq{\PostItAlignH}{right}% |
| 445 |
{% |
| 446 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedleft\TextePostIt}}% |
| 447 |
}% |
| 448 |
{}% |
| 449 |
%\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 450 |
\settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% |
| 451 |
\addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% |
| 452 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 453 |
{\addtolength\HauteurEssaiTexte{0.4cm}}% |
| 454 |
{}% |
| 455 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 456 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 457 |
{}% |
| 458 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 459 |
{\addtolength\HauteurEssaiTexte{0.6cm}}% |
| 460 |
{}% |
| 461 |
\IfStrEq{\PostItDeco}{Non}% |
| 462 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 463 |
{}% |
| 464 |
\def\hauteur{\the\HauteurEssaiTexte}% |
| 465 |
}% |
| 466 |
{% |
| 467 |
\def\hauteur{\PostItHauteur}% |
| 468 |
}% |
| 469 |
\def\OptionTikzPostIt{current bounding box.south}% |
| 470 |
\IfStrEq{\PostItAlignPostIt}{center}% |
| 471 |
{\def\OptionTikzPostIt{current bounding box.center}}{}% |
| 472 |
\IfStrEq{\PostItAlignPostIt}{top}% |
| 473 |
{\def\OptionTikzPostIt{current bounding box.north}}{}% |
| 474 |
\begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round,remember picture] |
| 475 |
%tracé |
| 476 |
%ombre1/2/3 |
| 477 |
\ifboolKV[postit]{Ombre}% |
| 478 |
{% |
| 479 |
\draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] |
| 480 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 481 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(2pt,-2pt)$) |
| 482 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-4pt,0)$) |
| 483 |
to[out=89,in=-90] (0,0) ; |
| 484 |
\draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] |
| 485 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 486 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(1.25pt,-1.25pt)$) |
| 487 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-2.5pt,0)$) |
| 488 |
to[out=89,in=-90] (0,0) ; |
| 489 |
\draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] |
| 490 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 491 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(0.5pt,-0.5pt)$) |
| 492 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-1pt,0)$) |
| 493 |
to[out=89,in=-90] (0,0) ; |
| 494 |
}% |
| 495 |
{}% |
| 496 |
%postit noeuds |
| 497 |
\coordinate (\PostItRappel-N-O) at (0,0) ; |
| 498 |
\coordinate (\PostItRappel-N-E) at ($(\PostItRappel-N-O)+({\PostItLarg+\PostItExtraMargin},0)$) ; |
| 499 |
\coordinate (\PostItRappel-S-E) at ($(\PostItRappel-N-E)+({0.05},{-\hauteur-0.05})$) ; |
| 500 |
\coordinate (\PostItRappel-S-O) at ($(\PostItRappel-S-E)+({-\PostItLarg-\PostItExtraMargin-0.1},{0})$) ; |
| 501 |
\coordinate (\PostItRappel-N) at ($(\PostItRappel-N-O)!0.5!(\PostItRappel-N-E)$) ; |
| 502 |
\coordinate (\PostItRappel-E) at ($(\PostItRappel-N-E)!0.5!(\PostItRappel-S-E)+(-0.025,0)$) ; |
| 503 |
\coordinate (\PostItRappel-S) at ($(\PostItRappel-S-E)!0.5!(\PostItRappel-S-O)$) ; |
| 504 |
\coordinate (\PostItRappel-O) at ($(\PostItRappel-S-O)!0.5!(\PostItRappel-N-O)+(0.025,0)$) ; |
| 505 |
%postit |
| 506 |
\ifboolKV[postit]{Bordure} |
| 507 |
{% |
| 508 |
\shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 509 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 510 |
to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) |
| 511 |
--++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) |
| 512 |
to[out=89,in=-90] (0,0) ; |
| 513 |
}% |
| 514 |
{% |
| 515 |
\shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 516 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 517 |
to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) |
| 518 |
--++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) |
| 519 |
to[out=89,in=-90] (0,0) ; |
| 520 |
}% |
| 521 |
\IfStrEq{\PostItHauteur}{auto}% |
| 522 |
{% |
| 523 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 524 |
{% |
| 525 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 526 |
}% |
| 527 |
{}% |
| 528 |
\IfStrEq{\PostItDeco}{Non}% |
| 529 |
{% |
| 530 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 531 |
}% |
| 532 |
{}% |
| 533 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 534 |
{% |
| 535 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 536 |
}% |
| 537 |
{}% |
| 538 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 539 |
{% |
| 540 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 541 |
}% |
| 542 |
{}% |
| 543 |
}% |
| 544 |
{% |
| 545 |
\IfStrEq{\PostItAlignV}{top} |
| 546 |
{% |
| 547 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 548 |
{% |
| 549 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 550 |
}% |
| 551 |
{}% |
| 552 |
\IfStrEq{\PostItDeco}{Non}% |
| 553 |
{% |
| 554 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 555 |
}% |
| 556 |
{}% |
| 557 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 558 |
{% |
| 559 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 560 |
}% |
| 561 |
{}% |
| 562 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 563 |
{% |
| 564 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 565 |
}% |
| 566 |
{}% |
| 567 |
}% |
| 568 |
{}% |
| 569 |
\IfStrEq{\PostItAlignV}{center} |
| 570 |
{% |
| 571 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 572 |
{% |
| 573 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 574 |
}% |
| 575 |
{}% |
| 576 |
\IfStrEq{\PostItDeco}{Non}% |
| 577 |
{% |
| 578 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 579 |
}% |
| 580 |
{}% |
| 581 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 582 |
{% |
| 583 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 584 |
}% |
| 585 |
{}% |
| 586 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 587 |
{% |
| 588 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 589 |
}% |
| 590 |
{}% |
| 591 |
}% |
| 592 |
{}% |
| 593 |
\IfStrEq{\PostItAlignV}{bottom} |
| 594 |
{% |
| 595 |
\draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 596 |
}% |
| 597 |
{}% |
| 598 |
}% |
| 599 |
%affichage de la punaise |
| 600 |
\IfStrEq{\PostItDeco}{Punaise}% |
| 601 |
{% |
| 602 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] |
| 603 |
\begin{scope}[rotate=-35] |
| 604 |
\draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 605 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 606 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 607 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 608 |
\end{scope} |
| 609 |
\draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 610 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 611 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 612 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 613 |
\end{scope} |
| 614 |
}% |
| 615 |
{}% |
| 616 |
%affichage du trombone |
| 617 |
\IfStrEq{\PostItDeco}{Trombone}% |
| 618 |
{% |
| 619 |
\begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] |
| 620 |
\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) ; |
| 621 |
\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) ; |
| 622 |
\end{scope} |
| 623 |
}% |
| 624 |
{}% |
| 625 |
%affichage du scotch |
| 626 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 627 |
{% |
| 628 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] |
| 629 |
\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} ; |
| 630 |
\end{scope} |
| 631 |
}% |
| 632 |
{}% |
| 633 |
\end{tikzpicture}% |
| 634 |
}{}% |
| 635 |
}% |
| 636 |
{}% |
| 637 |
|
| 638 |
%------Style principal minitcbox |
| 639 |
\tcbset{testminipostit/.style={% |
| 640 |
enhanced,size=small,boxrule=0.1mm,sharp corners,boxsep=0.5mm,% |
| 641 |
left=0mm,right=2.5mm,top=0mm,bottom=0mm,nobeforeafter,box align=base |
| 642 |
}% |
| 643 |
} |
| 644 |
%------Style principal minitcbox |
| 645 |
\tcbset{ombreminipostit/.style={% |
| 646 |
fuzzy shadow={0.5mm}{-0.5mm}{0mm}{0.1mm}{black!50!white} |
| 647 |
}% |
| 648 |
} |
| 649 |
|
| 650 |
\NewTCBox{\MiniPostIt}{ s O{yellow} }{% |
| 651 |
testminipostit,colback=#2!50,colframe=#2!50!black,rounded corners=southeast,arc is angular,arc=2mm,% |
| 652 |
before upper=\vphantom{pL}, |
| 653 |
underlay={ |
| 654 |
\path[line width=0.1mm,fill=#2!80!black] ([yshift=2mm]interior.south east)--++(-0.25,-0.1)--++(0.05,-0.1); |
| 655 |
\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); |
| 656 |
},% |
| 657 |
IfBooleanTF={#1}{ombreminipostit}{} |
| 658 |
} |
| 659 |
|
| 660 |
%======[EN] |
| 661 |
|
| 662 |
%------Clés |
| 663 |
\defKV[postitnote]{% |
| 664 |
Width=\def\PostItLarg{#1},% |
| 665 |
Color=\def\PostItCoul{#1},% |
| 666 |
PinColor=\def\PostItCoulClip{#1},% |
| 667 |
PinScale=\def\PostItCoulScaleClip{#1},% |
| 668 |
Rotate=\def\PostItIncline{#1},% |
| 669 |
Height=\def\PostItHauteur{#1},% |
| 670 |
PinShift=\def\PostItDeclClip{#1},% |
| 671 |
Pin=\def\PostItDeco{#1},% |
| 672 |
AlignV=\def\PostItAlignV{#1},% |
| 673 |
AlignH=\def\PostItAlignH{#1},% |
| 674 |
AlignPostIt=\def\PostItAlignPostIt{#1},% |
| 675 |
Render=\def\PostItRender{#1},% |
| 676 |
ExtraRightMargin=\def\PostItExtraMargin{#1},% |
| 677 |
Title=\def\PostItTitre{#1},% |
| 678 |
FontTitle=\def\PostItPoliceTitre{#1},% |
| 679 |
StorePostIt=\def\PostItRappel{#1} |
| 680 |
} |
| 681 |
|
| 682 |
\setKVdefault[postitnote]{% |
| 683 |
Width=6cm,% |
| 684 |
Color=yellow,% |
| 685 |
PinColor=red,% |
| 686 |
Rotate=0,% |
| 687 |
PinScale=1,% |
| 688 |
Shadow=true,% |
| 689 |
Height=auto,% |
| 690 |
PinShift=0,% |
| 691 |
Pin=Pushpin,% |
| 692 |
AlignV=top,% |
| 693 |
AlignH=justify,% |
| 694 |
AlignPostIt=bottom,% |
| 695 |
Border=true,% |
| 696 |
Corner=false,% |
| 697 |
Render=tcbox,% |
| 698 |
ExtraRightMargin=0cm,% |
| 699 |
Title={},% |
| 700 |
FontTitle=\normalfont\normalsize,% |
| 701 |
StorePostIt=PostIt |
| 702 |
} |
| 703 |
|
| 704 |
%------Style principal tcolorbox |
| 705 |
\tcbset{testpostitnote/.style={% |
| 706 |
on line,enhanced,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% |
| 707 |
%colback=\PostItCoul!50,% |
| 708 |
finish={\CommandeDecoration},tikz={rotate=\PostItIncline,transform shape},% |
| 709 |
box align=\PostItAlignPostIt,% |
| 710 |
interior style={top color=\PostItCoul!50,bottom color=\PostItCoul!33},% |
| 711 |
nobeforeafter |
| 712 |
}% |
| 713 |
} |
| 714 |
|
| 715 |
%------Environnement principal |
| 716 |
\NewDocumentEnvironment{PostItNote}{ O{} D<>{} +b }% |
| 717 |
{% |
| 718 |
\restoreKV[postitnote]% |
| 719 |
\setKV[postitnote]{#1}% |
| 720 |
\IfStrEq{\PostItRender}{tcbox}% |
| 721 |
{% |
| 722 |
%choix de la déco et paramètrage |
| 723 |
\def\CommandeDecoration{\EpinglePostIt}% |
| 724 |
\def\MarginOffsetV{4mm}% |
| 725 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 726 |
{\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% |
| 727 |
{}% |
| 728 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 729 |
{\def\CommandeDecoration{\ScotchPostIt}\def\MarginOffsetV{1mm}}% |
| 730 |
{}% |
| 731 |
\IfStrEq{\PostItDeco}{None}% |
| 732 |
{\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% |
| 733 |
{}% |
| 734 |
%gestion des coins/noeuds |
| 735 |
\tcbset{noeudscoin/.style={remember,underlay={% |
| 736 |
\coordinate (\PostItRappel-N-W) at (frame.north west) ; |
| 737 |
\coordinate (\PostItRappel-N-E) at (frame.north east) ; |
| 738 |
\coordinate (\PostItRappel-S-E) at (frame.south east) ; |
| 739 |
\coordinate (\PostItRappel-S-W) at (frame.south west) ; |
| 740 |
\coordinate (\PostItRappel-N) at (frame.north) ; |
| 741 |
\coordinate (\PostItRappel-S) at (frame.south) ; |
| 742 |
\coordinate (\PostItRappel-E) at (frame.east) ; |
| 743 |
\coordinate (\PostItRappel-W) at (frame.west) ; |
| 744 |
}% |
| 745 |
}% |
| 746 |
}% |
| 747 |
%cas de la bordure |
| 748 |
\ifboolKV[postitnote]{Border}% |
| 749 |
{% |
| 750 |
\def\PostItBorder{0.1mm}% |
| 751 |
\tcbset{bordure/.style={}}% |
| 752 |
}% |
| 753 |
{% |
| 754 |
\def\PostItBorder{0mm}% |
| 755 |
\tcbset{bordure/.style={frame hidden}}% |
| 756 |
}% |
| 757 |
%cas du coin |
| 758 |
\ifboolKV[postitnote]{Corner}% |
| 759 |
{% |
| 760 |
\tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% |
| 761 |
}% |
| 762 |
{% |
| 763 |
\tcbset{coincoin/.style={}}% |
| 764 |
}% |
| 765 |
%en fonction de hauteur auto ou non |
| 766 |
\IfStrEq{\PostItHauteur}{auto}% |
| 767 |
{% |
| 768 |
\ifboolKV[postitnote]{Shadow}% |
| 769 |
{\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 770 |
{\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 771 |
}% |
| 772 |
{% |
| 773 |
\ifboolKV[postitnote]{Shadow}% |
| 774 |
{\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 775 |
{\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV},noeudscoin]}% |
| 776 |
}% |
| 777 |
\IfStrEq{\PostItTitre}{}% |
| 778 |
{}% |
| 779 |
{% |
| 780 |
\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\% |
| 781 |
}% |
| 782 |
#3% |
| 783 |
\end{tcolorbox}% |
| 784 |
}{}% |
| 785 |
\IfStrEq{\PostItRender}{tikz}% |
| 786 |
{% |
| 787 |
\StrDel{\PostItLarg}{cm}[\PostItLarg]% |
| 788 |
\StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% |
| 789 |
\def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% |
| 790 |
\def\TextePostIt{% |
| 791 |
\IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\}% |
| 792 |
#3% |
| 793 |
}% |
| 794 |
\IfStrEq{\PostItHauteur}{auto}% |
| 795 |
{% |
| 796 |
\IfStrEq{\PostItAlignH}{justify}% |
| 797 |
{% |
| 798 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 799 |
}% |
| 800 |
{}% |
| 801 |
\IfStrEq{\PostItAlignH}{center}% |
| 802 |
{% |
| 803 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\centering\TextePostIt}}% |
| 804 |
}% |
| 805 |
{}% |
| 806 |
\IfStrEq{\PostItAlignH}{left}% |
| 807 |
{% |
| 808 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedright\TextePostIt}}% |
| 809 |
}% |
| 810 |
{}% |
| 811 |
\IfStrEq{\PostItAlignH}{right}% |
| 812 |
{% |
| 813 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedleft\TextePostIt}}% |
| 814 |
}% |
| 815 |
{}% |
| 816 |
%\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 817 |
\settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% |
| 818 |
\addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% |
| 819 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 820 |
{\addtolength\HauteurEssaiTexte{0.4cm}}% |
| 821 |
{}% |
| 822 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 823 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 824 |
{}% |
| 825 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 826 |
{\addtolength\HauteurEssaiTexte{0.6cm}}% |
| 827 |
{}% |
| 828 |
\IfStrEq{\PostItDeco}{None}% |
| 829 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 830 |
{}% |
| 831 |
\def\hauteur{\the\HauteurEssaiTexte}% |
| 832 |
}% |
| 833 |
{% |
| 834 |
\def\hauteur{\PostItHauteur}% |
| 835 |
}% |
| 836 |
\def\OptionTikzPostIt{current bounding box.south}% |
| 837 |
\IfStrEq{\PostItAlignPostIt}{center}% |
| 838 |
{\def\OptionTikzPostIt{current bounding box.center}}{}% |
| 839 |
\IfStrEq{\PostItAlignPostIt}{top}% |
| 840 |
{\def\OptionTikzPostIt{current bounding box.north}}{}% |
| 841 |
\begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round,remember picture] |
| 842 |
%tracé |
| 843 |
%ombre1/2/3 |
| 844 |
\ifboolKV[postitnote]{Shadow}% |
| 845 |
{% |
| 846 |
\draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] |
| 847 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 848 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreA,-\OffsetOmbreA)$) |
| 849 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 850 |
-- cycle ; |
| 851 |
\draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] |
| 852 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 853 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreB,-\OffsetOmbreB)$) |
| 854 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 855 |
-- cycle ; |
| 856 |
\draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] |
| 857 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 858 |
to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreC,-\OffsetOmbreC)$) |
| 859 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 860 |
-- cycle ; |
| 861 |
}% |
| 862 |
{}% |
| 863 |
%postit |
| 864 |
\coordinate (\PostItRappel-N-W) at (0,0) ; |
| 865 |
\coordinate (\PostItRappel-N-E) at ($(\PostItRappel-N-W)+({\PostItLarg+\PostItExtraMargin},0)$) ; |
| 866 |
\coordinate (\PostItRappel-S-E) at ($(\PostItRappel-N-E)+({0.15},{-\hauteur+0.15})$) ; |
| 867 |
\coordinate (\PostItRappel-S-W) at ($(\PostItRappel-S-E)+({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})$) ; |
| 868 |
\coordinate (\PostItRappel-N) at ($(\PostItRappel-N-W)!0.5!(\PostItRappel-N-E)$) ; |
| 869 |
\coordinate (\PostItRappel-E) at ($(\PostItRappel-N-E)!0.5!(\PostItRappel-S-E)+(-0.08,0)$) ; |
| 870 |
\coordinate (\PostItRappel-S) at ($(\PostItRappel-S-E)!0.5!(\PostItRappel-S-W)+(0,-0.07)$) ; |
| 871 |
\coordinate (\PostItRappel-W) at ($(\PostItRappel-S-W)!0.5!(\PostItRappel-N-W)$) ; |
| 872 |
%postit |
| 873 |
\ifboolKV[postitnote]{Shadow} |
| 874 |
{% |
| 875 |
\shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 876 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 877 |
to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) |
| 878 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 879 |
-- cycle ; |
| 880 |
}% |
| 881 |
{% |
| 882 |
\shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 883 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 884 |
to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) |
| 885 |
to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) |
| 886 |
-- cycle ; |
| 887 |
}% |
| 888 |
\IfStrEq{\PostItHauteur}{auto}% |
| 889 |
{% |
| 890 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 891 |
{% |
| 892 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 893 |
}% |
| 894 |
{}% |
| 895 |
\IfStrEq{\PostItDeco}{None}% |
| 896 |
{% |
| 897 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 898 |
}% |
| 899 |
{}% |
| 900 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 901 |
{% |
| 902 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 903 |
}% |
| 904 |
{}% |
| 905 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 906 |
{% |
| 907 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 908 |
}% |
| 909 |
{}% |
| 910 |
}% |
| 911 |
{% |
| 912 |
\IfStrEq{\PostItAlignV}{top} |
| 913 |
{% |
| 914 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 915 |
{% |
| 916 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 917 |
}% |
| 918 |
{}% |
| 919 |
\IfStrEq{\PostItDeco}{None}% |
| 920 |
{% |
| 921 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 922 |
}% |
| 923 |
{}% |
| 924 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 925 |
{% |
| 926 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 927 |
}% |
| 928 |
{}% |
| 929 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 930 |
{% |
| 931 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 932 |
}% |
| 933 |
{}% |
| 934 |
}% |
| 935 |
{}% |
| 936 |
\IfStrEq{\PostItAlignV}{center} |
| 937 |
{% |
| 938 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 939 |
{% |
| 940 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 941 |
}% |
| 942 |
{}% |
| 943 |
\IfStrEq{\PostItDeco}{None}% |
| 944 |
{% |
| 945 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 946 |
}% |
| 947 |
{}% |
| 948 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 949 |
{% |
| 950 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 951 |
}% |
| 952 |
{}% |
| 953 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 954 |
{% |
| 955 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 956 |
}% |
| 957 |
{}% |
| 958 |
}% |
| 959 |
{}% |
| 960 |
\IfStrEq{\PostItAlignV}{bottom} |
| 961 |
{% |
| 962 |
\draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 963 |
}% |
| 964 |
{}% |
| 965 |
}% |
| 966 |
%affichage de la punaise |
| 967 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 968 |
{% |
| 969 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] |
| 970 |
\begin{scope}[rotate=-35] |
| 971 |
\draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 972 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 973 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 974 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 975 |
\end{scope} |
| 976 |
\draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 977 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 978 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 979 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 980 |
\end{scope} |
| 981 |
}% |
| 982 |
{}% |
| 983 |
%affichage du trombone |
| 984 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 985 |
{% |
| 986 |
\begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] |
| 987 |
\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) ; |
| 988 |
\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) ; |
| 989 |
\end{scope} |
| 990 |
}% |
| 991 |
{}% |
| 992 |
%affichage du scotch |
| 993 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 994 |
{% |
| 995 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] |
| 996 |
\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} ; |
| 997 |
\end{scope} |
| 998 |
}% |
| 999 |
{}% |
| 1000 |
\end{tikzpicture}% |
| 1001 |
}{}% |
| 1002 |
\IfStrEq{\PostItRender}{tikzv2}% |
| 1003 |
{% |
| 1004 |
\StrDel{\PostItLarg}{cm}[\PostItLarg]% |
| 1005 |
\StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% |
| 1006 |
\def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% |
| 1007 |
\def\TextePostIt{% |
| 1008 |
\IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill\null\\}% |
| 1009 |
#3% |
| 1010 |
}% |
| 1011 |
\IfStrEq{\PostItHauteur}{auto}% |
| 1012 |
{% |
| 1013 |
\IfStrEq{\PostItAlignH}{justify}% |
| 1014 |
{% |
| 1015 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 1016 |
}% |
| 1017 |
{}% |
| 1018 |
\IfStrEq{\PostItAlignH}{center}% |
| 1019 |
{% |
| 1020 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\centering\TextePostIt}}% |
| 1021 |
}% |
| 1022 |
{}% |
| 1023 |
\IfStrEq{\PostItAlignH}{left}% |
| 1024 |
{% |
| 1025 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedright\TextePostIt}}% |
| 1026 |
}% |
| 1027 |
{}% |
| 1028 |
\IfStrEq{\PostItAlignH}{right}% |
| 1029 |
{% |
| 1030 |
\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\raggedleft\TextePostIt}}% |
| 1031 |
}% |
| 1032 |
{}% |
| 1033 |
%\sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% |
| 1034 |
\settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% |
| 1035 |
\addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% |
| 1036 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 1037 |
{\addtolength\HauteurEssaiTexte{0.4cm}}% |
| 1038 |
{}% |
| 1039 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 1040 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 1041 |
{}% |
| 1042 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 1043 |
{\addtolength\HauteurEssaiTexte{0.6cm}}% |
| 1044 |
{}% |
| 1045 |
\IfStrEq{\PostItDeco}{None}% |
| 1046 |
{\addtolength\HauteurEssaiTexte{0.2cm}}% |
| 1047 |
{}% |
| 1048 |
\def\hauteur{\the\HauteurEssaiTexte}% |
| 1049 |
}% |
| 1050 |
{% |
| 1051 |
\def\hauteur{\PostItHauteur}% |
| 1052 |
}% |
| 1053 |
\def\OptionTikzPostIt{current bounding box.south}% |
| 1054 |
\IfStrEq{\PostItAlignPostIt}{center}% |
| 1055 |
{\def\OptionTikzPostIt{current bounding box.center}}{}% |
| 1056 |
\IfStrEq{\PostItAlignPostIt}{top}% |
| 1057 |
{\def\OptionTikzPostIt{current bounding box.north}}{}% |
| 1058 |
\begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round,remember picture] |
| 1059 |
%tracé |
| 1060 |
%ombre1/2/3 |
| 1061 |
\ifboolKV[postitnote]{Shadow}% |
| 1062 |
{% |
| 1063 |
\draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] |
| 1064 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 1065 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(2pt,-2pt)$) |
| 1066 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-4pt,0)$) |
| 1067 |
to[out=89,in=-90] (0,0) ; |
| 1068 |
\draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] |
| 1069 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 1070 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(1.25pt,-1.25pt)$) |
| 1071 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-2.5pt,0)$) |
| 1072 |
to[out=89,in=-90] (0,0) ; |
| 1073 |
\draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] |
| 1074 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 1075 |
to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(0.5pt,-0.5pt)$) |
| 1076 |
--++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-1pt,0)$) |
| 1077 |
to[out=89,in=-90] (0,0) ; |
| 1078 |
}% |
| 1079 |
{}% |
| 1080 |
%postit noeuds |
| 1081 |
\coordinate (\PostItRappel-N-W) at (0,0) ; |
| 1082 |
\coordinate (\PostItRappel-N-E) at ($(\PostItRappel-N-W)+({\PostItLarg+\PostItExtraMargin},0)$) ; |
| 1083 |
\coordinate (\PostItRappel-S-E) at ($(\PostItRappel-N-E)+({0.05},{-\hauteur-0.05})$) ; |
| 1084 |
\coordinate (\PostItRappel-S-W) at ($(\PostItRappel-S-E)+({-\PostItLarg-\PostItExtraMargin-0.1},{0})$) ; |
| 1085 |
\coordinate (\PostItRappel-N) at ($(\PostItRappel-N-W)!0.5!(\PostItRappel-N-E)$) ; |
| 1086 |
\coordinate (\PostItRappel-E) at ($(\PostItRappel-N-E)!0.5!(\PostItRappel-S-E)+(-0.025,0)$) ; |
| 1087 |
\coordinate (\PostItRappel-S) at ($(\PostItRappel-S-E)!0.5!(\PostItRappel-S-W)$) ; |
| 1088 |
\coordinate (\PostItRappel-W) at ($(\PostItRappel-S-W)!0.5!(\PostItRappel-N-W)+(0.025,0)$) ; |
| 1089 |
%postit |
| 1090 |
\ifboolKV[postitnote]{Border} |
| 1091 |
{% |
| 1092 |
\shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 1093 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 1094 |
to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) |
| 1095 |
--++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) |
| 1096 |
to[out=89,in=-90] (0,0) ; |
| 1097 |
}% |
| 1098 |
{% |
| 1099 |
\shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] |
| 1100 |
(0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) |
| 1101 |
to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) |
| 1102 |
--++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) |
| 1103 |
to[out=89,in=-90] (0,0) ; |
| 1104 |
}% |
| 1105 |
\IfStrEq{\PostItHauteur}{auto}% |
| 1106 |
{% |
| 1107 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 1108 |
{% |
| 1109 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1110 |
}% |
| 1111 |
{}% |
| 1112 |
\IfStrEq{\PostItDeco}{None}% |
| 1113 |
{% |
| 1114 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1115 |
}% |
| 1116 |
{}% |
| 1117 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 1118 |
{% |
| 1119 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1120 |
}% |
| 1121 |
{}% |
| 1122 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 1123 |
{% |
| 1124 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1125 |
}% |
| 1126 |
{}% |
| 1127 |
}% |
| 1128 |
{% |
| 1129 |
\IfStrEq{\PostItAlignV}{top} |
| 1130 |
{% |
| 1131 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 1132 |
{% |
| 1133 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1134 |
}% |
| 1135 |
{}% |
| 1136 |
\IfStrEq{\PostItDeco}{None}% |
| 1137 |
{% |
| 1138 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1139 |
}% |
| 1140 |
{}% |
| 1141 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 1142 |
{% |
| 1143 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1144 |
}% |
| 1145 |
{}% |
| 1146 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 1147 |
{% |
| 1148 |
\draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1149 |
}% |
| 1150 |
{}% |
| 1151 |
}% |
| 1152 |
{}% |
| 1153 |
\IfStrEq{\PostItAlignV}{center} |
| 1154 |
{% |
| 1155 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 1156 |
{% |
| 1157 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1158 |
}% |
| 1159 |
{}% |
| 1160 |
\IfStrEq{\PostItDeco}{None}% |
| 1161 |
{% |
| 1162 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1163 |
}% |
| 1164 |
{}% |
| 1165 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 1166 |
{% |
| 1167 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1168 |
}% |
| 1169 |
{}% |
| 1170 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 1171 |
{% |
| 1172 |
\draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1173 |
}% |
| 1174 |
{}% |
| 1175 |
}% |
| 1176 |
{}% |
| 1177 |
\IfStrEq{\PostItAlignV}{bottom} |
| 1178 |
{% |
| 1179 |
\draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; |
| 1180 |
}% |
| 1181 |
{}% |
| 1182 |
}% |
| 1183 |
%affichage de la punaise |
| 1184 |
\IfStrEq{\PostItDeco}{Pushpin}% |
| 1185 |
{% |
| 1186 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] |
| 1187 |
\begin{scope}[rotate=-35] |
| 1188 |
\draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 1189 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 1190 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 1191 |
\fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 1192 |
\end{scope} |
| 1193 |
\draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); |
| 1194 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; |
| 1195 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); |
| 1196 |
\fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); |
| 1197 |
\end{scope} |
| 1198 |
}% |
| 1199 |
{}% |
| 1200 |
%affichage du trombone |
| 1201 |
\IfStrEq{\PostItDeco}{Paperclip}% |
| 1202 |
{% |
| 1203 |
\begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] |
| 1204 |
\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) ; |
| 1205 |
\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) ; |
| 1206 |
\end{scope} |
| 1207 |
}% |
| 1208 |
{}% |
| 1209 |
%affichage du scotch |
| 1210 |
\IfStrEq{\PostItDeco}{Scotch}% |
| 1211 |
{% |
| 1212 |
\begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] |
| 1213 |
\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} ; |
| 1214 |
\end{scope} |
| 1215 |
}% |
| 1216 |
{}% |
| 1217 |
\end{tikzpicture}% |
| 1218 |
}{}% |
| 1219 |
}% |
| 1220 |
{}% |
| 1221 |
|
| 1222 |
\endinput |