Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!spinnews!spin-hsd0-tky!inet-tsb!tis2!hq10!news.hby.toshiba!news.tsurumi.toshiba!csl.rdc.toshiba!isl.rdc.toshiba!tsb-wide!wnoc-sfc-news!venus.sun.com!cs.utexas.edu!news.sprintlink.net!news.gdbnet.ad.jp!sinetnews!newssinet!hakata!kudpc!kuis-news!kuamp!imamura
From: imamura@kuamp.kyoto-u.ac.jp (Toshiyuki Imamura)
Subject: Mathtech.sty 2.0 released
Content-Type: text/plain; charset=ISO-2022-JP
X-Newsreader: mnews [version 1.19PL1] 1995-12/25(Mon)
Sender: usenet@kuamp.kyoto-u.ac.jp (0000-NewsAdmin(0000))
Lines: 794
Organization: Div. of Applied Systems Science, Kyoto Univ., JAPAN
Message-ID: <DLFIus.7w5@kuamp.kyoto-u.ac.jp>
Mime-Version: 1.0
X-Nntp-Posting-Host: adeps.kuamp.kyoto-u.ac.jp
Date: Fri, 19 Jan 1996 13:01:40 GMT
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:7291
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=7291&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B:#B<!w5~Bg9)3XIt$G$9!#(B

mathtech.sty2.0$B$r%j%j!<%9$7$^$9!#$$$m$$$m$J%P%0$O$H$l$^$7$?$,!"(B
LaTeX2e$B$X$NBP1~$O:#2s40A4$K9T$J$($^$;$s$G$7$?!#(B

font$B%m!<%I$N%^%/%m$,$J$/$J$C$F$$$k$N$G$=$NE@$r$4Cm0U2<$5$$!#(B
$B$^$??7$?$K(B4$BO"%I%C%H!"(B5$BO"%I%C%H$,;H$($k$h$&$K$J$C$F$$$^$9!#(B

ex. \Hdots[20pt][5]  \Ddots[20pt][5]

mathtech.sty$B$N:G?7>pJs$O(B

http://fndsys.kuamp.kyoto-u.ac.jp/~imamura/tex-styles/my-tex-style.html

$B$+$i<hF@$G$-$^$9!#$=$l$G$O!"(B


%
%M A T H T E C H . S T Y
%
% MATHEMATICAL THESIS TECHNICAL-STYLE option
%
%     Version 2.0 released 19 Jan 1996
%     Version 1.52released 17 Nov 1995
%     Version 1.51released 17 Nov 1995
%     Version 1.5 released 10 Nov 1995
%     Version 1.4 released 14 Mar 1995
%     Version 1.3 released 01 Mar 1995
%     Version 1.2 released 06 Feb 1995
%     Version 1.1 released 13 Sep 1994
%     Version 1.0 released 23 Jul 1993
%
%  for LaTeX 209 / ( maybe on LaTeX2e and 2e-209 compati-mode)
%
% Copyright (C) 1993 by Toshiyuki Imamura, imamura@kuamp.kyoto-u.ac.jp
%
%This style option defines the mathematical technical macros,
%
%numberwithin command
%
%equation  and equation* environment
%eqnarray and subeqnarray and sub equation environment
%
%eqncases, subeqncases and cases environment
%
%textin command
%
%newfunction, newoperator and newrelation command
%
%lefteqno, righteqno  and fleqn
%
%and the slanted capital Greek, and resizable dots command.
%
%Vdots, Hdots, Ddots, Qdots
%
%
%
% Thanks to
%Tetsuo Iwakuma   <bear@hashi1.civil.tohoku.ac.jp>
%Kouzou Tsukiyama <tukiyama@shimane-u.ac.jp>
%Donald Arseneau  <asnd@triumf.ca>
%HAYASE Shigenori <t50616@hongo.ecc.u-tokyo.ac.jp>
%Hidekazu Ooguma  <kuma@suri.it.okayama-u.ac.jp>
%
\typeout{********************************************^^J%
         * MATHTECH.STY Ver2.0 \space\space\space\space\space\space\space\space 19 Jan 1996. *^^J%
         *  \space\space\space\space\space\space\space\space\space\space%
           by imamura@kuamp.kyoto-u.ac.jp *^^J%
         ********************************************}
\newif\iftwo@e@used
\@ifundefined{nfss@catcodes}
 {\typeout{MATHTECH.STY detects; your tex-fmt is LaTeX209.}%
  \two@e@usedfalse}%
 {\typeout{MATHTECH.STY detects; your tex-fmt is LaTeX2e(209 compati-mode).}
  \two@e@usedtrue}%
%
\def\numberwithin#1#2{%
\@addtoreset{#1}{#2}%
\expandafter\def\csname the#1\endcsname{\csname the#2\endcsname.\arabic{#1}}}
%
\numberwithin{equation}{section}
%
%
%
%%\newtheorem{theorem}{Theorem}[section]
%%\newtheorem{corollary}{Corollary}[section]
%%\newtheorem{lemma}{Lemma}[section]
%%\newtheorem{definition}{Definition}[section]
%%\newtheorem{algorithm}{Algorithm}[section]
%
%
% New equation, multilinable math with centering align.
% New subequation, numbering with subeqno.
%
\newcounter{subequation}[equation]
\def\thesubequation{\theequation\kern.8pt\hbox to1ex{\hss\alph{subequation}\hss}}
%

\def\equation{%
 \stepcounter{equation}%
 \def\@eqnstepcounter{\stepcounter{equation}}%
 \def\@eqndowncounter{\addtocounter{equation}{-1}}%
 \def\sub@eqnstepcounter{\stepcounter{subequation}}%
 \def\sub@eqndowncounter{\addtocounter{subequation}{-1}}%
 \let\@eqnnum=\@@eqnnum% bug fix
 \let\@@eqncr@orig=\@@eqncr%
 \let\@@eqncr=\@@@eqncr%
 \let\@currentlabel=\theequation\@equation}%
\def\endequation{%
 \@@@eqncr\egroup\global\advance\c@equation\m@ne$$\global\@ignoretrue%
 \let\@@eqncr=\@@eqncr@orig }

\def\subequation{%
 \stepcounter{equation}\global\c@subequation\@ne%%
 \def\@eqnstepcounter{\stepcounter{subequation}}%
 \def\@eqndowncounter{\addtocounter{subequation}{-1}}%
 \let\sub@eqnstepcounter=\@eqnstepcounter%
 \let\sub@eqndowncounter=\@eqndowncounter%
 \let\@eqnnum=\sub@@eqnnum% bug fix
 \let\@@eqncr@orig=\@@eqncr%
 \let\@@eqncr=\@@@eqncr%
 \@ifnextchar\label{\sub@equation}%
 {\let\@currentlabel=\thesubequation\@equation}}
\def\sub@equation\label#1{%
 \let\@currentlabel=\theequation\label{#1}%
 \let\@currentlabel=\thesubequation\@equation}
\def\endsubequation{\@@@eqncr\egroup$$\global\@ignoretrue%
 \let\@@eqncr=\@@eqncr@orig }

\@namedef{equation*}{\def\@eqncr{\nonumber\@seqncr}
            \let\eqncases=\cases\let\endeqncases=\endcases%
            \let\subeqncases=\cases\let\endsubeqncases=\endcases\equation}
\@namedef{endequation*}{\nonumber\endequation}
\@namedef{subequation*}{\def\@eqncr{\nonumber\@seqncr}
            \let\eqncases=\cases\let\endeqncases=\endcases%
            \let\subeqncases=\cases\let\endsubeqncases=\endcases\subequation}
\@namedef{endsubequation*}{\global\advance\c@equation\m@ne%
            \nonumber\endsubequation}
%
% New eqnarray, such that 2nd column's space are reduced.
% New subeqnarray, numbering with subeqno
%
\def\eqnarray{%
 \stepcounter{equation}%
 \def\@eqnstepcounter{\stepcounter{equation}}%
 \def\@eqndowncounter{\addtocounter{equation}{-1}}%
 \def\sub@eqnstepcounter{\stepcounter{subequation}}%
 \def\sub@eqndowncounter{\addtocounter{subequation}{-1}}%
 \let\@eqnnum=\@@eqnnum% bug fix
 \let\@currentlabel=\theequation\@eqnarray}
%\def\endeqnarray{\@@eqncr\egroup%
% \global\advance\c@equation\m@ne$$\global\@ignoretrue}

\def\subeqnarray{%
 \def\@eqnstepcounter{\stepcounter{subequation}}%
 \def\@eqndowncounter{\addtocounter{subequation}{-1}}%
 \let\sub@eqnstepcounter=\@eqnstepcounter%
 \let\sub@eqndowncounter=\@eqndowncounter%
 \let\@eqnnum=\sub@@eqnnum% bug fix
 \stepcounter{equation}%
 \global\c@subequation\@ne%
 \@ifnextchar\label{\sub@eqnarray}%
 {\let\@currentlabel=\thesubequation\@eqnarray}}
\def\sub@eqnarray\label#1{%
 \let\@currentlabel=\theequation\label{#1}%
 \let\@currentlabel=\thesubequation\@eqnarray}
\def\endsubeqnarray{\@@eqncr\egroup$$\global\@ignoretrue}

\@namedef{eqnarray*}{\def\@eqncr{\nonumber\@seqncr}
            \let\eqncases=\cases\let\endeqncases=\endcases%
            \let\subeqncases=\cases\let\endsubeqncases=\endcases\eqnarray}
\@namedef{endeqnarray*}{\nonumber\endeqnarray}
\@namedef{subeqnarray*}{\def\@eqncr{\nonumber\@seqncr}
            \let\eqncases=\cases\let\endeqncases=\endcases%
            \let\subeqncases=\cases\let\endsubeqncases=\endcases\subeqnarray}
\@namedef{endsubeqnarray*}{\global\advance\c@equation\m@ne%
            \nonumber\endsubeqnarray}

%
%
\def\@@eqncr{\let\@tempa=\relax%
 \ifcase\@eqcnt\def\@tempa{&&&}\or\def\@tempa{&&}\else\def\@tempa{&}\fi%
 \@tempa\if@eqnsw\@eqnnum\@eqnstepcounter\fi%
 \global\@eqnswtrue\global\@eqcnt\z@\cr}
\def\@@@eqncr{&\if@eqnsw\@eqnnum\@eqnstepcounter\fi%
 \global\@eqnswtrue\cr}
%
%If you wnat to change locate-Right:eq-no <-> locate-Left:eq-no,
%you may use \lefteqno or \righteqno outside eq-env.
%
\def\lefteqno{\global\def\@eqnnummode{l}}
\def\righteqno{\global\def\@eqnnummode{r}}
\def\@@eqnnum{%
 \if\@eqnnummode l%
  {\hbox to .01pt{}\rlap{\rm \hskip -\displaywidth(\theequation)}}%
 \else%
  {\rm(\theequation)}\fi}
\def\sub@@eqnnum{%
 \if\@eqnnummode l%
  {\hbox to .01pt{}\rlap{\rm \hskip -\displaywidth(\thesubequation)}}%
 \else%
  {\rm(\thesubequation)}\fi}

\righteqno%default is right-eq-no.
%
%If you want to CENTRing-eqn <-> FlushLeft-eqn
%you may use \centereqn or \fleqn outside eq-env,
%
\def\centereqn{%
 \gdef\[{\relax\ifmmode\@badmath\else%
  \ifvmode \nointerlineskip \makebox[.6\linewidth]\fi$$\fi}
 \gdef\]{\relax\ifmmode\ifinner\@badmath\else$$\fi\else\@badmath\fi%
  \ignorespaces}
 \gdef\@equation{%
  \global\@eqnswtrue\let\\=\@eqncr%
  \tabskip\@centering$$\halign to \displaywidth\bgroup\@eqnsel%
  \hfil$\displaystyle{####}$\hfil&\llap{####}\tabskip\z@\cr}
 \gdef\@eqnarray{%
  \global\@eqnswtrue%
  \global\@eqcnt\z@\tabskip\@centering\let\\=\@eqncr%
  $$\halign to \displaywidth\bgroup\@eqnsel\hskip\@centering%
  $\displaystyle\tabskip\z@%
  {####}$&\global\@eqcnt\@ne%
  \hfil$\displaystyle{{}####{}}$\hfil%
  &\global\@eqcnt\tw@$\displaystyle\tabskip\z@{####}$\hfil%
  \tabskip\@centering&\llap{####}\tabskip\z@\cr}
}
\def\fleqn{%referred from fleqn.sty 6 Feb 85
 \gdef\[{\relax\ifmmode\@badmath\else\begingroup\trivlist\item[]\leavevmode%
 \hbox to\linewidth\bgroup$\displaystyle%
 \hskip\mathindent\bgroup\fi}
 \gdef\]{\relax\ifmmode\egroup$\hfil\egroup\endtrivlist\endgroup\else%
 \@badmath\fi}
 \gdef\@equation{%
  \global\@eqnswtrue\tabskip\mathindent\let\\=\@eqncr%
  \abovedisplayskip\topsep\ifvmode\advance\abovedisplayskip\partopsep\fi%
  \belowdisplayskip\abovedisplayskip%
  \belowdisplayshortskip\abovedisplayskip%
  \abovedisplayshortskip\abovedisplayskip%
  $$\halign to \linewidth\bgroup\@eqnsel\tabskip\@centering%
  \let\@currentlabel=\theequation%
  $\displaystyle{####}$\hfil\tabskip\@centering&\llap{####}\tabskip\z@\cr}
 \gdef\@eqnarray{%
  \global\@eqnswtrue%
  \global\@eqcnt\z@\tabskip\mathindent\let\\=\@eqncr%
  \abovedisplayskip\topsep\ifvmode\advance\abovedisplayskip\partopsep\fi%
  \belowdisplayskip\abovedisplayskip%
  \belowdisplayshortskip\abovedisplayskip%
  \abovedisplayshortskip\abovedisplayskip%
  $$\halign to\linewidth\bgroup\@eqnsel\hskip\@centering%
  $\displaystyle\tabskip\z@%
  \let\@currentlabel=\theequation%
  {####}$&\global\@eqcnt\@ne%
  \hfil$\displaystyle{{}####{}}$\hfil%
  &\global\@eqcnt\tw@$\displaystyle\tabskip\z@{####}$\hfil%
  \tabskip\@centering&\llap{####}\tabskip\z@\cr}
 \newdimen\mathindent%
 \mathindent = \leftmargini%
}

\centereqn%default is CENTERing-eqn
%
%
\long\def\textin#1{\noalign{\noindent%
 \vskip\topsep\hbox{\vbox{\hsize\textwidth%
 \let\\=\newline%
 \noindent#1\hss}}\vskip\topsep}}
%
%
%
\def\FRAC{\@ifnextchar[{\@FRAC}{\@FRAC[.4pt]}}
\def\@FRAC[#1]#2#3{{\displaystyle#2\above#1\relax\displaystyle#3}}%
\def\pfrac{\@ifnextchar[{\@pfrac}{\@@pfrac}}
\def\@pfrac[#1]#2#3{\@FRAC[.4pt]{\partial^{#1}#2}{\partial#3^{#1}}}
\def\@@pfrac#1#2{\@FRAC[.4pt]{\partial#1}{\partial#2}}
\def\slfrac#1#2{\leavevmode%
 \ifmmode%
  \raise.5ex\hbox{$#1$}\kern-.1em/\kern-.1em\lower.25ex\hbox{$#2$}%
 \else%
  \raise.5ex\hbox{#1}\kern-.1em/\kern-.1em\lower.25ex\hbox{#2}%
 \fi}
%
%
\def\newfunction#1{%
  \iftwo@e@used%
   \expandafter\def\csname#1\endcsname{\mathop{\operator@font#1}\nolimits}%
  \else%
   \expandafter\def\csname#1\endcsname{\mathop{\rm#1}\nolimits}%
  \fi}
\def\newoperator#1#2{%
  \expandafter\def\csname#1\endcsname{\mathop{#2}\limits}}
\def\newrelation#1#2{%
  \expandafter\def\csname#1\endcsname{\mathrel{#2}\limits}}
%
\def\@iint@kern{\mathchoice{\!\!\!}{\!\!}{\!\!}{\!\!}}
\def\@iiint@kern{\mathchoice{\!\!\!\!}{\!\!}{\!\!}{\!\!}}
%
\newoperator{Ker}{\mbox{Ker}}
\newoperator{Im}{\mbox{Im}}
\newoperator{sumsum}{\sum\!\sum}
\newoperator{iint}{\int\@iint@kern\int}
\newoperator{iiint}{\int\@iiint@kern\int\@iiint@kern\int}
%
\newfunction{cond}
\newfunction{diag}
\newfunction{det}
\newfunction{trace}
\newfunction{sign}
\newfunction{const}
\newfunction{Arcsin}
\newfunction{Arccos}
\newfunction{Arctan}
\newfunction{cosec}
%
\newfunction{Arcsec}\newfunction{arcsec}
\newfunction{Arccosec}\newfunction{arccosec}
\newfunction{Arccsc}\newfunction{arccsc}
\newfunction{Arccot}\newfunction{arccot}
%
\def\@addCapitalGreek#1{%
 \expandafter\def\csname var#1\endcsname{{\mit\csname#1\endcsname}}}
%
\@addCapitalGreek{Gamma}\@addCapitalGreek{Delta}
\@addCapitalGreek{Theta}\@addCapitalGreek{Lambda}
\@addCapitalGreek{Xi}\@addCapitalGreek{Pi}
\@addCapitalGreek{Sigma}\@addCapitalGreek{Upsilon}
\@addCapitalGreek{Phi}\@addCapitalGreek{Psi}
\@addCapitalGreek{Omega}
%
\let\@addCapitalGreek=\relax%
%
%(See RakuRaku LaTeX edited by Dr.Nodera)
%
\def\fillBox{{\rule[-2pt]{5pt}{6pt}}}
%%%\font\b@g=cmr10 scaled\magstep4%
%%%\def\bigzerol{\smash{\hbox{\b@g0}}}
%%%\def\bigzerou{\smash{\lower1.7ex\hbox{\b@g0}}}
%%%\def\bigzero{\smash{\lower.85ex\hbox{\b@g0}}}
\def\bigzerol{\smash{\hbox{\LARGE$0$}}}
\def\bigzerou{%
  \setbox\@tempboxa=\hbox{$o$}\@tempdima=\ht\@tempboxa%
  \setbox\@tempboxa=\hbox{\LARGE$0$}\@tempdimb=\ht\@tempboxa%
  \advance\@tempdimb-\@tempdima\smash{\lower\@tempdimb\hbox{\LARGE$0$}}}
\def\bigzero{%
  \setbox\@tempboxa=\hbox{$o$}\@tempdima=\ht\@tempboxa%
  \setbox\@tempboxa=\hbox{\LARGE$0$}\@tempdimb=\ht\@tempboxa%
  \advance\@tempdimb-\@tempdima\smash{\lower.5\@tempdimb\hbox{\LARGE$0$}}}
%
%                 (     )           (  .  )
%                 (. . .)           (  .  )
% resizable Hdots (     ) and Vdots (  .  )
%           hdots(=cdots)     vdots
%                 (.    )           (    .)
%                 (  .  )           (  .  )
% resizable Ddots (    .) and Qdots (.    )
%           ddots             qdots
%
% ddots and qdots is adjusted to cdots and vdots
%
\def\Hdots[#1]{%
 \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}\let\cdots=\b@x\hdots}
\def\Vdots[#1]{%
 \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}\let\cdots=\b@x\vdots}
\def\Ddots[#1]{%
 \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}\let\cdots=\b@x\ddots}
\def\Qdots[#1]{%
 \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}\let\cdots=\b@x\qdots}
\def\hdots{\@ifnextchar[{\@hdots}{\@hdots[3]}}
\def\vdots{\@ifnextchar[{\@vdots}{\@vdots[3]}}
\def\ddots{\@ifnextchar[{\@ddots}{\@ddots[3]}}
\def\qdots{\@ifnextchar[{\@qdots}{\@qdots[3]}}
\def\@hdots[#1]{%
 \mathinner{\setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa%
  \hbox to \@tempdima{%
   \vrule width\z@ height.85\@tempdima depth.15\@tempdima%
   \@tempcnta=#1\loop\raise.35\@tempdima\my@dot\hss
    \advance\@tempcnta-1\ifnum\@tempcnta>2\repeat\raise.35\@tempdima\my@dot}}}
\def\@vdots[#1]{%
 \mathinner{\setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa%
   \vrule width\z@ height.85\@tempdima depth.15\@tempdima%
   \hss\vbox to.7\@tempdima{%
   \@tempcnta=#1\loop{\my@dot}\vss
    \advance\@tempcnta-1\ifnum\@tempcnta>2\repeat{\my@dot}}}}
\def\@ddots[#1]{%
 \mathinner{\setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa%
 \def\@tempa##1##2{\vbox to.7\@tempdima{%
   \@tempcntb=##1\loop{\ifnum##2=\@tempcntb{\my@dot}\fi}\vss%
   \advance\@tempcntb-1\ifnum\@tempcntb>2\repeat%
   {\ifnum##2=1{\my@dot}\fi}}}%
 \hbox to \@tempdima{%
  \vrule width\z@ height.85\@tempdima depth.15\@tempdima%
  \@tempcnta=#1\loop\@tempa{#1}{\@tempcnta}\hss%
  \advance\@tempcnta-1\ifnum\@tempcnta>2\repeat\@tempa{#1}{1}}}}
\def\@qdots[#1]{%
 \mathinner{\setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa%
 \def\@tempa##1##2{\vbox to.7\@tempdima{%
   \@tempcntb=##1\loop{\ifnum##2=\@tempcntb{\my@dot}\fi}\vss%
   \advance\@tempcntb-1\ifnum\@tempcntb>2\repeat%
   {\ifnum##2=1{\my@dot}\fi}}}%
 \hbox to \@tempdima{%
  \vrule width\z@ height.7\@tempdima depth-.1\@tempdima%
  \@tempa{#1}{1}\@tempcnta=2\loop\hss\@tempa{#1}{\@tempcnta}%
  \advance\@tempcnta1\ifnum\@tempcnta<#1\repeat}}}
\def\my@dot{\hbox{\hss\vbox to\z@{\vss\hbox{\hss.\hss}\vss}\hss}}
%
%
%NEW (sub)eqncases environment
%in version 1.4
%
\newcount\@eqnccnt\@eqnccnt\z@
\newsavebox\@eqc@a
\newsavebox\@eqc@b
\newsavebox\@eqc@c
\newsavebox\@eqc@d
\newsavebox\@eqc@e
\newsavebox\@eqc@f
\newsavebox\@eqc@g

\let\@eqnnum@old=\relax

\def\eqncases{%
 \let\@eqncnum=\@eqnnum%
 \@eqncases}
\def\subeqncases{%
 \ifx\@currentlabel\theequation%
  \global\c@subequation\@ne%
  \let\@currentlabel=\thesubequation%
  \let\@eqncnum=\sub@@eqnnum%
  \let\@eqnstepcounter=\sub@eqnstepcounter%
  \let\@eqndowncounter=\sub@eqndowncounter%
 \else%
  \let\@eqncnum=\@eqnnum% bug fix
 \fi%
 \@eqncases}

\def\@eqncases{%
 \global\let\@eqnnum@old=\@eqnnum% bug fix
 \global\setbox\@eqc@a=\vbox\bgroup\normalbaselines\m@th%
 \setbox\@eqc@b=\vbox{}% bug fix
 \setbox\@eqc@f=\vbox{}%
%%
 \let\noalignorig=\noalign%
 \def\noalign##1{%
  \typeout{\protect\noalign\space cannot be used in (sub)eqncases-env.(\protect\noalign\space ignore)}}
%%
 \let\\=\@eqnccr\ialign\bgroup\global\@eqnccnt\z@$##\hfil$&%
 \global\@eqnccnt\@ne\quad\strut##\hfil\crcr}

\def\endeqncases{\@@eqnccr\egroup\egroup\mk@eqncnum%
 \@eqndowncounter}% bug fix
\def\endsubeqncases{\@@eqnccr\egroup\egroup\mk@eqncnum%
 \@eqndowncounter}% bug fix

\def\@eqnccr{\@ifnextchar[{\@@qnccr}{\@@qnccr[\jot]}}
\def\@@qnccr[#1]{%
 \@@eqnccr\noalignorig{\vskip#1\relax%
  \global\setbox\@eqc@f=\vbox{\vbox{\rule{\z@}{#1}}\unvbox\@eqc@f}}}
\def\@@eqnccr{\let\@tempa=\relax%
 \ifcase\@eqnccnt\def\@tempa{&}\or\def\@tempa{}\fi%
%
% cases-num-column is contained in \@eqc@b
% and \@eqc@b is as an interface-box to \mk@eqncnum.
%
 \if@eqnsw\global\setbox\@eqc@b=\vbox{\unvbox\@eqc@b\hbox{\@eqncnum}}%
 \@eqnstepcounter\else\global\setbox\@eqc@b=\vbox{\unvbox\@eqc@b\hbox{}}\fi%
 \global\@eqnswtrue\@tempa\cr}

\def\mk@eqncnum{%
 \left\{\;\vcenter{\copy\@eqc@a}\right.%
 \def\@num{%
    \hbox{\vrule height\ht\@eqc@c depth\dp\@eqc@c width\z@}}%
 \def\@last{%
  \setbox\@eqc@a=\vbox{\unvbox\@eqc@a\unskip\global\setbox\@eqc@c=\lastbox}}%
%
% in next loop \@eqc@c contribute as an interface box
%              \@eqc@d assembles empty boxes which ht&dp is of eq-columns.
%
% \@num : put the 0wd box whose ht&dp is match up to those of \@eqc@c
% \@last : pick up the last box from \@eqc@a and set it to \@eqc@c
%
 \@last\setbox\@eqc@d=\vbox{\@num}\@last\@last%
 \loop%
  \setbox\@eqc@d=\vbox{\@num\unvbox\@eqc@d}\@last\@last%
 \ifhbox\@eqc@c\repeat%
%
 \@tempdima=\wd\@eqc@d%
 \setbox\@eqc@f=\vbox{\unvbox\@eqc@f\hbox{}}%
 \def\@num{%
  \hbox{\box\@eqc@a\hbox to\@tempdima{\hss\box\@eqc@c}}}%
 \def\@last{%
  \setbox\@eqc@b=\vbox{\unvbox\@eqc@b\unskip\global\setbox\@eqc@c=\lastbox}%
  \setbox\@eqc@d=\vbox{\unvbox\@eqc@d\unskip\global\setbox\@eqc@a=\lastbox}%
  \setbox\@eqc@f=\vbox{\unvbox\@eqc@f\unskip\global\setbox\@eqc@g=\lastbox}%
 }%
%
% in next loop \@eqc@c and \@eqc@a contribute as interface boxes
%              \@eqc@e assembles ht&dp-fitted num-columns.
%
% Known bug : \noalign results un-exact num-colums.
%           : but \\[XXpt] is worked instead of \noalign{\vskip...}.
%
% \@num : make hbox which contains \@eqc@a(eq-col) and \@eqc@c(num-col)
% \@last : pick up the last box from \@eqc@b(num-col-box) and set to \@eqc@c
%          pick up the last box from \@eqc@d(ht&dp-box) and set to \@eqc@a
%          pick up the last box from \@eqc@f(skip-box) and set it to \@eqc@g
%
 \@last\setbox\@eqc@e=\vbox{\@num}\@last%
 \loop%
  \setbox\@eqc@e=\vbox{\@num\kern\ht\@eqc@g\unvbox\@eqc@e}\@last%
 \ifhbox\@eqc@c\repeat%
%
 \global\setbox\@eqc@a=\box\@eqc@e%
 \gdef\@eqnnum{\@eqncnum\global\let\@eqnnum=\@eqnnum@old}%
}%

\def\@eqncnum{%
 $\vcenter{\box\@eqc@a}$%
 \setbox\@eqc@a=\box\voidb@x%
 \setbox\@eqc@b=\box\voidb@x%
 \setbox\@eqc@c=\box\voidb@x%
 \setbox\@eqc@d=\box\voidb@x%
 \setbox\@eqc@e=\box\voidb@x%
 \setbox\@eqc@f=\box\voidb@x%
 \setbox\@eqc@g=\box\voidb@x%
}

%
%CASES environment
%
\def\cases{%
 \left\{\;\vcenter\bgroup\normalbaselines\m@th%
 \def\@cr{\@ifnextchar[{\@@cr}{\@@cr[\jot]}}%
 \def\@@cr[##1]{\cr\noalign{\vskip##1\relax}}\let\\=\@cr%
 \ialign\bgroup$##\hfil$&\quad\strut##\hfil\crcr}
\def\endcases{\crcr\egroup\egroup\right.}

%
%   bigmathstrut
%
\def\bigmathstrut{\vphantom{\displaystyle{1\atop1}}}
%
\endinput
%
%Tiny document
%
mathematical envirnment

i) equation environment ( centering multi-eq-lines )
   No numbering can be done with '*'

\begin{equation}
f(x) = .... \\
g(x) = ....
\end{equation}

Compiled image is,

    f(x) = .... (1.1)

  g(x) = ........ (1.2)


ii) subequation environment ( centering multi-eq-lines with sub-eq no.)
    No numbering can be done but it is nonsense.

\begin{subequation}
f(x) = .... \\
g(x) = ....
\end{subequation}

Compiled image is,

    f(x) = ....(1.1a)

  g(x) = ........(1.1b)


iii) eqnarray environment ( aligning ,at '&', multi-eq-lines )
     No numbering can be done with '*'

\begin{eqnarray}
f(x)&=&.... \\
g(x)&=&....
\end{eqnarray}

Compiled image is,

f(x) = .... (1.1)

g(x) = ........ (1.2)


iv) subeqnarray environment ( aligning ,at '&', multi-eq-lines with sub-eq no. )
    No numbering can be done but it is nonsense.

\begin{subeqnarray}
f(x)&=&.... \\
g(x)&=&....
\end{subeqnarray}

Compiled image is,

f(x) = ....(1.1a)

g(x) = .......(1.1b)

\thesubequation is used in sub(equation|eqnarray) environment.
\ref command is also applied in sub* envirnment.


v) eqncases environment is the case environment with equation numbering
   with every items, and also subeqncases is with subeqation numbering.
   For each column, nonumber can be done. And after endsubeqncases nonumber
   means usual nonumber command of eqnarray.
   (sub)eqncases environment is only one time in (sub)(equation/eqnarray)
   environment on those of column. In (sub)eqnarray, (sub)eqncases must be
   located at third column. And also (sub)eqncases must not be nested.
  (in subeqnarray env, numbering is forced to subequation.)

\begin{eqnarray}
f(x) &=& \begin{subeqncases}
   1 & if $x>0$\\
  -1 & if $x\le0$
 \end{subeqncases}\\
g(x) &=& \tan x
\end{eqnarray}

Compiled image is,

/~  1  if x>0(1.1a)
f(x) = {
\_ -1  if x<=0(1.1b)

g(x) = tan x (1.2)

If only one numbering for cases, it is available with cases environment and
no numbering is able to use both cases and nonumber;

\begin{eqnarray}
f(x) &=& \begin{cases}
   1 & if $x>0$\\
  -1 & if $x\le0$
 \end{cases}\\
g(x) &=& \tan x
\end{eqnarray}

Compiled image is,

/~  1  if x>0
f(x) = { (1.1)
\_ -1  if x<=0

g(x) = tan x (1.2)


vi) In multiline-eqs, \textin command can be very useful.
    This line can be forced not to be aligned.

\begin{eqnarray}
f(x)&=&.....\\
\textin{where, x is in ...}
g(x)&=&.....
\end{eqnarray}

    Compiled image is,

f(x)=...... (1.1)

 where, x is in ...

g(x)=..... (1.2)

    In \textin \par and \\ (breakline) is available, but some command,
    for example \verb, is not available.


vii) re-sizable triple-dot commands(\cdot,\vdots,\ddots,and \qdots).

normalsize is \hdots, \vdots, \ddots, \qdots
(size of \ddots and \qdots is automatically changed with font-size)

re-sizable  is \Hdots[#1], \Vdots[#1], \Ddots[#1], \Qdots[#1]
(#1 is size of width)


viii) AMS-like command is also supported.

\numberwithin
\newfunction,\newoperator,\newrelation ... etc.

\varXXXX means slanted Greek capital font in math-mode.


ix) lefteqno, righteqno and fleqn command

\lefteqno   ... number of equation is located in left side.
\righteqno  ... number of equation is located in right side.
\fleqn      ... equation is flushed in the left side.

%********************************************************
%* TEST.TEX *
%********************************************************
\documentstyle[mathtech]{article}

\begin{document}
%\fleqn
%\lefteqno
\righteqno
\begin{equation}\label{0}% \label{0} is same as \label{1}
   f(x)=\cos(\varepsilon x) \label{1} \\
   g(x)=\frac{\sin x}{x} \label{2}
\end{equation}
(\ref{0})(\ref{1})(\ref{2})
%
\begin{subequation}\label{3}% \label{3} means theequation of this sub-one
   f(x)=\cos(\varepsilon x) \label{4} \\
   g(x)=\frac{\sin x}{x} \label{5}
\end{subequation}
(\ref{3})(\ref{4})(\ref{5})
%
\begin{equation}\label{6}% \label{6} is same as \label{7}
  f(x)=\begin{eqncases}
           1 & if~~$x=0$ \label{7}\\
           0 & others \label{8}
         \end{eqncases} \label{9}\\ % \label{9} is same as \label{8}
  g(x)=x^2\label{10}
\end{equation}
(\ref{6})(\ref{7})(\ref{8})(\ref{9})(\ref{10})
%
\begin{equation}\label{11}
  f(x)=\begin{subeqncases}
           1 & if~~$x=0$ \label{12}\\
           0 & others \label{13}
         \end{subeqncases} \label{14}\\ % \label{14} is same as \label{11}
  g(x)=x^2\label{15}
\end{equation}
(\ref{11})(\ref{12})(\ref{13})(\ref{14})(\ref{15})
%
\begin{subequation}\label{16}% \label{16} means theequation of this sub-one
  f(x)=\begin{eqncases}
           1 & if~~$x=0$ \label{17}\\
           0 & others \label{18}
         \end{eqncases} \label{19}\\ % \label{19} is same as \label{18}
  g(x)=x^2\label{20}
\end{subequation}
(\ref{16})(\ref{17})(\ref{18})(\ref{19})(\ref{20})
%
\begin{subequation}\label{21}% \label{21} means theequation of this sub-one
  f(x)=\begin{subeqncases}
           1 & if~~$x=0$ \label{22}\\
           0 & others \label{23}
         \end{subeqncases} \label{24}\\ % \label{24} is same as \label{23}
  g(x)=x^2\label{25}
\end{subequation}
(\ref{21})(\ref{22})(\ref{23})(\ref{24})(\ref{25})
%
\begin{eqnarray}\label{26} % \label{26} is same as \label{27}
  f(x)&=&\begin{eqncases}
           1 & if~~$x=0$ \label{27}\\
           0 & others \label{28}
         \end{eqncases} \label{29}\\ % label{29} is same as \label{28}
  g(x)&=&x^2\label{30}
\end{eqnarray}
(\ref{26})(\ref{27})(\ref{28})(\ref{29})(\ref{30})
%
\begin{eqnarray}\label{31}
  f(x)&=&\begin{subeqncases}
           1 & if~~$x=0$ \label{32}\\
           0 & others \label{33}
         \end{subeqncases} \label{34}\\ % label{34} is same as \label{31}
  g(x)&=&x^2\label{35}
\end{eqnarray}
(\ref{31})(\ref{32})(\ref{33})(\ref{34})(\ref{35})
%
\begin{subeqnarray}\label{36} % \label{36} means theequation of this sub-one
  f(x)&=&\begin{eqncases}
           1 & if~~$x=0$ \label{37}\\
           0 & others \label{38}
         \end{eqncases} \label{39}\\ % label{39} is same as \label{38}
  g(x)&=&x^2\label{40}
\end{subeqnarray}
(\ref{36})(\ref{37})(\ref{38})(\ref{39})(\ref{40})
%
\begin{subeqnarray}\label{41} % \label{41} meas theequation of this sub-one
  f(x)&=&\begin{subeqncases}
           1 & if~~$x=0$ \label{42}\\
           0 & others \label{43}
         \end{subeqncases} \label{44}\\ % label{44} is same as \label{43}
  g(x)&=&x^2\label{45}
\end{subeqnarray}
(\ref{41})(\ref{42})(\ref{43})(\ref{44})(\ref{45})
%
\end{document}

