From 2014750e7bcf55bab5c430e3d98d8a11430eb979 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 26 May 2019 21:24:59 +0000
Subject: luatexko (26may19)

git-svn-id: svn://tug.org/texlive/trunk@51228 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/luatex/luatexko/luatexko.sty | 26 +++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

(limited to 'Master/texmf-dist/tex/luatex/luatexko/luatexko.sty')

diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
index d575a0ce1df..bf151279768 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
@@ -13,7 +13,7 @@
 
 \ifdefined\luatexkohangulfontattr \endinput\fi
 \ifdefined\selectfont
-  \ProvidesPackage{luatexko}[2019/05/01 v2.0 typesetting Korean with LuaTeX]
+  \ProvidesPackage{luatexko}[2019/05/25 v2.1 typesetting Korean with LuaTeX]
   \RequirePackage{luatexbase}
   \RequirePackage{fontspec}
 \else
@@ -129,7 +129,14 @@
 % uline
 \newcount\luatexkoulinecount
 \def\ulinedown{0.5ex }\def\ulinewidth{0.04em }
-\protected\def\markoverwith#1#2{%
+\protected\def\markoverwith#1#{%
+  \ifx\empty#1\empty
+    \def\luatexkoleaderstype{101}% cleaders
+  \else
+    \def\luatexkoleaderstype{102}% xleaders
+  \fi
+  \luatexkomarkoverwith }
+\def\luatexkomarkoverwith#1#2{%
   \global\advance\luatexkoulinecount\@ne
   \begingroup
   \count@\luatexkoulinecount
@@ -140,17 +147,17 @@
   \setbox\z@\hbox{#1}%
   \directlua{
     if \the\luatexkoulinecount == 1 then luatexko.activate("uline") end
-    luatexko.ulboundary(\the\count@, tex.box[0].list)
+    luatexko.ulboundary(\the\count@, tex.box[0].list, \luatexkoleaderstype)
   }#2\directlua{
     luatexko.ulboundary(\the\count@)
   }\endgroup }
 \protected\def\uline{\markoverwith{%
   \vrule width\z@ height-\ulinedown depth\dimexpr\ulinedown+\ulinewidth\relax }}
-\protected\def\dashuline{\markoverwith{%
+\protected\def\dashuline{\markoverwith*{%
   \hbox{\kern.125em
     \vrule width.3em height-\ulinedown depth\dimexpr\ulinedown+\ulinewidth\relax
     \kern.125em }}}
-\protected\def\dotuline{\markoverwith{%
+\protected\def\dotuline{\markoverwith*{%
   \lower\dimexpr\ulinedown+.1ex\relax\hbox{\kern.07em .\kern.07em }}}
 \protected\def\uuline#1{\uline{\uline{#1}}}
 \protected\def\sout#1{\begingroup
@@ -161,7 +168,7 @@
   \markoverwith{\lower4\p@\hbox{\luatexkofontsixly\char58}}}
 % ruby
 \def\rubysize{0.6}  % size of ruby compared to base chars
-\def\rubysep{0.2ex} % distance between base chars and ruby
+\def\rubysep{0.1ex} % distance between base chars and ruby
 \def\luatexkostretchfactor{.0125} % .5em/20/2 is hard coded.
 \newif\ifruby@overlap
 \let\rubyoverlap\ruby@overlaptrue
@@ -173,8 +180,7 @@
   \global\advance\luatexkorubycount\@ne
   \begingroup
   \leavevmode
-  \setbox\z@\luatexkorubybasehbox{% base
-    \vrule width\z@ height 2ex depth\z@ #1}%
+  \setbox\z@\luatexkorubybasehbox{#1}% base
   \setbox\tw@\hbox{% ruby
     \ifdefined\rubyfont \rubyfont \fi
     \ifdefined\selectfont % <- latex
@@ -202,9 +208,9 @@
   \else
     \ifdim\rubysize\wd\z@ > 2\wd\tw@ % ruby is far shorter
       \setbox\tw@\hbox to\wd\z@{%
-        \hskip\dimen@ii\relax
+        \hskip\dimen@ii plus 1sp\relax
         \unhbox\tw@
-        \hskip\dimen@ii\relax }%
+        \hskip\dimen@ii plus 1sp\relax }%
     \else
       \setbox\tw@\hbox to\wd\z@{%
         \hskip\z@ plus \luatexkostretchfactor \dimen@ii\relax
-- 
cgit v1.2.3

