% sftabulr.sty 
% by Shinsaku Fujita 
% Copyright (C) S. Fujita (2000). All rights reserved. 
% Version 1.00 2000/01/05
%
%  作成者: 藤田眞作
%          fujitas@chem.kit.ac.jp
%
%   藤田眞作「LaTeX2e階梯」アジソンウェスレイ (1996) 掲載
%     第20章
%   藤田眞作著「入門・縦横文書術」所載
%
%\typeout{Option Style `sftabulr.sty' by S. Fujita}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{sftabulr}
\def\versi@ndate{January 5, 2000}
\def\versi@nno{ver1.00}
\def\copyrighth@lder{SF} % Shinsaku Fujita
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{Option Style `\j@urnalname' (\versi@nno) <\versi@ndate>\space 
[\copyrighth@lder]}
\typeout{藤田眞作著「入門・縦横文書術」所載}
%
% TabBC.sty by Shinsaku Fujita
% 1996/05/21 (v.1.00)
% 藤田眞作「LaTeX2e階梯」アジソンウェスレイ (1996) 掲載
% 第20章
%
%
%表組みリストを作る
\def\Hyogumilist{}
\def\HLset#1{\begingroup\let\tempCS=\relax
 \xdef#1{#1\tempCS}\endgroup}
\def\ADDtoTL{\HLset\Hyogumilist}
%始め命令
\newcount\TESTcnt
\def\tabularBC#1#2{%
\global\TESTcnt=#1 \global\@tempdima=#2
\tabular}%
%終わり命令
\def\endtabularBC{%
\noalign{\begingroup \let\tempCS=\relax
\let\tempCT=\relax \def\Hyogumilist{\tempCT}
\loop \global\advance\TESTcnt\m@ne
\ifnum\TESTcnt>0 \ADDtoTL\relax \repeat \endgroup
\def\@tempa{& \omit \hskip\@tempdima}%表組みの制御行の部材
\def\@tempb{\omit \hskip\@tempdima}%表組みの制御行の部材
\global\let\tempCS=\@tempa\global\let\tempCT=\@tempb}%
\Hyogumilist \\ \endtabular}
%
%TabFC.sty by Shinsaku Fujita
% 1996/05/21 (v.1.00)
% 藤田眞作「LaTeX2e階梯」アジソンウェスレイ (1996) 掲載
% 第20章
% 
\def\HyogumiList{}
\def\HLSET#1#2{\begingroup\let\tempCS=\relax
\xdef#1{#1\tempCS#2}\endgroup}
\def\ADDtoHList#1{\HLSET\HyogumiList{{#1}}}
\newcount\TESTcnt
%始め命令
\def\tabularFC#1{\gdef\@tempa{#1}\tabular}%
%終わり命令
\def\endtabularFC{%
\noalign{\global\TESTcnt=0\relax
\let\tempCS=\relax\let\tempCT=\relax 
\expandafter\@for\expandafter\member%
 \expandafter:\expandafter=\@tempa\do{%
 \ifnum\TESTcnt=\z@ \edef\HyogumiList{\tempCT{\member}}%
 \else \expandafter\ADDtoHList{\member}\fi
 \global\advance\TESTcnt\@ne}%
\def\@tempb##1{& \omit \hskip##1}%
\def\@tempc##1{\omit \hskip##1}%
\global\let\tempCS=\@tempb\global\let\tempCT=\@tempc}%
\HyogumiList \\ \endtabular}
\endinput
%
% 以下は例文
% 藤田眞作「LaTeX2e階梯」アジソンウェスレイ (1996) 掲載
% 第20章p277--281
%
\documentclass[a4j]{jarticle}
\usepackage{sftabulr}
\begin{document}
\begin{tabularBC}{3}{3cm}{|l|c|r|}
\hline
ragged right & centering & ragged left\\
left & center & right \\
\hline
\end{tabularBC}

\begin{tabularFC}{2cm,3cm,2cm}{|l|c|r|}
\hline
left & center & right \\
\hline
左 & 中央 & 右 \\
\hline
\end{tabularFC}

\end{document}
