\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{iwtsproc}[31/01/2017 Latex Class for Series of IWTS Proceeding Books v1.01]
\LoadClass{article}
\RequirePackage{titlesec}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amsfonts}
\RequirePackage{xstring}
\RequirePackage{color}
 \RequirePackage{lineno} %Authors can remove this line.

\RequirePackage{kvoptions}
\DeclareBoolOption[true]{preprint}       % automatically creates \ifmypackage@fullpage
\DeclareComplementaryOption{finalversion}{preprint}

\ProcessKeyvalOptions*{}


\DeclareOption{a4paper}{%
\setlength{\paperheight}{297mm}%
\setlength{\paperwidth}{210mm}%
}


\newcommand{\doinumber}{xx.xxxx/iwts.2016.xxxx}
\newcommand{\isbnnumber}{1234567890}
\newcommand{\typepreprint}{\textsf{Preprint submitted \ \today}}


\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}








\newcounter{lastpage}

 \newtheorem{thm}{Theorem}[section]
 \newtheorem{crl}[thm]{Corollary}
 \newtheorem{lem}[thm]{Lemma}
 \newtheorem{prop}[thm]{Proposition}
 \theoremstyle{definition}
 \newtheorem{defn}[thm]{Definition}
 \theoremstyle{remark}
 \newtheorem{rem}[thm]{Remark}
 \newtheorem{exmp}[thm]{Example}


%\def\allauthors{}

\renewcommand{\author}[1]{
\ifx\allauthors\undefined
\def\allauthors{ #1}
\def\allauthorswithcontact{#1: }
\else
\edef\allauthors{\allauthors{,} #1}
\edef\allauthorswithcontact{\allauthorswithcontact{,\par}  { #1:}}
\fi}

\newcommand{\adress}[1]{
\edef\allauthorswithcontact{\allauthorswithcontact{} #1,}
}
\newcommand{\email}[1]{
\edef\allauthorswithcontact{\allauthorswithcontact{} e-mail:#1}
}

%Abstract
\newcommand{\Abstract}[1]{\def\myabstract{#1}}

% Keywords
\newcommand{\Keyword}[1]{
\ifx\mykeywords\undefined
\def\mykeywords{#1 $\cdot$ }
\else
\edef\mykeywords{\mykeywords{}  #1 $\cdot$ }
\fi}

%MSC Classifications

\newcommand{\ClassPrimary}[1]{\def\myclassi{#1}}

\newcommand{\ClassSecondary}[1]{
\ifx\mysec\undefined
\def\mysec{#1 $\cdot$ }
\else
\edef\mysec{\mysec{}  #1 $\cdot$ }
\fi}

\makeatletter
\renewcommand\maketitle{





\ifiwtsproc@preprint
\linenumbers
\else
\renewcommand{\typepreprint}{ISBN: \isbnnumber\ pp~\thepage--\thelastpage
\par \textsf{DOI: \doinumber}}
\fi
   \begin{center}
        {\Huge {\bfseries {\@title}} \par}
        \vspace*{1cm}
        {
				\textbf{\allauthors}\par	}
				
    \end{center}
\begin{minipage}[b]{\textwidth}
\footnotesize
{\noindent \allauthorswithcontact} \par
\end{minipage}						
						
						
				
				
			

\vspace*{-8.2cm}
\hspace*{-3.9cm}
\begin{minipage}[b]{138pt}

\sf%
\tiny
Proceedings Book of International Workshop on \\Theory of Submanifolds\\ June 2--4, 2016, Istanbul, Turkey\\
Editors: Nurettin Cenk Turgay, Elif \" Ozkara Canfes,\\
Joeri van der Veken and Cornelia-Livia Bejan\\
Istanbul 2016,
\typepreprint
\end{minipage}

%		
\vspace*{6.6cm}	
\hspace*{1.8cm}	

\begin{minipage}[b]{315pt}%

{\sf\textbf{Abstract.} \myabstract}

{\sf\textbf{Keywords.} \StrGobbleRight{\mykeywords}{5}.}

{\sf\textbf{MSC 2010 Classification.} Primary: \myclassi ; Secondary:\StrGobbleRight{\mysec}{5}. }
\end{minipage}




}
\numberwithin{equation}{section}
\setcounter{equation}{0}








\newcommand{\acknowldgm}[1]{\section*{Acknowledgements} {\footnotesize  #1}}

\titleformat{\section}
  {\Large\scshape\centering}
  {\arabic{section} \ }{3em}
  {}
  [\titlerule]
  
  \titleformat{\subsection}
  {\large\bfseries\raggedright}
{\arabic{section}.\arabic{subsection}}{0.5em}{}
 
	
	 \titleformat{\subsubsection}
{\normalfont\itshape}
  {\arabic{section}.\arabic{subsection}.\arabic{subsubsection}. \ }{0em}
  {}
	
 

