diff options
author | Karl Berry <karl@freefriends.org> | 2014-05-18 23:36:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-05-18 23:36:26 +0000 |
commit | 49cdd10ba6dfc461ce5e70b61695ba2aba0cbeb7 (patch) | |
tree | 040f532958cd03ab74d9a1eace2a064fd7ed2695 /Master/texmf-dist/tex/context/base/spac-chr.lua | |
parent | d64820a42321d65868c63bd49e657b88c58967bb (diff) |
context from May 18 beta/cont-tmf.zip (11854476 bytes)
git-svn-id: svn://tug.org/texlive/trunk@34112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spac-chr.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/spac-chr.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/spac-chr.lua b/Master/texmf-dist/tex/context/base/spac-chr.lua index 1abba350ad8..5b3a15478ce 100644 --- a/Master/texmf-dist/tex/context/base/spac-chr.lua +++ b/Master/texmf-dist/tex/context/base/spac-chr.lua @@ -39,6 +39,7 @@ local setattr = nuts.setattr local getfont = nuts.getfont local getchar = nuts.getchar +local insert_node_before = nuts.insert_before local insert_node_after = nuts.insert_after local remove_node = nuts.remove local copy_node_list = nuts.copy_list @@ -58,6 +59,7 @@ local glue_code = nodecodes.glue local space_skip_code = skipcodes["spaceskip"] local chardata = characters.data +local is_punctuation = characters.is_punctuation local typesetters = typesetters @@ -162,6 +164,18 @@ local methods = { -- The next one uses an attribute assigned to the character but still we -- don't have the 'local' value. + [0x001F] = function(head,current) + local next = getnext(current) + if next and getid(next) == glyph_code then + local char = getchar(next) + head, current = remove_node(head,current,true) + if not is_punctuation[char] then + local p = fontparameters[getfont(next)] + head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink)) + end + end + end, + [0x00A0] = function(head,current) -- nbsp local next = getnext(current) if next and getid(next) == glyph_code then |