texlive[57316] Master/texmf-dist: luatexja (3jan21)

commits+karl at tug.org commits+karl at tug.org
Sun Jan 3 23:32:12 CET 2021


Revision: 57316
          http://tug.org/svn/texlive?view=revision&revision=57316
Author:   karl
Date:     2021-01-03 23:32:11 +0100 (Sun, 03 Jan 2021)
Log Message:
-----------
luatexja (3jan21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/luatexja/README
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex
    trunk/Master/texmf-dist/source/luatex/luatexja/tool/jfm-convert.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2021-01-03 22:32:11 UTC (rev 57316)
@@ -1,6 +1,6 @@
-The LuaTeX-ja Package 20201224.0
+The LuaTeX-ja Package 20210103.0
 --------------------------------
-Copyright (c) 2011--2020 The LuaTeX-ja project
+Copyright (c) 2011--2021 The LuaTeX-ja project
 License: modified BSD (see COPYING)
 
 LuaTeX-ja is a macro package for typesetting Japanese documents with LuaTeX.
@@ -45,9 +45,9 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20201224.0 in the Git repository by
+      or tagged as 20210103.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20201224.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20210103.0;sf=tgz>
 
    b. Extract the archive and process following three files by LuaLaTeX
       to generate classes for Japanese typesetting:
@@ -96,4 +96,4 @@
   This file and ltj-kinsoku.lua are not used anymore.
   (Do not remove ltj-kinsoku.tex.)
 
-Last commit date: Thu Dec 24 05:08:02 2020 +0900
+Last commit date: Sun Jan 3 09:48:34 2021 +0900

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2021-01-03 22:32:11 UTC (rev 57316)
@@ -221,7 +221,6 @@
 \end{lstlisting}
 のようにしてルビ用字形を用いることが可能だが,現在の実装ではタイプセットに時間がかかるようになる.
 
-
 \end{description}
 
 \medskip
@@ -325,8 +324,13 @@
 の\ltjruby{紋}{もん}\ltjruby{章}{しよう}が
 \end{LTXexample}
 のように,複数回使用すること.
-また,全てのグループにおいて「ルビ文字列の長さは親文字列以下」であれば,
-単純グループルビの並びとして扱われる.すなわち,次の2行は全くの等価となる.
+また,全てのグループにおいて「ルビ文字列の長さは親文字列以下」
+\footnote{%
+  実際には\TeX での長さの計算誤差($2^{-16}$~ptの整数倍として計算していることによる)を考慮し,
+  親文字全角の$1/1000$だけルビ文字列が長くなることを許容している.
+}であれば,
+単純グループルビの並びとして扱われる.すなわち,次ページ冒頭の2行は全くの等価となる.
+\newpage
 \begin{verbatim}
 \ltjruby{普|通|車}{ふ|つう|しや}
 \ltjruby{普}{ふ}\ltjruby{通}{つう}\ltjruby{車}{しや}
@@ -378,7 +382,6 @@
 \paragraph{前後からのルビ文字のはみ出し1}
 「日本語組版処理の要件」の図117\footnote{2020-08-11版での番号.2012-04-03版では図3.82.}のように,
 前後からのルビ文字のはみ出しが繋がらないようにする処理が組み込まれている.
-
 例えば,
 \begin{LTXexample}[preset=\Large,width=0.3\textwidth]
 \ltjruby{陵}{りよう}と\ltjruby{陵}{みささぎ}\\

Modified: trunk/Master/texmf-dist/source/luatex/luatexja/tool/jfm-convert.lua
===================================================================
--- trunk/Master/texmf-dist/source/luatex/luatexja/tool/jfm-convert.lua	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/source/luatex/luatexja/tool/jfm-convert.lua	2021-01-03 22:32:11 UTC (rev 57316)
@@ -3,7 +3,7 @@
 local stderr = io.stderr
 local function show_usage(s)
   stderr:write('Error: ' .. s .. '\n'); 
-  stderr:write('Usage: jfm-convert [-J|-U] <ptex_jfm>\n'); 
+  stderr:write('Usage: texlua jfm-convert [-J|-U] <ptex_jfm>\n'); 
   stderr:write('-J: JIS mode, -U: UCS mode \n'); 
   stderr:write(' * The output will be written to stdout.\n'); 
   stderr:write(' * I do not read  virtual fonts which corresponded to <ptex_jfm>.\n'); 
@@ -13,20 +13,21 @@
   os.exit(1)
 end
 
-require('unicode'); local uchar = unicode.utf8.char
 kpse.set_program_name('luatex')
+require('lualibs'); local uchar = utf.char
 jisx0208 = require('ltj-jisx0208.lua').table_jisx0208_uptex
 local function pass_ucs(s)
    return  "'" .. uchar(s) .. "'" 
 end
 local function jis_to_ucs(s)
-   local a = jisx0208[s-0x2020]
+   local i = s - 0x2020
+   local a = jisx0208[math.floor(i/256)*94+(i%256)-94] or 0
    return a and pass_ucs(a) or string.format('0x%X',s+0x200000)
 end
 
 -------- 引数解釈 --------
 
-require('unicode')
+
 local filename
 local mode
 
@@ -207,7 +208,8 @@
 if not mode then
    mode = jis_to_ucs
    for i=1, #all_ctype do
-      if not jisx0208[all_ctype[i]-0x2020] then
+      local i = all_ctype[i]-0x2020
+      if not jisx0208[math.floor(i/256)*94+(i%256)-94] then
 	 mode = pass_ucs; break
       end
    end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -4,7 +4,7 @@
 
 % LaTeX only!
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-ruby}[2020-12-24 v0.5]
+\ProvidesPackage{luatexja-ruby}[2020-12-25 v0.51]
 \RequirePackage{luatexja}
 
 %%------------------
@@ -63,6 +63,10 @@
 %% attr は sp 単位だが,ユーザーは親文字全角単位で指定
 \ltj@@rkeydef{intergap}
 
+%% epsilon: モノルビ * n にする際に,ルビの方がどれだけ親文字より長い
+%% 状況を許容するか.親文字全角単位.計算誤差を想定.
+\ltj@@rkeydef{epsilon}
+
 \ltj@@rkeydef{kenten}%% 圏点文字
 \ltj@@rkeydef{fontcmd}%% フォント
 \define at boolkey[ltj]{ruby}{rubysmash}[true]{}
@@ -98,6 +102,7 @@
 \catcode`\_=11
 \gdef\ltj@@ruby at create@table#1{% #1: ルビ全角
     \string{
+      eps = \ltj at safe@dimen{\ltj@@rubyip at epsilon\zw},
       before_jfmgk = 0, after_jfmgk = 0,
       rubyzw = \ltj at safe@dimen{#1}, 
       maxmargin = \ltj at safe@dimen{\ltj@@rubyip at maxmargin\zw},
@@ -244,7 +249,8 @@
   stretchbol={0}{1}{1}, stretcheol={1}{1}{0},
   maxmargin=0.5, size=0.5, intergap=0, rubysmash=false,
   kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
-  intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip
+  intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip,
+  epsilon=0.0001,
 }
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -12,7 +12,7 @@
 \def\luatexjalatexLoaded{\endinput}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2020-10-09 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2020-12-29 LaTeX support of LuaTeX-ja]
 
 % cleanup at end of the document
 %\let\ltj@@orig at end=\@@end
@@ -27,8 +27,12 @@
 \fi
 \newif\ifltj at ltfilehook@avail
 \@ifl at t@r\fmtversion{2020-10-01}{%
-  \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
-  \else\ltj at ltfilehook@availtrue\fi
+  \@ifl at t@r\fmtversion{2020-10-02}%
+    {\ltj at ltfilehook@availtrue}
+    {%
+      \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
+      \else\ltj at ltfilehook@availtrue\fi
+    }%
 }{}
 
 %%% patch for LaTeX

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua	2021-01-03 22:32:11 UTC (rev 57316)
@@ -1,7 +1,6 @@
 --
 -- ltj-otf.lua
 --
-require 'unicode'
 require 'lualibs'
 
 luatexja.load_module 'base';      local ltjb = luatexja.base
@@ -120,9 +119,9 @@
    setfield(p, 'value', char);  node_write(p)
 end
 
-local utf
+local myutf
 do
-   utf = function (ucs)
+   myutf = function (ucs)
       if ltjd_get_dir_count()==dir_tate then
          ucs = ltju.replace_vert_variant(
             tex_get_attr((ltjd_get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt),
@@ -235,7 +234,7 @@
 luatexja.otf = {
   append_jglyph = append_jglyph,
   enable_ivs = enable_ivs, disable_ivs = disable_ivs,
-  cid = cid, utf = utf,
+  cid = cid, utf = myutf,
 }
 
 

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2021-01-03 22:32:11 UTC (rev 57316)
@@ -278,9 +278,9 @@
                          'the body (' .. #rtlr .. ' != ' .. #rtlp .. ').',
                          '')
    else
-      local f = true
+      local f, eps = true, rst.eps
       for i = 1,#rtlr do
-         if getfield(rtlr[i], 'width') > getfield(rtlp[i], 'width') then
+         if getfield(rtlr[i], 'width') > getfield(rtlp[i], 'width') + eps then
             f = false; break
          end
       end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -65,7 +65,7 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja-core}[2020-12-22 Core of LuaTeX-ja]
+  \ProvidesPackage{luatexja-core}[2021-01-02 Core of LuaTeX-ja]
 \fi                             %</LaTeX>
 
 %% Load prerequisite packages.
@@ -526,9 +526,9 @@
     \csname ltj at kcat5\endcsname="7FFFFFFF %"
     \csname ltj at kcat6\endcsname="7FFFFFFF }%"
 
-\protected\def\ltjjachar{\afterassignment\ltj@@jachar\ltj at tempcnta}
+\protected\def\ltjjachar{\leavevmode\afterassignment\ltj@@jachar\ltj at tempcnta}
 \def\ltj@@jachar{{\directlua{tex.globaldefs=0}\ltj at alljachar\ltj@@origchar\ltj at tempcnta}}
-\protected\def\ltjalchar{\afterassignment\ltj@@alchar\ltj at tempcnta}
+\protected\def\ltjalchar{\leavevmode\afterassignment\ltj@@alchar\ltj at tempcnta}
 \def\ltj@@alchar{{\directlua{tex.globaldefs=0}\ltj at allalchar\ltj@@origchar\ltj at tempcnta}}
 
 %%%%%%%% \ltjsetmathletter<number>, \ltjunsetmathletter<number>

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -35,13 +35,13 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja}[2020-12-24 Japanese Typesetting with Lua(La)TeX]
+  \ProvidesPackage{luatexja}[2021-01-03 Japanese Typesetting with Lua(La)TeX]
   \DeclareOption{disablejfam}{\ltj at disablejfamtrue}
   \DeclareOption*{}
   \ProcessOptions\relax
 \fi                             %</LaTeX>
 %%%% VERSION
-\def\LuaTeXjaversion{20201224.0}
+\def\LuaTeXjaversion{20210103.0}
 
 \directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
 

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2020-10-05 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2020-12-29 Patch to NFSS2 for LuaTeX-ja]
 
 %% patching \DeclareTextComposite
 \def\ltj at chardef@text at cmd#1{%
@@ -634,7 +634,8 @@
 
 \newcount\ltj@@latex at plv \ltj@@latex at plv=-1
 \ifltj at ltfilehook@avail % 2020-10-01
-  \ltj@@latex at plv=1000
+  \@ifl at t@r\fmtversion{2020-10-02}{\ltj@@latex at plv=1300}%
+    {\ifnum\patch at level>2 \ltj@@latex at plv=1300\else \ltj@@latex at plv=1000\fi}
 \else\ifdefined\@rmfamilyhook % 2020-02-02
   \ifx\@forced at seriestrue\@undefined % 2020-02-02 pl0--2
     \@latex at error
@@ -768,12 +769,25 @@
 \DeclareRobustCommand\romanshapeforce[1]{\edef\f at shape{#1}}
 \DeclareRobustCommand\kanjishapeforce[1]{\edef\k at shape{#1}}
 \DeclareRobustCommand\fontshapeforce[1]{\set at safe@kanji at shape{#1}{}\romanshapeforce{#1}}
+\ifnum\ltj@@latex at plv>1000
+%%%% LaTeX >= 2020-10-01 PL3
 \DeclareRobustCommand\usekanji[4]{%
+    \kanjiencoding{#1}\edef\k at family{#2}%
+    \set at target@series at kanji{#3}\edef\k at shape{#4}%
+    \selectfont\ignorespaces}
+\DeclareRobustCommand\useroman[4]{%
+    \romanencoding{#1}\edef\f at family{#2}%
+    \set at target@series{#3}\edef\f at shape{#4}%
+    \selectfont\ignorespaces}
+\else
+%%%% 2020-10-01 <= LaTeX < 2020-10-01 PL3
+\DeclareRobustCommand\usekanji[4]{%
     \kanjiencoding{#1}\edef\k at family{#2}\edef\k at series{#3}\edef\k at shape{#4}%
     \selectfont\ignorespaces}
 \DeclareRobustCommand\useroman[4]{%
     \romanencoding{#1}\edef\f at family{#2}\edef\f at series{#3}\edef\f at shape{#4}%
     \selectfont\ignorespaces}
+\fi
 %%%% LaTeX >= 2020-02-02 END
 \else
 %%%% LaTeX 2019-10-01

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-geometry}[2020-09-18 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2020-12-29 Patch to geometry for LuaTeX-ja with vertical writing mode]
 \RequirePackage{expl3}
 \ifdefined\if at ltj@@geometry at tate\expandafter\endinput\fi
 \newif\if at ltj@@geometry at tate
@@ -33,8 +33,11 @@
 \unless\ifdefined\ltj at ExecuteAfterPackage
 \expandafter\newif\csname ifltj at ltfilehook@avail\endcsname
 \@ifl at t@r\fmtversion{2020-10-01}{%
-  \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
-  \else\ltj at ltfilehook@availtrue\fi
+  \@ifl at t@r\fmtversion{2020-10-02}{\ltj at ltfilehook@availtrue}
+    {%
+      \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
+      \else\ltj at ltfilehook@availtrue\fi
+    }%
 }{}
 \ifltj at ltfilehook@avail
   \def\@@ltj at ExecuteAfterPackage#1{\AddToHook{package/after/#1}}

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty	2021-01-03 22:31:41 UTC (rev 57315)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty	2021-01-03 22:32:11 UTC (rev 57316)
@@ -43,7 +43,7 @@
 \directlua{
   local cat_str = luatexbase.catcodetables['string']
   local cat_lp  = luatexbase.catcodetables['latex-package']
-  local ubyte = unicode.utf8.byte
+  local ubyte = utf.byte
   local spccmd = string.char(0x5C) .. 'ltj at lst@hss at normal'
   luatexja.listings = {}
   function luatexja.listings.althss(t)
@@ -229,7 +229,7 @@
 }}
 
 \directlua{
-  local utfchar, getcount = unicode.utf8.char, tex.getcount
+  local utfchar, getcount = utf.char, tex.getcount
   luatexja.listings.insert_cb = function()
     if not luatexja.listings.patched then
       luatexja.listings.patched = 1



More information about the tex-live-commits mailing list.