Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!aist-nara!wnoc-kyo-news!kuis-news!kuamp!imamura
From: imamura@kuamp.kyoto-u.ac.jp (Toshiyuki Imamura)
Subject: Re: LaTeX math-tech.sty(AMS-LaTeX like style file)
Message-ID: <1994Sep13.104252.26679@kuamp.kyoto-u.ac.jp>
Sender: news@kuamp.kyoto-u.ac.jp (USENET News System)
Organization: Div. of Applied Systems Science, Kyoto Univ., JAPAN
X-Newsreader: mnews [version 1.18PL3] 1994-08/01(Mon)
References: <1994Sep12.122534.16612@kuamp.kyoto-u.ac.jp>
Date: Tue, 13 Sep 1994 10:42:52 GMT
Lines: 416
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:5240
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=5240&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)!&1~%7%9$G$9!#(B

<1994Sep12.122534.16612@kuamp.kyoto-u.ac.jp>$B$N5-;v$K$*$$$F(B
imamura@kuamp.kyoto-u.ac.jp$B$5$s$O=q$-$^$7$?!#(B

>> $BB4=$O@MQ$N<jEA$$$r$9$k$?$S$KC_@Q$5$l$F$-$?(BLaTeX$B$N%^%/%m%U%!%$%k$,(B
>> $B$"$j$^$9$N$G!"K;$7$/$J$kA0$KEj9F$7$^$9!#%P%0>pJs$J$I$*4s$;2<$5$$!#(B

<bear@hashi1.civil.tohoku.ac.jp>$B$5$s$h$j!"%"%I%P%$%9$rD:$-$^$7$?!#(B
\endinput$B$N8e$K4JC1$J%3%a%s%H$r$D$1$?$N$H(B\ref$B$K$h$k(Bsub-eq$B$N;2>H$J$I$N(B
$B%P%0$r<h$j$^$7$?!#$^$?(B\textin$B%3%^%s%I$,J#?t9T$KBP1~$7$F$J$+$C$?ItJ,$r(B
$B=$@5$7$^$7$?!#(B

$B$=$l$+$i!"(BMS-DOS$B$G$NMxMQ$b9M$($i$lF@$k$H$N$3$H$G%U%!%$%kL>$r(B8$BJ8;z$K$7$^$7$?!#(B

bear@hashi1.civil.tohoku.ac.jp$B$5$s$I$&$b$"$j$,$H$&$4$6$$$^$7$?!#(B

%
%M A T H T E C H . S T Y
%
% MATHEMATICAL THESIS TECHNICAL-STYLE option Version 1.1 released 13 Sep 1994
%                                            Version 1.0 released 23 Jul 1993
%  for LaTeX /( AMS-LaTeX )
%
% 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* envirnment
%eqnarray and subeqnarray and sub equation envirnment
%textin command
%
%newfunction and newoperator command
%
%and the slanted capital Greek, and resizable dots command.
%
%Vdots, Hdots, Ddots, Qdots
%
%
%
\def\loadnewfont#1#2{%
  \def\tfm{#2}
  \fontcheck{\tfm5}\iffontexistence%
    \expandafter\font\csname#1v\endcsname=\tfm5\relax%
    \@addfontinfo\@vpt{%
      \expandafter\def\csname p#1\endcsname{\csname#1v\endcsname}}\fi%
  \fontcheck{\tfm7}\iffontexistence%
    \expandafter\font\csname#1vii\endcsname=\tfm7\relax%
    \@addfontinfo\@viipt{%
      \expandafter\def\csname p#1\endcsname{\csname#1vii\endcsname}}\fi%
  \fontcheck{\tfm10}\iffontexistence%
    \expandafter\font\csname#1x\endcsname=\tfm10\relax%
    \expandafter\font\csname#1xi\endcsname=\tfm10 scaled \magstephalf\relax%
    \expandafter\font\csname#1xii\endcsname=\tfm10 scaled \magstep1\relax%
    \expandafter\font\csname#1xiv\endcsname=\tfm10 scaled \magstep2\relax%
    \expandafter\font\csname#1xvii\endcsname=\tfm10 scaled \magstep3\relax%
   \@addfontinfo\@xpt{%
      \expandafter\def\csname p#1\endcsname{\csname#1x\endcsname}}%
    \@addfontinfo\@xipt{%
      \expandafter\def\csname p#1\endcsname{\csname#1xi\endcsname}}%
    \@addfontinfo\@xiipt{%
      \expandafter\def\csname p#1\endcsname{\csname#1xii\endcsname}}%
    \@addfontinfo\@xivpt{%
      \expandafter\def\csname p#1\endcsname{\csname#1xiv\endcsname}}%
    \@addfontinfo\@xviipt{%
      \expandafter\def\csname p#1\endcsname{\csname#1xvii\endcsname}}\fi%
  \expandafter\gdef\csname#1\endcsname{\protect\csname p#1\endcsname}}

%
\newif\iffontexistence \fontexistencefalse
\def\fontcheck#1{%
 \batchmode \font\fonts@mple=#1\relax \errorstopmode%
 \ifx\fonts@mple\nullfont \global\fontexistencefalse%
 \else \global\fontexistencetrue\fi}
%
%\loadnewfont{scr}{rsfs}% scrpit type font
%\loadnewfont{Bbb}{msbm}% blackboard bold face font
%\loadnewfont{frak}{eufm}% german frake font
%
%
%
\def\numberwithin#1#2{%
 \@addtoreset{#1}{#2}
 \expandafter\def\csname the#1\endcsname{\csname the#2\endcsname.\arabic{#1}}}
%
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\def\figlabel#1{\def\@captype{figure}\refstepcounter\@captype\label{#1}}
\def\tablabel#1{\def\@captype{table}\refstepcounter\@captype\label{#1}}
%
%
%
\def\indexname{Index}
\def\refname{Reference}
\def\appendixname{Appendix}
\def\contentsname{Contents}
\def\acknname{Acknowledgement}
%
\def\thebibliography#1{\section*{\refname\@mkboth{\refname}{\refname}}
 \addcontentsline{toc}{another}{\refname}
 \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}
%
\def\acknowledgement{\section*{\acknname\@mkboth{\acknname}{\acknname}}
 \addcontentsline{toc}{another}{\acknname}}
%
\newcounter{appendix}
\setcounter{appendix}{0}
\def\theappendix{\appendixname. \Alph{appendix}}
%
\def\appendix{%
 \def\addcontentsline##1##2##3{\relax}
 \refstepcounter{appendix}
 \@ifstar{\def\theappendix{\appendixname}\@appendix}{\@appendix}}
\def\@appendix#1{%
 \def\thesection{\theappendix}\section{#1}
 \if@filesw \begingroup
   \def\protect##1{\string\string\string##1\string\space\space}
   \setbox\@tempboxa\hbox{\appendixname. MM}
   \edef\@tempa{\write\@auxout{\string\@writefile{toc}{\protect
     \contentsline{appendix}{\protect\hbox to \the\wd\@tempboxa%
     {\theappendix\protect\hss}\protect\hskip 2.3ex plus 0.2ex#1}{\thepage}}}}
   \@tempa\if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
%
\@namedef{appendix*}{\appendix}

\let\l@appendix=\l@section
\let\l@another=\l@section
%
%
%
%
\newtheorem{theorem}{Theorem}[section]
\newtheorem{cor}{Cor}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{algorithm}{Algorithm}[section]
%
%
%
\newcounter{subequation}[equation]
\def\thesubequation{\theequation\alph{subequation}}
%
% New equation, multilinable math with centering align.
% New subequation, numbering with subeqno.
%
\def\equation{\stepcounter{equation}%
  \def\@eqnstepcounter{\stepcounter{equation}}
  \let\@@eqncr=\@@@eqncr
  \let\@currentlabel=\theequation\@equation}
\def\endequation{%
  \@@@eqncr\egroup\global\advance\c@equation\m@ne$$\global\@ignoretrue}

\@namedef{equation*}{\def\@eqncr{\nonumber\@seqncr}\equation}
\@namedef{endequation*}{\global\advance\c@equation\m@ne%
\nonumber\endequation}

\def\subequation#1{%
  \def\@eqnstepcounter{\stepcounter{subequation}}
  \stepcounter{equation}\global\c@subequation\@ne
  \ifx#1==\label\let\@currentlabel=@subequation#1\fi
  \let\@eqnnum=\sub@eqnnum
  \let\@@eqncr=\@@@eqncr
  \let\@currentlabel=\thesubequation\@equation}
\def\endsubequation{%
  \@@@eqncr\egroup$$\global\@ignoretrue}

\def\@equation{%
%
% ref command bug fix
% Thanks to bear@hashi1.civil.tohoku.ac.jp
%
% \let\@currentlabel=\theequation
%
 \global\@eqnswtrue\let\\=\@eqncr
 \tabskip\@centering$$\halign to \displaywidth\bgroup\@eqnsel
  \let\@currentlabel=\theequation
  \hfil$\displaystyle{##}$\hfil&\llap{##}\tabskip\z@\cr}
%
% New eqnarray, such that 2nd column's space are reduced.
% New subeqnarray, numbering with subeqno
%
\def\eqnarray{\stepcounter{equation}%
  \def\@eqnstepcounter{\stepcounter{equation}}
  \let\@currentlabel=\theequation\@eqnarray}

\def\subeqnarray{%
  \def\@eqnstepcounter{\stepcounter{subequation}}
  \stepcounter{equation}\global\c@subequation\@ne
  \let\@eqnnum=\sub@eqnnum
  \let\@currentlabel=\thesubequation\@eqnarray}
\def\endsubeqnarray{\@@eqncr\egroup$$\global\@ignoretrue}

\def\@eqnarray{%
%
% ref command bug fix
% Thanks to bear@hashi1.civil.tohoku.ac.jp
%
% \let\@currentlabel=\theequation% Thanks to bear@hashi1.civil.tohoku.ac.jp
%
 \global\@eqnswtrue%
 \global\@eqcnt\z@\tabskip\@centering\let\\=\@eqncr
 $$\halign to \displaywidth\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}
%
%
\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}
%
% Extend to left eq no
%
%   if you use left eq no , modify the next line to
%
%\def\sub@eqnnum{\hbox to .01pt{}\rlap%
%{\rm\hskip-\displaywidth(\thesubequation)}}
%
\def\sub@eqnnum{\rm(\thesubequation)}
%
%
\def\textin#1{%
 \noalign{\vskip\topsep\parindent0pt%
    \hbox{$\vtop{\hsize\textwidth{#1\hss}}$}\vskip\topsep}\cr}
%
\def\ds#1{{\displaystyle#1}}
\def\ss#1{{\scriptstyle#1}}
\def\sss#1{{\scriptscriptstyle#1}}
%
\def\FRAC#1#2{\frac{\ds{#1}}{\ds{#2}}}
\def\pfrac{\@ifnextchar [{\@pfrac}{\@pfrac[\smash{}]}}
\def\@pfrac[#1]#2#3{\FRAC{\partial^{#1}#2}{\partial#3^{#1}}}
%
%
%
%
\def\newfunction#1{%
  \expandafter\def\csname#1\endcsname{\mathop{\rm #1}\nolimits}}
\def\newoperator#1{%
  \expandafter\def\csname#1\endcsname{\mathop{\rm #1}\limits}}
%
\newoperator{Ker}
\newoperator{Im}
\newfunction{diag}
\newfunction{trace}
\newfunction{Arcsin}
\newfunction{Arccos}
\newfunction{Arctan}
\newfunction{Arcsec}
\newfunction{arcsec}
\newfunction{cosec}
\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}
%
%
%
\def\fillBox{{\rule[-2pt]{5pt}{6pt}}}
\newfont{\bg}{cmr10 scaled\magstep4}
\def\bigzerol{\smash{\hbox{\bg0}}}
\def\bigzerou{\smash{\lower1.7ex\hbox{\bg0}}}
\def\bigzero{\smash{\lower.85ex\hbox{\bg0}}}
%
%  (     )    (  .  )
%  (. . .)    (  .  )
% resizable Hdots (     ) and Vdots (  .  )
%
%  (.    )    (    .)
%  (  .  )    (  .  )
% resizable ddots (    .) and qdots (.    ).
%    Ddots             Qdots
\def\Hdots[#1]{%
  \@tempdima=#1%
  \mathinner{\hbox to \@tempdima{\hss\raise.35\@tempdima\hbox{%
    .\kern.4\@tempdima.\kern.4\@tempdima.}\hss}}}
\def\Vdots[#1]{%
  \@tempdima=#1%
  \mathinner{\hbox to\@tempdima{\hss\hbox to0pt{.}%
     \raise.35\@tempdima\hbox to0pt{.}\raise.7\@tempdima\hbox to0pt{.}\hss}}}
\def\Ddots[#1]{%
  \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}
  \let\cdots=\b@x \let\vdots=\b@x \ddots}
\def\Qdots[#1]{%
  \@tempdima=#1\def\b@x{\hbox to\@tempdima{\hss}}
  \let\cdots=\b@x \let\vdots=\b@x \qdots}
\def\ddots{%
 \setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa
 \mathinner{\hbox to\@tempdima{\hss\raise.7\@tempdima\hbox{.}%
    \kern.2\@tempdima\raise.35\@tempdima\hbox{.}%
    \kern.2\@tempdima\hbox{.}\hss}}}
\def\qdots{%
 \setbox\@tempboxa=\hbox{$\cdots$}\@tempdima\wd\@tempboxa
 \mathinner{\hbox to\@tempdima{\hss\hbox{.}%
    \kern.2\@tempdima\raise.35\@tempdima\hbox{.}%
    \kern.2\@tempdima\raise.7\@tempdima\hbox{.}\hss}}}
\def\hdots{\cdots}
%
%
\endinput
%
%Tiny document
%
mathematical envirnment

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

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

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

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

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

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

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

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

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

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

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

   Compling image is,

f(x)=......

where, x is in ...

g(x)=.....


vi) Some mathematical fonts can be loaded easily.

\loadnewfont{frak}{eufm}

    Above commmad make us use to eufm(German frak font) as '\frak' command,
    and font-size changing is automatically applied.

vii) Slanted Greek Capital font can be used.

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

viii) resizable 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)

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

ix) AMS-like command is also supported.

\numberwithin
\ds,\ss,\sss
\newfunction,\newoperator ... etc.

x) appendix, thebibliography, acknowledgement envirnments.


