1 % This is a part of bclogo.sty v2.27
2 %% This file is loaded by bclogo when tikz is used
3 %% It is a modification of md-frame-1.mdf file, from mdframed package
4 %% This file may be distributed under the terms of the LaTeX Project
5 %% Public License, as described in lppl.txt in the base LaTeX distribution.
6 %% Either version 1.0 or, at your option, any later version.
8 \def\bc@tikzBlur
{%ombre avec un semblant d'effet blur...
9 [preaction=
{fill=
\bcval@couleurOmbre,line width=
5,line join=round,opacity=
0.1,draw=
\bcval@couleurOmbre,
%
10 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}},
%
11 preaction=
{fill=
\bcval@couleurOmbre,line width=
4,line join=round,opacity=
0.15,draw=
\bcval@couleurOmbre,
%
12 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}},
%
13 preaction=
{fill=
\bcval@couleurOmbre,line width=
3,line join=round,opacity=
0.2,draw=
\bcval@couleurOmbre,
%
14 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}},
%
15 preaction=
{fill=
\bcval@couleurOmbre,line width=
2,line join=round,opacity=
0.3,draw=
\bcval@couleurOmbre,
%
16 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}},
%
17 preaction=
{fill=
\bcval@couleurOmbre,line width=
1,line join=round,opacity=
0.4,draw=
\bcval@couleurOmbre,
%
18 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}},
%
19 preaction=
{fill=
\bcval@couleurOmbre,line width=
0.5,line join=round,opacity=
0.4,draw=
\bcval@couleurOmbre,
%
20 transform canvas=
{xshift=
0.5*
\bcval@epOmbre cm, yshift=-
0.5*
\bcval@epOmbre cm
}}]%
22 \def\bc@tikzOmbre
{%ombre sans blur
23 [preaction=
{opacity=
0.6,fill=
\bcval@couleurOmbre,transform canvas=
{xshift=
\bcval@epOmbre cm,yshift=-
\bcval@epOmbre cm
}}]%
26 \def\md@tikz@settings
{%
27 \ifdimequal{\mdf@middlelinewidth@length
}{\z@
}%
28 {\ifdimequal{\mdf@innerlinewidth@length
}{\z@
}%
29 {\ifdimequal{\mdf@outerlinewidth@length
}{\z@
}%
30 {\let\mdf@middlelinecolor
\mdf@backgroundcolor
}%
31 {\let\mdf@middlelinecolor
\mdf@outerlinecolor
}%
33 {\let\mdf@middlelinecolor
\mdf@innerlinecolor
}%
35 \ifdimequal{\mdf@innerlinewidth@length
}{\z@
}%
36 {\ifdimequal{\mdf@outerlinewidth@length
}{\z@
}%
37 {\ifdimequal{\mdf@middlelinewidth@length
}{\z@
}%
39 {\let\mdf@middlelinecolor
\mdf@linecolor
}%
43 \tikzset{mdftext/.style=
{inner sep=
0pt,outer sep=
0pt
}}%
44 \tikzset{mdfcorners/.style=
{rounded corners=
\mdf@roundcorner@length
}}%
45 \tikzset{mdfbackground/.style=
{fill=
\mdf@backgroundcolor
}}%
46 \ifdimgreater{\mdf@outerlinewidth@length
}{\z@
}%
47 {\tikzset{mdfborderA/.style=
{%
48 draw=
\mdf@outerlinecolor,
%
49 line width=
2\mdf@outerlinewidth@length+
\mdf@middlelinewidth@length
%
53 {\tikzset{mdfborderA/.style=
{}}}%
54 \ifdimgreater{\mdf@innerlinewidth@length
}{\z@
}%
55 {\tikzset{mdfborderI/.style=
{%
56 draw=
\mdf@innerlinecolor,
%
57 line width=
2\mdf@innerlinewidth@length+
\mdf@middlelinewidth@length
%
61 {\tikzset{mdfborderI/.style=
{}}}%
62 \tikzset{mdfmiddle/.style=
{draw=
\mdf@middlelinecolor,line width=
\mdf@middlelinewidth@length
}}%
64 \def\md@putbox@single
{%boite qui tient sur la page
65 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
67 \setlength\mdfboxwidth{\wd\@tempboxa
}%
68 \setlength\mdfboxheight{\ht\@tempboxa+
\dp\@tempboxa
}%
69 \setlength{\bc@invboxh
}{\mdfboxheight}%
71 \coordinate(O)at(
0,
0);
%
72 \pgfmathsetlengthmacro\x{\mdfboxwidth+
\mdf@innerrightmargin@length
%
73 +
\mdf@innerleftmargin@length+
%
74 2\mdf@innerlinewidth@length+
\mdf@middlelinewidth@length
}%
75 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
76 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
77 \pgfmathsetlengthmacro\y{\mdfboxheight+
\mdf@innertopmargin@length
%
78 +
\mdf@innerbottommargin@length
%
79 +
2*
\mdf@innerlinewidth@length+
\mdf@middlelinewidth@length
}%
80 \pgfmathsetlengthmacro\yp{\mdf@innerbottommargin@length
%
81 +
1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
82 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
83 \coordinate(P)at(
\x,
\y);
%
87 \path[mdfcorners
]\bc@tikzBlur(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y+
\dep)--(-
\dep,
\y+
\dep)--cycle;
%
89 \path[mdfcorners
]\bc@tikzOmbre(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y+
\dep)--(-
\dep,
\y+
\dep)--cycle;
%
91 \clip[preaction=mdfborderA
]%
92 [postaction=
{mdfbackground,mdfborderI
}]%
93 [mdfcorners
](O)--(O|-P)--(P)--(P|-O)--cycle;
%
95 \path[mdfmiddle,mdfcorners,draw=
\ifKV@bclogo@noborder none
\else\bcval@couleurBord
\fi](O)--(O|-P)--(P)--(P|-O)--cycle;
96 \node[mdftext,anchor=north west
]at
%
97 (
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
%
98 \y-
0.75*
\bcval@framesep-
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length)
{\box\bc@envbox
};
99 \node[mdftext,anchor=south west
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
\yp)
{\bc@barre
};
100 \node[mdftext,anchor=south west
]at(
\xp,
\yp)
{\box\@tempboxa
};
101 %\draw[fill] (0,0) circle (.1cm);
102 %\draw[fill,yellow] (\x,\y) circle (.1cm);
103 %\draw[fill,orange] (\xp,\yp) circle (.05cm);
108 \def\md@putbox@first
{%tête d'une boite coupée
109 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
111 \setlength\mdfboxwidth{\wd\tw@
}%
112 \setlength\mdfboxheight{\ht\tw@+
\dp\tw@
}%
113 \setlength{\bc@invboxh
}{\mdfboxheight}%
114 \ifdimequal{\pagegoal}{\maxdimen}{\enlargethispage{\baselineskip}}{}%
116 \coordinate(O) at (
0,
0);
%
117 \pgfmathsetlengthmacro\x{\mdfboxwidth+
\mdf@innerrightmargin@length
%
118 +
\mdf@innerleftmargin@length+
%
119 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}
120 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
121 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}
122 \pgfmathsetlengthmacro\y{-
\mdfboxheight-
\mdf@innertopmargin@length
%
123 -
1*
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length+
0.0cm
}
124 \pgfmathsetlengthmacro\yp{-
\mdf@innertopmargin@length
%
125 -
1*
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length
%
127 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
128 \coordinate(P)at(
\x,
\y);
%
129 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,
%
130 \mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length)
%
131 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
%
132 \y-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi);
136 \path[mdfcorners
]\bc@tikzBlur(-
\dep,
\y)--(-
\dep,
\dep)--(
\x+
\dep,
\dep)--(
\x+
\dep,
\y);
%
138 \path[mdfcorners
]\bc@tikzOmbre(-
\dep,
\y)--(-
\dep,
\dep)--(
\x+
\dep,
\dep)--(
\x+
\dep,
\y);
%
140 \clip[preaction=mdfborderA
]%
141 [postaction=
{mdfbackground,mdfborderI
}]%
142 [mdfcorners
](O|-P)--(O)--(P|-O)--(P);
%
144 \path[mdfmiddle,mdfcorners,mdfbackground,draw=
\ifKV@bclogo@noborder none
\else \bcval@couleurBord
\fi](O|-P)--(O)--(P|-O)--(P);
145 \node[mdftext,anchor=north west
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
%
146 -
0.75*
\bcval@framesep-
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length)
{\box\bc@envbox
};
%
147 \node[mdftext,anchor=south west
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
\y)
{\bc@barre
};
%
148 \node[mdftext,anchor=west,inner sep=
0pt,outer sep=
0pt
]at(
\xp,
\yp)
{\box\tw@
};
%
149 %\draw[fill] (0,0) circle (.1cm);
150 %\draw[fill,yellow] (\x,\y) circle (.1cm);
151 %\draw[fill,orange] (\xp,\yp) circle (.05cm);
156 \def\md@putbox@middle
{%milieu d'une boite coupée (occupe une page entière)
157 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
159 \setlength\mdfboxwidth{\wd\tw@
}%
160 \setlength\mdfboxheight{\ht\tw@+
\dp\tw@
}%
161 \setlength{\bc@invboxh
}{\mdfboxheight}%
162 \setlength{\mdf@ymargin@length
}{0.4\baselineskip}%
164 \coordinate(O)at(
0,
0);
%
165 \pgfmathsetlengthmacro\x{\mdfboxwidth+
\mdf@innerrightmargin@length
%
166 +
\mdf@innerleftmargin@length+
%
167 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}%
168 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
169 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
170 \pgfmathsetlengthmacro\y{\mdfboxheight}%
171 \pgfmathsetlengthmacro\yp{0cm
}%
172 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
173 \coordinate(P)at(
\x,
\y);
%
174 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi)
%
175 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
\y);
177 \path[mdfborderA
](O)--(O|-P)(P)--(P|-O);
%
180 \path\bc@tikzBlur(-
\dep,
0)--(
\x+
\dep,
0)--(
\x+
\dep,
\y)--(
0,
\y)--cycle;
%
182 \path\bc@tikzOmbre(-
\dep,
0)--(
\x+
\dep,
0)--(
\x+
\dep,
\y)--(
0,
\y)--cycle;
%
185 [postaction=mdfbackground
](O)--(O|-P)--(P)--(P|-O);
%
186 \path[mdfborderI
](O)--(O|-P)(P)--(P|-O);
%
188 \path[mdfmiddle,draw=
\ifKV@bclogo@noborder none
\else \bcval@couleurBord
\fi](O)--(O|-P)(P)--(P|-O);
%
189 \node[mdftext,anchor=south west
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
0)
{\bc@barre
};
%
190 \node[mdftext,anchor=south west
]at(
\xp,
\yp)
{\box\tw@
};
%
195 \def\md@putbox@second
{%dernière partie d'une boite coupée
196 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
198 \setlength\mdfboxwidth{\wd\@tempboxa
}%
199 \setlength\mdfboxheight{\ht\@tempboxa+
\dp\@tempboxa
}%
200 \setlength{\bc@invboxh
}{\mdfboxheight}%
202 \coordinate(O)at(
0,
0);
%
203 \pgfmathsetlengthmacro\x{\mdfboxwidth+
\mdf@innerrightmargin@length
%
204 +
\mdf@innerleftmargin@length+
%
205 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}%
206 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
207 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
208 \pgfmathsetlengthmacro\y{\mdfboxheight%
209 +
\mdf@innerbottommargin@length
%
210 +
1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}
211 \pgfmathsetlengthmacro\yp{\mdf@innerbottommargin@length
%
212 +
1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
213 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
214 \coordinate(P)at(
\x,
\y);
%
215 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,
%
216 -
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi)
%
217 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
\y);
221 \path[mdfcorners
]\bc@tikzBlur(-
\dep,
\y)--(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y);
%
223 \path[mdfcorners
]\bc@tikzOmbre(-
\dep,
\y)--(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y);
%
225 \clip[preaction=mdfborderA
]%
226 [postaction=
{mdfbackground,mdfborderI
}]%
227 [mdfcorners
](P-|O)--(O)--(O-|P)--(P);
%
229 \path[mdfmiddle,mdfcorners,draw=
\ifKV@bclogo@noborder none
\else \bcval@couleurBord
\fi](P-|O)--(O)--(O-|P)--(P);
%
230 \node[mdftext,anchor=south west
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep,
\yp)
{\bc@barre
};
%
231 \node[mdftext,anchor=south west
] at (
\xp,
\yp)
{\box\@tempboxa
};
%