1 \NeedsTeXFormat{LaTeX2e}%
2 \def\PackageName{bclogo}%
3 \def\fileversion{v3.0}%
4 \def\filedate{2012/07/21}%
5 \ProvidesPackage{bclogo}[\filedate\space\fileversion]%
8 \RequirePackage{xkeyval,ifthen}%
9 \RequirePackage{graphicx}%
10 %% Les options globales du package sont au nombre de 2: tikz ou pstricks
13 \define@key{bclogo.sty}{tikz}[]{\bclogotikztrue}%
14 \define@key{bclogo.sty}{pstricks}[]{\bclogotikzfalse}%
15 \define@key{bclogo.sty}{blur}[]{\bclogoblurtrue}%
18 \newlength{\bc@invboxh}\newlength{\bc@invboxd}%
19 \newlength{\bc@titleLength}%
20 \newlength{\logowidth}%
22 \setlength{\logowidth}{17pt}%
26 \RequirePackage{tikz}%
27 \RequirePackage[framemethod=tikz]{mdframed}%mdframed2
28 \usetikzlibrary{shadows}% pour l'ombre
29 \usetikzlibrary{decorations.pathmorphing}% pour la barre ondulee
31 \RequirePackage{pstricks}%
32 \RequirePackage{pst-grad}%
33 \RequirePackage{pst-coil}% pour la barre ondulee
34 \RequirePackage[framemethod=pstricks]{mdframed}%mdframed2
36 \RequirePackage{pst-blur}%
37 \let\pagecolorOLD\pagecolor% modification pour sauvegarde de la couleur du fond
38 \def\pagecolor#1{\gdef\psx@blurbg{#1}\pagecolorOLD{#1}}%suppose l'utilisation: \pagecolor{couleur}
41 \edef\Gin@extensions{.mps,\Gin@extensions}%
42 \RequirePackage{ifpdf}%
43 \ifpdf\relax\else\DeclareGraphicsRule{mps}{eps}{*}{}\fi%
46 % ==============================================================================
48 \newcommand\bcfleur{\includegraphics[width=\logowidth]{bc-fleur}}%
49 % une note (Thomas Labarussias)
50 \newcommand\bcnote{\includegraphics[width=\logowidth]{bc-note}}%
51 % panneau chantier (Jean-Michel Sarlat)
52 \newcommand\bcpanchant{\includegraphics[width=\logowidth]{bc-aux-301}}%
54 \newcommand\bcours{\includegraphics[width=\logowidth]{bc-ours}}%
56 \newcommand\bcetoile{\includegraphics[width=\logowidth]{bc-etoile}}%
58 \newcommand\bcattention{\includegraphics[width=\logowidth]{bc-attention}}%
60 \newcommand\bctakecare{\includegraphics[width=\logowidth]{bc-takecare}}%
62 \newcommand\bclampe{\includegraphics[width=\logowidth]{bc-lampe}}%
64 \newcommand\bccoeur{\includegraphics[width=\logowidth]{bc-coeur}}%
65 % ornement (tire du site http://openclipart.org )
66 \newcommand\bcorne{\includegraphics[width=\logowidth]{bc-orne}}%
68 \newcommand\bcdanger{\includegraphics[width=\logowidth]{bc-danger}}%
69 % smiley bonne humeur (Francois)
70 \newcommand\bcsmbh{\includegraphics[width=\logowidth]{bc-smiley-bonnehumeur}}%
71 % smiley bonne humeur (Francois)
72 \newcommand\bcsmmh{\includegraphics[width=\logowidth]{bc-smiley-mauvaisehumeur}}%
74 \newcommand\bctrefle{\includegraphics[width=\logowidth]{bc-trefle}}%
76 \newcommand\bcbook{\includegraphics[width=\logowidth]{bc-book}}%
77 % point d'interrogation
78 \newcommand\bcquestion{\includegraphics[width=\logowidth]{bc-inter}}%
79 % crayon anne-sophie philippe
80 \newcommand\bccrayon{\includegraphics[width=\logowidth]{bc-crayon}}%
81 % info (thomas labarrussias)
82 \newcommand\bcinfo{\includegraphics[width=\logowidth]{bc-info}}%
84 \newcommand\bcplume{\includegraphics[width=\logowidth]{bc-plume}}%
86 \newcommand\bcspadesuit{{\centering \huge $\spadesuit$}}%
87 % logos Alphonse Capriani
88 \newcommand\bcbombe{\includegraphics[width=\logowidth]{bc-bombe}}%
89 \newcommand\bccube{\includegraphics[width=\logowidth]{bc-cube}}%
90 \newcommand\bcdallemagne{\includegraphics[width=\logowidth]{bc-dallemagne}}%
91 \newcommand\bcdautriche{\includegraphics[width=\logowidth]{bc-dautriche}}%
92 \newcommand\bcdbelgique{\includegraphics[width=\logowidth]{bc-dbelgique}}%
93 \newcommand\bcdbulgarie{\includegraphics[width=\logowidth]{bc-dbulgarie}}%
94 \newcommand\bcdfrance{\includegraphics[width=\logowidth]{bc-dfrance}}%
95 \newcommand\bcditalie{\includegraphics[width=\logowidth]{bc-ditalie}}%
96 \newcommand\bcdluxembourg{\includegraphics[width=\logowidth]{bc-dluxembourg}}%
97 \newcommand\bcdpaysbas{\includegraphics[width=\logowidth]{bc-dpaysbas}}%
98 \newcommand\bcdodecaedre{\includegraphics[width=\logowidth]{bc-dodecaedre}}%
99 \newcommand\bceclaircie{\includegraphics[width=\logowidth]{bc-eclaircie}}%
100 \newcommand\bcicosaedre{\includegraphics[width=\logowidth]{bc-icosaedre}}%
101 \newcommand\bcinterdit{\includegraphics[width=\logowidth]{bc-interdit}}%
102 \newcommand\bcneige{\includegraphics[width=\logowidth]{bc-neige}}%
103 \newcommand\bcoctaedre{\includegraphics[width=\logowidth]{bc-octaedre}}%
104 \newcommand\bcpluie{\includegraphics[width=\logowidth]{bc-pluie}}%
105 \newcommand\bcpoisson{\includegraphics[width=\logowidth]{bc-poisson}}%
106 \newcommand\bcsoleil{\includegraphics[width=\logowidth]{bc-soleil}}%
107 \newcommand\bcstop{\includegraphics[width=\logowidth]{bc-stop}}%
108 \newcommand\bctetraedre{\includegraphics[width=\logowidth]{bc-tetraedre}}%
109 \newcommand\bccalendrier{\includegraphics[width=\logowidth]{bc-calendrier}}%
110 \newcommand\bchorloge{\includegraphics[width=\logowidth]{bc-horloge}}%
111 \newcommand\bcyin{\includegraphics[width=\logowidth]{bc-yin}}%
112 \newcommand\bcrosevents{\includegraphics[width=\logowidth]{bc-rosevents}}%
114 % Vincent Pantaloni route glissante
115 \newcommand\bcdz{\includegraphics[width=\logowidth]{bc-dz}}%
117 \newcommand\bcvelo{\includegraphics[width=\logowidth]{bc-velo}}%
118 \newcommand\bcoeil{\includegraphics[width=\logowidth]{bc-oeil}}%
119 \newcommand\bcpeaceandlove{\includegraphics[width=\logowidth]{bc-peaceandlove}}%
120 \newcommand\bcnucleaire{\includegraphics[width=\logowidth]{bc-nucleaire}}%
121 \newcommand\bcfemme{\includegraphics[width=\logowidth]{bc-femme}}%
122 \newcommand\bchomme{\includegraphics[width=\logowidth]{bc-homme}}%
123 \newcommand\bcloupe{\includegraphics[width=\logowidth]{bc-loupe}}%
124 \newcommand\bcrecyclage{\includegraphics[width=\logowidth]{bc-recyclage}}%
125 \newcommand\bcvaletcoeur{\includegraphics[width=\logowidth]{bc-valetcoeur}}%
126 \newcommand\bccle{\includegraphics[width=\logowidth]{bc-cle}}%
127 \newcommand\bcclefa{\includegraphics[width=\logowidth]{bc-clefa}}%
128 \newcommand\bcclesol{\includegraphics[width=\logowidth]{bc-clesol}}%
129 \newcommand\bcfeujaune{\includegraphics[width=\logowidth]{bc-feujaune}}%
130 \newcommand\bcfeurouge{\includegraphics[width=\logowidth]{bc-feurouge}}%
131 \newcommand\bcfeutricolore{\includegraphics[width=\logowidth]{bc-feutricolore}}%
132 \newcommand\bcfeuvert{\includegraphics[width=\logowidth]{bc-feuvert}}%
133 \newcommand\bcoutil{\includegraphics[width=\logowidth]{bc-outil}}%
134 \newcommand\bctrombone{\includegraphics[width=\logowidth]{bc-trombone}}%
136 % =========================== La fonction listable =============================
138 \newcommand{\titrebclogo}{Liste des \texttt{bclogo}}%
139 \newcommand\bccaption[1]{\addcontentsline{bcl}{bclogo}{#1}}%
140 \newcommand\listofbclogo{\section*{\titrebclogo}\@starttoc{bcl}}%
141 \newcommand\l@bclogo[2]{\par\noindent #1,~\textit{page~#2}}%
142 \newcounter{bclogocompteur} % idee de Francois Petiard
144 % ======================================= les keys =============================
146 \newlength{\bcval@epBarre}% on definit une longueur : l'epaisseur de la barre en point
147 \newlength{\bcval@framesep}% on definit une longueur : l'epaisseur de la marge en point
148 \newlength{\bcval@tailleOndu}% on definit une longueur : taille d'une ondulation
149 \newlength{\bcval@borderWidth}% on definit une longueur : epaisseur du bord
150 \newlength{\bcval@margeG}% on definit une longueur : marge gauche avant la boîte
151 \newlength{\bcval@margeD}% on definit une longueur : marge droite après la boîte
152 \define@key{bclogo}{logo}[\bcfleur]{\def\bcval@logo{#1}}%
153 \define@key{bclogo}{couleur}[white]{\def\bcval@couleur{#1}}%
154 \define@key{bclogo}{arrondi}[0]{\def\bcval@arrondi{#1}}%
155 \define@key{bclogo}{epOmbre}[0.2]{\def\bcval@epOmbre{#1}}%
156 \define@key{bclogo}{arrondi}[0]{\def\bcval@arrondi{#1}}%
157 \define@key{bclogo}{couleurOmbre}[black!30]{\def\bcval@couleurOmbre{#1}}%
158 \define@key{bclogo}{couleurBarre}[black]{\def\bcval@couleurBarre{#1}}%
159 \define@key{bclogo}{couleurBord}[black]{\def\bcval@couleurBord{#1}}% modification Philippe Fortemps
160 \define@key{bclogo}{couleurTexte}[black]{\def\bcval@couleurTexte{#1}}%
161 \define@key{bclogo}{imageBarre}[]{\def\bcval@imageBarre{#1}}%
162 \define@key{bclogo}{motifBarre}[*]{\def\bcval@motifBarre{#1}}%
163 \define@key{bclogo}{marge}[4]{\setlength{\bcval@framesep}{#1 pt}}%
164 \define@key{bclogo}{margeG}[0]{\setlength{\bcval@margeG}{#1 cm}}%
165 \define@key{bclogo}{margeD}[0]{\setlength{\bcval@margeD}{#1 cm}}%
166 \define@key{bclogo}{sousTitre}[]{\def\bcval@sousTitre{#1}}%
167 \define@key{bclogo}{epBarre}[1.5]{\setlength{\bcval@epBarre}{#1 pt}}%
168 \define@key{bclogo}{epBord}[0.8]{\setlength{\bcval@borderWidth}{#1 pt}%
169 \ifdimgreater{\bcval@borderWidth}{\z@}{\KV@bclogo@noborderfalse}{\KV@bclogo@nobordertrue}%
171 \define@key{bclogo}{tailleOndu}[2.5]{\setlength{\bcval@tailleOndu}{#1 pt}}%
172 \define@boolkey{bclogo}{cadreTitre}[true]{}%
173 \define@boolkey{bclogo}{noborder}[true]{\ifKV@bclogo@noborder\setlength{\bcval@borderWidth}{\z@}\fi}%
174 \define@boolkey{bclogo}{ombre}[true]{}%
175 \define@boolkey{bclogo}{avecBarre}[true]{}%
176 \define@boolkey{bclogo}{nobreak}[true]{}%
177 \define@boolkey{bclogo}{blur}[true]{\ifKV@bclogo@blur\KV@bclogo@ombretrue\fi}%
178 \define@choicekey{bclogo}{barre}{none,line,snake,motif,zigzag,imageExt,imageClip,wave}[line]{%
179 \ifthenelse{\equal{#1}{none}}{\KV@bclogo@avecBarrefalse\gdef\bc@barre{}}%
180 {\gdef\bc@barre{\ifKV@bclogo@avecBarre\@nameuse{bc@barre#1}\fi}}%
183 % selection par defaut
184 \presetkeys{bclogo}{logo,barre,couleur,arrondi,couleurOmbre,couleurTexte,couleurBarre,epOmbre,epBarre,epBord,tailleOndu,ombre=false,cadreTitre=false,%
185 avecBarre=true,noborder=false,marge,sousTitre,couleurBord,blur=false,nobreak=false}{}%
187 %les differentes commandes de barre verticale a gauche
189 \newcommand*{\bc@barreline}{%
190 \begin{minipage}{\logowidth}\centering%
193 \draw[line width=\bcval@epBarre,line cap=butt,color=\bcval@couleurBarre](0,\bc@invboxh)--(0,0);\end{tikzpicture}%
196 \begin{pspicture}(0,0)(0,\bc@invboxh)%
197 \psline[linewidth=\bcval@epBarre,linecolor=\bcval@couleurBarre](0,\bc@invboxh)(0,0)%
204 \newcommand*{\bc@barresnake}{%
205 \begin{minipage}{\logowidth}\centering%
207 \begin{tikzpicture}[decoration={snake,segment length=2.66\bcval@tailleOndu, amplitude=\bcval@tailleOndu}]%
208 \draw[decorate,line width=1pt, color=\bcval@couleurBarre](0,\bc@invboxh)--(0,0);\end{tikzpicture}%
211 \begin{pspicture}(0,0)(0,\bc@invboxh)%
212 \pszigzag[coilarm=0pt,coilwidth=2\bcval@tailleOndu,linewidth=1pt,linearc=1pt,coilheight=1.33,linecolor=\bcval@couleurBarre](0,\bc@invboxh)(0,0)%
218 \newcommand*{\bc@barrezigzag}{%
219 \begin{minipage}{\logowidth}\centering%
221 \begin{tikzpicture}[decoration={zigzag,segment length=2.66\bcval@tailleOndu, amplitude=\bcval@tailleOndu}]%
222 \draw[decorate,line width=1pt,color=\bcval@couleurBarre](0,\bc@invboxh)--(0,0);\end{tikzpicture}%
225 \begin{pspicture}(0,0)(0,\bc@invboxh)%
226 \pszigzag[coilarm=0pt,coilwidth=2\bcval@tailleOndu,linewidth=1pt,linearc=0pt,coilheight=1.33,linecolor=\bcval@couleurBarre](0,\bc@invboxh)(0,0)%
232 \newcommand*{\bc@barreimageExt}{% l'image est deformee
233 \begin{minipage}{\logowidth}\centering%
234 \includegraphics[width=\logowidth,height=\bc@invboxh]{\bcval@imageBarre}%
238 \newcommand*{\bc@barreimageClip}{%
239 \begin{minipage}{\logowidth}\centering%
240 \includegraphics[viewport=0 0 \logowidth~ \bc@invboxh,clip=true]{\bcval@imageBarre}%
244 \newcommand*{\bc@barremotif}{%
245 \begin{minipage}{\logowidth}\centering%
246 \color{\bcval@couleurBarre}%
247 \vbox to \bc@invboxh{\cleaders\vbox{\vss\bcval@motifBarre\vss}\vfill}%
251 \newcommand*{\bc@barrewave}{%
252 \begin{minipage}{\logowidth}\centering%
253 \color{\bcval@couleurBarre}%
254 \vbox to \bc@invboxh{\cleaders\vbox{\vss$\leftwave\right.$\vss}\vfill}%
258 %======================= Quelques definitions===================================
260 \newsavebox{\bc@envbox}%
262 \newcommand*\bclogotitre{}%
263 \newcommand\bcStyleSousTitre[1]{\normalsize \textit{#1}}%
264 \newcommand\styleSousTitre[1]{\bcStyleSousTitre{#1}}% pour la compatibilit
265 \newcommand\bcStyleTitre[1]{\large \textbf{#1}}%
266 %======================= L'environnement =======================================
268 \ifbclogotikz%définition du style bclogo pour mdframed
269 \mdfdefinestyle{bc@style}{%
270 apptotikzsetting={\ifKV@bclogo@blur\tikzset{mdfshadow/.style={%% semblant de blur...
271 preaction={fill=\bcval@couleurOmbre,line width=5,line join=round,opacity=0.1,draw=\bcval@couleurOmbre,%
272 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}},%
273 preaction={fill=\bcval@couleurOmbre,line width=4,line join=round,opacity=0.15,draw=\bcval@couleurOmbre,%
274 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}},%
275 preaction={fill=\bcval@couleurOmbre,line width=3,line join=round,opacity=0.2,draw=\bcval@couleurOmbre,%
276 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}},%
277 preaction={fill=\bcval@couleurOmbre,line width=2,line join=round,opacity=0.3,draw=\bcval@couleurOmbre,%
278 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}},%
279 preaction={fill=\bcval@couleurOmbre,line width=1,line join=round,opacity=0.4,draw=\bcval@couleurOmbre,%
280 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}},%
281 preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,draw=\bcval@couleurOmbre,%
282 transform canvas={xshift=0.5*\bcval@epOmbre cm, yshift=-0.5*\bcval@epOmbre cm}}%
286 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-2\mdf@innerlinewidth@length-2\mdf@outerlinewidth@length-%
287 2\mdf@middlelinewidth@length-\mdf@innertopmargin@length-\mdf@innerbottommargin@length\relax}%
288 \node[mdfbox,anchor=north west,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,%
289 yshift=-0.75*\bcval@framesep-\mdf@innerlinewidth@length-0.5*\mdf@middlelinewidth@length]at%
290 (P-|O){\box\bc@envbox};%
291 \node[mdfbox,anchor=south,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,%
292 yshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+\bcval@framesep]at(O){\bc@barre};%
295 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@innerlinewidth@length-\mdf@outerlinewidth@length-%
296 \mdf@middlelinewidth@length-\mdf@innertopmargin@length-\mdf@splitbottomskip@length\relax}%
297 \node[mdfbox,anchor=north west,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,%
298 yshift=-0.75*\bcval@framesep-\mdf@innerlinewidth@length-0.5*\mdf@middlelinewidth@length]at%
299 (P-|O){\box\bc@envbox};%
300 \node[mdfbox,anchor=south,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,%
301 yshift=\mdf@splitbottomskip@length]at(O){\bc@barre};%
304 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@splitbottomskip@length-\mdf@splittopskip@length\relax},%
305 \node[mdfbox,anchor=south,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,%
306 yshift=\mdf@splitbottomskip@length]at(O){\bc@barre};%
309 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@innerlinewidth@length-\mdf@outerlinewidth@length-%
310 \mdf@middlelinewidth@length-\mdf@splittopskip@length-\mdf@innerbottommargin@length\relax}%
311 \node[mdfbox,anchor=south,xshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,%
312 yshift=\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.75*\bcval@framesep]at(O){\bc@barre};%
316 \mdfdefinestyle{bc@style}{%
317 pstrickssetting={blur=\ifbclogoblur true\else false\fi},%
319 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-2\mdf@innerlinewidth@length-2\mdf@outerlinewidth@length-%
320 2\mdf@middlelinewidth@length-\mdf@innertopmargin@length-\mdf@innerbottommargin@length\relax}%
321 \rput[tl](\dimexpr\mdf@innerlinewidth@length+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length+0.5\bcval@framesep\relax,%
322 \dimexpr\mdfboundingboxheight-0.75\bcval@framesep-\mdf@middlelinewidth@length-%
323 \mdf@innerlinewidth@length-\mdf@outerlinewidth@length\relax){\box\bc@envbox}%
324 \rput[b](\dimexpr\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+0.5\bcval@framesep+0.5\logowidth+\mdf@innerlinewidth@length\relax,%
325 \dimexpr\mdf@innerbottommargin@length+\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+\mdf@innerlinewidth@length\relax){\bc@barre}%
328 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@innerlinewidth@length-\mdf@outerlinewidth@length-%
329 \mdf@middlelinewidth@length-\mdf@innertopmargin@length-\mdf@splitbottomskip@length\relax}%
330 \rput[tl](\dimexpr\mdf@innerlinewidth@length+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length+0.5\bcval@framesep\relax,%
331 \dimexpr\mdfboundingboxheight-0.75\bcval@framesep-\mdf@middlelinewidth@length-%
332 \mdf@innerlinewidth@length-\mdf@outerlinewidth@length\relax){\box\bc@envbox}%
333 \rput[b](\dimexpr\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+0.5\bcval@framesep+0.5\logowidth+\mdf@innerlinewidth@length\relax,%
334 \mdf@splitbottomskip@length){\bc@barre}%
337 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@splitbottomskip@length-\mdf@splittopskip@length\relax}%
338 \rput[b](\dimexpr\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+0.5\bcval@framesep+0.5\logowidth+\mdf@innerlinewidth@length\relax,%
339 \mdf@splitbottomskip@length){\bc@barre}%
342 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-\mdf@innerlinewidth@length-\mdf@outerlinewidth@length-%
343 \mdf@middlelinewidth@length-\mdf@splittopskip@length-\mdf@innerbottommargin@length\relax}%
344 \rput[b](\dimexpr\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+0.5\bcval@framesep+0.5\logowidth+\mdf@innerlinewidth@length\relax,%
345 \dimexpr\mdf@innerbottommargin@length+\mdf@middlelinewidth@length+\mdf@outerlinewidth@length+\mdf@innerlinewidth@length\relax){\bc@barre}%
350 \newenvironment*{bclogo}[2][]{%
351 \setkeys{bclogo}{#1}%options
352 \renewcommand*\bclogotitre{#2}%
353 % deux types de titres
354 \ifKV@bclogo@cadreTitre% si cadreTitre = true
357 \ifbclogotikz% cadreTitre tikz
359 \node[rectangle, thick, top color=red!60!green!40, bottom color=white,draw]{\large #2};%
361 \else% cadreTitre pstricks
362 \psframebox[fillstyle=gradient,gradmidpoint=0.2, gradangle=0,gradbegin=red!60!green!40, gradend=white]{\large #2}%
366 \else%sinon cadreTitre = false
367 \def\bc@structitre{\bcStyleTitre{#2} \bcStyleSousTitre{\bcval@sousTitre}}%
370 \setlength{\bc@titleLength}{%
371 \dimexpr\linewidth-\bcval@margeD-\bcval@margeG-1.5\bcval@framesep-\ifKV@bclogo@noborder\z@\else2\bcval@borderWidth\fi-%
372 \logowidth-\ifKV@bclogo@ombre\bcval@epOmbre cm\else\z@\fi\relax}%
374 \begin{lrbox}{\bc@envbox}% boite titre
375 \begin{tabular}{@{}c@{}p{\bc@titleLength}@{}}%
376 \begin{minipage}{\logowidth}%
377 \refstepcounter{bclogocompteur}\bccaption{\bclogotitre}\bcval@logo%
380 \ifKV@bclogo@cadreTitre%
381 \begin{minipage}{\bc@titleLength}%
384 \else\bc@structitre\fi%
388 \smallskip% ressort %% Pourquoi ? %%%parce que ça se comprime et ça s'étire!
389 \def\bcval@nobreak{\ifKV@bclogo@nobreak true\else false\fi}% gestion nobreak
390 \def\bcval@shadow{\ifKV@bclogo@ombre true\else false\fi}% gestion ombre
394 innerleftmargin={\dimexpr\ifKV@bclogo@avecBarre\logowidth\else\z@\fi+\bcval@framesep\relax},%
395 innertopmargin={\dimexpr\ht\bc@envbox+\dp\bc@envbox+\bcval@framesep\relax},%hauteur titre+framesep
396 innerrightmargin=\bcval@framesep,%
397 innerbottommargin=\bcval@framesep,%
398 rightmargin={\dimexpr\bcval@margeD+\ifKV@bclogo@ombre\bcval@epOmbre cm\else\z@\fi\relax},%
399 leftmargin=\bcval@margeG,%
400 backgroundcolor=\bcval@couleur,%
401 fontcolor=\bcval@couleurTexte,%
402 middlelinewidth=\bcval@borderWidth,%
403 linecolor=\bcval@couleurBord,%
404 roundcorner={\bcval@arrondi cm},%
405 nobreak=\bcval@nobreak,%l'option nobreak de mdframed vient avec la version 0.9
406 shadow=\bcval@shadow,%
407 shadowsize=\bcval@epOmbre cm,%
408 shadowcolor=\bcval@couleurOmbre%
417 %%%%%%%%%%%%%%%% fin %%%%%%%%%%%%%%%%