%
%      dmisc.sty                 ver 1.0  92/03/24
%                                modified by S. Takehiro 96/05/17
%
%  following environments are defined
%
%  \begin{Dreference}    \end{Dreference}
%  \begin{Dsmallquote}   \end{Dsmallquote}
%  \begin{Dnitemize}     \end{Dnitemize}
%  \begin{Dlist}         \end{Dlist}
%
%  following commands are defined
%
%  \Dparindent
%  \Dnoparindent
%  \Dparskip
%  \Dnoparskip
%  \Dsethead
%  \Dtoday
%  \Dentry
%  \Deqlab    \Deqref
%  \Dfiglab   \Dfigref \DFigref
%  \Dtablab   \Dtabref
%  \Dseclab   \Dsecref
%  \Dchaplab  \Dchapref
%  \Dappendix                      modified by S.Takehiro
%  \Dsidenote
%
\newlength{\D@parindent}
\setlength{\D@parindent}{\parindent}
\def\Dparindent{\setlength{\parindent}{\D@parindent}}
\def\Dnoparindent{\setlength{\parindent}{0pt}}
\def\Dparskip{\setlength{\parskip}{3ex}}
\def\Dnoparskip{\setlength{\parskip}{0}}
%
\def\Dsethead{\let\firstmark\botmark}
%
\@ifundefined{DselJ}{\gdef\DselJ#1#2{#1}}{}
\def\@chapapp#1#2{\DselJ{��#2��}{Chapter#1#2}}
\def\fnum@figure{\DselJ{��}{Figure} \thefigure}
\def\fnum@table{\DselJ{ɽ}{Table} \thetable}  % modified by S.Takehiro
\def\D@refapp{\DselJ{ʸ��}{Reference}}
%
\def\Dreference{\@ifundefined{chapter}%
                {\section*{\D@refapp\@mkboth{\D@refapp}{\D@refapp}}}
                {\chapter*{\D@refapp\@mkboth{\D@refapp}{\D@refapp}}}
                \list{}{\labelwidth\z@ \itemindent-\leftmargin
                \let\makelabel\descriptionlabel}}
\let\endDreference\endlist
%
\newcount\D@year
\def\Dtoday{\D@year=\year\advance\D@year -1900 %
            \ \number\D@year /\nobreak%
            \ifnum\month<10 0\fi%
            \number\month /\nobreak%
            \ifnum\day<10 0\fi%
            \number\day}
%
\def\Dentry#1{\label{#1}\index{#1}}
%
\@ifundefined{Dlabel}{\let\Dlabel\label}{}
\def\Deqlab#1{\Dlabel{eq:#1}}
\def\Dfiglab#1{\Dlabel{fig:#1}}
\def\Dtablab#1{\Dlabel{tab:#1}}
\def\Dseclab#1{\Dlabel{sec:#1}}
\def\Dchaplab#1{\Dlabel{chap:#1}}
%
\def\Deqref#1{(\ref{eq:#1})}
\def\Dfigref#1{\DselJ{��}{Fig.}\ref{fig:#1}}
\def\DFigref#1{\DselJ{��}{Figure }\ref{fig:#1}}
\def\Dtabref#1{\DselJ{ɽ}{Table }\ref{tab:#1}}
\def\Dsecref#1{\DselJ{��\ref{sec:#1}��}{Section \ref{sec:#1}}}
\def\Dchapref#1{\DselJ{��\ref{chap:#1}��}{Chapter \ref{chap:#1}}}
%
\def\Dappendix{\par
 \setcounter{chapter}{0}
 \setcounter{section}{0}
 \def\@chapapp{\DselJ{���}{Appendix}}
 \def\thechapter{\Alph{chapter}}}      % modified by S.Takehiro
%
\def\Dsmallquote{\begingroup\small\quote}
\def\endDsmallquote{\endquote\endgroup}
%
\def\Dnitemize{\vskip -1ex
   \list{$\bullet$}{\itemsep=0.0pt \parsep=0.0pt}}
\def\endDnitemize{\endlist\vskip -1ex}
%
\def\Dsidenote#1{\marginpar{\scriptsize #1}}
%
\def\Dlistlabel#1{\mbox{\bf #1}\hfil}
\def\Dlistlabelsep{1em}
\def\Dlisttemplate{XXXXXXXX}
\def\Dlist{\@ifnextchar[{\D@list} %]
                {\D@list[\Dlisttemplate]}}
\def\D@list[#1]{%
  \list{}{\let\makelabel\Dlistlabel
  \settowidth{\labelwidth}{#1}
  \leftmargin=\labelwidth 
  \addtolength{\leftmargin}{\Dlistlabelsep}}}
\let\endDlist\endlist
%
%  re-definition of \listoffigures and  \listoftables.
%         appended by S.Takehiro 96.5.17
%
\def\listoffigures{\section*{\DselJ{�� �� ��}{List of Figures}}\markboth
 {\DselJ{�� �� ��}{List of Figures}}
 {\DselJ{�� �� ��}{List of Figures}}\@starttoc{lof}}
\let\l@table\l@figure
\def\listoftables{\section*{\DselJ{ɽ �� ��}{List of Tables}}\markboth
 {\DselJ{ɽ �� ��}{List of Tables}}
 {\DselJ{ɽ �� ��}{List of Tables}}\@starttoc{lot}}
\let\l@table\l@figure
