summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/platex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-20 21:10:01 +0000
committerKarl Berry <karl@freefriends.org>2017-04-20 21:10:01 +0000
commitcc13eb77c29c9b0e7e88b0dff77de642caf978ea (patch)
treef02ec0696d2b1bd6e728e6b8482f430d2456a271 /Master/texmf-dist/source/platex
parent31bd7e8e835857044c14536e89a72f678dfd1b86 (diff)
pxrubrica (20apr17)
git-svn-id: svn://tug.org/texlive/trunk@43943 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/platex')
-rw-r--r--Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx826
1 files changed, 731 insertions, 95 deletions
diff --git a/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx b/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx
index c2c286306e3..9a46020499d 100644
--- a/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx
+++ b/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx
@@ -20,7 +20,7 @@
%<*driver>
\ProvidesFile{pxrubrica.dtx}
%</driver>
- [2017/04/10 v1.1 PX Japanese-style ruby]
+ [2017/04/20 v1.2 PX Japanese-style ruby]
%<*driver>
\documentclass{jsarticle}
\usepackage{doc}
@@ -46,6 +46,7 @@
\newcommand*{\Note}{\par\noindent $B"((B\ }
\providecommand*{\pTeX}{p\TeX}
\providecommand*{\upTeX}{u\pTeX}
+\providecommand*{\pdfTeX}{pdf\/\TeX}
\providecommand*{\XeTeX}{XeTeX}
\providecommand*{\LuaTeX}{Lua\TeX}
\inhibitxspcode`$B!?(B=0
@@ -165,7 +166,9 @@
% \texttt{H} & & $B3HD%8*IU$-(B\\
% \texttt{m} & \fro{mono} & $B%b%N%k%S(B\\
% \texttt{g} & \fro{group} & $B%0%k!<%W%k%S(B\\
-% \texttt{j} & \fro{jukugo} & $B=O8l%k%S(B
+% \texttt{j} & \fro{jukugo} & $B=O8l%k%S(B\\
+% \texttt{M} & & $B<+F0@ZBX%b%N%k%S(B\\
+% \texttt{G} & & $B<+F0@ZBX%0%k!<%W%k%S(B
% \end{tabular}\qquad
% \begin{tabular}[t]{l@{ }ll}
% \texttt{P} & \fro{primary} & $B>eB&G[CV(B\\
@@ -192,6 +195,11 @@
% $B$*$h$S$=$NJR2>L>!K$rBP1~$NHs>.=q$-2>L>(B
% $B$KJQ49$9$k!#(B
% |F| $B;XDj$O$3$N5!G=$rL58z$K$9$k!#(B
+% \item |M| $B$*$h$S(B |J| $B$N;XDj$O(B
+% $B!V%0%k!<%W%k%S$H%b%N!&=O8l%k%S$N4V$G<+F0E*$K@Z$jBX$($k!W(B
+% $B@_Dj$G$"$k!#(B
+% $B6qBNE*$K$O!"%k%S$N%0%k!<%W$,(B1$B$D$7$+$J$$>l9g$O(B |m| $B$*$h$S(B |g|$B!"(B
+% $BJ#?t$"$k>l9g$O(B |g| $B$HEy2A$K$J$k!#(B
% \end{itemize}
%
% \jmeta{$B8eJd=u@_Dj(B}$B$O0J2<$NCM$N2?$l$+!#(B
@@ -267,8 +275,19 @@
% $B2#AH$N>l9g!"?FJ8;zNs$N>eB&$H2<B&$K%k%S$rIU$9!#(B
% $B=DAH$N>l9g!"?FJ8;zNs$N1&B&$H:8B&$K%k%S$rIU$9!#(B
%
-% $BN>B&%k%S$O>o$K!JC1=c!K%0%k!<%W%k%S$H$J$k$N$G!"(B
-% \jmeta{$B%*%W%7%g%s(B}$B$NCf$N(B |m|$B!"(B|g|$B!"(B|j| $B$N;XDj$OL5;k$5$l$k!#(B
+% $BN>B&%k%S$G=O8l%k%S$r;H$&$3$H$O$G$-$J$$!#(B
+% $B$9$J$o$A!"(B\jmeta{$B%*%W%7%g%s(B}$BCf$G(B |j|$B!"(B|J| $B$O;XDj$G$-$J$$!#(B
+%
+% \Note 1.1$BHG0JA0$G$O>o$K%0%k!<%W%k%S$N07$$$G$"$C$?!#(B
+% $B5lHG$H$N8_49$N$?$a!"N>B&%k%S$N>l9g$K$O<+F0@ZBX%b%N%k%S!J(B|M|$B!K$r(B
+% $B4{DjCM$H$9$k!#(B
+% \footnote{$B$D$^$j!"5lMh$N;HMQ$G$O%0%k!<%W%k%S$H07$o$l$k$?$a!"(B
+% $B%k%S$N%0%k!<%W$O(B1$B$D$K$7$F$$$k$O$:$G!"$3$l$O?7HG$G$b$=$N$^$^(B
+% $B%0%k!<%W%k%S$H07$o$l$k!#(B
+% $B0lJ}$G!"%b%N%k%S$r;H$$$?$$>l9g$O%0%k!<%W$rJ#?t$K$9$k$O$:$G!"(B
+% $B$3$N;~$O<+F0E*$K%b%N%k%S$K$J$k!#(B
+% $B$J$N$G7k6I!"4pDl%b!<%I!J(B\texttt{g}$B!"(B\texttt{m}$B!K$r;XDj$9$k(B
+% $BI,MW$OL5$$$3$H$K$J$k!#(B}
%
% \item |\atruby[|\jmeta{$B%*%W%7%g%s(B}|]{|\jmeta{$B?FJ8;z(B}^^A
% |}{|\jmeta{$B>eB&%k%SJ8;z(B}|}{|\jmeta{$B2<B&%k%SJ8;z(B}|}|
@@ -280,9 +299,13 @@
%
% \subsection{$BF~NOJ8;zNs$N%0%k!<%W$N;XDj(B}
%
-% $BF~NOJ8;zNs!J?FJ8;zNs!&%k%SJ8;zNs!K$NCf$G!V(B\texttt{\vb}$B!W$O(B
+% $BF~NOJ8;zNs!J?FJ8;zNs(B
+% \footnote{$B8e=R$NDL$j!"8=:_$NHG$G$O?FJ8;zNs$rJ#?t%0%k!<%W$K$9$k(B
+% $B;HMQK!$OB8:_$7$J$$$?$a!"?FJ8;zNsCf$G$O!V(B\texttt{\vb}$B!W$O;H$o$l$J$$!#(B}%
+% $B!&%k%SJ8;zNs!K$NCf$G!V(B\texttt{\vb}$B!W$O(B
% $B%0%k!<%W$N6h@Z$j$H$_$J$5$l$k!J$?$@$7(B |{ }| $B$NCf$K$"$k$b$N$O(B
% $BJ8;z$H$_$J$5$l$k!K!#(B
+%
% $BNc$($P!"%k%SJ8;zNs(B
%\begin{quote}\begin{verbatim}
%$B$8$f$/(B|$B$4(B
@@ -389,6 +412,8 @@
% \item |\rubysetup| $B$G$N@_Dj$ON_@Q$9$k!#(B
% $BNc$($P!"=i4|>uBV$+$i!"(B|\rubysetup{hmf}| $B$H(B |\rubysetup{<->}| $B$r(B
% $B<B9T$7$?>l9g!"4{DjCM@_Dj$O(B |<hmPef>| $B$H$J$k!#(B
+% \item $B$3$N@_Dj$K4X$o$i$:!"N>B&%k%S$G$O!V<+F0@ZBX%b%N%k%S!J(B|M|$B!K!W(B
+% $B$,4{Dj$H$7$F;XDj$5$l$k!#(B
% \end{itemize}
%
% \item |\rubyfontsetup{|\jmeta{$BL?Na(B}|}|
@@ -438,6 +463,25 @@
%
% \begin{itemize}
%
+% \item |\rubysafemode|$B!?(B|\rubynosafemode|
+%
+% $B0BA4%b!<%I$rM-8z!?L58z$K$9$k!#(B
+% $B!N4{Dj(B = $BL58z!O(B
+% \begin{itemize}
+% \item $BK\%Q%C%1!<%8$,%5%]!<%H$9$k%(%s%8%s$O(B
+% (u){\pTeX}$B!"(B{\XeTeX}$B!"(B{\LuaTeX}$B$G$"$k!#(B
+% $B!V0BA4%b!<%I!W$H$O!"$3$l$i$N%(%s%8%s$rI,MW$H$9$k0lIt$N5!G=(B
+% \footnote{$B0BA4%b!<%I$G$O!"6/@)E*$K%0%k!<%W%k%S$K@Z$jBX$o$k!#(B
+% $B$^$?!"?FJ8;z!&%k%S$NN>J}$N6QEy3d$jIU$1!"$*$h$S!"(B
+% $B>.=q$-J8;z<+F0JQ49$,L58z$K$J$k!#(B}%
+% $B$rL58z2=$7$?%b!<%I$G$"$k!#(B
+% $B$D$^$j!"0BA4%b!<%I$K@Z$jBX$($k$3$H$G!"!H%5%]!<%HBP>]!I$G$J$$(B
+% $B%(%s%8%s!J(B{\pdfTeX}$BEy!K$G$bK\%Q%C%1!<%8$N0lIt$N5!G=$,(B
+% $B;H$($k2DG=@-$,$"$k!#(B
+% \item $B;HMQCf$N%(%s%8%s$,(B{\pdfTeX}$B$G$"$k>l9g!"4{Dj$G0BA4%b!<%I(B
+% $B$,M-8z$K$J$k!#(B
+% \end{itemize}
+%
% \item |\rubysizeratio{|\jmeta{$B<B?t(B}|}|
%
% $B%k%S%5%$%:$N?FJ8;z%5%$%:$KBP$9$k3d9g!#(B
@@ -630,7 +674,7 @@
% \end{macro}
%
% \begin{macro}{\pxrr@warn@must@group}
-% $B2$J8%k%S!"$"$k$$$ON>B&%k%S$G%0%k!<%W%k%S0J30$N;XDj$,9T$o$l$?>l9g!#(B
+% $B2$J8%k%S$G%0%k!<%W%k%S0J30$N;XDj$,9T$o$l$?>l9g!#(B
% $B6/@)E*$K%0%k!<%W%k%S$KJQ99$5$l$k!#(B
% \begin{macrocode}
\def\pxrr@warn@must@group{%
@@ -639,6 +683,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@warn@bad@jukugo}
+% $BN>B&%k%S$G=O8l%k%S$N;XDj$,9T$o$l$?>l9g!#(B
+% $B6/@)E*$KA*BrE*%b%N%k%S!J(B|M|$B!K$KJQ99$5$l$k!#(B
+% \begin{macrocode}
+\def\pxrr@warn@bad@jukugo{%
+ \pxrr@warn{Jukugo ruby is not allowed here}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@fatal@bad@intr}
% $B%4!<%9%H=hM}$,M-8z$G?JF~M-$j$r@_Dj$7$?>l9g!#(B
% $B!JCWL?E*%(%i!<!K!#(B
@@ -682,14 +736,26 @@
% \begin{macrocode}
\def\pxrr@fatal@bad@mono{%
\pxrr@fatal@error{%
- Mono-ruby must have a single group%
+ Mono-ruby body must have a single group%
+ }\pxrr@eh@fatal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@fatal@bad@switching}
+% $BA*BrE*%k%S$N?FJ8;zNs$,(B2$B$D0J>e$N%0%k!<%W$r;}$D>l9g!#(B
+% \begin{macrocode}
+\def\pxrr@fatal@bad@switching{%
+ \pxrr@fatal@error{%
+ The body of Switching-ruby (M/J) must\MessageBreak
+ have a single group%
}\pxrr@eh@fatal
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pxrr@fatal@bad@movable}
-% $B2$J8%k%S$^$?$ON>B&%k%S!JI,$:%0%k!<%W%k%S$H$J$k!K$G(B
+% $B2$J8%k%S!JI,$:%0%k!<%W%k%S$H$J$k!K$G(B
% $B%k%SJ8;zNs$,(B2$B$D0J>e$N%0%k!<%W$r;}$D>l9g!#(B
% \begin{macrocode}
\def\pxrr@fatal@bad@movable{%
@@ -1130,6 +1196,91 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{$BJQ?t(B}
+%
+% \begin{macro}{\pxrr@body@list}
+% $B?FJ8;zNs$N$?$a$K;H$&%j%9%H!#(B
+% \begin{macrocode}
+\let\pxrr@body@list\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@body@count}
+% |\pxrr@body@list| $B$ND9$5!#(B
+% $B@0?tCM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@body@count\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@ruby@list}
+% $B%k%SJ8;zNs$N$?$a$K;H$&%j%9%H!#(B
+% \begin{macrocode}
+\let\pxrr@ruby@list\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@ruby@count}
+% |\pxrr@ruby@list| $B$ND9$5!#(B
+% $B@0?tCM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@ruby@count\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@sruby@list}
+% 2$B$DL\$N%k%SJ8;zNs$N$?$a$K;H$&%j%9%H!#(B
+% \begin{macrocode}
+\let\pxrr@sruby@list\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@sruby@count}
+% |\pxrr@sruby@list| $B$ND9$5!#(B
+% $B@0?tCM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@sruby@count\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@whole@list}
+% $B?FJ8;z$H%k%S$N%j%9%H$r(Bzip$B$7$?%j%9%H!#(B
+% \begin{macrocode}
+\let\pxrr@whole@list\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@bspace}
+% $B%k%S$,?FJ8;z$+$iA0B&$K$O$_$@$9D9$5!#(B
+% $B@#K!CM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@bspace\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@aspace}
+% $B%k%S$,?FJ8;z$+$i8eB&$K$O$_$@$9D9$5!#(B
+% $B@#K!CM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@aspace\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@natwd}
+% |\pxrr@evenspace@int| $B$N%Q%i%a%?!#(B
+% $B@#K!CM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@natwd\@undefined
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@all@input}
+% $BN>B&%k%S$N=hM}$G;H$o$l$k0l;~JQ?t!#(B
+% \begin{macrocode}
+\let\pxrr@all@input\@undefined
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{$BJd=u<jB3(B}
%
% \subsubsection{$B;(B?$JDj5A(B}
@@ -1179,6 +1330,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@token}
+% |\futurelet| $BMQ$N0l;~JQ?t!#(B
+% \Note if-$B%H!<%/%s$J$I$N!H4m81!I$J%H!<%/%s$K$J$j$&$k$N$G;H$$2s$5$J$$!#(B
+% \begin{macrocode}
+\let\pxrr@token\relax
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@zero}
% $B@0?tDj?t$N%<%m!#(B
% |\z@| $B$H0[$J$j!"!VC10LIU@#K!!W$N78?t$H$7$F;HMQ2DG=!#(B
@@ -1224,12 +1383,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\pxrr@ifnum}
-% |\pxrr@ifnum{|\jmeta{$B0z?t(B}|}|\jmeta{$B??(B}|}{|\jmeta{$B56(B}|}|\Means
-% |\ifnum|\jmeta{$B0z?t(B} $B$r9T$&%F%9%H!#(B
+% \begin{macro}{\pxrr@cond}
+% |\pxrr@cond\ifXXX...\fi{|\jmeta{$B??(B}|}{|\jmeta{$B56(B}|}|\Means
+% $B0lHL$N(B{\TeX}$B$N(Bif$BJ8(B |\ifXXX...| $B$r9T$&%F%9%H!#(B
+% \Note |\fi| $B$rIU$1$F$$$k$N$O!"(Bif-$BIT6Q9U$rHr$1$k$?$a!#(B
% \begin{macrocode}
-\def\pxrr@ifnum#1{%
- \ifnum#1\expandafter\@firstoftwo
+\@gobbletwo\if\if \def\pxrr@cond#1\fi{%
+ #1\expandafter\@firstoftwo
\else\expandafter\@secondoftwo
\fi
}
@@ -1297,11 +1457,12 @@
% $B%^%/%mE83+$N%H%l!<%9$rL58z$K$7$?>uBV$G(B\jmeta{$B%F%-%9%H(B}$B$r<B9T$9$k!#(B
% \begin{macrocode}
\def\pxrr@without@macro@trace#1{%
- \chardef\pxrr@tracingmacros=\tracingmacros
+ \chardef\pxrr@tracingmacros@save=\tracingmacros
\tracingmacros\z@
#1%
- \tracingmacros\pxrr@tracingmacros
+ \tracingmacros\pxrr@tracingmacros@save
}
+\chardef\pxrr@tracingmacros@save=0
% \end{macrocode}
% \end{macro}
%
@@ -1382,9 +1543,9 @@
\else
\@tempdimb=\@tempcntb\@ne
\fi}%
- \xdef\pxrr@gtmpa{\the\@tempdimb}%
+ \xdef\pxrr@gtempa{\the\@tempdimb}%
\endgroup
- #1=\pxrr@gtmpa\relax
+ #1=\pxrr@gtempa\relax
}
% \end{macrocode}
% \end{macro}
@@ -1472,13 +1633,13 @@
\pxrr@decompose@loopa#1\pxrr@end
}
\def\pxrr@decompose@loopa{%
- \futurelet\pxrr@tempa\pxrr@decompose@loopb
+ \futurelet\pxrr@token\pxrr@decompose@loopb
}
\def\pxrr@decompose@loopb{%
- \pxrr@ifx{\pxrr@tempa\pxrr@end}{%
+ \pxrr@ifx{\pxrr@token\pxrr@end}{%
\pxrr@appto\pxrr@res{\pxrr@post}%
}{%
- \pxrr@setok{\pxrr@ifx{\pxrr@tempa\bgroup}}%
+ \pxrr@setok{\pxrr@ifx{\pxrr@token\bgroup}}%
\pxrr@decompose@loopc
}%
}
@@ -1589,6 +1750,74 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@tzip@list}
+% |\pxrr@tzip@list\CSa\CSb\CSc|\Means
+% |\CSa|$B!"(B|\CSb|$B!"(B|\CSc| $B$,0J2<$N$h$&$KE83+$5$l$k%^%/%m$H$9$k!'(B
+% \begin{quote}\small
+% |\CSa| = |\pxrr@pre{|\jmeta{X1}|}\pxrr@inter{|\jmeta{X2}|}|^^A
+% $\cdots$|\pxrr@inter{|\jmeta{Xn}|}\pxrr@post|\\
+% |\CSb| = |\pxrr@pre{|\jmeta{Y1}|}\pxrr@inter{|\jmeta{Y2}|}|^^A
+% $\cdots$|\pxrr@inter{|\jmeta{Yn}|}\pxrr@post|\\
+% |\CSc| = |\pxrr@pre{|\jmeta{Z1}|}\pxrr@inter{|\jmeta{Z2}|}|^^A
+% $\cdots$|\pxrr@inter{|\jmeta{Zn}|}\pxrr@post|
+% \end{quote}
+% $B$3$NL?Na$O(B |\pxrr@res| $B$r0J2<$NFbMF$KDj5A$9$k!#(B
+% \begin{quote}\small
+% |\pxrr@pre{|\jmeta{X1}|}{|\jmeta{Y1}|}{|\jmeta{Z1}|}|^^A
+% |\pxrr@inter{|\jmeta{X2}|}{|\jmeta{Y2}|}{|\jmeta{Z2}|}|^^A
+% $\cdots$\\
+% |\pxrr@inter{|\jmeta{Xn}|}{|\jmeta{Yn}|}{|\jmeta{Zn}|}|^^A
+% |\pxrr@post|
+% \end{quote}
+% \begin{macrocode}
+\def\pxrr@tzip@list#1#2#3{%
+ \let\pxrr@res\@empty
+ \let\pxrr@post\relax
+ \let\pxrr@tempa#1\pxrr@appto\pxrr@tempa{{}}%
+ \let\pxrr@tempb#2\pxrr@appto\pxrr@tempb{{}}%
+ \let\pxrr@tempc#3\pxrr@appto\pxrr@tempc{{}}%
+ \pxrr@tzip@list@loopa
+}
+\def\pxrr@tzip@list@loopa{%
+ \expandafter\pxrr@tzip@list@loopb\pxrr@tempa\pxrr@end
+}
+\def\pxrr@tzip@list@loopb#1#2#3\pxrr@end{%
+ \pxrr@ifx{#1\relax}{%
+ \pxrr@tzip@list@exit
+ }{%
+ \pxrr@appto\pxrr@res{#1{#2}}%
+ \def\pxrr@tempa{#3}%
+ \expandafter\pxrr@tzip@list@loopc\pxrr@tempb\pxrr@end
+ }%
+}
+\def\pxrr@tzip@list@loopc#1#2#3\pxrr@end{%
+ \pxrr@ifx{#1\relax}{%
+ \pxrr@interror{tzip}%
+ \pxrr@appto\pxrr@res{{}}%
+ \pxrr@tzip@list@exit
+ }{%
+ \pxrr@appto\pxrr@res{{#2}}%
+ \def\pxrr@tempb{#3}%
+ \expandafter\pxrr@tzip@list@loopd\pxrr@tempc\pxrr@end
+ }%
+}
+\def\pxrr@tzip@list@loopd#1#2#3\pxrr@end{%
+ \pxrr@ifx{#1\relax}{%
+ \pxrr@interror{tzip}%
+ \pxrr@appto\pxrr@res{{}}%
+ \pxrr@tzip@list@exit
+ }{%
+ \pxrr@appto\pxrr@res{{#2}}%
+ \def\pxrr@tempc{#3}%
+ \pxrr@tzip@list@loopa
+ }%
+}
+\def\pxrr@tzip@list@exit{%
+ \pxrr@appto\pxrr@res{\pxrr@post}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@concat@list}
% |\pxrr@concat@list\CS|\Means
% $B%j%9%H$NMWAG$rO"7k$9$k!#(B
@@ -1614,6 +1843,29 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@unite@group}
+% |\pxrr@unite@group\CS|\Means
+% $B%j%9%H$NMWAG$rO"7k$7$F(B1$BMWAG$N%j%9%H$KAH$_D>$9!#(B
+% $B$9$J$o$A!"(B|\CS| $B$,(B
+% \begin{quote}\small
+% |\CS| = |\pxrr@pre{|\jmeta{X1}|}\pxrr@inter{|\jmeta{X2}|}|^^A
+% $\cdots$|\pxrr@inter{|\jmeta{Xn}|}\pxrr@post|
+% \end{quote}
+% $B$N;~$K!"(B|\CS| $B$r0J2<$NFbMF$GCV$-49$($k!#(B
+% \begin{quote}\small
+% |\pxrr@pre{|\jmeta{X1}\jmeta{X2}$\cdots$\jmeta{Xn}|}\pxrr@post|
+% \end{quote}
+% \begin{macrocode}
+\def\pxrr@unite@group#1{%
+ \expandafter\pxrr@concat@list\expandafter{#1}%
+ \expandafter\pxrr@unite@group@a\pxrr@res\pxrr@end#1%
+}
+\def\pxrr@unite@group@a#1\pxrr@end#2{%
+ \def#2{\pxrr@pre{#1}\pxrr@post}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@zip@single}
% |\pxrr@zip@single\CSa\CSb|\Means
% \begin{quote}\small
@@ -1665,6 +1917,8 @@
%
% $B$3$N>.@a$N%^%/%mFb$G;H$o$l$kJQ?t!#(B
% \begin{macrocode}
+\let\pxrr@x@tempa\@empty
+\let\pxrr@x@tempb\@empty
\let\pxrr@x@gtempa\@empty
\newif\ifpxrr@x@swa
% \end{macrocode}
@@ -1834,15 +2088,33 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\ifpxrr@in@tate}
+% \begin{macro}{\pxrr@if@in@tate}
+% |\pxrr@if@in@tate{|\jmeta{$B??(B}|}{|\jmeta{$B56(B}|}|\Means
% $B=DAH$G$"$k$+!#(B
-% \Note {p\TeX} $B0J30$G$N=DAH$r%5%]!<%H$9$kM=Dj$O$J$$!#(B
% \begin{macrocode}
\ifpxrr@in@ptex
- \pxrr@csletcs{ifpxrr@in@tate}{iftdir}
+% \end{macrocode}
+% {p\TeX}$B7O$N>l9g!"(B|\iftdir| $B%W%j%_%F%#%V$rMxMQ$9$k!#(B
+% \Note |\iftdir| $B$,L$Dj5A$N$H$-$K(Bif$B$,IT6Q9U$K$J$k$N$rKI$0!#(B
+% \begin{macrocode}
+ \begingroup \catcode`\|=0
+ \gdef\pxrr@if@in@tate{%
+ \pxrr@cond|iftdir|fi
+ }
+ \endgroup
+\else\ifpxrr@in@luatexja
+% \end{macrocode}
+% Lua\TeX-ja$BMxMQ$N>l9g!"(B|direction| $B%Q%i%a%?$rMxMQ$9$k!#(B
+% \begin{macrocode}
+ \def\pxrr@if@in@tate{%
+ \pxrr@cond\ifnum\ltjgetparameter{direction}=\thr@@\fi
+ }
\else
- \pxrr@csletcs{ifpxrr@in@tate}{iffalse}
-\fi
+% \end{macrocode}
+% $B$=$l0J30$O>o$K2#AH$H8+$J$9!#(B
+% \begin{macrocode}
+ \let\pxrr@if@in@tate\@secondoftwo
+\fi\fi
% \end{macrocode}
% \end{macro}
%
@@ -2311,7 +2583,7 @@
\pxrr@csletcs{ifpxrr@aprotr}{ifpxrr@d@aprotr}%
\let\pxrr@bintr@\pxrr@d@bintr
\let\pxrr@aintr@\pxrr@d@aintr
- \let\pxrr@athead@\pxrr@d@athead
+ \let\pxrr@athead\pxrr@d@athead
\let\pxrr@mode\pxrr@d@mode
\let\pxrr@side\pxrr@d@side
\let\pxrr@evensp\pxrr@d@evensp
@@ -2331,6 +2603,12 @@
\pxrr@mode@givenfalse
\pxrr@athead@givenfalse
% \end{macrocode}
+% $BN>B&%k%S$N>l9g!"4pK\%b!<%I4{DjCM$,(B |M| $B$K8GDj$5$l$k!#(B
+% \begin{macrocode}
+ \ifpxrr@truby
+ \let\pxrr@mode=M%
+ \fi
+% \end{macrocode}
% $BM-8B>uBV5!3#$r3+;O$5$;$k!#(B
% $BF~NO$NKvHx$K(B |@| $B$r2C$($F$$$k!#(B
% |\pxrr@end| $B$O%(%i!<;~$NC&=P$KMQ$$$k!#(B
@@ -2427,6 +2705,8 @@
\def\pxrr@po@C@m{M}
\def\pxrr@po@C@g{M}
\def\pxrr@po@C@j{M}
+\def\pxrr@po@C@M{M}
+\def\pxrr@po@C@J{M}
\def\pxrr@po@C@P{M}
\def\pxrr@po@C@S{M}
\def\pxrr@po@C@e{M}
@@ -2542,6 +2822,14 @@
\let\pxrr@mode=j%
\pxrr@mode@giventrue
}
+\def\pxrr@po@PR@M{%
+ \let\pxrr@mode=M%
+ \pxrr@mode@giventrue
+}
+\def\pxrr@po@PR@J{%
+ \let\pxrr@mode=J%
+ \pxrr@mode@giventrue
+}
\def\pxrr@po@PR@P{%
\chardef\pxrr@side\z@
}
@@ -2600,6 +2888,24 @@
%
% \subsection{$B%*%W%7%g%s@09g@-8!::(B}
%
+% \begin{macro}{\pxrr@mode@grand}
+% $B4pK\%b!<%I$N!HBgJ,N`!I!#(B
+% $B%b%N!J(B|m|$B!K!&=O8l!J(B|j|$B!K!&%0%k!<%W!J(B|g|$B!K$N2?$l$+!#(B
+% $B$D$^$j!HA*BrE*!I@_Dj$N(B |M|$B!&(B|J| $B$r(B |m|$B!&(B|j| $B$K4s$;$k!#(B
+% \Note $B40A4E83+2DG=$G$"$k$,!"!H@hF,40A4E83+2DG=!I$G$J$$$3$H$KCm0U!#(B
+% \begin{macrocode}
+\def\pxrr@mode@grand{%
+ \if m\pxrr@mode m%
+ \else\if M\pxrr@mode m%
+ \else\if j\pxrr@mode j%
+ \else\if J\pxrr@mode j%
+ \else\if g\pxrr@mode g%
+ \else ?%
+ \fi\fi\fi\fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@check@option}
% |\pxrr@parse@option| $B$N7k2L$G$"$k%*%W%7%g%s@_DjCM$N@09g@-$r8!::$7!"(B
% $BI,MW$K1~$8$F!"CWL?E*%(%i!<$r=P$7$?$j!"7Y9p$r=P$7$FE,@Z$JCM$K(B
@@ -2644,15 +2950,15 @@
\fi
\fi
% \end{macrocode}
-% $BN>B&%k%S$G$O%b%N%k%S!J(B|m|$B!K!&=O8l%k%S!J(B|j|$B!K$O;XDjIT2D$J$N$G!"(B
+% $BN>B&%k%S$G$O=O8l%k%S!J(B|j|$B!K$O;XDjIT2D$J$N$G!"(B
% $B%0%k!<%W%k%S$KJQ99$9$k!#(B
% $B$3$N;~$KL@<(;XDj$G$"$k>l9g$O7Y9p$r=P$9!#(B
% \begin{macrocode}
- \if g\pxrr@mode\else
+ \if \pxrr@mode@grand j%
\ifnum\pxrr@side=\tw@
\let\pxrr@mode=g\relax
\ifpxrr@mode@given
- \pxrr@warn@must@group
+ \pxrr@warn@bad@jukugo
\fi
\fi
\fi
@@ -2663,9 +2969,9 @@
% \end{macrocode}
% $B2#AH$_$G$OIT2D$J$N$GCfIU$-$KJQ99$9$k!#(B
% \begin{macrocode}
- \ifpxrr@in@tate\else
+ \pxrr@if@in@tate{}{%else
\chardef\pxrr@athead\z@
- \fi
+ }%
% \end{macrocode}
% $B%0%k!<%W%k%S$G$OIT2D$J$N$GCfIU$-$KJQ99$9$k!#(B
% \begin{macrocode}
@@ -2770,8 +3076,8 @@
\pxrr@get@zwidth\pxrr@body@zw
\begingroup
\pxrr@use@ruby@font
- \pxrr@get@zwidth\pxrr@gtempa
- \global\let\pxrr@gtempa\pxrr@gtempa
+ \pxrr@get@zwidth\pxrr@ruby@zw
+ \global\let\pxrr@gtempa\pxrr@ruby@zw
\endgroup
\let\pxrr@ruby@zw\pxrr@gtempa
\pxrr@get@iiskip\pxrr@iiskip
@@ -2779,11 +3085,11 @@
% \end{macrocode}
% |\pxrr@htratio| $B$NCM$r@_Dj$9$k!#(B
% \begin{macrocode}
- \ifpxrr@in@tate
+ \pxrr@if@in@tate{%
\let\pxrr@htratio\pxrr@thtratio
- \else
+ }{%
\let\pxrr@htratio\pxrr@yhtratio
- \fi
+ }%
% \end{macrocode}
% |\pxrr@ruby@raise| $B$NCM$r7W;;$9$k!#(B
% \begin{macrocode}
@@ -2840,6 +3146,7 @@
%
% \begin{macro}{\pxrr@evenspace}
% \begin{macro}{\pxrr@evenspace@int}
+% \begin{macro}{\pxrr@makebox@res}
% |\pxrr@evenspace{|\jmeta{$B%Q%?!<%s(B}|}\CS{|\jmeta{$B%U%)%s%H(B}|}|^^A
% |{|\jmeta{$BI}(B}|}{|\jmeta{$B%F%-%9%H(B}|}|\Means
% \jmeta{$B%F%-%9%H(B}$B$r;XDj$N(B\jmeta{$BI}(B}$B$KBP$9$k(B
@@ -2949,9 +3256,11 @@
\let\pxrr@sprop@y@#2%
\let\pxrr@sprop@z@#3%
}
+\let\pxrr@makebox@res\@undefined
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\pxrr@adjust@margin}
% |\pxrr@adjust@margin|\Means
@@ -3008,6 +3317,9 @@
\let\pxrr@inter@save\pxrr@inter
\let\pxrr@post@save\pxrr@post
}
+\let\pxrr@pre@save\@undefined
+\let\pxrr@inter@save\@undefined
+\let\pxrr@post@save\@undefined
% \end{macrocode}
% \end{macro}
%
@@ -3044,14 +3356,14 @@
\expandafter\pxrr@transform@kana@loop@a#1\pxrr@end
}
\def\pxrr@transform@kana@loop@a{%
- \futurelet\pxrr@tempa\pxrr@transform@kana@loop@b
+ \futurelet\pxrr@token\pxrr@transform@kana@loop@b
}
\def\pxrr@transform@kana@loop@b{%
- \ifx\pxrr@tempa\pxrr@end
+ \ifx\pxrr@token\pxrr@end
\let\pxrr@tempb\pxrr@transform@kana@end
- \else\ifx\pxrr@tempa\bgroup
+ \else\ifx\pxrr@token\bgroup
\let\pxrr@tempb\pxrr@transform@kana@loop@c
- \else\ifx\pxrr@tempa\@sptoken
+ \else\ifx\pxrr@token\@sptoken
\let\pxrr@tempb\pxrr@transform@kana@loop@d
\else
\let\pxrr@tempb\pxrr@transform@kana@loop@e
@@ -3129,6 +3441,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@locate@temp}
+% |\pxrr@compose@*side@block@do| $B$G;H$o$l$k0l;~JQ?t!#(B
+% $B@0?tDj?t!#(B
+% \begin{macrocode}
+\let\pxrr@locate@temp\relax
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@epsilon}
% $B%k%SJ8;zNs$H?FJ8;zNs$N<+A3D9$N:9$,$3$NCM0J2<$N>l9g$O!"(B
% $B:9$O$J$$$b$N$H$_$J$9!J1i;;8m:9BP:v!K!#(B
@@ -3247,6 +3567,10 @@
\pxrr@compose@block@pre
}
\def\pxrr@compose@twoside@block@do#1#2#3#4{%
+% \end{macrocode}
+% |\pxrr@boxa| $B$K?FJ8;z!"(B|\pxrr@boxr| $B$K>eB&%k%S!"(B
+% |\pxrr@boxb| $B$K2<B&%k%S$N=PNO$rJ];}$9$k!#(B
+% \begin{macrocode}
\setbox\pxrr@boxa\pxrr@hbox{#2}%
\setbox\pxrr@boxr\pxrr@hbox{%
\pxrr@use@ruby@font
@@ -3257,46 +3581,76 @@
#4%
}%
% \end{macrocode}
-% 3$B$D$N%\%C%/%9$N:GBg$NI}$r5a$a$k!#(B
-% $B$3$l$,A4BN$NI}$H$J$k!#(B
+% $B!V2?$l$+$N%k%S$,?FJ8;zNs$h$jD9$$$+!W$r8!::$9$k!#(B
% \begin{macrocode}
- \@tempdima\wd\pxrr@boxa
- \ifdim\@tempdima<\wd\pxrr@boxr
- \@tempdima\wd\pxrr@boxr
- \fi
- \ifdim\@tempdima<\wd\pxrr@boxb
- \@tempdima\wd\pxrr@boxb
- \fi
- \edef\pxrr@maxwd{\the\@tempdima}%
- \advance\@tempdima-\pxrr@epsilon\relax
- \edef\pxrr@maxwdx{\the\@tempdima}%
+ \@tempswafalse
+ \@tempdima\wd\pxrr@boxr
+ \advance\@tempdima-\wd\pxrr@boxa
+ \ifdim\pxrr@epsilon<\@tempdima \@tempswatrue \fi
+ \@tempdima\wd\pxrr@boxb
+ \advance\@tempdima-\wd\pxrr@boxa
+ \ifdim\pxrr@epsilon<\@tempdima \@tempswatrue \fi
% \end{macrocode}
-% $BA4BN$NI}$h$jC;$$%\%C%/%9$r6QEy3d$j$GAH$_D>$9!#(B
+% $B?FJ8;z$h$jD9$$%k%S$,B8:_$9$k>l9g!#(B
+% $BD9$$J}$N%k%SJ8;zNs$ND9$5$K9g$o$;$F!"?FJ8;zNs$H(B
+% $BB>J}$N%k%SJ8;zNs$rAH$_D>$9!#(B
+% $B!J<B:]$N=hM}$O(B |\pxrr@compose@twoside@block@sub| $B$G9T$&!#!K(B
% \begin{macrocode}
- \ifdim\pxrr@maxwdx>\wd\pxrr@boxr
- \pxrr@decompose{#3}%
- \edef\pxrr@natwd{\the\wd\pxrr@boxr}%
- \pxrr@evenspace@int{#1}\pxrr@boxr
- \pxrr@use@ruby@font{\pxrr@maxwd}%
- \pxrr@adjust@margin
- \fi
- \ifdim\pxrr@maxwdx>\wd\pxrr@boxb
- \pxrr@decompose{#4}%
- \edef\pxrr@natwd{\the\wd\pxrr@boxb}%
- \pxrr@evenspace@int{#1}\pxrr@boxb
- \pxrr@use@ruby@font{\pxrr@maxwd}%
- \pxrr@adjust@margin
- \fi
+ \if@tempswa
+ \pxrr@protrtrue
% \end{macrocode}
-% $B?FJ8;zNs$N%\%C%/%9$r:G8e$K=hM}$7$F!"$=$N(B |\pxrr@?space| $B$NCM$r(B
-% $B0J9_$N=hM}$GMQ$$$k!#(B
-% $B!J?FJ8;zNs$,C;$/$J$$>l9g$O(B |\pxrr@?space| $B$O%<%m!#!K(B
+% $B!V3HD%8*IU$-!W;XDj$N>l9g!"A0B&$NFM=P$rM^;_$9$k!#(B
+% \begin{macrocode}
+ \let\pxrr@locate@temp#1%
+ \ifnum\pxrr@athead>\@ne
+ \ifnum\pxrr@locate@temp=\pxrr@locate@inner
+ \let\pxrr@locate@temp\pxrr@locate@head
+ \fi
+ \fi
+% \end{macrocode}
+% $B>eB&$H2<B&$N$I$A$i$N%k%S$,D9$$$+$K1~$8$F0z?t$rJQ$($F!"(B
+% |\pxrr@compose@twoside@block@sub| $B$r8F$S=P$9!#(B
+% \begin{macrocode}
+ \ifdim\wd\pxrr@boxr<\wd\pxrr@boxb
+ \pxrr@compose@twoside@block@sub{#2}{#3}%
+ \pxrr@boxr\pxrr@boxb
+ \else
+ \pxrr@compose@twoside@block@sub{#2}{#4}%
+ \pxrr@boxb\pxrr@boxr
+ \fi
+% \end{macrocode}
+% $B?FJ8;z$NJ}$,D9$$>l9g!#(B
+% $B?FJ8;zNs$ND9$5$K9g$o$;$F!"N>J}$N%k%S$r!JJRB&$N>l9g$HF1MM$N!K(B
+% $B6QEy3d$j$GAH$_D>$9!#(B
% \begin{macrocode}
- \ifdim\pxrr@maxwdx>\wd\pxrr@boxa
- \pxrr@decompose{#2}%
- \edef\pxrr@natwd{\the\wd\pxrr@boxa}%
- \pxrr@evenspace@int{#1}\pxrr@boxa\relax{\pxrr@maxwd}%
\else
+ \pxrr@protrfalse
+% \end{macrocode}
+% $B8*IU$-%k%S$N>l9g$OAH$_D>$7$r9T$o$J$$!#(B
+% \begin{macrocode}
+ \ifnum\pxrr@athead=\z@
+ \@tempdima\wd\pxrr@boxa
+ \advance\@tempdima-\wd\pxrr@boxr
+ \ifdim\pxrr@epsilon<\@tempdima
+ \pxrr@decompose{#3}%
+ \edef\pxrr@natwd{\the\wd\pxrr@boxr}%
+ \pxrr@evenspace@int{#1}\pxrr@boxr
+ \pxrr@use@ruby@font{\wd\pxrr@boxa}%
+ \pxrr@adjust@margin
+ \fi
+ \@tempdima\wd\pxrr@boxa
+ \advance\@tempdima-\wd\pxrr@boxb
+ \ifdim\pxrr@epsilon<\@tempdima
+ \pxrr@decompose{#4}%
+ \edef\pxrr@natwd{\the\wd\pxrr@boxb}%
+ \pxrr@evenspace@int{#1}\pxrr@boxb
+ \pxrr@use@ruby@font{\wd\pxrr@boxa}%
+ \pxrr@adjust@margin
+ \fi
+ \fi
+% \end{macrocode}
+% |\pxrr@?space| $B$O%<%m$K@_Dj$9$k!#(B
+% \begin{macrocode}
\let\pxrr@bspace\pxrr@zeropt
\let\pxrr@aspace\pxrr@zeropt
\fi
@@ -3320,6 +3674,73 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@body@wd}
+% |\pxrr@compose@twoside@block@sub| $B$NFbIt$GMQ$$$i$l$kJQ?t$G!"(B
+% $B!H?FJ8;zNs$N<B:]$ND9$5!I!J6QEy3d$j$GF~$C$?Cf4V$N6u$-$rF~$l$k$,(B
+% $BN>C<$N6u$-$rF~$l$J$$!K$rI=$9!#(B
+% $B@#K!CM%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@body@wd\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@compose@twoside@block@sub}
+% |\pxrr@compose@twoside@block@sub| $B$NFbIt$GMQ$$$i$l$k%^%/%m!#(B
+% \begin{macrocode}
+\let\pxrr@restore@margin@values\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@compose@twoside@block@sub}
+% |\pxrr@compose@twoside@block@sub{|^^A
+% \jmeta{$B?FJ8;z(B}|}{|\jmeta{$BC;$$J}$N%k%SJ8;z(B}|}\CSa\CSb|\Means
+% $BN>B&%k%S$G?FJ8;zNs$h$jD9$$%k%SJ8;zNs$,B8:_$9$k>l9g$N(B
+% $BAH$_D>$7$N=hM}$r9T$&!#(B
+% $B$3$N%^%/%m$N8F=P;~!">eB&%k%S$N=PNO7k2L$,(B |\pxrr@boxr|$B!"(B
+% $B2<B&%k%S$N=PNO7k2L$,(B |\pxrr@boxb| $B$KF~$C$F$$$k$,!"(B
+% $B$3$N(B2$B$D$N%\%C%/%9$N$&$A!"C;$$%k%S$NJ}$,(B |\CSa|$B!"(B
+% $BD9$$%k%S$NJ}$,(B |\CSb| $B$H$7$FEO$5$l$F$$$k!#(B
+% \begin{macrocode}
+\def\pxrr@compose@twoside@block@sub#1#2#3#4{%
+ \pxrr@decompose{#1}%
+ \edef\pxrr@natwd{\the\wd\pxrr@boxa}%
+ \pxrr@evenspace@int\pxrr@locate@temp\pxrr@boxa\relax{\wd#4}%
+ \@tempdima\wd#4%
+ \advance\@tempdima-\pxrr@bspace\relax
+ \advance\@tempdima-\pxrr@aspace\relax
+ \edef\pxrr@body@wd{\the\@tempdima}%
+ \advance\@tempdima-\wd#3%
+ \ifdim\pxrr@epsilon<\@tempdima
+ \edef\pxrr@restore@margin@values{%
+ \edef\noexpand\pxrr@bspace{\pxrr@bspace}%
+ \edef\noexpand\pxrr@aspace{\pxrr@aspace}%
+ }%
+ \pxrr@decompose{#2}%
+ \edef\pxrr@natwd{\the\wd#3}%
+ \pxrr@evenspace@int\pxrr@locate@temp#3%
+ \pxrr@use@ruby@font{\pxrr@body@wd}%
+ \pxrr@adjust@margin
+ \pxrr@restore@margin@values
+ \setbox#3\hbox{%
+ \kern\pxrr@bspace\relax
+ \box#3%
+ }%
+ \else
+ \ifnum\pxrr@locate@temp=\pxrr@locate@head
+ \@tempdima\z@
+ \else\ifnum\pxrr@locate@temp=\pxrr@locate@inner
+ \@tempdima.5\@tempdima
+ \fi\fi
+ \advance\@tempdima\pxrr@bspace\relax
+ \setbox#3\hbox{%
+ \kern\@tempdima
+ \box#3%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@compose@block@pre}
% |\pxrr@compose@block@pre{|\jmeta{$B%Q%?!<%s(B}|}{|^^A
%r \jmeta{$B?FJ8;z(B}|}{|\jmeta{$B%k%S(B1}|}{|\jmeta{$B%k%S(B2}|}|\Means
@@ -3330,7 +3751,7 @@
% \end{macrocode}
% |f| $B;XDj;~$O>.=q$-2>L>$NJQ49$r;\$9!#(B
% \begin{macrocode}
- \pxrr@ifnum{\pxrr@fullsize>\z@}{%
+ \pxrr@cond\ifnum\pxrr@fullsize>\z@\fi{%
\pxrr@compose@block@pre@a
}{%
\pxrr@compose@block@pre@d
@@ -3355,7 +3776,7 @@
\pxrr@compose@block@pre@d{#3}{#4}{#1}{#2}%
}
\def\pxrr@compose@block@pre@d{%
- \pxrr@ifnum{\pxrr@evensp=\z@}{%
+ \pxrr@cond\ifnum\pxrr@evensp=\z@\fi{%
\pxrr@compose@block@pre@e
}{%
\pxrr@compose@block@pre@f
@@ -3366,7 +3787,7 @@
\pxrr@compose@block@pre@f{#1}{{#2}}%
}
\def\pxrr@compose@block@pre@f{%
- \pxrr@ifnum{\pxrr@revensp=\z@}{%
+ \pxrr@cond\ifnum\pxrr@revensp=\z@\fi{%
\pxrr@compose@block@pre@g
}{%
\pxrr@compose@block@do
@@ -3376,6 +3797,7 @@
\def\pxrr@compose@block@pre@g#1#2#3#4{%
\pxrr@compose@block@do{#1}{#2}{{#3}}{{#4}}%
}
+\let\pxrr@compose@block@tempa\@undefined
% \end{macrocode}
% \end{macro}
%
@@ -3518,10 +3940,10 @@
% \begin{macrocode}
\def\pxrr@check@kinsoku#1{%
\let\pxrr@tempb#1%
- \futurelet\pxrr@tempa\pxrr@check@kinsoku@a
+ \futurelet\pxrr@token\pxrr@check@kinsoku@a
}
\def\pxrr@check@kinsoku@a{%
- \pxrr@check@char\pxrr@tempa
+ \pxrr@check@char\pxrr@token
% \end{macrocode}
% $BOBJ8%k%S$N>l9g$O!"2$J8DL>oJ8;z$bOBJ8DL>oJ8;z$HF1$807$$$K$9$k!#(B
% \begin{macrocode}
@@ -3956,6 +4378,20 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@mode@is@switching}
+% |\if\pxrr@mode@is@switching{|\jmeta{$B4pK\%b!<%I(B}|}| $B$N7A$N(B
+% if$BJ8$H$7$F;H$&!#(B
+% $B%b!<%I$,!HA*BrE*!I!J(B|M|$B!&(B|J|$B!K$G$"$k$+!#(B
+% \begin{macrocode}
+\def\pxrr@mode@is@switching{%
+ \if M\pxrr@mode T%
+ \else\if J\pxrr@mode T%
+ \else F%
+ \fi\fi T%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@ruby@proc}
% |\pxrr@ruby@proc{|\jmeta{$B?FJ8;zNs(B}|}{|\jmeta{$B%k%SJ8;zNs(B}|}|\Means
% $B$3$l$,<jB3$NK\BN$H$J$k!#(B
@@ -3976,19 +4412,30 @@
\pxrr@decompbar{#2}%
\let\pxrr@ruby@list\pxrr@res
\edef\pxrr@ruby@count{\the\pxrr@cntr}%
+ \let\pxrr@sruby@list\relax
% \end{macrocode}
% $B?FJ8;zF~NO$r%0%k!<%WNs$KJ,2r$9$k!#(B
% \begin{macrocode}
\pxrr@decompbar{#1}%
\let\pxrr@body@list\pxrr@res
\edef\pxrr@body@count{\the\pxrr@cntr}%
-\ifpxrrDebug
- \pxrr@debug@show@input
-\fi
+% \end{macrocode}
+% $B0BA4%b!<%I$K4X$9$k=hM}$r9T$&!#(B
+% \begin{macrocode}
\ifpxrr@safe@mode
\pxrr@setup@safe@mode
\fi
% \end{macrocode}
+% $B%b!<%I$,!HA*BrE*!I$G$"$k>l9g!"!HIaDL$N!I%b!<%I(B
+% $B!J(B|m|$B!&(B|j|$B!&(B|g|$B!K$K5"Ce$5$;$k!#(B
+% \begin{macrocode}
+ \if\pxrr@mode@is@switching
+ \pxrr@resolve@mode
+ \fi
+\ifpxrrDebug
+ \pxrr@debug@show@input
+\fi
+% \end{macrocode}
% $BF~NO8!::$r9T$$!"%Q%9$7$?>l9g$OAHHG=hM}$K?J$`!#(B
% \begin{macrocode}
\pxrr@if@alive{%
@@ -4030,22 +4477,45 @@
% \begin{macrocode}
\pxrr@parse@option\pxrr@option
% \end{macrocode}
-% $BN>B&%k%S$N>l9g!"F~NOJ8;zNs$r%0%k!<%WJ,2r$;$:$K!"$=$N$^$^$N0z?tNs$N(B
-% $B7A$G%^%/%m$K5-21$9$k!#(B
+% $BN>B&$N%0%k!<%W%k%S$G$O(B |pxrr@all@input| $B$rMxMQ$9$k$N$G!"(B
+% $BF~NOJ8;zNs$r@_Dj$9$k!#(B
% \begin{macrocode}
\def\pxrr@all@input{{#1}{#2}{#3}}%
-\ifpxrrDebug
- \pxrr@debug@show@input
-\fi
+% \end{macrocode}
+% $BF~NOJ8;zNs$N%0%k!<%WJ,2r$r9T$&!#(B
+% \begin{macrocode}
+ \pxrr@decompbar{#3}%
+ \let\pxrr@sruby@list\pxrr@res
+ \edef\pxrr@sruby@count{\the\pxrr@cntr}%
+ \pxrr@decompbar{#2}%
+ \let\pxrr@ruby@list\pxrr@res
+ \edef\pxrr@ruby@count{\the\pxrr@cntr}%
+ \pxrr@decompbar{#1}%
+ \let\pxrr@body@list\pxrr@res
+ \edef\pxrr@body@count{\the\pxrr@cntr}%
+% \end{macrocode}
+% $B0BA4%b!<%I$K4X$9$k=hM}$r9T$&!#(B
+% \begin{macrocode}
\ifpxrr@safe@mode
\pxrr@setup@safe@mode
\fi
+ \if\pxrr@mode@is@switching
+ \pxrr@resolve@mode
+ \fi
+\ifpxrrDebug
+ \pxrr@debug@show@input
+\fi
% \end{macrocode}
% $BF~NO8!::$r9T$$!"%Q%9$7$?>l9g$OAHHG=hM}$K?J$`!#(B
% \begin{macrocode}
\pxrr@if@alive{%
- \pxrr@ruby@check@tg
- \pxrr@if@alive{\pxrr@ruby@main@tg}%
+ \if g\pxrr@mode
+ \pxrr@ruby@check@tg
+ \pxrr@if@alive{\pxrr@ruby@main@tg}%
+ \else
+ \pxrr@ruby@check@tm
+ \pxrr@if@alive{\pxrr@ruby@main@tm}%
+ \fi
}%
% \end{macrocode}
% $B8e=hM}$r9T$&!#(B
@@ -4059,7 +4529,22 @@
% $B0BA4%b!<%IMQ$N@_Dj!#(B
% \begin{macrocode}
\def\pxrr@setup@safe@mode{%
- \let\pxrr@mode=g%
+% \end{macrocode}
+% $BC1=c%0%k!<%W%k%S$K6/@)E*$KJQ99$9$k!#(B
+% $B$3$l$K1~$8$F!"?FJ8;zNs$H%k%SJ8;zNs$N%0%k!<%W$r(B1$B$D$K=8@.$9$k!#(B
+% \begin{macrocode}
+ \let\pxrr@mode=g\relax
+ \pxrr@unite@group\pxrr@body@list
+ \def\pxrr@body@count{1}%
+ \pxrr@unite@group\pxrr@ruby@list
+ \def\pxrr@ruby@count{1}%
+ \ifx\pxrr@sruby@list\relax\else
+ \pxrr@unite@group\pxrr@sruby@list
+ \def\pxrr@sruby@count{1}%
+ \fi
+% \end{macrocode}
+% $B!HJ8;zC10L$N%9%-%c%s!I$,I,MW$J5!G=$rL58z$K$9$k!#(B
+% \begin{macrocode}
\chardef\pxrr@evensp\z@
\chardef\pxrr@revensp\z@
\chardef\pxrr@fullsize\z@
@@ -4067,6 +4552,47 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@resolve@mode}
+% $B4pK\%b!<%I$,!HA*BrE*!I!J(B|M|$B!&(B|J|$B!K$G$"$k>l9g$K!">u67$K1~$8$F(B
+% $BE,@Z$JDL>o$N%b!<%I$K@Z$jBX$($k!#(B
+% \begin{macrocode}
+\def\pxrr@resolve@mode{%
+ \ifnum\pxrr@body@count=\@ne
+% \end{macrocode}
+% $B%k%S%0%k!<%W$,(B1$B$D$G?FJ8;z$,J#?t$"$k>l9g$K$O%0%k!<%W%k%S$rA*Br$7!"(B
+% \begin{macrocode}
+ \ifnum\pxrr@ruby@count=\@ne
+ \let\pxrr@pre\pxrr@decompose
+ \let\pxrr@post\relax
+ \pxrr@body@list
+ \ifnum\pxrr@cntr=\@ne\else
+ \let\pxrr@mode=g%
+ \fi
+ \fi
+% \end{macrocode}
+% $B$=$l0J30$O%b%N%k%S!&=O8l%k%S$rA*Br$9$k!#(B
+% \begin{macrocode}
+ \if M\pxrr@mode \let\pxrr@mode=m\fi
+ \if J\pxrr@mode \let\pxrr@mode=j\fi
+\ifpxrrDebug
+ \pxrr@debug@show@resolve@mode
+\fi
+% \end{macrocode}
+% |\pxrr@check@option| $B$G9T$C$F$$$kD4@0$r$d$jD>$9!#(B
+% \begin{macrocode}
+ \if g\pxrr@mode
+ \chardef\pxrr@athead\z@
+ \fi
+ \if g\pxrr@mode\else
+ \chardef\pxrr@evensp\@ne
+ \fi
+ \else
+ \pxrr@fatal@bad@switching
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{$BF~NO8!::(B}
%
% $B%0%k!<%W!&J8;z$N8D?t$N8!::$r9T$&<jB3!#(B
@@ -4121,11 +4647,49 @@
% \end{macro}
%
% \begin{macro}{\pxrr@ruby@check@tg}
-% $BN>B&%k%S$N>l9g!"$3$3$G8!::$9$kFbMF$O$J$$!#(B
-% $B!JN>B&%k%S$NF~NOJ8;zNs$O%0%k!<%WJ,3d$5$l$:!">o$KC10l%0%k!<%W$H(B
-% $B$7$F07$o$l$k!#!K(B
+% $BN>B&$N%0%k!<%W%k%S$N>l9g!#(B
+% $B%k%S$,(B2$B$D$"$k$3$H$r=|$-!"JRB&$N>l9g$HF1$8!#(B
% \begin{macrocode}
\def\pxrr@ruby@check@tg{%
+ \ifnum\pxrr@body@count=\pxrr@ruby@count\relax\else
+ \pxrr@fatal@bad@length\pxrr@body@count\pxrr@ruby@count
+ \fi
+ \ifnum\pxrr@body@count=\pxrr@sruby@count\relax\else
+ \pxrr@fatal@bad@length\pxrr@body@count\pxrr@sruby@count
+ \fi
+ \pxrr@if@alive{%
+ \ifnum\pxrr@body@count=\@ne\else
+ \ifpxrr@abody
+ \pxrr@fatal@bad@movable
+ \else\ifnum\pxrr@extra=\z@
+ \pxrr@fatal@na@movable
+ \fi\fi
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pxrr@ruby@check@tm}
+% $BN>B&$N%b%N%k%S$N>l9g!#(B
+% $B%k%S$,(B2$B$D$"$k$3$H$r=|$-!"JRB&$N>l9g$HF1$8!#(B
+% \begin{macrocode}
+\def\pxrr@ruby@check@tm{%
+ \ifnum\pxrr@body@count=\@ne
+ \let\pxrr@pre\pxrr@decompose
+ \let\pxrr@post\relax
+ \pxrr@body@list
+ \let\pxrr@body@list\pxrr@res
+ \edef\pxrr@body@count{\the\pxrr@cntr}%
+ \ifnum\pxrr@body@count=\pxrr@ruby@count\relax\else
+ \pxrr@fatal@bad@length\pxrr@body@count\pxrr@ruby@count
+ \fi
+ \ifnum\pxrr@body@count=\pxrr@sruby@count\relax\else
+ \pxrr@fatal@bad@length\pxrr@body@count\pxrr@sruby@count
+ \fi
+ \else
+ \pxrr@fatal@bad@mono
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -4359,8 +4923,67 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@ruby@main@tm}
+% $BN>B&$N%b%N%k%S$N>l9g!#(B
+% \begin{macrocode}
+\def\pxrr@ruby@main@tm{%
+ \pxrr@tzip@list\pxrr@body@list\pxrr@ruby@list\pxrr@sruby@list
+ \let\pxrr@whole@list\pxrr@res
+ \pxrr@check@par@head
+ \pxrr@any@protrfalse
+\ifpxrrDebug
+\pxrr@debug@show@recomp
+\fi
+ \let\pxrr@locate@head@\pxrr@locate@inner
+ \let\pxrr@locate@end@\pxrr@locate@inner
+ \let\pxrr@locate@sing@\pxrr@locate@inner
+ \ifpxrr@aprotr\else
+ \let\pxrr@locate@end@\pxrr@locate@end
+ \let\pxrr@locate@sing@\pxrr@locate@end
+ \fi
+ \ifpxrr@bprotr\else
+ \let\pxrr@locate@head@\pxrr@locate@head
+ \let\pxrr@locate@sing@\pxrr@locate@head
+ \fi
+ \def\pxrr@pre##1##2##3{%
+ \pxrr@if@last{%
+ \pxrr@compose@twoside@block\pxrr@locate@sing@
+ {##1}{##2}{##3}%
+ \pxrr@intrude@head
+ \unhbox\pxrr@boxr
+ \pxrr@intrude@end
+ \pxrr@takeout@any@protr
+ }{%
+ \pxrr@compose@twoside@block\pxrr@locate@head@
+ {##1}{##2}{##3}%
+ \pxrr@intrude@head
+ \unhbox\pxrr@boxr
+ }%
+ }%
+ \def\pxrr@inter##1##2##3{%
+ \pxrr@if@last{%
+ \pxrr@compose@twoside@block\pxrr@locate@end@
+ {##1}{##2}{##3}%
+ \pxrr@inter@mono
+ \unhbox\pxrr@boxr
+ \pxrr@intrude@end
+ \pxrr@takeout@any@protr
+ }{%
+ \pxrr@compose@twoside@block\pxrr@locate@inner
+ {##1}{##2}{##3}%
+ \pxrr@inter@mono
+ \unhbox\pxrr@boxr
+ }%
+ }%
+ \let\pxrr@post\@empty
+ \setbox\pxrr@boxr\pxrr@hbox{\pxrr@whole@list}%
+ \unhbox\pxrr@boxr
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pxrr@ruby@main@tg}
-% $BN>B&%k%S!JI,$:C1=c%0%k!<%W%k%S$G$"$k!K$N>l9g!#(B
+% $BN>B&$NC1=c%0%k!<%W%k%S$N>l9g!#(B
% \begin{macrocode}
\def\pxrr@ruby@main@tg{%
\pxrr@check@par@head
@@ -4381,6 +5004,13 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pxrr@ruby@main@mg}
+% $BL$<BAu!J8F=P$b$J$$!K!#(B
+% \begin{macrocode}
+\let\pxrr@ruby@main@mg\@undefined
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{$BA0=hM}(B}
%
% $B%4!<%9%H=hM}$9$k!#$=$N$?$a!"E83+ITG=L?Na$,!D!#(B
@@ -4440,6 +5070,9 @@
% $B!J%0%k!<%WFb$G(B |\usefont{T1}{lmr}{m}{n}| $B$r8F$s$G$*$/$H!"(B
% $BBg0hE*$K(B |\T1/lmr/m/n/2.5| $B$,Dj5A$5$l$k!#!K(B
% \begin{macrocode}
+\chardef\pxrr@aghostchar=23 % compwordmark
+\let\pxrr@aghost\relax
+\let\pxrr@aghostfont\relax
\def\pxrr@setup@aghost{%
\global\let\pxrr@setup@aghost\relax
\IfFileExists{t1lmr.fd}{%
@@ -4447,7 +5080,6 @@
\fontsize{2.5}{0}\usefont{T1}{lmr}{m}{n}%
\endgroup
\global\pxrr@letcs\pxrr@aghostfont{T1/lmr/m/n/2.5}%
- \global\chardef\pxrr@aghostchar=23 % compwordmark
\gdef\pxrr@aghost{{\pxrr@aghostfont\pxrr@aghostchar}}%
\global\xspcode\pxrr@aghostchar=3 %
}{%else
@@ -4588,6 +5220,10 @@
----
}%
}
+\def\pxrr@debug@show@resolve@mode{%
+ \typeout{----\pxrr@pkgname\space resolve-mode:
+ \meaning\pxrr@mode}%
+}
% \end{macrocode}
%
% \Finale