%%%% \documentclass{law}
%%%% 
%%%% \begin{document}
%%%% 
%%%% 
%%%% \title{Title of the Talk}
%%%% \author{Your Name}
%%%% \university{Name of University}
%%%% \country{Country}
%%%% \jointwork{Some Author, Another Author and Some Other Author}
%%%% 
%%%% \begin{abstract}
%%%% Your abstract.
%%%% \end{abstract}
%%%% 
%%%% 
%%%% \end{document}

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{law}[2011/01/25 Linear Algebra Workshop Abstract]
\LoadClass[11pt]{article}
\linespread{1.1}
\RequirePackage{geometry, ifthen}
\geometry{
  a4paper,
  hmargin = 25mm,
  vmargin = 20mm,
  marginparsep = 8mm
}

\newcommand{\@ensure}[2]{\ifthenelse{\equal{#1}{}}{#2}{#1}}

\newcommand{\@resetvariables}{%
    \title{}%
    \author{}%
    \university{}%
    \country{}%
    \global\let\@jointwork\@empty%
}

\newcommand{\university}[1]{\global\def\@university{#1}}
\newcommand{\country}[1]{\global\def\@country{#1}}
\newcommand{\jointwork}[1]{\global\def\@jointwork{#1}}
\@resetvariables
% fix spacing and title size for References
\renewcommand{\section}{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {1ex \@plus.0ex}%
                                   {\normalfont\bfseries}}
\renewenvironment{abstract}{%
    \filbreak%
    \begin{centering}%
    \textbf{\large%
    \@ensure{\@title}{Set the title using \texttt{\char`\\title\char`{title\char`}}}
    } \par\medskip%
    \@ensure{\@author}{Set your name using~\texttt{\char`\\author\char`{name\char`}}},
    \@ensure{\@university}{set your university's name using~\texttt{\char`\\university\char`{name\char`}}},
    \@ensure{\@country}{set your country's name using~\texttt{\char`\\country\char`{name\char`}}}%
    \ifx\@jointwork\@empty\else\par\smallskip(Joint work with \@jointwork)\fi%
    \par%
    \end{centering}%
    \medskip%
    \@afterindentfalse%
    \@afterheading%
}{%
    \@resetvariables%
    \vspace{2cm}%
}

