Patch pour blur et pstricks
[bclogo.git] / dev / latex / bclogo.sty
index 4dcf5cf..75ab5c4 100644 (file)
@@ -1,7 +1,7 @@
 \NeedsTeXFormat{LaTeX2e}%
 \def\PackageName{bclogo}%
-\def\fileversion{v3.0}%
-\def\filedate{2012/07/21}%
+\def\fileversion{v3.11}%
+\def\filedate{2016/10/31}%
 \ProvidesPackage{bclogo}[\filedate\space\fileversion]%
 %
 % Extensions a charger
 \fi%
 \edef\Gin@extensions{.mps,\Gin@extensions}%
 \RequirePackage{ifpdf}%
+\RequirePackage{etoolbox} % pour robustifier les commandes
 \ifpdf\relax\else\DeclareGraphicsRule{mps}{eps}{*}{}\fi%
 %
 % les symboles
 % ==============================================================================
 % la fleur
 \newcommand\bcfleur{\includegraphics[width=\logowidth]{bc-fleur}}%
+% on robustifie
+\robustify\bcfleur
 % une note (Thomas Labarussias)
 \newcommand\bcnote{\includegraphics[width=\logowidth]{bc-note}}%
+\robustify\bcnote
 % panneau chantier (Jean-Michel Sarlat)
 \newcommand\bcpanchant{\includegraphics[width=\logowidth]{bc-aux-301}}%
+\robustify\bcpanchant
 % ours
 \newcommand\bcours{\includegraphics[width=\logowidth]{bc-ours}}%
+\robustify\bcours
 % etoile
 \newcommand\bcetoile{\includegraphics[width=\logowidth]{bc-etoile}}%
+\robustify\bcetoile
 % attention
 \newcommand\bcattention{\includegraphics[width=\logowidth]{bc-attention}}%
+\robustify\bcattention
 % attention P.Fradin
 \newcommand\bctakecare{\includegraphics[width=\logowidth]{bc-takecare}}%
+\robustify\bctakecare
 % lampe P.Fradin
 \newcommand\bclampe{\includegraphics[width=\logowidth]{bc-lampe}}%
+\robustify\bclampe
 % coeur
 \newcommand\bccoeur{\includegraphics[width=\logowidth]{bc-coeur}}%
+\robustify\bccoeur
 % ornement (tire du site http://openclipart.org )
 \newcommand\bcorne{\includegraphics[width=\logowidth]{bc-orne}}%
+\robustify\bcorne
 % danger (Francois)
 \newcommand\bcdanger{\includegraphics[width=\logowidth]{bc-danger}}%
+\robustify\bcdanger
 % smiley bonne humeur (Francois)
 \newcommand\bcsmbh{\includegraphics[width=\logowidth]{bc-smiley-bonnehumeur}}%
+\robustify\bcsmbh
 % smiley bonne humeur (Francois)
 \newcommand\bcsmmh{\includegraphics[width=\logowidth]{bc-smiley-mauvaisehumeur}}%
+\robustify\bcsmmh
 % le trefle
 \newcommand\bctrefle{\includegraphics[width=\logowidth]{bc-trefle}}%
+\robustify\bctrefle
 % le livre
 \newcommand\bcbook{\includegraphics[width=\logowidth]{bc-book}}%
+\robustify\bcbook
 % point d'interrogation
 \newcommand\bcquestion{\includegraphics[width=\logowidth]{bc-inter}}%
+\robustify\bcquestion
 % crayon anne-sophie philippe
 \newcommand\bccrayon{\includegraphics[width=\logowidth]{bc-crayon}}%
+\robustify\bccrayon
 % info (thomas labarrussias)
 \newcommand\bcinfo{\includegraphics[width=\logowidth]{bc-info}}%
+\robustify\bcinfo
 % plume
 \newcommand\bcplume{\includegraphics[width=\logowidth]{bc-plume}}%
+\robustify\bcplume
 % le pic LaTeX
 \newcommand\bcspadesuit{{\centering \huge $\spadesuit$}}%
+\robustify\bcspadesuit
 % logos Alphonse Capriani
 \newcommand\bcbombe{\includegraphics[width=\logowidth]{bc-bombe}}%
+\robustify\bcbombe
 \newcommand\bccube{\includegraphics[width=\logowidth]{bc-cube}}%
+\robustify\bccube
 \newcommand\bcdallemagne{\includegraphics[width=\logowidth]{bc-dallemagne}}%
+\robustify\bcdallemagne
 \newcommand\bcdautriche{\includegraphics[width=\logowidth]{bc-dautriche}}%
+\robustify\bcdautriche
 \newcommand\bcdbelgique{\includegraphics[width=\logowidth]{bc-dbelgique}}%
+\robustify\bcdbelgique
 \newcommand\bcdbulgarie{\includegraphics[width=\logowidth]{bc-dbulgarie}}%
+\robustify\bcdbulgarie
 \newcommand\bcdfrance{\includegraphics[width=\logowidth]{bc-dfrance}}%
+\robustify\bcdfrance
 \newcommand\bcditalie{\includegraphics[width=\logowidth]{bc-ditalie}}%
+\robustify\bcditalie
 \newcommand\bcdluxembourg{\includegraphics[width=\logowidth]{bc-dluxembourg}}%
+\robustify\bcdluxembourg
 \newcommand\bcdpaysbas{\includegraphics[width=\logowidth]{bc-dpaysbas}}%
+\robustify\bcdpaysbas
 \newcommand\bcdodecaedre{\includegraphics[width=\logowidth]{bc-dodecaedre}}%
+\robustify\bcdodecaedre
 \newcommand\bceclaircie{\includegraphics[width=\logowidth]{bc-eclaircie}}%
+\robustify\bceclaircie
 \newcommand\bcicosaedre{\includegraphics[width=\logowidth]{bc-icosaedre}}%
+\robustify\bcicosaedre
 \newcommand\bcinterdit{\includegraphics[width=\logowidth]{bc-interdit}}%
+\robustify\bcinterdit
 \newcommand\bcneige{\includegraphics[width=\logowidth]{bc-neige}}%
+\robustify\bcneige
 \newcommand\bcoctaedre{\includegraphics[width=\logowidth]{bc-octaedre}}%
+\robustify\bcoctaedre
 \newcommand\bcpluie{\includegraphics[width=\logowidth]{bc-pluie}}%
+\robustify\bcpluie
 \newcommand\bcpoisson{\includegraphics[width=\logowidth]{bc-poisson}}%
+\robustify\bcpoisson
 \newcommand\bcsoleil{\includegraphics[width=\logowidth]{bc-soleil}}%
+\robustify\bcsoleil
 \newcommand\bcstop{\includegraphics[width=\logowidth]{bc-stop}}%
+\robustify\bcstop
 \newcommand\bctetraedre{\includegraphics[width=\logowidth]{bc-tetraedre}}%
+\robustify\bctetraedre
 \newcommand\bccalendrier{\includegraphics[width=\logowidth]{bc-calendrier}}%
+\robustify\bccalendrier
 \newcommand\bchorloge{\includegraphics[width=\logowidth]{bc-horloge}}%
+\robustify\bchorloge
 \newcommand\bcyin{\includegraphics[width=\logowidth]{bc-yin}}%
+\robustify\bcyin
 \newcommand\bcrosevents{\includegraphics[width=\logowidth]{bc-rosevents}}%
+\robustify\bcrosevents
 % fin alphonse
 % Vincent Pantaloni route glissante
 \newcommand\bcdz{\includegraphics[width=\logowidth]{bc-dz}}%
+\robustify\bcdz
 % François Pétiard
 \newcommand\bcvelo{\includegraphics[width=\logowidth]{bc-velo}}%
+\robustify\bcvelo
 \newcommand\bcoeil{\includegraphics[width=\logowidth]{bc-oeil}}%
+\robustify\bcoeil
 \newcommand\bcpeaceandlove{\includegraphics[width=\logowidth]{bc-peaceandlove}}%
+\robustify\bcpeaceandlove
 \newcommand\bcnucleaire{\includegraphics[width=\logowidth]{bc-nucleaire}}%
+\robustify\bcnucleaire
 \newcommand\bcfemme{\includegraphics[width=\logowidth]{bc-femme}}%
+\robustify\bcfemme
 \newcommand\bchomme{\includegraphics[width=\logowidth]{bc-homme}}%
+\robustify\bchomme
 \newcommand\bcloupe{\includegraphics[width=\logowidth]{bc-loupe}}%
+\robustify\bcloupe
 \newcommand\bcrecyclage{\includegraphics[width=\logowidth]{bc-recyclage}}%
+\robustify\bcrecyclage
 \newcommand\bcvaletcoeur{\includegraphics[width=\logowidth]{bc-valetcoeur}}%
+\robustify\bcvaletcoeur
 \newcommand\bccle{\includegraphics[width=\logowidth]{bc-cle}}%
+\robustify\bccle
 \newcommand\bcclefa{\includegraphics[width=\logowidth]{bc-clefa}}%
+\robustify\bcclefa
 \newcommand\bcclesol{\includegraphics[width=\logowidth]{bc-clesol}}%
+\robustify\bcclesol
 \newcommand\bcfeujaune{\includegraphics[width=\logowidth]{bc-feujaune}}%
+\robustify\bcfeujaune
 \newcommand\bcfeurouge{\includegraphics[width=\logowidth]{bc-feurouge}}%
+\robustify\bcfeurouge
 \newcommand\bcfeutricolore{\includegraphics[width=\logowidth]{bc-feutricolore}}%
+\robustify\bcfeutricolore
 \newcommand\bcfeuvert{\includegraphics[width=\logowidth]{bc-feuvert}}%
+\robustify\bcfeuvert
 \newcommand\bcoutil{\includegraphics[width=\logowidth]{bc-outil}}%
+\robustify\bcoutil
 \newcommand\bctrombone{\includegraphics[width=\logowidth]{bc-trombone}}%
+\robustify\bctrombone
 % fin François
 % =========================== La fonction listable =============================
 %
@@ -314,7 +380,6 @@ secondextra={%
 }%
 \else%pstricks
 \mdfdefinestyle{bc@style}{%
-pstrickssetting={blur=\ifbclogoblur true\else false\fi},%
 singleextra={%
 \setlength{\bc@invboxh}{\dimexpr\mdfboundingboxheight-2\mdf@innerlinewidth@length-2\mdf@outerlinewidth@length-%
 2\mdf@middlelinewidth@length-\mdf@innertopmargin@length-\mdf@innerbottommargin@length\relax}%
@@ -389,24 +454,49 @@ secondextra={%
 \def\bcval@nobreak{\ifKV@bclogo@nobreak true\else false\fi}% gestion nobreak
 \def\bcval@shadow{\ifKV@bclogo@ombre true\else false\fi}% gestion ombre
 %
+%
+\ifbclogoblur%
+\mdframed[%
+style=bc@style,%
+innerleftmargin={\dimexpr\ifKV@bclogo@avecBarre\logowidth\else\z@\fi+\bcval@framesep\relax},%
+innertopmargin={\dimexpr\ht\bc@envbox+\dp\bc@envbox+\bcval@framesep\relax},%hauteur titre+framesep
+innerrightmargin=\bcval@framesep,%
+innerbottommargin=\bcval@framesep,%
+rightmargin={\dimexpr\bcval@margeD+\ifKV@bclogo@ombre\bcval@epOmbre cm\else\z@\fi\relax},%
+leftmargin=\bcval@margeG,%
+backgroundcolor=\bcval@couleur,%
+fontcolor=\bcval@couleurTexte,%
+middlelinewidth=\bcval@borderWidth,%
+linecolor=\bcval@couleurBord,%
+roundcorner={\bcval@arrondi cm},%
+nobreak=\bcval@nobreak,%l'option nobreak de mdframed vient avec la version 0.9
+shadow=\bcval@shadow,%
+shadowsize=\bcval@epOmbre cm,%
+shadowcolor=\bcval@couleurOmbre,%
+pstrickssetting={%
+  blur=true%
+},%
+]%
+\else%
 \mdframed[%
- style=bc@style,%
- innerleftmargin={\dimexpr\ifKV@bclogo@avecBarre\logowidth\else\z@\fi+\bcval@framesep\relax},%
- innertopmargin={\dimexpr\ht\bc@envbox+\dp\bc@envbox+\bcval@framesep\relax},%hauteur titre+framesep
- innerrightmargin=\bcval@framesep,%
- innerbottommargin=\bcval@framesep,%
- rightmargin={\dimexpr\bcval@margeD+\ifKV@bclogo@ombre\bcval@epOmbre cm\else\z@\fi\relax},%
- leftmargin=\bcval@margeG,%
- backgroundcolor=\bcval@couleur,%
- fontcolor=\bcval@couleurTexte,%
- middlelinewidth=\bcval@borderWidth,%
- linecolor=\bcval@couleurBord,%
- roundcorner={\bcval@arrondi cm},%
- nobreak=\bcval@nobreak,%l'option nobreak de mdframed vient avec la version 0.9
- shadow=\bcval@shadow,%
- shadowsize=\bcval@epOmbre cm,%
- shadowcolor=\bcval@couleurOmbre%
+style=bc@style,%
+innerleftmargin={\dimexpr\ifKV@bclogo@avecBarre\logowidth\else\z@\fi+\bcval@framesep\relax},%
+innertopmargin={\dimexpr\ht\bc@envbox+\dp\bc@envbox+\bcval@framesep\relax},%hauteur titre+framesep
+innerrightmargin=\bcval@framesep,%
+innerbottommargin=\bcval@framesep,%
+rightmargin={\dimexpr\bcval@margeD+\ifKV@bclogo@ombre\bcval@epOmbre cm\else\z@\fi\relax},%
+leftmargin=\bcval@margeG,%
+backgroundcolor=\bcval@couleur,%
+fontcolor=\bcval@couleurTexte,%
+middlelinewidth=\bcval@borderWidth,%
+linecolor=\bcval@couleurBord,%
+roundcorner={\bcval@arrondi cm},%
+nobreak=\bcval@nobreak,%l'option nobreak de mdframed vient avec la version 0.9
+shadow=\bcval@shadow,%
+shadowsize=\bcval@epOmbre cm,%
+shadowcolor=\bcval@couleurOmbre,%
 ]%
+\fi%
 }%
 {%
 \endmdframed\par%

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.