summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bclogo/bclogo.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bclogo/bclogo.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bclogo/bclogo.sty105
1 files changed, 105 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bclogo/bclogo.sty b/Master/texmf-dist/tex/latex/bclogo/bclogo.sty
new file mode 100644
index 00000000000..38d107de868
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bclogo/bclogo.sty
@@ -0,0 +1,105 @@
+\NeedsTeXFormat{LaTeX2e}
+
+\ProvidesPackage{bclogo}[2008/03/12, V1.31]
+
+% extensions
+
+\RequirePackage{pstricks}
+\RequirePackage{pst-grad}
+\RequirePackage{tabularx}
+\RequirePackage{graphicx}
+\RequirePackage{ifthen}
+%\RequirePackage{xkeyval}
+%les symboles
+%==========================================================================================
+%la fleur
+\newcommand\fleur{\begingroup\input{fleur}\endgroup}
+%une note (Thomas Laburussias)
+\newcommand\note{\begingroup\input{note}\endgroup}
+%panneau chantier (Jean-Michel Sarlat)
+\newcommand{\panchant}{\includegraphics[width=17pt]{aux-301.eps}}
+%ours
+\newcommand\ours{\begingroup\input{ours.tex}\endgroup}
+%étoile
+\newcommand\etoile{\begingroup\input{etoile.tex}\endgroup}
+%attention
+\newcommand\attention{\begingroup\input{attention.tex}\endgroup}
+%coeur
+\newcommand\coeur{\begingroup\input{coeur.tex}\endgroup}
+%ornement (tiré du site http://openclipart.org )
+\newcommand\orne{\begingroup\input{orne.tex}\endgroup}
+%danger (François)
+\newcommand\danger{\begingroup\input{danger.tex}\endgroup}
+%smiley bonne humeur (François)
+\newcommand\smbh{\begingroup\input{smiley_bonnehumeur.tex}\endgroup}
+%smiley bonne humeur (François)
+\newcommand\smmh{\begingroup\input{smiley_mauvaisehumeur.tex}\endgroup}
+%=================================================================================
+
+%=========================== La fonction listable ================================
+\newcommand{\titrebclogo}{Liste des \texttt{bclogo}}
+\newcommand\bccaption[1]{\addcontentsline{bcl}{bclogo}{#1}}
+\makeatletter
+\newcommand\listofbclogo{\section*{\titrebclogo}\@starttoc{bcl}}
+\newcommand\l@bclogo[2]{\par\noindent #1,~\textit{page~#2}}
+\makeatother
+%=================================================================================
+\makeatletter
+%======================================= les keys ================================
+\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
+\def\fileversion{1.31}
+\def\filedate{2008/09/18}
+\message{`bclogo' v\fileversion, \filedate}
+
+\pst@addfams{bclogo}
+\define@key[psset]{bclogo}{logo}{\def\val@logo{#1}}
+\define@key[psset]{bclogo}{couleur}{\def\val@couleur{#1}}
+\define@key[psset]{bclogo}{arrondi}{\def\val@arrondi{#1}}
+\psset[bclogo]{logo=\fleur,couleur=white,arrondi=0}
+
+\define@boolkey[psset]{bclogo}[Pst@]{cadretitre}[false]{}
+\psset[bclogo]{cadretitre}% set to the default, which is false
+
+%=================================================================================
+
+\newsavebox{\envbox}
+%%% précaution JCC
+\newcommand*\bclogocolor{}
+\newcommand*\bclogotitre{}
+
+\newenvironment*{bclogo}[2][]{%
+ \psset[bclogo]{#1} %on récupère les options
+ \par\noindent % attention au retrait d'alinéa
+%%% Ajout de JCC : il faut définir les commandes qui seront untilisées dans la deuxième partie de l'environnement
+%%% commande titre
+ \renewcommand*\bclogotitre{#2}
+ \renewcommand*\bclogocolor{\val@couleur}
+%La commande pour les coins arrondis
+ \newcommand{\arr}{\val@arrondi}
+%%% deux types de titres
+ \ifPst@cadretitre %si cadretitre = true
+ \newcommand{\structitre}{ \rput({\dimexpr -17pt+0.5\linewidth},0.1){\psframebox[fillstyle=gradient,gradmidpoint=0.2, gradangle=0,gradbegin=red!60!green!40, gradend=white]{\large #2}}}
+ \else %sinon
+ \newcommand{\structitre}{{\large \textbf{#2}}}
+ \fi
+%
+ \begin{lrbox}{\envbox}
+ \begin{tabular}{@{}c@{}p{\dimexpr\linewidth-2\psframesep-2\pslinewidth-17pt}@{}}
+ \raisebox{-3mm}{\val@logo} &\structitre \\[1ex]
+ \vrule width 0.05cm&
+}
+{%
+ \bccaption{\bclogotitre}
+ \end{tabular}%
+ \end{lrbox}%
+ % Affiche le texte dans un cadre en couleur.
+ \noindent
+ \rput[tl](-0.18,0){%
+ \psframebox[fillstyle=solid, fillcolor=\bclogocolor,framearc=\arr]{%
+ \usebox{\envbox}%
+ }%
+ }%
+ \par\vspace*{\dimexpr\ht\envbox+\dp\envbox+2\psframesep+2\pslinewidth}
+}
+
+\makeatother