% jktram.sty
% LaTeX style/package 

% A short sample is at the tail of this file.


\typeout{LaTeX2.09 and LaTeX2e style for 
    ``Journal of Knot Theory and Its Ramifications''.
}
\typeout{K.Kodama(kodama@kobe-kosen.ac.jp), 2001-06-10, 2001-06-23.}
\typeout{1. Write down in pencil a short title 
    to be used as the running head.}
\typeout{2. Number each page of the manuscript lightly 
    at the botton with a blue pencil.}
\typeout{3. A short sample is at the tail of this file.}
\typeout{4. See also 
    http://www.wspc.com.sg/others/style_files/journal/journals_style_files.html}
%

%--------------------------------------------------------------------------
\newcommand{\textlineskip}{\baselineskip=13pt}
\newcommand{\smalllineskip}{\baselineskip=10pt}

%--------------------------------------------------------------------------
%MACRO FOR PUBLISHER INFORMATION SECTION
\newcommand{\pub}[1]{{\begin{center}\footnotesize\smalllineskip 
    Received #1\\
    \rule{0pt}{0pt}\phantom{Revised}\rule{0pt}{0pt}
    \end{center}
    }}
\newcommand{\publisher}[2]{{\begin{center}\footnotesize\smalllineskip 
    Received #1\\
    Revised #2
        \end{center}
    }}
\newcommand{\phantompublisher}[2]{{\begin{center}\footnotesize\smalllineskip 
            \rule{0pt}{0pt}\phantom{Received #1}\rule{0pt}{0pt}\\
            \rule{0pt}{0pt}\phantom{Revised #2}\rule{0pt}{0pt}
        \end{center}
    }}
%--------------------------------------------------------------------------
%  MARCO FOR KEYWORDS BLOCK
\def\keywords#1{{ 
    \centering{\begin{minipage}{4.5in}\footnotesize\baselineskip=10pt
    {\footnotesize\it Keywords}\/: #1
    \end{minipage}}\par}}
%--------------------------------------------------------------------------
%MACRO FOR RUNNINGHEAD
\def\runninghead#1#2{\pagestyle{myheadings}
\markboth{{\protect\footnotesize\it{\quad #1}}\hfill}
{\hfill{\protect\footnotesize\it{#2\quad}}}}

%%%%%%%% Set Page Number
\def\setpagenumber#1{\c@page=#1}

%%%%%%%% Copyright Heading
\def\copyrightheading#1{\gdef\@copyrightheading{#1}\thispagestyle{copyrightpage}}
\def\ps@copyrightpage{%
    \def\@oddhead{\footnotesize 
        \rlap{\raisebox{10pt}{Journal of Knot Theory and Its Ramifications, \@copyrightheading}}
        {\kern-3pt\mbox{\copyright\kern2pt World Scientific Publishing Company}}
        \hfill}
    \def\@oddfoot{\footnotesize\hspace*{\fill}\thepage\hspace*{\fill}}
    \def\@evenhead{\@oddhead}
    \def\@evenfoot{\@oddfoot}
}

%%%%%%%% Main Text
\oddsidemargin=\evensidemargin
\addtolength{\oddsidemargin}{-30pt}
\addtolength{\evensidemargin}{-30pt}
\headsep=15pt
%\topmargin=0mm
\textheight=7.8in \textwidth=5in
\baselineskip=13pt % for main text
\pagestyle{empty}

%%%%%%%%%% Theorems, lemmas, etc.

\def\@thmcounter#1{\noexpand\arabic{#1}}
\def\@thmcountersep{.}

% \newtheorem{theorem}{Theorem} % WHICH HAS __NO__ SECTION NUMBER
\newtheorem{theorem}{Theorem}[section] % WHICH HAS SECTION NUMBER
\newtheorem{cor}[theorem]{Corollary}
% \newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
% \newtheorem{df}[theorem]{Definition}
\newtheorem{ex}[theorem]{Example}
% \newtheorem{example}[theorem]{Example}
\newtheorem{lemma}[theorem]{Lemma}
% \newtheorem{lem}[theorem]{Lemma}
\newtheorem{prop}[theorem]{Proposition}
% \newtheorem{proposition}[theorem]{Proposition}
\newtheorem{rem}[theorem]{Remark}
% \newtheorem{remark}[theorem]{Remark}

\def\@begintheorem#1#2{\it 
    \trivlist \item[\hskip \parindent{\bf #1\ #2.}]%
    \def\@currentlabel{{\bf #2}}%
}
\def\@opargbegintheorem#1#2#3{\it 
    %\trivlist \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]%
    \trivlist \item[\hskip \parindent{\bf #1\ #2\ (#3)}]%
    \def\@currentlabel{{\bf #2}}%
}


%%%%%%%%%% Proof
\newenvironment{proof}{\trivlist \item[\hskip \parindent{\bf Proof.}]}{%
% \hspace*{\fill}%
\quad %
{\fboxsep2.4pt\fboxrule0.4pt\raisebox{0.6ex}{\fbox{}}}
%$\Box$
\endtrivlist}

%%%%%%%%%%%% Title
\def\@maketitle{\newpage \null \vskip 2em 
    \begin{center}
        {\bf \@title \par} \vskip 1.5em 
        {\small \lineskip .5em
            \begin{tabular}[t]{c}\@author \end{tabular}\par} 
    \end{center}
    \par} 

%%%%%%%%% Abstract
\def\abstract{\if@twocolumn \section*{Abstract}
    \else \footnotesize \baselineskip=10pt % 8pt
    \begin{center}ABSTRACT\end{center}
    \quotation 
    \fi}
\def\quotation{\list{}{%
        \listparindent 1.5em 
        \itemindent\listparindent
        \leftmargin=0.25in
        \rightmargin\leftmargin
        \parsep 0pt plus 1pt}\item[]}

%%%%%%%%% Section
\newfont{\@secbitx}{cmbxti10} % Bold Italic 10pt

\def\thesection{\noexpand\bf\arabic{section}}
\def\thesubsection{\noexpand\bf\arabic{section}.\arabic{subsection}}
\def\thesubsubsection{\noexpand\rm\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
\def\theparagraph{\noexpand\rm\thesubsubsection.\arabic{paragraph}}
\def\thesubparagraph{\noexpand\rm\theparagraph.\arabic{subparagraph}}
% c.f. art10.sty
\def\section{\@startsection {section}{1}{\z@}%
    {-3.5ex plus -1ex minus -.2ex}{2.3ex plus .2ex}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
    {-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\@secbitx}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
    {-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\it}}
\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
    \par \@tempskipa #4\relax
    \@afterindenttrue
    \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
    \if@nobreak \everypar{}\else
    \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
    {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}

\def\@secthead{}
% \def\@secthead{\S} % section mark

\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
    \def\@svsec{}\else 
    \refstepcounter{#1}\edef\@svsec{%
        \@secthead{}%
        \csname the#1\endcsname%
        {.}%
        \hskip 1em }\fi
    \@tempskipa #5\relax
    \ifdim \@tempskipa>\z@ 
    \begingroup #6\relax
    \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
    \endgroup
    \csname #1mark\endcsname{#7}\addcontentsline
    {toc}{#1}{\ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname}\fi
        #7}\else
    \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
        {#7}\addcontentsline
        {toc}{#1}{\ifnum #2>\c@secnumdepth \else
            \protect\numberline{\csname the#1\endcsname}\fi
            #7}}\fi
    \@xsect{#5}}

%%%%%%%%%% Lists of Items
\def\labelitemi{$\bullet$}
\def\theenumi{\roman{enumi}}
\def\labelenumi{(\theenumi)}
\def\theenumii{\alph{enumii}}
\def\labelenumii{(\theenumii)}
\def\theenumiii{\arabic{enumiii}}
\def\labelenumiii{(\theenumiii)}

%%%%%% Equations
\@addtoreset{equation}{section}
% c.f. latex.tex
\def\equation{$$ % $$ BRACE MATCHING HACK
    \stepcounter{equation}
    \def\@currentlabel{{\rm \arabic{section}.\theequation}}
    }
\def\@eqnnum{{\rm (\arabic{section}.\theequation)}} 

%%%%%% Figure and Table
% c.f. latex.tex
\def\caption{\refstepcounter\@captype \@dblarg{\@caption\@captype}}
\long\def\@caption#1[#2]#3{%
    \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
    \begingroup \@parboxrestore
    \footnotesize\rm\baselineskip10pt  %\normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
    \endgroup}
% c.f. article.sty
\def\fnum@figure{Fig.~\thefigure}
\def\fnum@table{Table~\thetable}
\long\def\@makecaption#1#2{ \vskip 10pt 
    \setbox\@tempboxa\hbox{#1. #2}
    \ifdim \wd\@tempboxa >\hsize #1. #2\par 
    \else \hbox to\hsize{\hfil\box\@tempboxa\hfil} 
    \fi}

%%%%%%%%%%% Footnotes
\def\thefootnote{\arabic{footnote}}

%%%%%%%%%% References
\def\thebibliography#1{\section*{References\@mkboth{REFERENCES}{REFERENCES}}
    \small % 9pt
    \list
    {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus .07em}
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}

%%%%%% Appendix
\def\appendix{\par
    \setcounter{section}{0}
    \def\@secthead{{\noexpand\bf Appendix}}
    \def\thesection{\noexpand\bf\Alph{section}}
    \def\thesubsection{\noexpand\bf\Alph{section}.\arabic{subsection}}
    \def\thesubsubsection{\noexpand\rm\Alph{section}.\arabic{subsection}.\arabic{subsubsection}}
    \setcounter{theorem}{0}
    \def\thetheorem{\Alph{section}.\arabic{theorem}}
    \setcounter{figure}{0}
    \def\thefigure{\Alph{section}.\arabic{figure}}
    \setcounter{table}{0}
    \def\thetable{\Alph{section}.\arabic{table}}
    \def\equation{$$ % $$ BRACE MATCHING HACK
        \stepcounter{equation}
        \def\@currentlabel{{\rm \Alph{section}.\theequation}}
        }
    \def\@eqnnum{{\rm (\Alph{section}.\theequation)}} 
    }

\endinput


%%%%%%%%%%% sample %%%%%%%%%%%%%
%LaTeX
% Sample of jktram.sty
%%%%% Choose LaTeX2e or LaTeX2.09 %%%%%
%%%% LaTeX2.09
%\documentstyle[twoside,jktram]{article}
%%%%
%%%% LaTeX2e
\documentclass[twoside]{article}
\usepackage{jktram}
%%%%

\begin{document}
%\runninghead{Authors here.}
%{Sample for Typesetting Camera-Ready Manuscript}

\setpagenumber{1} 
\label{head:of:text} %% Recommended. label of the first page.

\title{TITLE IN UPPER CASE}
\author{AUTHOR IN UPPER CASE\thanks{Sample thanks. Marked symbol.} \\
    {\it Affiliations in italic}\\
    {\it e-mail@address in italic}\\
    \\
    OTHER AUTHOR$^{1}$\\
    {\it Affiliations in italic}\\
    {\it e-mail@address in italic}
    }
\maketitle \thispagestyle{empty} 
% \copyrightheading{Vol.~0, No.~0 (2001) \pageref{head:of:text}--\pageref{last:of:text}}

\stepcounter{footnote}\footnotetext{Another sample thanks. Marked Arabic numerals.}

% The following dummy publisher is recomended.
\vskip 0.2in
\phantompublisher{(Leave 1 inch blank space for publisher.)}{}
\vskip 0.2in

\begin{abstract}
    Abstract up to 200 words.
\end{abstract}

\keywords{keyword1, keyword2,...}

\section{Sample Section}

% 1in: \rule{1in}{3pt}\, 1cm: \rule{1cm}{3pt}

This text is a sample for ``Journal of Knot Theory and Its Ramifications''.

Run LaTeX twice to get references right.

\begin{enumerate}
\item Write down in ``pencil'' a short title 
    to be used as the running head.
\item Number each page of the manuscript lightly 
    at the botton with a ``blue pencil''.
\item See also \\
    \verb|http://www.wspc.com.sg/others/style_files/|
    \verb|journal/journals_style_files.html|
\end{enumerate}


\section{Sample Section}
Major headings in boldface roman.
Numbered in  boldface roman.

\subsection{Sample Sub-section}
Sub-headings in boldface italic.
Numbered in boldface roman.

\subsubsection{Sample Sub-sub-section}
Sub-sub-headings in medium face italic.
Numbered in medium face roman.

\begin{itemize}
\item Sample itemize
\end{itemize}

\begin{enumerate}
\item Sample enumerate of level 1
    \begin{enumerate}
    \item Sample enumerate of level 2
        \begin{enumerate}
        \item Sample enumerate of level 3
        \end{enumerate}
    \end{enumerate}
\end{enumerate}

\begin{theorem}[optional argument] \label{th:sample}
    Sample theorem here.
\end{theorem}

\begin{proof}
    Sample proof of Theorem \ref{th:sample}.
    Proofs end with square.
\end{proof}

\begin{cor}\label{cor:sample2}
    Sample corollary. 
\end{cor}

\begin{definition}\label{df:sample}
    Sample definition. 
\end{definition}

\begin{ex}\label{ex:sample}
    Sample example. 
\end{ex}

\begin{lemma}\label{lem:sample}
    Sample lemma. 
\end{lemma}

\begin{prop}\label{pro:sample}
    Sample proposition. 
\end{prop}

\begin{rem}\label{rem:sample}
    Sample remark. 
\end{rem}


\begin{equation}
    y=x \mbox{ Sample equation.}    \label{eq:sample1}
\end{equation}

\begin{equation}
    y=x \mbox{ Sample equation.}    \label{eq:sample2}
\end{equation}

\section{Sample Section}

\begin{equation}
    y=x \mbox{ Sample equation.}    \label{eq:sample3}
\end{equation}

Sample references: Eq. (\ref{eq:sample1}),
(\ref{eq:sample2}) and (\ref{eq:sample3}).

\begin{table}[htbp]
    \caption{The caption is placed above the table.}
    \label{tbl:sample} % \label{} should be placed after \caption{}.
    \begin{center}
        (Table)
    \end{center}
\end{table}

\begin{figure}[htbp]
    \begin{center}
        (Figure)
    \end{center}
    \caption{The caption is placed below the figure.}
    \label{fig:sample} % \label{} should be placed after \caption{}.
\end{figure} 

Sample Citation\cite{bib:name}

Sample Footnote\footnote{Sample Footnote. Footnotes are numbered in Arabic numerals.}


\section*{Acknowledgements}
This section should come before the References.


\begin{thebibliography}{99}
\bibitem{bib:name} Author, {\it Title in Italic}, Journal name.
\end{thebibliography}

\appendix

\section{}
1st appendix here.

\subsection{}
sub-appendix here.

Sample Reference : Eq. (\ref{eq:sampleAp1}) and (\ref{eq:sampleAp2}).

\begin{equation}
    y=x \mbox{ Sample equation.}    \label{eq:sampleAp1}
\end{equation}

\section{}
2nd appendix here.

\begin{equation}
    y=x \mbox{ Sample equation.}    \label{eq:sampleAp2}
\end{equation}

\begin{theorem}\label{th:sampleA}
    Sample theorem here.
\end{theorem}

\begin{table}[hbt]
    \caption{The caption is placed above the table.}
    \label{tbl:sampleA} % \label{} should be placed after \caption{}.
    \begin{center}
        (Table)
    \end{center}
\end{table}

\begin{figure}[hbt]
    \begin{center}
        (Figure)
    \end{center}
    \caption{The caption is placed below the figure.}
    \label{fig:sampleA} % \label{} should be placed after \caption{}.
\end{figure} 

\label{last:of:text} %% Recommended.  label of the last page.
\end{document}
