diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-28 22:13:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-28 22:13:58 +0000 |
commit | e419c0c89b5d20699307d32913bda2c4318e78da (patch) | |
tree | 0378799ebc39f1f1f1faeb041577fbde8c8f8d95 /Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua | |
parent | 87b2d1358e32a16c879c30fc456627b2659f03c2 (diff) |
polyglossia (28may13)
git-svn-id: svn://tug.org/texlive/trunk@30787 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua')
-rw-r--r-- | Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua index 04355384029..46370c46af2 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua +++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-tibt.lua @@ -8,14 +8,24 @@ local next, type = next, type local nodes, fonts, node = nodes, fonts, node +local nodecodes = nodes.nodecodes --- <= preloaded node.types() + local insert_node_before = node.insert_before local insert_node_after = node.insert_after local remove_node = nodes.remove local copy_node = node.copy -local end_of_math = node.end_of_math local has_attribute = node.has_attribute -local nodecodes = nodes.nodecodes --- <= preloaded node.types() +local end_of_math = node.end_of_math +if not end_of_math then -- luatex < .76 + local traverse_nodes = node.traverse_id + local math_code = nodecodes.math + local end_of_math = function (n) + for n in traverse_nodes(math_code, n.next) do + return n + end + end +end -- node types as of April 2013 local glyph_code = nodecodes.glyph @@ -24,7 +34,7 @@ local kern_code = nodecodes.kern -- we make a new node, so that we can copy it later on local penalty_node = node.new(penalty_code) -penalty_node.penalty = -2000 -- rather arbitrary... if someone has a better idea...? +penalty_node.penalty = 50 -- corresponds to the penalty LaTeX sets at explicit hyphens local function get_penalty_node() return copy_node(penalty_node) |