boites.sty 1.87 KB
Newer Older
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
\usepackage{tikz,environ}
\tikzstyle{mybox} = [draw=black, very thick,
    rectangle, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[draw=black, fill=white, text=black]


\NewEnviron{defin}{\par
\begin{center}
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.8\textwidth}
    	\BODY
	\end{minipage} };
\node[fancytitle, right=10pt] at (box.north west) {\textbf{Définition}};
\end{tikzpicture}\end{center}\par
}

% \NewEnviron{thm}{\par
% \begin{center}
% \begin{tikzpicture}
% \node [mybox] (box){%
%     \begin{minipage}{0.8\textwidth}
%     	\BODY
% 	\end{minipage} };
% \node[fancytitle, right=10pt] at (box.north west) {\textbf{Théorème}};
% \end{tikzpicture}\end{center}\par
%}

\usepackage{thmbox}
\usepackage{xparse}
\NewDocumentEnvironment{prop}{o}{%
\begin{center}\begin{minipage}{0.8\textwidth}
  \thmbox[M]{\textbf{Proposition \IfNoValueTF{#1}{}{\em (#1)}}}%
  %\hspace*{-1.5em}%
  }
  {%
  \endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
  }

\NewDocumentEnvironment{thm}{o}{%
\begin{center}\begin{minipage}{0.8\textwidth}
  \thmbox[M]{\textbf{Théorème \IfNoValueTF{#1}{}{\em (#1)}}}%
  %\hspace*{-1.5em}%
  }
  {%
  \endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
  }


\NewDocumentEnvironment{corol}{o}{%
	\begin{center}\begin{minipage}{0.8\textwidth}
			\thmbox[M]{\textbf{Corollaire \IfNoValueTF{#1}{}{\em (#1)}}}%
			%\hspace*{-1.5em}%
		}
		{%
			\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
}

\NewDocumentEnvironment{lemEM}{o}{%
	\begin{center}\begin{minipage}{0.8\textwidth}
			\thmbox[M]{\textbf{Lemme ergodique maximal \IfNoValueTF{#1}{}{\em (#1)}}}%
			%\hspace*{-1.5em}%
		}
		{%
			\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
}

\newenvironment{rem}{\par\textbf{Remarque: }\nopagebreak}{\par}
\newenvironment{exemple}{\par\textbf{Exemple: }\nopagebreak}{\par}
\newenvironment{preuve}{\par\textit{Démonstration: }\nopagebreak}{\par}