%%% STYLE of the Bozok Journal of Science.
%%% Author: Dr. Tarık Akan
%%% Revision : 1.0
%%% ====================================================================
%%%  @LaTeX-file{
%%%     filename        = "fizik.cls"
%%%     author          = "Dr. Dr. Tarık Akan"
%%%     address         = "Dr. Tarık Akan
%%%                              Yozgat Bozok Üniversitesi
%%%                              Fizik Bölümü"
%%%     telephone       = "(+90) 354-242 10 21/2602"
%%%     email           = "tarik.akan@bozok.edu.tr"
%%%     keywords        = "bozok.cls"
%%%  }
%%% ====================================================================
\RequirePackage{mathptmx}
\renewcommand{\rmdefault}{ptm}
\if@compatibility
\input{amsart.sty}
\else
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{bozok}[2023/10/29 v1.0 YOBU - Bozok Journal of 
Science]
\newif\if@draftcopy
\@draftcopyfalse
\DeclareOption{a5paper}
    {\ClassError{Elektrik}{Option `a5paper' not supported}{}}
\DeclareOption{b5paper}
    {\ClassError{Elektrik}{Option `b5paper' not supported}{}}
\DeclareOption{twocolumn}%
    {\ClassError{Elektrik}{Option `twocolumn' not supported}{}}
\DeclareOption{titlepage}%
    {\ClassError{Elektrik}{Option `titlepage' not supported}{}}
\DeclareOption{draft}
    {\@draftcopytrue
    \setlength\overfullrule{5pt}}
\DeclareOption{final}
    {\@draftcopyfalse
     \setlength\overfullrule{0pt}}
     
\PassOptionsToClass{letterpaper,twoside}{article}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}
\ExecuteOptions{letterpaper,10pt,onecolumn,final}
%%%%%%%%%%%%%%%%% LOGO %%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{graphicx}
\def\ps@myheadings{%
    \def\@oddhead{%
        \hbox{\hbox{
            \includegraphics[height=2.5cm]{logor_bsn.png} % Adjust height as needed
            \hspace{0.5cm} % Add spacing if necessary
        }%
        \hspace{0.5cm}
        \vbox{\huge{Bozok Journal of Science}\\ \\
        \large \textbf{Volume \@vol, No \@sayi, Page \@fpage\textsc{-}\@lpage$\,$(\@yil)}\\ \\
        \textbf{Research Article DOI:\@doi}}}}
        %%
    \def\@oddfoot{\normalfont\hfil \thepage \hfil}%
    \let\@evenhead\@oddhead%
    \def\@evenfoot{\normalfont\hfil \thepage \hfil}%
}


%%%%%%%%%%%%%%%%% CAPTION %%%%%%%%%%%%%%%%%%%%%%


\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\small{ #1}. #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\small { #1}. #2\par}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%% PAGE SIZE DEFINITIONS %%%%%%%%%%%%%%%%


\tolerance=300
\pretolerance=200
\hfuzz=1 true pt
\vfuzz=1 true pt
\parindent=0 true cm
\mathsurround=1 true pt
\parskip=1pt plus .25pt minus .25pt
\normallineskiplimit=.99pt
\hoffset=-1.25cm      %sonradan eklendi.
\voffset=-1.25cm
%\hoffset=-0.1in       %sonradan eklendi.
%\voffset=-0.4in
%\topskip 20truept
\hsize=17 true cm
\vsize=22 true cm
\textwidth=19.2 true cm
\textheight=22 true cm
\oddsidemargin 0cm
\evensidemargin 0cm
\baselineskip=16pt
\lineskiplimit=4.5pt
\lineskip=5.5pt


\newfont{\tarik}{cmr9 scaled \magstep0}
\newfont{\tarikl}{cmr10 scaled \magstep0}
\def\ozbaslik #1{\gdef\@ozbaslik{#1}}
\def\soyad #1{\gdef\@soyad{#1}}
\def\fpage #1{\gdef\@fpage{#1}}
\def\lpage #1{\gdef\@lpage{#1}}
\def\ilksayfa #1{\gdef\@ilksayfa{#1}}
\def\sonsayfa #1{\gdef\@sonsayfa{#1}}
\def\sayi #1{\gdef\@sayi{#1}}
\def\vol #1{\gdef\@vol{#1}}
\def\yil #1{\gdef\@yil{#1}}
\def\doi #1{\gdef\@doi{#1}}
\def\rec #1{\gdef\@rec{#1}}
\def\acc #1{\gdef\@acc{#1}}
\def\finv #1{\gdef\@prin{#1}}
%\def\orc #1{\gdef\@orc{#1}}
\newcommand{\orc}[1]{\footnote{\texttt{#1}}}




\renewcommand{\author}[2][]{
   \gdef\@surnames{#1 \textit{Bozok J. Sci. Vol \@vol,  \@sayi,  \@fpage-\@lpage$\,$(\@yil)}}\gdef\@author{#2}
   \ifx\@empty\@surnames \gdef\@surnames{ Bozok J Sci Vol \@vol,  No \@sayi,  Page \@fpage-\@lpage (\@yil)  }\fi
}



\def\@oddhead{\normalfont\hfil\small\@surnames\hfil}
\def\@oddfoot{\normalfont\hfil \thepage \hfil}
\def\@evenhead{\normalfont\hfil\small\@surnames\hfil}
\def\@evenfoot{\normalfont\hfil \thepage \hfil}

\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\arabic{footnote}}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@0.5em{%
        \hss\@textsuperscript{\normalfont\@thefnmark}} ##1
		    \vspace{-5mm}
		    \begin{center}
 		    \end{center} }%
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \thispagestyle{myheadings}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}

\gdef\@soyad{}
\gdef\@vol{}
\gdef\@fpage{}
\gdef\@lpage{}
\gdef\@yil{}
\gdef\@rec{}
\gdef\@acc{}
\gdef\@finv{}

\def\@maketitle{%
  \newpage
  \null
    \vskip 3em%
  \hrule\vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\fontsize{14pt}{16pt}\selectfont\bfseries \@title \par}%
    \vskip 1.5em%
    \lineskip .5em%
    {\fontsize{10pt}{12pt}\selectfont\begin{tabular}[t]{c}%
      \@author   \\ [-1.4em]  \hline \\ [-.8em] \\  \hline 
    \end{tabular}}
   {\@rec \@acc \@finv}
\\ [-1.4em]
    \vskip 1.5em%
  \end{center}%
}


\renewcommand{\rec}[1]{\footnotesize{\bf Received:} #1 ~~~~~~~~\ \ \textbullet ~~~~~~~~}
\renewcommand{\acc}[1]{\footnotesize{\bf Accepted/Published Online:} #1 ~~~~~~~~\ \ \textbullet ~~~~~~~~}
\renewcommand{\finv}[1]{\footnotesize{\bf Final Version:} #1}

\RequirePackage[authoryear]{natbib} 

\renewenvironment{thebibliography}[1]
     {\section*{\refname}
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}
     \list{}%
           {\setlength{\labelwidth}{0pt}  % No numbering
            \setlength{\leftmargin}{0pt}
            \setlength{\itemindent}{-2pt} % Hanging indent
            \setlength{\parsep}{6pt}  % Space between entries
            \setlength{\parskip}{0pt}
            \renewcommand\theenumiv{}}%
      \sloppy
      \small}
     {\endlist}



\renewenvironment{abstract}{%
\vskip 1em \small 
\noindent     {\bfseries \abstractname \vspace{\z@}$\mbox{\!}$} 
}
   {\endquotation}

\newbox{\tempbox}
\newlength{\tcaplen}
\newlength{\ttcaplen}
\newcommand{\tablo}[2]{
    \par\vspace{10pt}\sbox{\tempbox}{\small{\textbf #1} #2}
    \ifdim \wd\tempbox > \linewidth
       \settowidth\tcaplen{\small\textbf #1\ }
        \setlength\ttcaplen\linewidth
        \addtolength{\ttcaplen}{-\tcaplen}
        {\noindent\small\mbox{{\bf #1\ }}\parbox[t]{\ttcaplen}{#2}}
    \else
    {\centerline{\small{\bf #1\ } #2}}
    \fi
}



\def\proof{\ifdim\lastskip <\bigskipamount\removelastskip\fi
             \vskip -\parskip
             \vskip\smallskipamount\noindent \rm{\bf Proof } }
\def\endproof{\smallskip\nopagebreak\hfill$\fbox{}$\\[\smallskipamount]}

\newcommand\zsection{\@startsection {section}{1}{\z@}%
                      {-3.5ex \@plus -1ex \@minus -.2ex}%
                      {.5ex \@plus.2ex}%
                      {\centering\normalfont\bfseries}}%\normalsize
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {.5ex \@plus.2ex}%
                                   {\normalfont\bfseries\MakeUppercase}}%\normalsize
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.5ex \@plus .2ex}%
                                     {\normalfont\bfseries}}%\normalsize
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.5ex \@plus .2ex}%
                                     {\normalfont\bfseries}}%\normalsize

\renewcommand\@seccntformat[1]{\csname the#1\endcsname.~}

 \if@draftcopy\renewcommand\baselinestretch{2}\else
  \renewcommand\baselinestretch{}\fi
  
  \newcommand{\keywords}[1]{\par\vskip 0.2cm \noindent
{\bf Key words:} #1}

\endinput
