Adaptation de bclogo.sty bclogoMdframedTikz.tex et bclogoMdframedPst.tex a la version...
[bclogo.git] / dev / latex / bclogoMdframedTikz.tex
index 432533a..6ac7b21 100644 (file)
@@ -40,7 +40,7 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
                             }%
                             {}%
                         }{}%
-        \tikzset{mdftext/.style={inner sep=0pt,outer sep=0pt}}%
+        \tikzset{mdftext/.style={inner sep=0pt,outer sep=0pt,\mdf@fontcolor}}%
         \tikzset{mdfcorners/.style={rounded corners=\mdf@roundcorner@length}}%
         \tikzset{mdfbackground/.style={fill=\mdf@backgroundcolor}}%
         \ifdimgreater{\mdf@outerlinewidth@length}{\z@}%
@@ -65,7 +65,7 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
    \leftline{\null\hspace*{\mdf@leftmargin@length}%%
        \md@tikz@settings%
         \setlength\bc@mdfboxwidth{\wd\@tempboxa}%
-        \setlength\bc@mdfboxheight{\ht\@tempboxa+\dp\@tempboxa}%
+        \setlength\bc@mdfboxheight{\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax}%
         \setlength{\bc@invboxh}{\bc@mdfboxheight}%
         \begin{tikzpicture}%
                 \coordinate(O)at(0,0);%
@@ -92,13 +92,13 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
                    \clip[preaction=mdfborderA]%
                         [postaction={mdfbackground,mdfborderI}]%
                         [mdfcorners](O)--(O|-P)--(P)--(P|-O)--cycle;%
-                \end{scope}%
                  \path[mdfmiddle,mdfcorners,draw=\ifKV@bclogo@noborder none\else\bcval@couleurBord\fi](O)--(O|-P)--(P)--(P|-O)--cycle;
                  \node[mdftext,anchor=north west]at%
                   (\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,%
-                   \y-0.75*\bcval@framesep-\mdf@innerlinewidth@length-0.5*\mdf@middlelinewidth@length){\box\bc@envbox};
-                 \node[mdftext,anchor=south west]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,\yp){\bc@barre};
-                 \node[mdftext,anchor=south west]at(\xp,\yp){\box\@tempboxa};
+                   \y-0.75*\bcval@framesep-\mdf@innerlinewidth@length-0.5*\mdf@middlelinewidth@length){\box\bc@envbox};%
+                 \node[mdftext,anchor=south]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,\yp){\bc@barre};%
+                 \node[mdftext,anchor=south west]at(\xp,\yp){\box\@tempboxa};%
+                \end{scope}%
                  %\draw[fill] (0,0) circle (.1cm);
                  %\draw[fill,yellow] (\x,\y) circle (.1cm);
                  %\draw[fill,orange] (\xp,\yp) circle (.05cm);
@@ -110,7 +110,7 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
    \leftline{\null\hspace*{\mdf@leftmargin@length}%%
        \md@tikz@settings%
         \setlength\bc@mdfboxwidth{\wd\tw@}%
-        \setlength\bc@mdfboxheight{\ht\tw@+\dp\tw@}%
+        \setlength\bc@mdfboxheight{\dimexpr\ht\tw@+\dp\tw@\relax}%
         \setlength{\bc@invboxh}{\bc@mdfboxheight}%
         \ifdimequal{\pagegoal}{\maxdimen}{\enlargethispage{\baselineskip}}{}%
         \begin{tikzpicture}%
@@ -141,12 +141,12 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
                         \clip[preaction=mdfborderA]%
                           [postaction={mdfbackground,mdfborderI}]%
                           [mdfcorners](O|-P)--(O)--(P|-O)--(P);%
-                 \end{scope}%
                  \path[mdfmiddle,mdfcorners,mdfbackground,draw=\ifKV@bclogo@noborder none\else \bcval@couleurBord\fi](O|-P)--(O)--(P|-O)--(P);
                  \node[mdftext,anchor=north west]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,%
                         -0.75*\bcval@framesep-\mdf@innerlinewidth@length-0.5*\mdf@middlelinewidth@length){\box\bc@envbox};%
-                 \node[mdftext,anchor=south west]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,\y){\bc@barre};%
+                 \node[mdftext,anchor=south]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,\y){\bc@barre};%
                  \node[mdftext,anchor=west,inner sep=0pt,outer sep=0pt]at(\xp,\yp){\box\tw@};%
+                 \end{scope}%
                  %\draw[fill] (0,0) circle (.1cm);
                  %\draw[fill,yellow] (\x,\y) circle (.1cm);
                  %\draw[fill,orange] (\xp,\yp) circle (.05cm);
@@ -158,7 +158,7 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
    \leftline{\null\hspace*{\mdf@leftmargin@length}%%
         \md@tikz@settings%
         \setlength\bc@mdfboxwidth{\wd\tw@}%
-        \setlength\bc@mdfboxheight{\ht\tw@+\dp\tw@}%
+        \setlength\bc@mdfboxheight{\dimexpr\ht\tw@+\dp\tw@\relax}%
         \setlength{\bc@invboxh}{\bc@mdfboxheight}%
         %\setlength{\bc@mdf@ymargin@length}{0.4\baselineskip}%
         \begin{tikzpicture}%
@@ -185,10 +185,10 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
                         \clip%
                              [postaction=mdfbackground](O)--(O|-P)--(P)--(P|-O);%
                         \path[mdfborderI](O)--(O|-P)(P)--(P|-O);%
-                 \end{scope}%
                  \path[mdfmiddle,draw=\ifKV@bclogo@noborder none\else \bcval@couleurBord\fi](O)--(O|-P)(P)--(P|-O);%
-                 \node[mdftext,anchor=south west]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,0){\bc@barre};%
-                 \node[mdftext,anchor=south west]at(\xp,\yp){\color{\mdf@fontcolor}\box\tw@};%
+                 \node[mdftext,anchor=south]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,0){\bc@barre};%
+                 \node[mdftext,anchor=south west]at(\xp,\yp){\box\tw@};%
+                 \end{scope}%
        \end{tikzpicture}%
      }%
 }%
@@ -197,7 +197,7 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
    \leftline{\null\hspace*{\mdf@leftmargin@length}%%
        \md@tikz@settings%
         \setlength\bc@mdfboxwidth{\wd\@tempboxa}%
-        \setlength\bc@mdfboxheight{\ht\@tempboxa+\dp\@tempboxa}%
+        \setlength\bc@mdfboxheight{\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax}%
         \setlength{\bc@invboxh}{\bc@mdfboxheight}%
         \begin{tikzpicture}%
                  \coordinate(O)at(0,0);%
@@ -226,10 +226,10 @@ preaction={fill=\bcval@couleurOmbre,line width=0.5,line join=round,opacity=0.4,d
                       \clip[preaction=mdfborderA]%
                       [postaction={mdfbackground,mdfborderI}]%
                       [mdfcorners](P-|O)--(O)--(O-|P)--(P);%
-                 \end{scope}%
                  \path[mdfmiddle,mdfcorners,draw=\ifKV@bclogo@noborder none\else \bcval@couleurBord\fi](P-|O)--(O)--(O-|P)--(P);%
-                 \node[mdftext,anchor=south west]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep,\yp){\bc@barre};%
-                 \node[mdftext,anchor=south west] at (\xp,\yp){\color{\mdf@fontcolor}\box\@tempboxa};%
+                 \node[mdftext,anchor=south]at(\mdf@innerlinewidth@length+0.5*\mdf@middlelinewidth@length+0.5*\bcval@framesep+0.5*\logowidth,\yp){\bc@barre};%
+                 \node[mdftext,anchor=south west] at (\xp,\yp){\box\@tempboxa};%
+                 \end{scope}%
        \end{tikzpicture}%
      }%
 }%

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.