ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Li Yanrui (李延瑞)" <liyanrui.m2@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: problem with the removing of glue node in scrp-cjk.lua
Date: Mon, 30 Aug 2010 17:13:59 +0800	[thread overview]
Message-ID: <AANLkTimjnOZYeK-JCGg+pXtCPv5xqc2eZ-c-bnZL-sb8@mail.gmail.com> (raw)

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:

\starttext
中国 (Chinese) 的未来
\stoptext

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
it.

--- /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
                             remove_node(head,first,true)

-- 
Best regards,

Li Yanrui (李延瑞)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

                 reply	other threads:[~2010-08-30  9:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimjnOZYeK-JCGg+pXtCPv5xqc2eZ-c-bnZL-sb8@mail.gmail.com \
    --to=liyanrui.m2@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).