%% --- This is the .cls file for Journal of Vibration Testing and System Dynamics
%% ---Copyright 2017


% --- Class structure: declaration of options part
% --- article paramters: 11 pt, two side
% This class extends the article class

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{jvtsde}
  [2017/12/28 v0.2e Journal of Vibration Testing and System Dynamics
   article document class]
%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} used only when sent options from .tex
\PassOptionsToClass{11pt,twoside}{article}
\ProcessOptions
\LoadClass{article}

% --- Class structure: associated packages
% ---
\RequirePackage{multicol,float,fancyhdr}
\RequirePackage{amsmath,amsthm,amssymb,amsfonts}
\RequirePackage{lastpage}  % otain page number
%\RequirePackage{indentfirst,url}
%\RequirePackage{graphicx,subfigure,picins}
%\RequirePackage{textcomp}
%\RequirePackage{booktabs, tabularx}


% --- Class structure: layout setting
% ---

\paperheight 279.4mm%
\paperwidth  215.9mm%

%\ifx\pdfoutput\undefined % We're not running pdftex
  \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
%\else
%  \setlength\pdfpagewidth{\paperwidth}%
%  \setlength\pdfpageheight{\paperheight}%
%\fi
\textheight      231.78mm%
\textwidth       171.45mm%
\topmargin       -12.6mm%
\oddsidemargin     -6mm%
\evensidemargin    -6mm%
\columnsep         5mm%
\headheight 15pt
\headsep 12pt
\parskip \z@ plus \z@ minus \z@

\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{courier}

\usepackage[small]{caption2}
\renewcommand{\captionlabeldelim}{\ }

\usepackage{lscape}
\usepackage{cite}
\usepackage{bm}
\usepackage{latexsym}
\usepackage{slashbox}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{cases}
\usepackage{graphicx}
%\usepackage{diagrams}
\usepackage{upgreek}
\usepackage{pifont}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{esint}
\usepackage{titlesec}
\usepackage{xargs}
\usepackage{textcomp,booktabs}
\usepackage[usenames,dvipsnames]{color}
\usepackage{colortbl}
\definecolor{mygray}{gray}{.9}
\definecolor{mypink}{rgb}{.99,.91,.95}
\definecolor{mycyan}{cmyk}{.3,0,0,0}

\renewcommand \thefigure {\arabic{figure}}    %
\renewcommand \thetable {\arabic{table}}   %
\renewcommand\theequation {\arabic{equation}}%

\renewcommand\thesection{\arabic{section}}
\titleformat{\section}{\normalsize\bfseries}{\thesection}{.5em}{}
\titlespacing*{\section}{0mm}{24pt}{12pt}%
\titleformat{\subsection}{\normalsize\bfseries}{\arabic{section}.\arabic{subsection}}{1em}{}
\titlespacing*{\subsection}{0mm}{3mm}{3mm}
\titleformat{\subsubsection}{\normalsize\bfseries}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}{1em}{}
\titlespacing*{\subsubsection}{0mm}{1.5mm}{1.5mm}

\setlength{\arraycolsep}{0.5mm}

\newcommand{\first}[1]{\begin{figure}[h!]
\vspace*{-4mm} \doublerulesep 0.1pt \tabcolsep 7.8mm
\setlength{\tabcolsep}{3.5pt}
\begin{tabular*}{ 171.45mm}{>{\sf }ccc}
\hline\hline\hline\hline
%\\[-3mm]
\hspace*{1.45mm}\includegraphics[width=1.71cm, height=2.37cm]{JVTSD.eps}\hspace*{3mm} &
\multicolumn{1}{>{\columncolor{mygray}}l}{
\raisebox{5.5ex}[0pt][0pt]{\parbox[t]{116mm}{\centering \Large Journal of Vibration Testing and System Dynamics\\[4mm]
\scriptsize
Journal homepage: https://lhscientificpublishing.com/Journals/JVTSD-Default.aspx
}} } &
\hspace*{3mm}\includegraphics{LOGO.eps}\\
\hline\hline\hline\hline
\end{tabular*}
\end{figure}
{\noindent{\Large\rm #1}}}


\renewcommand{\qed}{\hfill $\blacksquare$}
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \bfseries
    #1.\@addpunct{}]\mbox{}
}{%
  \popQED
}

\def\corrauth#1{\footnote{Corresponding author.\\Email address: #1}~}
\newcommandx{\Abstract}[7][2= Keyword 1, 3=Albert Luo, 4=01-09-2021, 5=01-09-2021, 6=01-09-2021, 7= 2022]{\abstract{
		\begin{table}[h!]
			\vspace*{-5mm} \doublerulesep 0.05pt \tabcolsep 7.8mm \vspace*{2mm}
			\setlength{\tabcolsep}{7.5pt}
			\hspace*{-2.5mm}\begin{tabular*}{17.145cm}{r|||||l}
				%\hline
				\multicolumn{2}{l}{\rule[-6pt]{17.145cm}{.01pt}}\\
				\parbox[t]{6cm}{\small
					\vspace*{.5mm}
					\hfill {\bf Submission Info}\par
					\vspace*{2mm}
					\hfill Communicated by #3\par
					\hfill Received #4 \par
					\hfill Accepted #5\par
					\hfill Available online #6\par
					\noindent\rule[-2pt]{6.3cm}{.1pt}\par
					\vspace*{2mm}
					\hfill {\bf Keywords}\par
					\vspace*{2mm}
					#2
				}
				&
				\parbox[t]{10.5cm}{
					\vspace*{.5mm}
					{\normalsize\bf Abstract}\par
					\renewcommand{\baselinestretch}{.8}
					\normalsize \vspace*{2mm} {\small #1 }
					\par
					\par
					\par
					\hfill{\scriptsize\copyright #7}}\\[-4mm]
				&\\
				\multicolumn{2}{l}{\rule[15pt]{17.145cm}{.01pt}}\\\end{tabular*}
			\vspace*{-7mm}
		\end{table}
}}


\def\floatenv{\footnotesize\let\center\Center}
\renewenvironment{table}
               {\floatenv
               \renewcommand{\arraystretch}{1.3}
               \tabcolsep 22pt
               \doublerulesep 0.1pt
                \abovecaptionskip\z@\belowcaptionskip3\p@\@float{table}}
               {\end@float}



% --- Class structure: Header and footer
% --- First page:The header displays the Journal and the corresponding issue; the footer shows the corresponding author and email address
% --- Following page: Journal issue at center, number at the left of even page and at the right of odd page
% --- \mbox{} aovid unexpected linke break
% ---

\fancypagestyle{firstpage}{%
  \fancyhf{}%

  \fancyfoot[LO,LE]{\footnotesize
  ISSN~2475-4811,~eISSN~2475\mbox{-}482X/\$\mbox{-}see~front~materials~\copyright~\jvtsd@year~L\&H~Scientific~Publishing,~LLC.~All~rights~reserved.
  \rm DOI:10.5890/JVTSD.\jvtsd@year.\jvtsd@month.\jvtsd@number}

  \renewcommand{\headrulewidth}{0pt}%
  \renewcommand{\footrulewidth}{0pt}%
}

\fancypagestyle{followingpage}{%
	\fancyhf{}
	
	\fancyhead[CE,CO]{\footnotesize%\MakeUppercase
	%\it\hfill \jvtsd@titlemark }
	\it\centering \jvtsd@titlemark }
	
	\fancyhead[LE,RO]{\footnotesize{\thepage}}
	
	\renewcommand{\headrulewidth}{0pt}%
	\renewcommand{\footrulewidth}{0pt}%
}

\pagestyle{followingpage}



% --- Class structure: parameters and commands
% --- define volumn, issue
% --- define year month, number, eg 2018.01.001
% --- define starting page
% ---
\def\jvtsd@volume{1}
\def\jvtsd@issue{1}
\newcommand{\setVolume}[2]{%
  \def\jvtsd@year{#1}%
  \def\jvtsd@volume{#1}%
  \def\jvtsd@issue{#2}%
}

\def\jvtsd@year{2020}
\def\jvtsd@month{01}
\def\jvtsd@number{001}
\newcommand{\setIndex}[3]{%
  \def\jvtsd@year{#1}%
  \def\jvtsd@month{#2}%
  \def\jvtsd@number{#3}%
}
\newcommand{\setPage}[1]{ %
  \setcounter{page}{#1}
}




% --- Class structure:  footnote indent
% ---
\renewcommand\@makefntext[1]{%
    \parindent 0\p@
    \noindent
    \mbox{\@makefnmark} #1}

\renewcommand\thefootnote{\@alph\c@footnote}

% --- Class structure: publication inforamtion
% --- #1: firstpage,  #2: last page
\def\jvtsd@pubinfo#1#2{%
%Journal of Vibration Testing and System Dynamics, VOL. \jvtsd@volume, NO. \jvtsd@number, \jvtsd@year, #1--#2
\centering Journal of Vibration Testing and System Dynamics \jvtsd@issue(\jvtsd@volume) (\jvtsd@year) #1-#2}

% % address and zipcode
\newcommand\address[1]{\gdef\@address{\noindent\rm #1}}
\def\@address{\@latex@warning@no@line{No \noexpand\address given}}

\let\@date\@empty
\newcommand\zipcode[1]{\mbox{\rm #1}}

% --- Class structure: make titile
% ---
\let\jvtsd@titlemark\@empty
\newcommand\titlemark[1]{\gdef\jvtsd@titlemark{#1}}
\let\jvtsd@authormark\@empty
\newcommand\authormark[1]{\gdef\jvtsd@authormark{#1}}

\def\@maketitle{%
  \begingroup
    \let\footnote\thanks
    \noindent
    \raisebox{25\p@}[0\p@][0\p@]{\parbox[t]{\textwidth}
      {\footnotesize\jvtsd@pubinfo{\thepage}{\pageref{LastPage}}}}%
%    \begin{center}
    \vskip -10\p@\bfseries\Large%
      \first{\@title}%
      \vskip 12\p@
      \normalfont\large \noindent
      \@author\vskip 5\p@%
      \it\small\renewcommand{\baselinestretch}{1.5}\selectfont%
      \@address\vskip 9\p@%
      \normalfont\@date\par
%    \end{center}%
  \endgroup
  \@abstract
  \mainrule
}
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@0em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{firstpage}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\@thanks\@empty
  \global\let\@title\@empty
  \global\let\@author\@empty
  \global\let\@address\@empty
  \global\let\@date\@empty
  \global\let\thanks\relax
  \global\let\title\relax
  \global\let\author\relax
  \global\let\address\relax
  \global\let\date\relax
  \global\let\@abstract\@empty
  \global\let\@keywords\@empty
  \global\let\abstract\relax
  \global\let\keywords\relax
  \global\let\@maketitle\relax
  \global\let\maketitle\relax
  \global\let\and\relax
%  \begin{multicols}{2}
}
\let\@abstract\@empty
\let\@keywords\@empty
\let\@doi\@empty
%\renewcommand\abstract[1]{
%  \def\@abstract{%
%    \quotation\item\relax\small
%    \vskip -10\p@\centerline{\bf ABSTRACT}\vskip 3\p@
%    #1\par
%    \vskip 7\p@\@keywords\@doi
%    \vskip\baselineskip\endquotation}}

% --- Class structure: abstract
% ---

\renewcommand\abstract[1]{
  \def\@abstract{%
    \quotation\item\relax\small
    \vskip -50\p@\centerline{\bf }\vskip 0\p@
    #1\par
    \vskip 0\p@\@keywords\@doi
    \vskip\baselineskip\endquotation}}

\newcommand\keywords[1]{
  \def\@keywords{%
    \begingroup
    \settowidth{\@tempdima}{\textbf{Key words}:}
    \list{}{\leftmargin\@tempdima
            \itemindent-\leftmargin
            \labelwidth\z@
            \advance\leftmargin\labelsep}
    \item[\textbf{Key words}:]
    #1\par\endlist
    \endgroup}}
\newcommand\doi[1]{
  \def\@doi{%
    \noindent\text{DOI}: #1\par}}
\newcommand\mainrule{\vspace*{-13mm}}
%\newcommand\mainrule{%
%  \begin{center}
%  \rule{0.3\textwidth}{2pt}
%  \end{center}
%  \vspace*{2ex}}
%\renewcommand\section{\@startsection {section}{1}{\z@}%
%                                   {-\baselineskip}%
%                                   {\baselineskip}%
%                                   {\normalfont\normalsize\bfseries}}
%\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
%                                     {-.5\baselineskip}%
%                                     {.5\baselineskip}%
%                                     {\normalfont\normalsize\bfseries\itshape}}
%\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
%                                     {-.5\baselineskip}%
%                                     {.25\baselineskip}%
%                                     {\normalfont\normalsize\itshape}}
%\newcommand\jvtsd@thesection{\@arabic\c@section.}
%\newcommand\jvtsd@thesubsection{\mbox{\bf\thesection.\@arabic\c@subsection}}
%\newcommand\jvtsd@thesubsubsection{\mbox{\rm\thesubsection.\@arabic\c@subsubsection}}
%\def\@seccntformat#1{\csname jndc@the#1\endcsname\quad}




%\renewenvironment{figure}
%               {\@float{figure}[H]}
%               {\end@float}
%\renewenvironment{table}
%               {\@float{table}[H]\small}
%               {\end@float}
%\renewenvironment{table*}
%               {\@ifnextchar[{\jvtsd@xdblfloat{table}}{\jvtsd@dblfloat{table}}}
%               {\end@dblfloat}
\def\jvtsd@xdblfloat#1[#2]{\@dblfloat{#1}[#2]\small}
\def\jvtsd@dblfloat#1{\@dblfloat{#1}\small}
\newenvironment{widetabular}[2][\linewidth]
  {\begin{tabular*}{#1}{@{\space\extracolsep{\fill}}#2@{\space}}}
  {\end{tabular*}}
\renewcommand\figurename{\bf Fig.}
\renewcommand\tablename{\bf Table}
\long\def\jvtsd@makefigcaption#1#2{%
  \abovecaptionskip \baselineskip%
  \belowcaptionskip \z@%
  \vskip\abovecaptionskip\small
  \list{}{\leftmargin \jvtsd@figmargin\rightmargin\leftmargin%
          \topsep\z@\partopsep\z@\itemsep\z@\parsep\z@}%
  \item\relax
  \sbox\@tempboxa{\mbox{\bf #1.} #2}%
  \ifdim \wd\@tempboxa >\hsize
    \mbox{\bf #1.} #2\par
  \else
    \global \@minipagefalse
    {\hfil\box\@tempboxa\hfil}%
  \fi
  \endlist
  \vskip\belowcaptionskip}
\long\def\jvtsd@maketabcaption#1#2{%
  \abovecaptionskip \z@%
  \belowcaptionskip .5\baselineskip%
  \vskip\abovecaptionskip\small
  \mbox{\bf #1.} #2\par
  \vskip\belowcaptionskip}
\newdimen\jvtsd@figwidth
\newdimen\jvtsd@figmargin
\newcommand\figcaption[2][\linewidth]{%
  \setlength\jvtsd@figwidth{#1}
  \jvtsd@figmargin\linewidth
  \advance\jvtsd@figmargin-\jvtsd@figwidth
  \divide\jvtsd@figmargin 2
  \let\jvtsd@makecaption\@makecaption%
  \let\@makecaption\jvtsd@makefigcaption%
  \caption{#2}%
  \let\@makecaption\jvtsd@makecaption%
}
\newcommand\tabcaption[1]{%
  \let\jvtsd@makecaption\@makecaption%
  \let\@makecaption\jvtsd@maketabcaption%
  \caption{#1}%
  \let\@makecaption\jvtsd@makecaption%
}
\newcommand\figcontinue{\addtocounter{figure}{-1}}
\newcommand\tabnote[1]{%
  \begingroup
    \footnotesize
    \vskip\baselineskip
    \parindent\z@
    #1
  \endgroup
}
\def\toprule{\noalign{\ifnum0=`}\fi \hrule \@height 0.75pt \hrule \@height 3pt \@width 0pt \futurelet
   \@tempa\@xhline}
\def\midrule{\noalign{\ifnum0=`}\fi \hrule \@height 3.25pt \@width 0pt \hrule \@height 0.5pt
    \hrule \@height 3pt \@width 0pt \futurelet \@tempa\@xhline}
\def\botrule{\noalign{\ifnum0=`}\fi \hrule \@height 2.75pt \@width 0pt \hrule \@height 0.75pt \futurelet
   \@tempa\@xhline}
\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
\textfloatsep \baselineskip
\intextsep \baselineskip
\floatsep \baselineskip
\dbltextfloatsep \baselineskip
\dblfloatsep \baselineskip
\abovedisplayskip .5\baselineskip
\belowdisplayskip .5\baselineskip
\newenvironment{acknowledgements}{%
  \vskip\baselineskip
  \small\bfseries\itshape Acknowledgements.\quad
  \small\normalfont\baselineskip=11pt}
  {\normalsize\normalfont}%
\renewcommand\refname{References}

\renewcommand{\qed}{\hfill $\blacksquare$}
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \bfseries
    #1.\@addpunct{}]\mbox{}
}{%
  \qed
}


\renewenvironment{thebibliography}[1]
     {\section*{\refname}
      \small\baselineskip=11pt%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin 0em\itemindent 0em \leftmargin 1em
            \parsep\z@\itemsep\z@
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%\bibsep\z@
%\def\bibfont{\small}
\renewcommand\appendix{\par
  \section*{\rm Appendix}
  \normalsize
  \setcounter{equation}{0}%
  \def\cl@section{\@elt{subsection}}%
  \renewcommand\theequation{A\@arabic\c@equation}%
  \setcounter{secnumdepth}{0}
  \renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-\baselineskip}%
                                   {\baselineskip}%
                                   {\normalfont\normalsize\bfseries}}
  \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-.5\baselineskip}%
                                     {.5\baselineskip}%
                                     {\normalfont\normalsize\bfseries\itshape}}
  \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-.5\baselineskip}%
                                     {.25\baselineskip}%
                                     {\normalfont\normalsize\itshape}}
}
%\renewcommand\@biblabel[1]{\ \ }
%\def\@biblabel#1{#1.}

\endinput
%%
%% End of file `jvtsde.cls'.
