% Sinopfbd DOCUMENT CLASS -- version 1 for LaTeX2e
%
% LaTeX document class for Sinop University Journal of Natural Sciences
%
%%  Edited by Dr. Murat UZUNCA from Mathematics Department of Sinop University
%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Sinopfbd}[2022/10/20 Sinop Uni J Nat Sci Paper Class]
\LoadClass[11pt,a4paper]{article}

\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{times}
\RequirePackage{amsmath,amssymb}
\RequirePackage{amsthm,latexsym}
\RequirePackage{bm,multirow,framed,ragged2e}       
\RequirePackage{graphicx}
\graphicspath{{./Figures/}}
\RequirePackage{xcolor}
\RequirePackage{placeins}
\RequirePackage{setspace}
\RequirePackage{doi}
\RequirePackage{titlesec,tcolorbox}
\RequirePackage[labelfont={bf,it},textfont=it]{caption}
\RequirePackage{array}
\captionsetup{labelsep = period}
\captionsetup[table]{skip=0pt}
\captionsetup[figure]{skip=5pt}
\RequirePackage{cite}

\RequirePackage{mfirstuc}
\MFUnocap{are}
\MFUnocap{is}
\MFUnocap{of}
\MFUnocap{or}
\MFUnocap{etc}
\MFUnocap{and}
\MFUnocap{ve}
\MFUnocap{veya}
\MFUnocap{ile}


% set page geometry
\RequirePackage[verbose=true,a4paper]{geometry}
\AtBeginDocument{
  \newgeometry{
    textheight=27.94cm,
    textwidth=21.59cm,
    margin = 2.5cm,
		top=3.00cm, 
		headsep=0.25cm, 
		footskip=1.07cm
  }
}

%default options
\newif\ift@rkish \t@rkishtrue
\newif\ift@rkish \t@rkishtrue

%Language
\DeclareOption{tr}{\t@rkishtrue}
\DeclareOption{en}{\t@rkishfalse}

%Unspecified input handler
\DeclareOption*{Invalid Option \CurrentOption }
\ProcessOptions\relax
 

\titleformat*{\section}{\large \bf }
\titleformat*{\subsection}{\large \bf }
\titleformat*{\subsubsection}{\large \bf }

\newif\ifturkish
\ift@rkish
\turkishtrue 
\else
\turkishfalse
\fi


\newcommand*{\titleTr}[1]{\gdef\@titleTr{#1}
}%
\newcommand*{\titleEn}[1]{\gdef\@titleEn{#1}
}%
\newcommand*{\abstractTr}[1]{\gdef\@abstractTr{#1}
}%
\newcommand*{\abstractEn}[1]{\gdef\@abstractEn{#1}
}%
\newcommand*{\keywordsTr}[1]{\gdef\@keywordsTr{#1}
}%
\newcommand*{\keywordsEn}[1]{\gdef\@keywordsEn{#1}
}%
\newcommand*{\hlinewd}[1]{\noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
\reserved@a\@xhline
}%


\setlength{\parindent}{0pt}
%%% TURKISH Text Templates
\ift@rkish
\renewcommand\refname{\large Kaynaklar}
\renewcommand{\figurename}{Şekil}
\renewcommand{\tablename}{Tablo}
\def\@titleone{\@titleTr}
\def\@titletwo{\@titleEn}
\def\@abstractone{\@abstractTr}
\def\@abstracttwo{\@abstractEn}
\def\@keywordsone{\@keywordsTr}
\def\@keywordstwo{\@keywordsEn}
\def\@absnameone{Öz}
\def\@absnametwo{Abstract}
\def\@keynameone{Anahtar Kelimeler}
\def\@keynametwo{Keywords}
\newtheorem{thm}{Teorem}
\newtheorem{lem}{Önsav}
\newtheorem{prop}{Önerme}
\newtheorem{cor}{Sonuç}
\newtheorem{defn}{Tanım}
\newtheorem{exmp}{Örnek}
\newtheorem{rem}{Yorum}
\newtheorem{note}{Not}
\renewcommand*{\proofname}{İspat}
%%% ENGLISH Text Templates
\else
\renewcommand\refname{\large References}
\def\@titleone{\@titleEn}
\def\@titletwo{\@titleTr}
\def\@abstractone{\@abstractEn}
\def\@abstracttwo{\@abstractTr}
\def\@keywordsone{\@keywordsEn}
\def\@keywordstwo{\@keywordsTr}
\def\@absnameone{Abstract}
\def\@absnametwo{Öz}
\def\@keynameone{Keywords}
\def\@keynametwo{Anahtar Kelimeler}
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{defn}{Definition}
\newtheorem{exmp}{Example}
\newtheorem{rem}{Remark}
\newtheorem{note}{Note}
\fi

\doublespacing

% create title 
\providecommand{\@maketitle}{}
\renewcommand{\@maketitle}{%
\begin{center}
{\Large \bf \@titleone\par}
\end{center}
%\vskip 0.1in
\noindent {\bf \@absnameone} \par
\@abstractone 
\vskip 5pt
\noindent {\bf \@keynameone:} \@keywordsone \par
\vskip 7pt
\begin{center}
{\Large \bf \@titletwo\par}
\end{center}
%\vskip 0.1in
\noindent {\bf \@absnametwo} \par
\@abstracttwo 
\vskip 5pt
\noindent {\bf \@keynametwo:} \@keywordstwo \par
}


\RequirePackage{hyperref}
\hypersetup{nolinks=true}

%              standard font size
%command	       10pt	11pt	12pt

%\tiny	         5pt	6pt	6pt
%\scriptsize	   7pt	8pt	8pt
%\footnotesize	 8pt	9pt	10pt
%\small	         9pt	10pt	11pt
%\normalsize	   10pt	11pt	12pt
%\large	         12pt	12pt	14pt
%\Large	         14pt	14pt	17pt
%\LARGE	         17pt	17pt	20pt
%\huge	         20pt	20pt	25pt
%\Huge	         25pt	25pt	25pt

\endinput
