% daihon.sty 
% by Shinsaku Fujita 
% Copyright (C) S. Fujita (2000). All rights reserved. 
% Version 1.00 2000/01/04
%
%  作成者: 藤田眞作
%          fujitas@chem.kit.ac.jp
%
%   藤田眞作著「入門・縦横文書術」所載
%
%\typeout{Option Style `daihon.sty' by S. Fujita}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{daihon}
\def\versi@ndate{January 4, 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{藤田眞作著「入門・縦横文書術」所載}
%
% 目次の出力様式
%
\def\l@section{\@dottedtocline{1}{1zw}{5zw}}
\def\l@subsection{\@dottedtocline{2}{2zw}{6zw}}
%
%目次の三点リーダー
%藤田眞作「LaTeXまくろの八衢」
%アジソンウェスレイジャパン(1995)第19章参照
%
\def\@dottedtocline#1#2#3#4#5{%
  \vskip\toclineskip \@plus.2\p@%
  {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
    \parindent #2\relax\@afterindenttrue
   \interlinepenalty\@M
   \leavevmode
   \@lnumwidth #3\relax
   \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
    {#4}\nobreak
 \leaders\hbox to 0.33333zw{\hfil\raise.26zw\hbox{.}\hfil}%
     \hfill \nobreak\hbox to\@pnumwidth{%
         \hss\reset@font\rmfamily\small \normalcolor #5}\par}}
%
% 漢数字変換
% tatesujiパッケージが必要
% jdkintouパッケージが必要
%
\@ifundefined{漢数字}{\input{tkokugo.sty}}{}
\@ifundefined{tatesuji}{\input{tatesuji.sty}}{}
\@ifundefined{jidoukintou}{\input{jdkintou.sty}}{}
\def\thesection{\TateSuji{section}}
\def\thesubsection{\TateSuji{subsection}}
\def\TateSuji#1{\expandafter\@TateSuji\csname c@#1\endcsname}
\def\@TateSuji#1{\expandafter\@T@teSuji\number #1\@nil}
\def\@T@teSuji#1\@nil{\tatesuji{#1}}
\def\zenkaku{　}%全角空白
%
% 第一幕、第二幕
% sectionカウンターを流用
%
\newbox\sectdaijibox
\def\Maku#1{\stepcounter{section}%
\protected@edef\@currentlabel
  {\p@section\protect\tatesuji{\the\c@section}}%
\sectionmark{#1}%
\addcontentsline{toc}{section}{%
 \protect\numberline{第\protect\tatesuji{\the\c@section}幕}#1}%
\par \@tempdima=\baselineskip\advance\@tempdima-1zw
\vskip\@tempdima\def\tempaaa{#1}%
\setbox\sectdaijibox=\vbox to2\baselineskip{\vss\noindent
\hbox to\hsize{%
\hskip5zw\LARGE 第\thesection 幕
\ifx\tempaaa\empty\relax\else
{\normalsize \zenkaku 〔#1〕}\fi\hss}\vss}%
\@tempdima=2\baselineskip\advance\@tempdima-.5zw
\dp\sectdaijibox=.5zw\ht\sectdaijibox=\@tempdima
\box\sectdaijibox\par}
%
% 第一場、第二場
% subsectionカウンターを流用
%
\def\Ba#1{\stepcounter{subsection}%
\protected@edef\@currentlabel
  {\p@subsection\protect\tatesuji{\the\c@subsection}}%
\subsectionmark{#1}%
\addcontentsline{toc}{subsection}{%
 \protect\numberline{第\protect\tatesuji{\the\c@subsection}場}#1}%
\par \@tempdima=\baselineskip\advance\@tempdima-1zw
\vskip\@tempdima\def\tempaaa{#1}%
\setbox\sectdaijibox=\vbox to2\baselineskip{\vss\noindent
\hbox to\hsize{%
\hskip5zw\Large 第\thesubsection 場
\ifx\tempaaa\empty\relax\else
{\normalsize \zenkaku 〔#1〕}\fi\hss}\vss}%
\@tempdima=2\baselineskip\advance\@tempdima-.5zw
\dp\sectdaijibox=.5zw\ht\sectdaijibox=\@tempdima
\box\sectdaijibox\par}
%
% haiyaku環境
%
\def\haiyakudaiji{登場人物}%
%\def\haiyakudaiji{配役}%きりかえ
\def\haiyaku{%
\par\vskip.5\baselineskip
\begingroup
\noindent\hbox to5zw{\haiyakudaiji\hss}\hskip1zw
\tabcolsep=0pt\begin{tabular}[t]{llll}}
\def\endhaiyaku{%
&\omit \hskip.2\hsize & \omit \hskip.2\hsize & \\
\end{tabular}\endgroup\par}
%
% ト書環境
%
\def\togaki{\list{}{%
  \labelwidth6zw\leftmargin6zw
  \rightmargin2zw\itemindent1zw %\partopsep\z@
  \labelsep=1zw\parsep=\z@ \listparindent=1zw}%
\small\item[]}
\let\endtogaki=\endlist
%
% 台詞環境
%
\def\serifu{\list{}{%
  \labelwidth5zw\leftmargin2zw
  \rightmargin0zw
  \itemindent4zw \partopsep\z@
  \labelsep=1zw\parsep=\z@ \listparindent=1zw
\let\makelabel\seriful@bel}}
\let\endserifu=\endlist
\def\seriful@bel#1{\setbox\@tempboxa=\hbox{\jidoukintou{\bf #1}}%
\ifdim\wd\@tempboxa>5zw\relax\hbox{\jidoukintou{\bf #1}}\else
\hbox to5zw{\jidoukintou{\bf #1}\hss}\fi}
%
% タイトル
%
\def\@maketitle{\newpage\null\let\footnote\p@thanks
{%
\setbox\sectdaijibox=\vbox to4\baselineskip{\vss\noindent
\hbox to\hsize{\hskip2zw\LARGE\bfseries \@title\hss}\vss}%
\@tempdima=4\baselineskip\advance\@tempdima-.5zw
\dp\sectdaijibox=.5zw\ht\sectdaijibox=\@tempdima
\box\sectdaijibox\par}
\noindent\hspace*{6zw}{\large\tabcolsep=0pt
      \begin{tabular}[t]{l}%
        \@author
      \end{tabular}\par}%
\noindent\hspace*{12zw}\@date%
\par\vskip 2\baselineskip}
%
% 柱文
%
\if@twoside
  \def\ps@headings{\let\ps@jpl@in\ps@headnombre
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@evenhead{{\leftmark}\hfil\thepage}%
    \def\@oddhead{\thepage\hfil\rightmark}%
    \let\@mkboth\markboth
\def\sectionmark##1{\markboth{%
%		第\protect\tatesuji{\the\c@section}幕 \hskip1zw
		第\protect\漢数字{section}幕 \hskip1zw
     ##1}{}}%
  \def\subsectionmark##1{\markright{%
%		第\protect\tatesuji{\the\c@subsection}場 \hskip1zw
		第\protect\漢数字{subsection}場 \hskip1zw
     ##1}}%
  }
\else % if not twoside
  \def\ps@headings{\let\ps@jpl@in\ps@headnombre
    \let\@oddfoot\@empty
    \def\@oddhead{\thepage\hfil\rightmark}%
    \let\@mkboth\markboth
\def\sectionmark##1{\markright{%
%		第\protect\tatesuji{\the\c@section}幕 \hskip1zw
		第\protect\漢数字{section}幕 \hskip1zw
     ##1}{}}%
  }\fi
\pagestyle{headings}
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%
%以下は例文
% test22.tex
% by Shinsaku Fujita (C) 2000
%
%  作成者: 藤田眞作
%          fujitas@chem.kit.ac.jp
%
%   藤田眞作著「入門・縦横文書術」所載
% 
\documentclass[12pt,twocolumn,a4j,twoside,draft]{tarticle}
%\documentclass[12pt,a4j,twoside,draft]{tarticle}
%\documentclass[12pt,a4j,draft]{tarticle}
\usepackage{daihon}
\usepackage{furikana}
\columnsep=2zw
\columnseprule=.4pt

\begin{document}

\title{弟子 {\normalfont\rmfamily\normalsize（ていし）}}
\author{中島敦 原作 \\ 角野丸平 脚本}
\date{}

\maketitle

\tableofcontents

\begin{haiyaku}
孔子   &&  \\
子路   &(孔子の弟子) &  \\
友人Ａ &(子路の遊侠時代の友人)& \\
友人Ｂ &(子路の遊侠時代の友人)& \\ 
\end{haiyaku}

\Maku{子路、孔子にまみえる}\label{maku2}
\begin{togaki}
すでに名の出ていた孔子に、子路は興味をもちつつ、
大した人物ではないと思っている。「学者面を
した軟弱な\kana{輩}{やから}に違いない。ひとつ
おどかしてやれ」と気負いたって出かける。
\end{togaki}
\Ba{孔子の学び舎の前庭にて}
\begin{togaki}
孔子の家では、孔子と弟子たちが、
\kana{瑟}{おおごと}を\kana{弾}{ひ}きながら、
おだやかな議論を続けている。
子路は、携えてきた雄にわとりと牝豚を
せきたてて、けたたましく孔子の家に入る。
\end{togaki}
\begin{serifu}%
\item[子路] \kana{孔丘}{こうきゅう}はどこじゃ。
\item[孔子] わたしが丘じゃが、そなたは、
だれじゃ。何用でこられた。
\end{serifu}
\begin{togaki}
予想に反して孔子の体格が大柄で、野太い声の迫力におされて、
子路は息をのむ。一息の沈黙。孔子、威厳をもって、
押さえつけるように。
\end{togaki}
\begin{serifu}%
\item[孔子] そんなに、騒がんでもよろしい。
話もできないではないか。まず、
雄にわとりと牝豚をしずめなされ。
\end{serifu}
\begin{togaki}
子路、素直に、雄にわとりと牝豚を追い立てるのをやめる。
\end{togaki}
\begin{serifu}%
\item[孔子] ところで、そなたは、何をこのむか。
\item[子路] もちろんのこと、わしは、長剣じゃ。
国を治めるのは、剣の力じゃ。
\item[孔子] 学問は、きらいか。
\item[子路] 学問は、なんの役に立とう。
もう一度言う、国を治めるものは、剣の力じゃ。
学問など屁の突っ張りにもならぬは。
\item[孔子] そんなことはない。たとえば、
君主が間違っていた場合に、それを諌める臣下が
なければ、国の方針を誤ってしまうではないか。
\end{serifu}
\Ba{街の中で}
\begin{togaki}
子路はすでに孔子の弟子になっている。
街を歩いいて、久しぶりにかっての友人と会う。
友人は、子路の風体をじろじろと見て。
\end{togaki}
\begin{serifu}%
\item[友人Ａ] おい、子路よ。
その恰好はなんだ。
ずいぶんみすぼらしい\bou{なり}だな。
\item[友人Ｂ] これが、儒服というやつか。
昔のそなたとは、おお違いだ。
長剣が恋しくはないかい。
\item[友人Ａ] どうだい。
あの孔丘という先生は、とんだ
食わせものだというじゃないか。
したり顔をして誠しやかなことを説いていると、
えらく甘い汁が吸えるものと見えるなあ。
\end{serifu}

\Maku{諸国巡回}
\Ba{孔子の不遇}
\Ba{子路、衛に出仕}
\Ba{子路の善政}
\setcounter{section}{9}
\Maku{子路の最後}
\Ba{膾のごとく}
\begin{togaki}
子路は衛の孔家に仕えている。衛の政変。
子路の死の間際。
\end{togaki}
\begin{serifu}
\item[子路]見よ！君子は、
冠を、正しうして、しぬものだぞ！
\end{serifu}

\end{document}
