summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/platex/pxrubrica/README-ja.md3
-rw-r--r--Master/texmf-dist/doc/platex/pxrubrica/README.md3
-rw-r--r--Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.pdfbin52345 -> 52449 bytes
-rw-r--r--Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.tex4
-rw-r--r--Master/texmf-dist/doc/platex/pxrubrica/pxrubrica.pdfbin440838 -> 447886 bytes
-rw-r--r--Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx164
-rw-r--r--Master/texmf-dist/tex/platex/pxrubrica/pxrubrica.sty99
7 files changed, 234 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/platex/pxrubrica/README-ja.md b/Master/texmf-dist/doc/platex/pxrubrica/README-ja.md
index 249c2581590..7915348aab8 100644
--- a/Master/texmf-dist/doc/platex/pxrubrica/README-ja.md
+++ b/Master/texmf-dist/doc/platex/pxrubrica/README-ja.md
@@ -47,6 +47,9 @@ MITライセンスの下で配布される。
更新履歴
--------
+ * Version 1.3a 〈2017/05/05〉
+ - 縦数式組方向のための調整。
+ - バグ修正
* Version 1.3 〈2017/04/27〉
- 圏点出力機能(ルビ圏点同時付加を含む)。
- 和文ゴースト処理の改良。
diff --git a/Master/texmf-dist/doc/platex/pxrubrica/README.md b/Master/texmf-dist/doc/platex/pxrubrica/README.md
index f826a14bcd0..fc113ac5ab5 100644
--- a/Master/texmf-dist/doc/platex/pxrubrica/README.md
+++ b/Master/texmf-dist/doc/platex/pxrubrica/README.md
@@ -50,6 +50,9 @@ This package is distributed under the MIT License.
Revision History
----------------
+ * Version 1.3a 〈2017/05/05〉
+ - Adjust for tate math direction.
+ - Bug fix.
* Version 1.3 〈2017/04/27〉
- Kenten function.
- Improve Japanese-text ghost insertion.
diff --git a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.pdf b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.pdf
index 5508115bfd2..33eb149c0be 100644
--- a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.pdf
+++ b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.tex b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.tex
index 3f4b244e1a5..292f7a78cc9 100644
--- a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.tex
+++ b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica-en.tex
@@ -8,8 +8,8 @@
\newcommand*{\Eg}{E.\,g.\mbox{}}
\newcommand*{\eg}{e.\,g.\mbox{}}
\newcommand*{\ie}{i.\,e.\mbox{}}
-\newcommand*{\myfileversion}{1.3}
-\newcommand*{\myfiledate}{2017/04/27}
+\newcommand*{\myfileversion}{1.3a}
+\newcommand*{\myfiledate}{2017/05/05}
\newsavebox{\myexample}
\begin{document}
diff --git a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica.pdf b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica.pdf
index ece8940db9b..77077bce0d7 100644
--- a/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica.pdf
+++ b/Master/texmf-dist/doc/platex/pxrubrica/pxrubrica.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx b/Master/texmf-dist/source/platex/pxrubrica/pxrubrica.dtx
index 33b036c5126..65836b6ce12 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/27 v1.3 PX Japanese-style ruby]
+ [2017/05/05 v1.3a PX Japanese-style ruby]
%<*driver>
\documentclass[uplatex]{jsarticle}
\usepackage{doc}
@@ -170,7 +170,7 @@
% \texttt{g} & \fro{group} & $B%0%k!<%W%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
+% \texttt{J} & & $B<+F0@ZBX=O8l%k%S(B
% \end{tabular}\qquad
% \begin{tabular}[t]{l@{ }ll}
% \texttt{P} & \fro{primary} & $B>eB&G[CV(B\\
@@ -200,8 +200,8 @@
% \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
+% $B6qBNE*$K$O!"%k%S$N%0%k!<%W$,(B1$B$D$7$+$J$$>l9g$O(B |g|$B!"(B
+% $BJ#?t$"$k>l9g$O(B |m| $B$*$h$S(B |j| $B$HEy2A$K$J$k!#(B
% \end{itemize}
%
% \jmeta{$B8eJd=u@_Dj(B}$B$O0J2<$NCM$N2?$l$+!#(B
@@ -391,7 +391,7 @@
%
% $B$J$*!"(B\jmeta{$BA0Jd=u@_Dj(B}$B!?(B\jmeta{$B8eJd=u@_Dj(B}$B$G;XDj$5$l$k5!G=$O!"(B
% $B%4!<%9%H=hM}$,M-8z$N>l9g$K$OL58z2=$5$l$k!#(B
-% $B$3$l$i$N5!G=$NL\E*$,<+F0=hM}$,<:GT$9$k$N$rJa0o$9$k$?$a$@$+$i$G$"$k!#(B
+% $B$3$l$i$N5!G=$NL\E*$,<+F0=hM}$,<:GT$9$k$N$rJd=<$9$k$?$a$@$+$i$G$"$k!#(B
%
% \subsection{$B%Q%i%a%?@_DjL?Na(B}
%
@@ -2274,6 +2274,14 @@
% \end{macrocode}
% \end{macro}
%
+% {\LuaTeX}$B%(%s%8%s$N>l9g!"K\%Q%C%1!<%8MQ$N(BLua$B%b%8%e!<%k(B |pxrubtica|
+% $B$r:n@.$7$F$*$/!#(B
+% \begin{macrocode}
+\ifpxrr@in@luatex
+ \directlua{ pxrubrica = {} }
+\fi
+% \end{macrocode}
+%
% \begin{macro}{\ifpxrr@in@luatexja}
% \PKN{LuaTeX-ja}$B%Q%C%1!<%8$,;HMQ$5$l$F$$$k$+!#(B
% \begin{macrocode}
@@ -2366,19 +2374,30 @@
% \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
+% \Note $BK\%Q%C%1!<%8$N=hM}$NHO0O$G$O!"=D?t<0AHJ}8~$O(B
+% $BC1$K!V=DAH$G$J$$!W$HH=Dj$9$k!#(B
+% $B!J(B|\ifmdir| $B$O?t<0AHJ}8~$rH=Dj$9$k%W%j%_%F%#%V!#!K(B
% \begin{macrocode}
\begingroup \catcode`\|=0
\gdef\pxrr@if@in@tate{%
- \pxrr@cond|iftdir|fi
+ \pxrr@cond{\if
+ |iftdir|ifmdir F|else T|fi|else F|fi
+ T}\fi
}
\endgroup
\else\ifpxrr@in@luatexja
% \end{macrocode}
-% Lua\TeX-ja$BMxMQ$N>l9g!"(B|direction| $B%Q%i%a%?$rMxMQ$9$k!#(B
+% {\LuaTeX-ja}$BMxMQ$N>l9g!"(B|direction| $B%Q%i%a%?$rMxMQ$9$k!#(B
+% \Note $B=DAHBP1~!J(B|\ltj@curtfnt| $B$,Dj5A:Q!K$G$J$$8E$$(B{\LuaTeX-ja}$B$N(B
+% $B>l9g$O>o$K2#AH$H8+$J$9!#(B
% \begin{macrocode}
- \def\pxrr@if@in@tate{%
- \pxrr@cond\ifnum\ltjgetparameter{direction}=\thr@@\fi
- }
+ \ifx\ltj@curtfnt\@undefined
+ \let\pxrr@if@in@tate\@secondoftwo
+ \else
+ \def\pxrr@if@in@tate{%
+ \pxrr@cond\ifnum\ltjgetparameter{direction}=\thr@@\fi
+ }
+ \fi
\else
% \end{macrocode}
% $B$=$l0J30$O>o$K2#AH$H8+$J$9!#(B
@@ -2527,14 +2546,97 @@
% \begin{macrocode}
\else\ifpxrr@in@luatexja
\def\pxrr@get@iiskip#1{%
- \edef#1{%
- \ifnum\ltjgetparameter{autospacing}=\@ne
- \ltjgetparameter{kanjiskip}%
- \else \pxrr@zeropt
+ \ifnum\ltjgetparameter{autospacing}=\@ne
+ \xdef\pxrr@x@gtempa{\ltjgetparameter{kanjiskip}}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+% \end{macrocode}
+% |kanjiskip|$B%Q%i%a%?$NCM$,(B |\maxdimen| $B$N>l9g!"(BJFM$B$N%Q%i%a%?$K(B
+% $B$h$jOB2$J84V6uGr$NNL$,7hDj$5$l$k!#(B
+% $B$3$NCM$rFI$_=P$98x<0$N%$%s%?%U%'!<%9$OB8:_$7$J$$$?$a!"(B
+% $B<B:]$NAHHG7k2L$+$i?dDj$9$k!#(B
+% $B!JCM$O(B |\pxrr@x@gtempa| $B$KJV$k!#!K(B
+% \begin{macrocode}
+ \pxrr@get@interchar@glue{\pxrr@x@K\pxrr@x@K}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+% \end{macrocode}
+% $B?dDj$,<:GT$7$?>l9g!#(B
+% $B7Y9p$r!J0lEY$@$1!K=P$7$?>e$G!"CM$r%<%m$H$7$F07$&!#(B
+% \begin{macrocode}
+ \pxrr@warn@unknown@iiskip
+ \global\let\pxrr@x@gtempa\pxrr@zeropt
+ \fi
\fi
- }%
+ \let#1\pxrr@x@gtempa
+ \else
+ \let#1\pxrr@zeropt
+ \fi
}
% \end{macrocode}
+% $BOBJ84V6uGr$N?dDj$K<:GT$7$?>l9g$N7Y9p!#(B
+% \begin{macrocode}
+ \def\pxrr@warn@unknown@iiskip{%
+ \global\let\pxrr@warn@unknown@iiskip\relax
+ \pxrr@warn{Cannot find the kanjiskip value}%
+ }
+% \end{macrocode}
+% $B%F%-%9%H(B |#1| $B$rAHHG$7$??eJ?%\%C%/%9$NCf$K$"$k!"(B
+% $B!HJ8;z4V%0%k!<!I$NCM$r(B |\pxrr@g@tempa| $B$KJV$9!#(B
+% \begin{macrocode}
+ \def\pxrr@get@interchar@glue#1{%
+ \begingroup
+ \setbox\z@\hbox{#1}%
+% \end{macrocode}
+% Lua$B$NJd=u4X?t$O=jK>$NCM$r(B |\skip0| $B$KJV$9!#(B
+% $B<:GT;~$N8!=P$N$?$a!"$3$N%l%8%9%?$r(B |\maxdimen| $B$G=i4|2=$9$k!#(B
+% \begin{macrocode}
+ \skip\z@\maxdimen\relax
+ \directlua{%
+ pcall(pxrubrica._get_interchar_glue)
+ }%
+ \xdef\pxrr@x@gtempa{\the\skip\z@}%
+ \endgroup
+ }
+ \begingroup
+ \endlinechar=10 \directlua{%
+ local node, tex = node, tex
+ local id_glyph, id_glue = node.id("glyph"), node.id("glue")
+ local id_hlist = node.id("hlist")
+% \end{macrocode}
+% |_get_interchar_glue()| $B$O(B |\box0| $B$N!HJ8;z4V%0%k!<!I$NNL$r(B
+% $B<hF@$7!"(B|\skip0| $B$KBeF~$9$k!#(B
+% $B<B:]$K$O!"!V:G=i$N(B glyph $B%N!<%I$N8e$K$"$k:G=i$N(B glue $B%N!<%I$r(B
+% $B!HJ8;z4V%0%k!<!I$HH=CG$7!"$=$NNL$rFI$_=P$9!#(B
+% \begin{macrocode}
+ function pxrubrica._get_interchar_glue()
+ local c, n = false, tex.box[0].head
+ while n do
+% \end{macrocode}
+% \Note 2014$BG/:"$N(B{\LuaTeX-ja}$B$G$OJ8;z$NItJ,$,(Bhlist$B%N!<%I$K$J$C$F$$$k!#(B
+% \begin{macrocode}
+ if n.id == id_glyph or n.id == id_hlist then
+ c = true
+ elseif c and n.id == id_glue then
+% \end{macrocode}
+% $B$3$3$G$N(B |n| $B$,!HJ8;z4V%0%k!<!I$N%N!<%I$G$"$k!#(B
+% \Note 0.85$BHG0J9_$N(B{\LuaTeX}$B$G$O!"(Bglue$B%N!<%I$KD>@\CM!J(B|n.width| $BEy!K(B
+% $B$,F~$C$F$$$k!#(B
+% $B$=$l$h$j8E$$HG$G$O!"(B|glue_spec| $B%G!<%?$r2p$7$?%$%s%?%U%'!<%9$K(B
+% $B$J$C$F$$$k!#(B
+% \begin{macrocode}
+ if n.width then
+ tex.setglue(0, n.width, n.stretch, n.shrink,
+ n.stretch_order, n.shrink_order)
+ elseif n.spec then
+ tex.setskip(0, node.copy(n.spec))
+ end
+ break
+ end
+ n = n.next
+ end
+ end
+ }%
+ \endgroup%
+% \end{macrocode}
%
% $B$=$l0J30$N>l9g$O%<%m$H$9$k!#(B
% \begin{macrocode}
@@ -2573,15 +2675,33 @@
% \end{macrocode}
%
% \PKN{LuaTeX-ja}$B;HMQ$N>l9g!#(B
+% $B=hM}$NN.$l$OOBJ84V6uGr$N>l9g$HF1$8!#(B
% \begin{macrocode}
\else\ifpxrr@in@luatexja
\def\pxrr@get@iaiskip#1{%
- \edef#1{%
- \ifnum\ltjgetparameter{autoxspacing}=\@ne
- \ltjgetparameter{xkanjiskip}%
- \else \pxrr@zeropt
+ \ifnum\ltjgetparameter{autoxspacing}=\@ne
+ \xdef\pxrr@x@gtempa{\ltjgetparameter{xkanjiskip}}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+% \end{macrocode}
+% $BH=DjMQ$N%\%C%/%9$O2$J8!&OBJ8$NAH$H$9$k!#(B
+% \begin{macrocode}
+ \pxrr@get@interchar@glue{A\pxrr@x@K}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+ \pxrr@warn@unknown@iaiskip
+ \global\let\pxrr@x@gtempa\pxrr@zeropt
+ \fi
\fi
- }%
+ \let#1\pxrr@x@gtempa
+ \else
+ \let#1\pxrr@zeropt
+ \fi
+ }
+% \end{macrocode}
+% $BOB2$J84V6uGr$N?dDj$K<:GT$7$?>l9g$N7Y9p!#(B
+% \begin{macrocode}
+ \def\pxrr@warn@unknown@iaiskip{%
+ \global\let\pxrr@warn@unknown@iaiskip\relax
+ \pxrr@warn{Cannot find the xkanjiskip value}%
}
% \end{macrocode}
%
@@ -6225,10 +6345,12 @@
\hb@xt@\pxrr@dima{%
\kern-.5\pxrr@dima
\pxrr@if@in@tate{}{\lower.38\pxrr@dima}%
- \hbox{%
+ \hb@xt@2\pxrr@dima{%
\pxrr@dima=\f@size\p@
\fontsize{2\pxrr@dima}{\z@}\selectfont
+ \hss
\pxrr@ja@dot
+ \hss
}%
\hss
}%
diff --git a/Master/texmf-dist/tex/platex/pxrubrica/pxrubrica.sty b/Master/texmf-dist/tex/platex/pxrubrica/pxrubrica.sty
index 3efd8853ac3..9dd51d8ffe9 100644
--- a/Master/texmf-dist/tex/platex/pxrubrica/pxrubrica.sty
+++ b/Master/texmf-dist/tex/platex/pxrubrica/pxrubrica.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pxrubrica}
- [2017/04/27 v1.3 PX Japanese-style ruby]
+ [2017/05/05 v1.3a PX Japanese-style ruby]
\RequirePackage{keyval}
\def\pxrr@pkgname{pxrubrica}
\def\pxrr@error{%
@@ -524,6 +524,9 @@
}{%
\pxrr@csletcs{ifpxrr@in@luatex}{iffalse}%
}
+\ifpxrr@in@luatex
+ \directlua{ pxrubrica = {} }
+\fi
\@ifpackageloaded{luatexja-core}{%
\pxrr@csletcs{ifpxrr@in@luatexja}{iftrue}%
}{%
@@ -581,13 +584,19 @@
\ifpxrr@in@ptex
\begingroup \catcode`\|=0
\gdef\pxrr@if@in@tate{%
- \pxrr@cond|iftdir|fi
+ \pxrr@cond{\if
+ |iftdir|ifmdir F|else T|fi|else F|fi
+ T}\fi
}
\endgroup
\else\ifpxrr@in@luatexja
- \def\pxrr@if@in@tate{%
- \pxrr@cond\ifnum\ltjgetparameter{direction}=\thr@@\fi
- }
+ \ifx\ltj@curtfnt\@undefined
+ \let\pxrr@if@in@tate\@secondoftwo
+ \else
+ \def\pxrr@if@in@tate{%
+ \pxrr@cond\ifnum\ltjgetparameter{direction}=\thr@@\fi
+ }
+ \fi
\else
\let\pxrr@if@in@tate\@secondoftwo
\fi\fi
@@ -654,13 +663,58 @@
}
\else\ifpxrr@in@luatexja
\def\pxrr@get@iiskip#1{%
- \edef#1{%
- \ifnum\ltjgetparameter{autospacing}=\@ne
- \ltjgetparameter{kanjiskip}%
- \else \pxrr@zeropt
+ \ifnum\ltjgetparameter{autospacing}=\@ne
+ \xdef\pxrr@x@gtempa{\ltjgetparameter{kanjiskip}}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+ \pxrr@get@interchar@glue{\pxrr@x@K\pxrr@x@K}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+ \pxrr@warn@unknown@iiskip
+ \global\let\pxrr@x@gtempa\pxrr@zeropt
+ \fi
\fi
- }%
+ \let#1\pxrr@x@gtempa
+ \else
+ \let#1\pxrr@zeropt
+ \fi
+ }
+ \def\pxrr@warn@unknown@iiskip{%
+ \global\let\pxrr@warn@unknown@iiskip\relax
+ \pxrr@warn{Cannot find the kanjiskip value}%
+ }
+ \def\pxrr@get@interchar@glue#1{%
+ \begingroup
+ \setbox\z@\hbox{#1}%
+ \skip\z@\maxdimen\relax
+ \directlua{%
+ pcall(pxrubrica._get_interchar_glue)
+ }%
+ \xdef\pxrr@x@gtempa{\the\skip\z@}%
+ \endgroup
}
+ \begingroup
+ \endlinechar=10 \directlua{%
+ local node, tex = node, tex
+ local id_glyph, id_glue = node.id("glyph"), node.id("glue")
+ local id_hlist = node.id("hlist")
+ function pxrubrica._get_interchar_glue()
+ local c, n = false, tex.box[0].head
+ while n do
+ if n.id == id_glyph or n.id == id_hlist then
+ c = true
+ elseif c and n.id == id_glue then
+ if n.width then
+ tex.setglue(0, n.width, n.stretch, n.shrink,
+ n.stretch_order, n.shrink_order)
+ elseif n.spec then
+ tex.setskip(0, node.copy(n.spec))
+ end
+ break
+ end
+ n = n.next
+ end
+ end
+ }%
+ \endgroup%
\else
\def\pxrr@get@iiskip#1{%
\let#1\pxrr@zeropt
@@ -686,12 +740,23 @@
}
\else\ifpxrr@in@luatexja
\def\pxrr@get@iaiskip#1{%
- \edef#1{%
- \ifnum\ltjgetparameter{autoxspacing}=\@ne
- \ltjgetparameter{xkanjiskip}%
- \else \pxrr@zeropt
+ \ifnum\ltjgetparameter{autoxspacing}=\@ne
+ \xdef\pxrr@x@gtempa{\ltjgetparameter{xkanjiskip}}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+ \pxrr@get@interchar@glue{A\pxrr@x@K}%
+ \ifdim\glueexpr\pxrr@x@gtempa=\maxdimen
+ \pxrr@warn@unknown@iaiskip
+ \global\let\pxrr@x@gtempa\pxrr@zeropt
+ \fi
\fi
- }%
+ \let#1\pxrr@x@gtempa
+ \else
+ \let#1\pxrr@zeropt
+ \fi
+ }
+ \def\pxrr@warn@unknown@iaiskip{%
+ \global\let\pxrr@warn@unknown@iaiskip\relax
+ \pxrr@warn{Cannot find the xkanjiskip value}%
}
\else
\def\pxrr@get@iaiskip#1{%
@@ -2692,10 +2757,12 @@
\hb@xt@\pxrr@dima{%
\kern-.5\pxrr@dima
\pxrr@if@in@tate{}{\lower.38\pxrr@dima}%
- \hbox{%
+ \hb@xt@2\pxrr@dima{%
\pxrr@dima=\f@size\p@
\fontsize{2\pxrr@dima}{\z@}\selectfont
+ \hss
\pxrr@ja@dot
+ \hss
}%
\hss
}%