発言者: 石原 守
発言日: 2009 10/31 19:07
\oresen* や \oresen** はあるようなので、\oresen を改造して
名前は \Oresen にしてみました。
\documentclass{jarticle}
\usepackage{emathPh}
\makeatletter
\def\Oresen{\def\oresen@@kyokuzahyou{0}\@ifstar{\tenretu}{\@Oresen}}%
\def\@Oresen{%
\edef\by@perl@retu{0}%
\edef\put@kuromaru{0}%
\@ifnextchar<{\@@Oresen}{\@@Oresen<\empty>}}%
\def\@@Oresen<#1>#2{\let\org@sensyu\sensyu
\ifx \empty #1\else\setkeys{emP}{#1}\fi
\def\@Oresen@sub{%
\@ifnextchar[{\@@Oresen@sub}{\@@Oresen@sub[\empty]}}%
\def\@@Oresen@sub[##1]##2(##3,##4){%
\edef\oresen@kyokuzahyou{\oresen@@kyokuzahyou}%
\edef\oresen@soutaizahyou{0}%
\Strsep{##2}{[}\oresen@Vname\oresen@opt
\Strchr\oresen@opt{r}\oresen@tmp
\ifnum\oresen@tmp>\z@\edef\oresen@kyokuzahyou{1}\fi
\Strchr\oresen@opt{s}\oresen@tmp
\ifnum\oresen@tmp>\z@\edef\oresen@soutaizahyou{1}\fi
\@ifnextchar({\@@oresensub@std[##1]\oresen@Vname(##3,##4)}{%
\@ifnextchar[{\@@oresensub@std[##1]\oresen@Vname(##3,##4)}{%
\@@oresensub@brev[##1]\oresen@Vname(##3,##4)}}}%
\def\@@oresensub@brev[##1]##2(##3,##4)##5\@nil{%
\ifthenelse{\equal{##5}{}}{%
\@@oresensub@std[##1]##2(##3,##4)\@nil}{%
\@@oresensub@std[##1]##2(##3,##4)[##5]\@nil}}%
\def\@@oresensub@std[##1]##2(##3,##4)##5\@nil{%
\ifnum\oresen@kyokuzahyou>\z@\Rdef(##3,##4)\@OresenV\else
\edef\@OresenV{(##3,##4)}\fi
\ifnum\oresen@soutaizahyou>\z@\Addvec\@OresenV@old\@OresenV\@OresenV\fi
\expandafter\edef\csname ##2\endcsname{\@OresenV}%
\edef\@oresen@subtmp{{\csname ##2\endcsname}##5}%
\ifnum\put@kuromaru>\z@\expandafter\Kuromaru{\csname ##2\endcsname}\fi
}
\edef\oresen@siten{}%
\Cfor{\def\@OresenVs{#2}}{\not\equal\@OresenVs\empty}{}\do{%
\Strsep\@OresenVs{;}\@OresenV\@OresenVs
\trim\@OresenVs\to\@OresenVs
\ifnum\by@perl@retu=\z@
\else
\expandafter\@tenretu@seppara\@OresenV\@nil
\edef\@OresenV{%
\the\namae@opt\the\tenretu@namae(\tenretu@x,\tenretu@y)\tenretu@n}%
\fi
\expandafter\@Oresen@sub\@OresenV\@nil
\ifthenelse{\equal\oresen@siten\empty}{%
\edef\oresen@siten{\@OresenV}%
}{%
\edef\Oresen@tmp{\@OresenV@old\@OresenV}%
\expandafter\sensyu\Oresen@tmp
}%
\edef\@OresenV@old{\@OresenV}}%
\def\by@perl{\by@perl@}%
\let\sensyu\org@sensyu
\ignorespaces}%
\makeatother
\begin{document}
\begin{zahyou}[ul=5mm](-2,4)(-2,8)
\Oresen{A(2,0)s;B(3,1)se;C(3,3)e;%
D(1,5)ne;E(-1,5)n}
\end{zahyou}
\begin{zahyou}[ul=5mm](-2,4)(-2,8)
\oresen{[]A(2,0)s;[]B(3,1)se;[]C(3,3)e;%
[]D(1,5)ne;[]E(-1,5)n}
\end{zahyou}
\begin{zahyou}[ul=5mm](-2,4)(-2,8)
\oresen{A(2,0)s;B(3,1)se;C(3,3)e;%
D(1,5)ne;E(-1,5)n}
\end{zahyou}
\begin{zahyou}[ul=5mm](-2,4)(-2,8)
\oresen*{A(2,0)s;B(3,1)se;C(3,3)e;%
D(1,5)ne;E(-1,5)n}
\end{zahyou}
\begin{zahyou}[ul=5mm](-2,4)(-2,8)
\oresen**{A(2,0)s;B(3,1)se;C(3,3)e;%
D(1,5)ne;E(-1,5)n}
\end{zahyou}
\end{document}
他のコマンドとのバッティングは確かめていません。
▼関連発言
│
└◆766:\oresen* [st] 10/30 17:30
├◆767:Re:\oresen* [tDB] 10/31 17:57
└◆768:Re:\oresen* [石原 守] 10/31 19:07
└◆769:Re[2]:\oresen* [st] 11/03 06:58
└◆770:Re[3]:\oresen* [石原 守] 11/03 09:29<-last