\ProvidesClass{amas}[2017/02/17]

\LoadClass[12pt]{article}

\RequirePackage{graphicx}

\RequirePackage{fancyhdr}
\RequirePackage{tikz}
\RequirePackage{tikz-cd}

\RequirePackage{amsthm,amssymb}
\RequirePackage{lipsum}
\RequirePackage[pdfstartview=FitH]{hyperref}
%\RequirePackage[croatian]{babel}

%------ubacivanje simbola \dj -------%
\def\crrtic@{\hrule height0.1ex width0.3em}
\def\crttic@{\hrule height0.1ex width0.33em}
\def\ddj@{%
\setbox0\hbox{d}\dimen@=\ht0
\advance\dimen@1ex
\dimen@.45\dimen@
\dimen@ii\expandafter\rem@pt\the\fontdimen\@ne\font\dimen@
\advance\dimen@ii.5ex
\leavevmode\rlap{\raise\dimen@\hbox{\kern\dimen@ii\vbox{\crrtic@}}}}
 \def\DDJ@{%
 \setbox0\hbox{D}\dimen@=.55\ht0
\dimen@ii\expandafter\rem@pt\the\fontdimen\@ne\font\dimen@
 \advance\dimen@ii.15ex % correction for the dash position
 \advance\dimen@ii-.15\fontdimen7\font % correction for cmtt font
 \dimen\thr@@\expandafter\rem@pt\the\fontdimen7\font\dimen@
\leavevmode\rlap{\raise\dimen@\hbox{\kern\dimen@ii\vbox{\crttic@}}}}
 %
 \DeclareTextCommand{\dj}{OT1}{\ddj@ d}
 \DeclareTextCommand{\DJ}{OT1}{\DDJ@ D}
 %---------------------------------------%

\newtheorem{theorem}{Theorem}
\newtheorem{definition}[theorem]{Definition} 
\newtheorem{definitions}[theorem]{Definitions} 
\newtheorem{example}[theorem]{Example}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{prop}[theorem]{Proposition}
%\newtheorem{comment}[theorem]{Comment}
\newtheorem{remarks}[theorem]{Remarks}
\newtheorem{exam}{exam}
\newtheorem{question*}{Question}
\newtheorem{conjecture}[theorem]{Conjecture}


\newcommand{\keywords}[1]{\def\@keywords{#1}}
\newcommand{\msc}[1]{\def\@msc{#1}}


\let\addresses\@empty      
\def\emailaddrname{{\itshape E-mail address: }}
\let\authors\@empty

%ubacivanje autora u authors za naslovnicu(if fi je zbog zareza) i i svega u addresses što ide na kraj

\renewcommand{\author}[2][]{\ifx\authors\empty {\g@addto@macro\authors{\noindent \normalfont \author{#1}{#2}}
	\g@addto@macro\addresses{\noindent \normalfont \author{#1}{#2}  \\}} 
\else {\g@addto@macro\authors{\noindent \normalfont {, \author{#1}{#2}}}
	\g@addto@macro\addresses{\noindent \normalfont \author{#1}{#2}  \\}}
\fi
}
\newcommand{\address}[2][]{\g@addto@macro\addresses{\noindent \normalfont \address{#1}{#2} \\ } }
\newcommand{\email}[2][]{\g@addto@macro\addresses{\noindent \emailaddrname \ttfamily \email{#1}{#2} \\ \newline}}

%sređivanje prve stranice

%\newsavebox{\abstractbox} 
\renewenvironment{abstract}
{
	\hrule height 0.25pt
	\vskip 5pt
	\noindent \textbf{Abstract}
	\vskip 5pt	
}
{
	\vskip 5pt
	\noindent \textit{\small Keywords:~\@keywords}
		
	\noindent \textit{\small Math.\ Subj.\ Class.: \@msc}
	\vskip 5pt
	\hrule height 0.25pt
	\vskip 5pt
} 



\def\@maketitle{%
	\newpage
	\null
	\vskip 2em%
	\begin{center}
	%verzija za web stranicu (bez loga)
	\begin{tiny} ACTA MATHEMATICA SPALATENSIA \end{tiny}  \hfill  \begin{huge}AMAS\end{huge} logo
	
	%verzija_za urednistvo:
	%\tiny {ACTA MATHEMATICA SPALATENSIA}  \hfill  \includegraphics[width=3cm]{logo_ams.pdf}
	\end{center}

	\vskip 2em%
	\begin{center}%
		\let \footnote \thanks
		{\LARGE \textbf \@title \par}%
		\vskip 1.5em%
		{\large
			\lineskip .5em%
			\begin{tabular}[t]{c}%
				\authors
			\end{tabular}\par}%
		\vskip 1em%
	\end{center}%
	\par
	
	\vskip 1.5em}

%\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}

%ubacivanje podataka o autorima na kraj


\AtEndDocument{\vskip 2em  \addresses}


%\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}



%za dodati e-mail adresu pogledati amsdtx, amsclass, amsart-tu se dodaje adresa na kraj i ubacuje sve u addresses


\endinput  