% This is the file `nmmacro.sty'
% a macro database to be used with LaTeX2e
% together with the package `notemat'
\def\filedate{2010/10/01}
\def\NMmacroVer{1.0}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nmmacro}
              [\filedate\space
Note di Matematica macro database v.\NMmacroVer for notemat.cls]
\RequirePackage{amsthm}
%--------------------------------------------------------------------%
% Claims
%--------------------------------------------------------------------%
\newtheoremstyle{NMThm}% name
  {3pt}%      Space above
  {3pt}%      Space below
  {\itshape}%     Body font
  {\parindent}%   Indent amount (empty = no indent)
  {\bfseries}%    Thm head font
  {.}%        Punctuation after thm head
  {.5em}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {}%         Thm head spec (can be left empty, meaning `normal')
\theoremstyle{NMThm}
\newtheorem{Lemma}{Lemma}
\newtheorem{Proposition}{Proposition}
\newtheorem{Theorem}{Theorem}
\newtheorem{Corollary}{Corollary}
\newtheorem{Conjecture}{Conjecture}
\newtheoremstyle{NMDef}% name
  {3pt}%      Space above
  {3pt}%      Space below
  {\normalfont}%     Body font
  {\parindent}%   Indent amount (empty = no indent)
  {\bfseries}%    Def head font
  {.}%        Punctuation after def head
  {.5em}%     Space after def head: " " = normal interword space;
        %       \newline = linebreak
  {}%         Def head spec (can be left empty, meaning `normal')
\theoremstyle{NMDef}
\newtheorem{Definition}{Definition}
\newtheorem{Remark}{Remark}
\newtheorem{Note}{Note}
\newtheorem{Example}{Example}

\newenvironment{pf}[1][\pfname]{\par
  \pushQED{\qed}%
  \normalfont \topsep0\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep\hskip\parindent
        \scshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\newcommand{\pfname}{Proof}
\def\QED{\hskip0.1em\hfill\null\
\null\nobreak\hfill\kern3pt\vbox{\hrule\hbox
   {\vrule\kern1pt\vbox{\kern1.7pt\hbox{$\scriptscriptstyle{QED}$}
    \kern0.2pt}\kern1pt\vrule}\hrule}}
\renewcommand{\qedsymbol}{\QED}

% Resets counters at the and of any article

\@addtoreset{Lemma}{article}
\@addtoreset{Proposition}{article}
\@addtoreset{Theorem}{article}
\@addtoreset{Corollary}{article}
\@addtoreset{Conjecture}{article}

\@addtoreset{Definition}{article}
\@addtoreset{Remark}{article}
\@addtoreset{Note}{article}
\@addtoreset{Example}{article}
%--------------------------------------------------------------------%
% Other
%--------------------------------------------------------------------%

\endinput

