% jdkintou.sty 
% by Shinsaku Fujita 
% Copyright (C) S. Fujita (1999). All rights reserved. 
% Version 1.00 1999/12/31
%
%  �쐬��: ���c����
%          fujitas@chem.kit.ac.jp
%
%   ���c���쒘�u����E�c�������p�v����
%
%\typeout{Option Style `jdkintou.sty' by S. Fujita}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{jdkintou}
\def\versi@ndate{December 31, 1999}
\def\versi@nno{ver1.00}
\def\copyrighth@lder{SF} % Shinsaku Fujita
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{Option Style `\j@urnalname' (\versi@nno) <\versi@ndate>\space 
[\copyrighth@lder]}
\typeout{���c���쒘�uLaTeX�܂���̔��ˁv����}
\typeout{���c���쒘�u��LaTeX2e�K��E�c�g�ҁv����}
\typeout{���c���쒘�u����E�c�������p�v����}
% **************
% * �����ϓ��� * tatebook.cls(S. Fujita)���
% **************
\newif\ifjidoukintou \jidoukintoutrue
%
% \kintou
% by Shinsaku Fujita 1995/05/27
% ���c���쒘�u\LaTeX{}�܂���̔��ˁv��24�͎Q�ƁB
% \leavevmode�ǉ�
%
\def\kintou#1#2{\leavevmode\hbox to#1{%
 \kanjiskip=0pt plus 1fill minus 1fill
 \xkanjiskip=\kanjiskip #2}}
%
% \jidoukintou 
% by Shinsaku Fujita 1995/05/27
% ���c���쒘�u\LaTeX{}�܂���̔��ˁv��24�͎Q�ƁB
% \leavevmode�ǉ�
%
\def\jidoukintou#1{%�����ϓ���
%\settowidth{\@tempdima}{#1}%������̒����𑪂�
%\@jidoukintou{\@tempdima}{#1}}
\setbox9=\hbox{#1}%������̒����𑪂�
\leavevmode
\@jidoukintou{\wd9}{#1}}
\def\@jidoukintou#1#2{%�������f�̓����}�N��
\ifjidoukintou
 \ifdim#1<1.2zw \hbox{#2}%1����
 \else\ifdim#1<2.4zw \kintou{4zw}{#2}%2����
 \else\ifdim#1<3.4zw \kintou{5zw}{#2}%3����
 \else\ifdim#1<4.4zw \kintou{6zw}{#2}%4����
 \else\ifdim#1<5.4zw \kintou{6zw}{#2}%5����
 \else #2%6�����ȏ�
\fi\fi\fi\fi\fi\else #2\fi}
% **************
% * �����ϓ��� *
% **************
% \jidoukintouII
% by Shinsaku Fujita 1998/09/06
% ���c���쒘�u��\LaTeXe{}�K��E�c�g�ҁv��9�͎Q�ƁB
%
\def\jidoukintouII#1{%�����ϓ���
\setbox9=\hbox{#1}%������̒����𑪂�
\leavevmode
\@jidoukintouII{\wd9}{#1}}
\def\@jidoukintouII#1#2{%�������f�̓����}�N��
\ifjidoukintou
 \ifdim#1<1.2zw \hbox{#2}%1����
 \else\ifdim#1<2.4zw \kintou{4zw}{#2}%2����
 \else\ifdim#1<3.4zw \kintou{5zw}{#2}%3����
 \else\ifdim#1<4.4zw \kintou{5.5zw}{#2}%4����
 \else\ifdim#1<5.4zw \kintou{6zw}{#2}%5����
 \else #2%6�����ȏ�
\fi\fi\fi\fi\fi\fi}
% ********
% * ���� *
% ********
% \zenkakuwari �S�p��
% \nibuwari �񕪊�
% \yonbuwari �l����
% by Shinsaku Fujita 1999/12/31
\def\zenkakuwari#1{\leavevmode\hbox{%
\kanjiskip=1zw plus .5zw minus 0.125zw
\let\xkanjiskip=\kanjiskip #1}}
\def\nibuwari#1{\leavevmode\hbox{%
\kanjiskip=0.5zw plus .25zw minus 0.0625zw
\let\xkanjiskip=\kanjiskip #1}}
\def\yonbuwari#1{\leavevmode\hbox{%
\kanjiskip=0.25zw plus .125zw minus 0.031zw
\let\xkanjiskip=\kanjiskip #1}}
%
% ************
% * �������� *
% ************
% \Mojiatukai
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
%
\newcount\kakkocnt%���p
\newif\ifyosokuon\yosokuonfalse
\def\zenkaku{\char\jis"2121}%�S�p�A�L
\def\mojiatukai#1{\zenkaku\kern-1zw#1\kern-1zw\zenkaku}
\let\kanjiatukai=\mojiatukai%���`
\def\Mojiatukai#1{%
\if\noexpand#1\relax\else
\kakkocnt=`#1\relax\yosokuonfalse
\ifnum\kakkocnt=\jis"2139\relax
\yosokuontrue%
\else\ifnum\kakkocnt=\jis"2138\relax
\yosokuontrue%
\else
\ifnum\kakkocnt>\jis"2132\relax
 \ifnum\kakkocnt<\jis"2137\relax \yosokuontrue\else
  \ifnum\kakkocnt>\jis"2420\relax
   \ifnum\kakkocnt<\jis"242A\relax
    \ifodd\kakkocnt\relax \yosokuontrue\fi%%%%%
   \else
    \ifnum\kakkocnt=\jis"2443\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2463\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2465\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2467\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"246E\relax \yosokuontrue\else
  \ifnum\kakkocnt>\jis"2520\relax
   \ifnum\kakkocnt<\jis"252A\relax
    \ifodd\kakkocnt \else\yosokuontrue\fi%%%%%
   \else
    \ifnum\kakkocnt=\jis"2543\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2563\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2565\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2567\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"256E\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2575\relax \yosokuontrue\else
    \ifnum\kakkocnt=\jis"2576\relax \yosokuontrue%%%%%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi
\ifyosokuon\mojiatukai{#1}\else#1\fi}
%
% **********
% * �ϓ��� *
% **********
% \KinTou
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
%
\def\KinTou#1#2{\leavevmode\kintou{#1}{%
\@tfor\mojimemb:=#2\do{%
\expandafter\Mojiatukai\mojimemb}}}
%
% ************
% * �������f *
% ************
% \mojihandan
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
% �Y���̕������a���ł����\wajiswtrue��Ԃ�
%
%\newcount\kakkocnt%���p
\newif\ifwajisw\wajiswfalse
\newif\ifoujisw\oujiswfalse
\newif\ifowarisw \owariswfalse
\def\mojihandan#1{%
\if\noexpand#1\relax\else
\kakkocnt=`#1\relax\wajiswfalse
\ifnum\kakkocnt>\jis"2120\relax
\wajiswtrue\fi\fi}
%
% **************************
% * �����Ȏ������߂̃O���[ *
% **************************
% \kintouglue
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
% ���O�̎��ƌ��݂̎��̊ԂɃO���[������B
%
%  ���O�̎�      ���݂̎�
%  \oujiswtrue   \wajiswtrue  --- \hss �}��
%  \oujiswfalse  \wajiswtrue  --- \hss �}��
%  \oujiswtrue   \wajiswfalse --- \hss �}������
%  \oujiswfalse  \wajiswfalse --- \hss �}��
%
\def\kintouglue#1{\owariswfalse
\wajiswfalse\oujiswfalse
\@tfor\mojimemb:=#1\do{%
\ifwajisw\oujiswfalse\else\oujiswtrue\fi
\expandafter\mojihandan\mojimemb\relax
\ifowarisw\ifwajisw\hss\else\ifoujisw\relax\else\hss\fi\fi\fi
\mojimemb\owariswtrue}}
%
% **************
% * �����Ȏ��� *
% **************
\def\KinTouI#1#2{\leavevmode\hbox to#1{\kintouglue{#2}}}
%
% ********
% * ���� *
% ********
% \ZenkakuWari �S�p��
% \NibuWari �񕪊�
% \YonbuWari �l����
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
%
\def\YonbuWari#1{\leavevmode\yonbuwari{%
\@tfor\mojimemb:=#1\do{%
\expandafter\Mojiatukai\mojimemb}}}
\def\NibuWari#1{\leavevmode\nibuwari{%
\@tfor\mojimemb:=#1\do{%
\expandafter\Mojiatukai\mojimemb}}}
\def\ZenkakuWari#1{\leavevmode\zenkakuwari{%
\@tfor\mojimemb:=#1\do{%
\expandafter\Mojiatukai\mojimemb}}}
%
% \jidouKinTou 
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
%
\def\jidouKinTou#1{%�����ϓ���
\setbox9=\hbox{#1}%������̒����𑪂�
\leavevmode
\@jidouKinTou{\wd9}{#1}}
\def\@jidouKinTou#1#2{%�������f�̓����}�N��
\ifjidoukintou
 \ifdim#1<1.2zw \hbox{#2}%1����
 \else\ifdim#1<2.4zw \KinTou{4zw}{#2}%2����
 \else\ifdim#1<3.4zw \KinTou{5zw}{#2}%3����
 \else\ifdim#1<4.4zw \KinTou{6zw}{#2}%4����
 \else\ifdim#1<5.4zw \KinTou{6zw}{#2}%5����
 \else #2%6�����ȏ�
\fi\fi\fi\fi\fi\else #2\fi}
% **************
% * �����ϓ��� *
% **************
% \jidouKinTouII
% by Shinsaku Fujita 1999/12/31
% ���c���쒘�u����E�c�������p�v(����)
%
\def\jidouKinTouII#1{%�����ϓ���
\setbox9=\hbox{#1}%������̒����𑪂�
\leavevmode
\@jidouKinTouII{\wd9}{#1}}
\def\@jidouKinTouII#1#2{%�������f�̓����}�N��
\ifjidoukintou
 \ifdim#1<1.2zw \hbox{#2}%1����
 \else\ifdim#1<2.4zw \KinTou{4zw}{#2}%2����
 \else\ifdim#1<3.4zw \KinTou{5zw}{#2}%3����
 \else\ifdim#1<4.4zw \KinTou{5.5zw}{#2}%4����
 \else\ifdim#1<5.4zw \KinTou{6zw}{#2}%5����
 \else #2%6�����ȏ�
\fi\fi\fi\fi\fi\fi}

\endinput

