1 %% This is a part of bclogo.sty v3.0
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,
\mdf@fontcolor
}}%
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\bc@mdfboxwidth
{\wd\@tempboxa
}%
68 \setlength\bc@mdfboxheight
{\dimexpr\ht\@tempboxa+
\dp\@tempboxa
\relax}%
69 \setlength{\bc@invboxh
}{\bc@mdfboxheight
}%
71 \coordinate(O)at(
0,
0);
%
72 \pgfmathsetlengthmacro\x{\bc@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{\bc@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;
%
92 \clip[preaction=mdfborderA
]%
93 [postaction=
{mdfbackground,mdfborderI
}]%
94 [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
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep+
0.5*
\logowidth,
\yp)
{\bc@barre
};
%
100 \node[mdftext,anchor=south west
]at(
\xp,
\yp)
{\box\@tempboxa
};
%
102 %\draw[fill] (0,0) circle (.1cm);
103 %\draw[fill,yellow] (\x,\y) circle (.1cm);
104 %\draw[fill,orange] (\xp,\yp) circle (.05cm);
109 \def\md@putbox@first
{%tête d'une boite coupée
110 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
112 \setlength\bc@mdfboxwidth
{\wd\tw@
}%
113 \setlength\bc@mdfboxheight
{\dimexpr\ht\tw@+
\dp\tw@
\relax}%
114 \setlength{\bc@invboxh
}{\bc@mdfboxheight
}%
115 \ifdimequal{\pagegoal}{\maxdimen}{\enlargethispage{\baselineskip}}{}%
117 \coordinate(O) at (
0,
0);
%
118 \pgfmathsetlengthmacro\x{\bc@mdfboxwidth+
\mdf@innerrightmargin@length
%
119 +
\mdf@innerleftmargin@length+
%
120 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}
121 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
122 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}
123 \pgfmathsetlengthmacro\y{-
\bc@mdfboxheight-
\mdf@innertopmargin@length
%
124 -
1*
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length+
0.0cm
}
125 \pgfmathsetlengthmacro\yp{-
\mdf@innertopmargin@length
%
126 -
1*
\mdf@innerlinewidth@length-
0.5*
\mdf@middlelinewidth@length
%
127 -
0.5\bc@mdfboxheight
}
128 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
129 \coordinate(P)at(
\x,
\y);
%
130 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,
%
131 \mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length)
%
132 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
%
133 \y-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi);
137 \path[mdfcorners
]\bc@tikzBlur(-
\dep,
\y)--(-
\dep,
\dep)--(
\x+
\dep,
\dep)--(
\x+
\dep,
\y);
%
139 \path[mdfcorners
]\bc@tikzOmbre(-
\dep,
\y)--(-
\dep,
\dep)--(
\x+
\dep,
\dep)--(
\x+
\dep,
\y);
%
141 \clip[preaction=mdfborderA
]%
142 [postaction=
{mdfbackground,mdfborderI
}]%
143 [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
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep+
0.5*
\logowidth,
\y)
{\bc@barre
};
%
148 \node[mdftext,anchor=west,inner sep=
0pt,outer sep=
0pt
]at(
\xp,
\yp)
{\box\tw@
};
%
150 %\draw[fill] (0,0) circle (.1cm);
151 %\draw[fill,yellow] (\x,\y) circle (.1cm);
152 %\draw[fill,orange] (\xp,\yp) circle (.05cm);
157 \def\md@putbox@middle
{%milieu d'une boite coupée (occupe une page entière)
158 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
160 \setlength\bc@mdfboxwidth
{\wd\tw@
}%
161 \setlength\bc@mdfboxheight
{\dimexpr\ht\tw@+
\dp\tw@
\relax}%
162 \setlength{\bc@invboxh
}{\bc@mdfboxheight
}%
163 %\setlength{\bc@mdf@ymargin@length}{0.4\baselineskip}%
165 \coordinate(O)at(
0,
0);
%
166 \pgfmathsetlengthmacro\x{\bc@mdfboxwidth+
\mdf@innerrightmargin@length
%
167 +
\mdf@innerleftmargin@length+
%
168 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}%
169 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
170 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
171 \pgfmathsetlengthmacro\y{\bc@mdfboxheight
}%
172 \pgfmathsetlengthmacro\yp{0cm
}%
173 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
174 \coordinate(P)at(
\x,
\y);
%
175 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi)
%
176 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
\y);
178 \path[mdfborderA
](O)--(O|-P)(P)--(P|-O);
%
181 \path\bc@tikzBlur(-
\dep,
0)--(
\x+
\dep,
0)--(
\x+
\dep,
\y)--(
0,
\y)--cycle;
%
183 \path\bc@tikzOmbre(-
\dep,
0)--(
\x+
\dep,
0)--(
\x+
\dep,
\y)--(
0,
\y)--cycle;
%
186 [postaction=mdfbackground
](O)--(O|-P)--(P)--(P|-O);
%
187 \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
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep+
0.5*
\logowidth,
0)
{\bc@barre
};
%
190 \node[mdftext,anchor=south west
]at(
\xp,
\yp)
{\box\tw@
};
%
196 \def\md@putbox@second
{%dernière partie d'une boite coupée
197 \leftline{\null\hspace*
{\mdf@leftmargin@length
}%%
199 \setlength\bc@mdfboxwidth
{\wd\@tempboxa
}%
200 \setlength\bc@mdfboxheight
{\dimexpr\ht\@tempboxa+
\dp\@tempboxa
\relax}%
201 \setlength{\bc@invboxh
}{\bc@mdfboxheight
}%
203 \coordinate(O)at(
0,
0);
%
204 \pgfmathsetlengthmacro\x{\bc@mdfboxwidth+
\mdf@innerrightmargin@length
%
205 +
\mdf@innerleftmargin@length+
%
206 2*
\mdf@innerlinewidth@length+
1*
\mdf@middlelinewidth@length
}%
207 \pgfmathsetlengthmacro\xp{\mdf@innerleftmargin@length+
%
208 1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
209 \pgfmathsetlengthmacro\y{\bc@mdfboxheight
%
210 +
\mdf@innerbottommargin@length
%
211 +
1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}
212 \pgfmathsetlengthmacro\yp{\mdf@innerbottommargin@length
%
213 +
1*
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
214 \pgfmathsetlengthmacro\dep{\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length
}%
215 \coordinate(P)at(
\x,
\y);
%
216 \clip(-
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length,
%
217 -
\mdf@outerlinewidth@length-
0.5*
\mdf@middlelinewidth@length-
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi)
%
218 rectangle(
\x+
\mdf@outerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
\ifKV@bclogo@ombre
\bcval@epOmbre cm
\else0\fi,
\y);
222 \path[mdfcorners
]\bc@tikzBlur(-
\dep,
\y)--(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y);
%
224 \path[mdfcorners
]\bc@tikzOmbre(-
\dep,
\y)--(-
\dep,-
\dep)--(
\x+
\dep,-
\dep)--(
\x+
\dep,
\y);
%
226 \clip[preaction=mdfborderA
]%
227 [postaction=
{mdfbackground,mdfborderI
}]%
228 [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
]at(
\mdf@innerlinewidth@length+
0.5*
\mdf@middlelinewidth@length+
0.5*
\bcval@framesep+
0.5*
\logowidth,
\yp)
{\bc@barre
};
%
231 \node[mdftext,anchor=south west
] at (
\xp,
\yp)
{\box\@tempboxa
};
%