[NTG-context] problem with the removing of glue node in scrp-cjk.lua

Li Yanrui (李延瑞) liyanrui.m2 at gmail.com
Mon Aug 30 11:13:59 CEST 2010

Hi Hans,

In scrp-cjk.lua, the function "process" can eat some glue node between
CJK glyphs. But the following glue nodes between CJK glyph and
half_width_open/half_width_close glyphs should not be eaten.

For example:

中国 (Chinese) 的未来

Its output need stay the same.

Therefore I think the function "process" need add some codes for the
test of half_width_open/half_width_close glyphs. This is a patch for

--- /opt/context/tex/texmf-context/tex/context/base/scrp-cjk.lua	2010-08-20
01:35:20.000000000 +0800
+++ /home/garfileo/scrp-cjk.lua	2010-08-30 17:08:31.000000000 +0800
@@ -553,7 +553,8 @@
                         if not pcjk                 or not ncjk
                             or pcjk == "korean"     or ncjk == "korean"
                             or pcjk == "other"      or ncjk == "other"
-                            or pcjk == "jamo_final" or ncjk ==
"jamo_initial" then
+                            or pcjk == "jamo_final" or ncjk == "jamo_initial"
+			    or pcjk == "half_width_close" or ncjk == "half_width_open" then
                             previous = "start"
                         else -- if head ~= first then

Best regards,

Li Yanrui (李延瑞)

More information about the ntg-context mailing list