\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{MSH}
\typeout{Document style 'MSH' - Mathematiques et Sciences Humaines environment}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{graphicx}
\RequirePackage[french]{babel}
\renewcommand{\section}{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\normalsize\rmfamily}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\scshape}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\itshape}}

\setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm}
\setlength{\oddsidemargin}{8mm}
\setlength{\evensidemargin}{8mm}
\setlength{\textheight}{239mm}
\setlength{\textwidth}{150mm}
%\setlength{\headheight}{0pt}
\setlength{\headsep}{10mm}
%\setlength{\footskip}{0pt}
\setlength{\voffset}{-27mm}

\renewcommand{\baselinestretch}{1.} % faut-il ????


\renewcommand{\thesection}{\@arabic\c@section.}
\renewcommand{\thesubsection}{\thesection\@arabic\c@subsection.}
\renewcommand{\thesubsubsection}{\thesubsection\@arabic\c@subsubsection.}


%% caption in footnotesize type
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
%%org:  \sbox\@tempboxa{#1: #2}%
   \sbox\@tempboxa{{\footnotesize #1. #2}\par}%ajout de \par
  \ifdim \wd\@tempboxa >\hsize
%%org:    #1: #2\par
   {\footnotesize #1. #2\par}   %}\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\renewcommand{\fnum@figure}{\small{\scshape figure~\thefigure}}

\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{{\scriptsize\thepage}\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil{\scriptsize\thepage}}%
      \let\@mkboth\markboth
    \def\sectionmark##1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\z@
          \thesection\quad
        \fi
        ##1}}{}}%
    \def\subsectionmark##1{%
      \markright {%
        \ifnum \c@secnumdepth >\@ne
          \thesubsection\quad
        \fi
        ##1}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil{\scriptsize\thepage}}%
    \let\@mkboth\markboth
    \def\sectionmark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \thesection\quad
        \fi
        ##1}}}}
\fi
\def\ps@myheadings{%
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@evenhead{{\scriptsize\thepage}\hfil\slshape\leftmark}%
    \def\@oddhead{{\slshape\rightmark}\hfil{\scriptsize\thepage}}%
    \let\@mkboth\@gobbletwo
    \let\sectionmark\@gobble
    \let\subsectionmark\@gobble
    }


\renewenvironment{proof}[1][d\'emonstration]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \scshape 
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\newtheorem{theorem}{\scshape th\'eor\`eme}
\newtheorem{corollary}{\scshape corollaire}
\newtheorem{proposition}{\scshape proposition}
\newtheorem{lemma}{\scshape lemme}                   
\newtheorem{definition}{\scshape d\'efinition}
\newtheorem{example}{\itshape Exemple}


\makeatother



