%
% jsmeddpaper.cls
%
% $Id: jsmepaper.cls,v 1.3 2000/03/19 11:57:09 ken Exp $
%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsmeddpaper}
   [2000/06/23 v1.00 Standard JSME D&D Paper Class for pLateX2e]
%
% If you don't have PSNFSS system, comment out the following three
% lines : 
\RequirePackage{times}      % Loads the Times-Roman Fonts
\RequirePackage{mathptm}    % Loads the Times-Roman Math Fonts
\RequirePackage{pifont}     % Loads the Postscript symbol fonts

\newif\iflatexe\latexetrue
%
\input jsmefont.sty\relax
\newcounter{@paper}
\newif\if@landscape \@landscapefalse
\newcommand{\@ptsize}{0}
\newif\if@restonecol
\newif\if@titlepage
\@titlepagefalse
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
\newif\if@stysize \@stysizefalse
\newif\if@enablejfam \@enablejfamtrue
\DeclareOption{a4jsme}{\setcounter{@paper}{1}%
  \setlength\paperheight {297mm}%
  \setlength\paperwidth  {210mm}}
\DeclareOption{a5jsme}{\setcounter{@paper}{2}%
  \setlength\paperheight {210mm}
  \setlength\paperwidth  {148mm}}
\DeclareOption{b4jsme}{\setcounter{@paper}{3}%
  \setlength\paperheight {364mm}
  \setlength\paperwidth  {257mm}}
\DeclareOption{b5jsme}{\setcounter{@paper}{4}%
  \setlength\paperheight {257mm}
  \setlength\paperwidth  {182mm}}
\DeclareOption{a4journal}{\setcounter{@paper}{5}%
  \setlength\paperheight {297mm}%
  \setlength\paperwidth  {210mm}}
\if@compatibility
  \renewcommand{\@ptsize}{0}
\else
  \DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
\fi
\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}

\def\ds@twoside{\@twosidetrue\@mparswitchtrue}\def\ds@draft{\overfullrule 5pt} 
\@options
\input{jsize1\@ptsize.clo}
\input{jsme1\@ptsize.sty}\relax
\ifnum\c@@paper=2 % A5
  \input a4jsme.sty\relax
\else\ifnum\c@@paper=3 % B4
  \input b4jsme.sty\relax
\else\ifnum\c@@paper=4 % B5
  \input b5jsme.sty\relax
\else\ifnum\c@@paper=5 % Journal Articles
  \input a4journal.sty\relax
\else             % A4 ant other
  \input a4jsme.sty\relax
\fi\fi\fi
\def\labelenumi{\theenumi.} 
\def\theenumi{\arabic{enumi}} 
\def\labelenumii{(\theenumii)}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}
\def\labelenumiii{\theenumiii.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}
\def\labelenumiv{\theenumiv.}
\def\theenumiv{\Alph{enumiv}} 
\def\p@enumiv{\p@enumiii\theenumiii}

\def\labelitemi{$\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\ast$}
\def\labelitemiv{$\cdot$}

\def\verse{\let\\=\@centercr 
  \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent 
  \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
\let\endverse\endlist
\def\quotation{\list{}{\listparindent 1.5em
  \itemindent\listparindent
  \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
\let\endquotation=\endlist
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

% '\bf' is replaced to '\normalfont\bfseries', and '\labelsep = 15pt'
% is added to insert a small indent for description items. 

\def\descriptionlabel#1{\labelsep = 15pt \hspace\labelsep \normalfont\bfseries #1}
% \def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
  \let\makelabel\descriptionlabel}}
\let\enddescription\endlist

\newcommand{\up}{\upshape}
\newcommand{\it}{\itshape}
\newcommand{\sl}{\slshape}
\newcommand{\sc}{\scshape}
\newcommand{\md}{\mdseries}
\newcommand{\bf}{\bfseries}
\newcommand{\tt}{\ttfamily}
\newcommand{\sf}{\sffamily}
\newcommand{\rm}{\rmfamily}
\newcommand{\mc}{\mcfamily}
\newcommand{\gt}{\gtfamily}
\newcommand{\bfs}{\bfseries\slshape}
\newcommand{\bfi}{\font\bfif=cmbxti10\bfif}
\newcommand{\bsf}{\font\bfsff=cmssdc10\bfsff}
\newcommand{\msf}{\font\bmsff=cmssbx10\bmsff}
\newcommand{\ssf}{\font\ssff=cmssi10\ssff}

\renewcommand{\theequation}{\arabic{equation}}

\newenvironment{titlepage}{%
  \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \else \newpage \fi \thispagestyle{empty}\c@page\z@}
  {\if@restonecol\twocolumn \else \newpage \fi}

\arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt 
\tabbingsep \labelsep 

\skip\@mpfootins = \skip\footins
\fboxsep = 3pt \fboxrule = .4pt 

\newcounter{part}
\newcounter{section}
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]

\def\thepart{\Roman{part}}
\def\thesection {\arabic{section}}
\def\thesubsection{\thesection$\cdot$\arabic{subsection}}
\def\thesubsubsection {\thesubsection$\cdot$\arabic{subsubsection}}
\def\theparagraph {\thesubsubsection.\arabic{paragraph}}
\def\thesubparagraph {\theparagraph.\arabic{subparagraph}}

\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
%
% difinition of Language
%
\newif\ifjapan
\def\japan{\global\japantrue}
\def\english{\global\japanfalse}
\def\@chapapp#1{\ifjapan ��#1\else Chapter #1\fi}
\def\appendix{\par\setcounter{chapter}{0}\setcounter{section}{0}
 \ifjapan\def\@chapapp{�t�^}\else\def\@chapapp{Appendix}\fi%
 \def\thechapter{\Alph{chapter}}}
\newcommand{\prepartname}{\ifjapan ��\else Part.\fi}
\newcommand{\postpartname}{\ifjapan ��\fi}
\newcommand{\contentsname}{\ifjapan �ڎ�\else Contents\fi}
\newcommand{\listfigurename}{\ifjapan �}�ڎ�\else List of Figures\fi}
\newcommand{\listtablename}{\ifjapan �\�ڎ�\else List of Tables\fi}
\newcommand{\refname}{\ifjapan ����\else References\fi}
\newcommand{\indexname}{\ifjapan �� ��\else Index\fi}
\newcommand{\figurename}{\ifjapan �}\else Fig.\fi}
\newcommand{\tablename}{\ifjapan �\\else Table\fi}
\newcommand{\appendixname}{\ifjapan �t�^\else Appendix\fi}
\newcommand{\abstractname}{\ifjapan �T�v\else Abstract\fi}
%
\newdimen\@lnumwidth
\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
\def\tableofcontents{\section*{\contentsname}%
  \markboth{\contentsname}{\contentsname}\@starttoc{toc}}
\def\@seccntformat#1{\csname the#1\endcsname}
\def\l@part#1#2{\addpenalty{\@secpenalty}
  \addvspace{2.25em plus 1pt} \begingroup
  \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth
  \parfillskip -\@pnumwidth 
  {\large \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
  \nobreak \endgroup}
%
%
%\newcommand{\section}{\secdef\@section\@ssection}%
\newcommand{\section}{\@ifstar{\@ssection}{\@section}}%
\newcommand{\@section}[1]{\@startsection{section}{1}{\z@}%
   {0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {.35\Cvs \@plus.3\Cdp}%
   {\reset@font\semilarge\center\bfseries}
   {\protect\normalsize{.}\leavevmode\setbox\@tempboxa\hbox{#1}%
    \hspace*{1.2ex}\protect\@spsection{#1}}}
\newcommand{\@ssection}[1]{\@startsection{section}{10}{\z@}%
   {0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {.35\Cvs \@plus.3\Cdp}%
   {\reset@font\semilarge\center\bfseries}
   {\leavevmode\setbox\@tempboxa\hbox{#1}%
    \hspace*{1.2ex}\protect\@spsection{#1}}}
\newcommand{\@spsection}[1]{% %%%%% (���Ȃ������͓��Ԋu��) %%%%%
    \setbox\@tempboxa\hbox{\begin{tabular}{@{}c@{}}#1\end{tabular}}
    \ifdim\wd\@tempboxa>9zw#1\else
    \ifdim\wd\@tempboxa>3zw\makebox[8zw][s]{#1}\else\makebox[5zw][s]{#1}\fi\fi}
\newcommand{\subsection}[1]{\@startsection{subsection}{2}{\z@}%
   {0.0\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {-1.4\Cvs \@plus.3\Cdp}%
   {\hspace*{2.1ex}\reset@font\normalsize\bfseries}
   {\protect\@ifstar{#1}{\hspace*{1.4ex} #1}}}
\newcommand{\subsubsection}[1]{\@startsection{subsubsection}{3}{\z@}%
   {0.0\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {-1.4\Cvs \@plus.3\Cdp}%
   {\hspace*{2.1ex}\reset@font\normalsize\bfseries}
   {\protect\@ifstar{#1}{\hspace*{1.4ex} #1}}}
%
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\def\listoffigures{\section*{\listfigurename}\@starttoc{lof}}
\def\l@figure{\@dottedtocline{2}{1.5em}{2.3em}}
\def\listoftables{\section*{\listtablename}
	\@starttoc{lot}}
\let\l@table\l@figure
%
\newenvironment{theindex}
  {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
   \columnseprule\z@ \columnsep 35\p@
   \twocolumn[\section*{\indexname}]%
   \@mkboth{\indexname}{\indexname}%
   \thispagestyle{jpl@in}\parindent\z@
   \parskip\z@ \@plus .3\p@\relax
   \let\item\@idxitem}
  {\if@restonecol\onecolumn\else\clearpage\fi}
%
\newenvironment{thebibliography}[1] {
 \bigskip\par
 \hfil{\semilarge\bf\makebox[5zw][s]{\refname}}%
   \vskip 2ex\par
   \list{({\@arabic\c@enumiv})}%
        {\settowidth\labelwidth{\@biblabel{#1}}%
         \leftmargin\labelwidth
         \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}
\let\@openbib@code\@empty
%
\newcommand{\@idxitem}{\par\hangindent 40\p@}
\newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
\newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
\renewcommand{\footnoterule}{%
  \kern-3\p@\hrule width \columnwidth\kern 2.6\p@}
\newcommand\@makefntext[1]{\parindent 1em
  \noindent\hbox to 1.8em{\hss\@makefnmark}#1}
\newif\if���� \����false
\def\����{\����true}
\def\�a��{\����false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\today{{%
  \iftdir
    \if����
      \kansuji\number\year �N
      \kansuji\number\month ��
      \kansuji\number\day ��
    \else
      ����\ifnum\heisei=1 ���N\else\kansuji\number\heisei �N\fi
      \kansuji\number\month ��
      \kansuji\number\day ��
    \fi
  \else
    \if����
      \number\year~�N
      \number\month~��
      \number\day~��
    \else
      ����\ifnum\heisei=1 ���N\else\number\heisei~�N\fi
      \number\month~��
      \number\day~��
    \fi
  \fi}}

% The following variables are arranged from the originals to avoid a
% column only with figures & tables and to arrange the height between
% figures/tables and text 
\setcounter{topnumber}{4}
\def\topfraction{1.0}
\setcounter{bottomnumber}{0}
\def\bottomfraction{0.0}
\setcounter{totalnumber}{4}
\def\textfraction{0.0}
\def\floatpagefraction{0.95}
\setcounter{dbltopnumber}{2}
\def\dbltopfraction{1.0}
\def\dblfloatpagefraction{0.95}
\setlength{\intextsep}{1zw}
\setlength{\textfloatsep}{1.3zw}
\setlength{\dbltextfloatsep}{1.3zw}
\setcounter{totalnumber}{5}
\setcounter{dbltopnumber}{5}
\setcounter{bottomnumber}{3}
\setcounter{topnumber}{4}
\setlength\floatsep    { 6\p@ \@plus 2\p@ \@minus 1\p@}
\setlength\intextsep   { 6\p@ \@plus 2\p@ \@minus 1\p@}

%\setcounter{topnumber}{2}
%\def\topfraction{.7}
%\setcounter{bottomnumber}{1}
%\def\bottomfraction{.3}
%\setcounter{totalnumber}{3}
%\def\textfraction{.2}
%\def\floatpagefraction{.5}
%\setcounter{dbltopnumber}{2}
%\def\dbltopfraction{1.0}
%\def\dblfloatpagefraction{.5}
%\setlength{\intextsep}{1zw}
%\setlength{\textfloatsep}{1zw}
%\setlength{\dbltextfloatsep}{1zw}

\newcounter{figure}
\def\thefigure{\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename\thefigure}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}
\newcounter{table}
\def\thetable{\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename\thetable}
\def\table{\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}

\if@twoside
 \def\ps@headings{%
  \def\@oddfoot{}\def\@evenfoot{}
  \def\@oddhead{\@signif\hfil\underline{\protect\small\rightmark}\hfil\thepage}
  \def\@evenhead{\thepage\hfil\underline{\protect\small\leftmark}\hfil\@signif}
  \def\sectionmark##1{}\def\subsectionmark##1{}
 }
 \else \def\ps@headings{%
  \def\@oddfoot{}\def\@evenfoot{}
  \def\@oddhead{\@signif\hfil\underline{\protect\small\rightmark}\hfil\thepage}
  \def\@evenhead{\thepage\hfil\underline{\protect\small\leftmark}\hfil\@signif}
  \def\sectionmark##1{}\def\subsectionmark##1{}
}\fi
\def\ps@myheadings{\let\@mkboth\@gobbletwo
  \def\@oddhead{\@signf\sl\rightmark\hfil\rm\thepage}
  \def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\sl\leftmark\@signif}
  \def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%�ύX
\pagestyle{empty} \pagenumbering{arabic}
%\ps@plain \pagenumbering{arabic}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  twocolumn defined
\def\@ps@{1}
\def\@twoc{}
\twocolumn
\sloppy
\flushbottom
\if@twoside\else\raggedbottom\fi 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%�ύX
\input jsddadd.sty\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The next part is added for less hyphenation 
\pretolerance=9999	
%
\endinput
