summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-23 23:34:09 +0000
committerKarl Berry <karl@freefriends.org>2014-06-23 23:34:09 +0000
commit35c8a6c999c88800146abb0df96becdb3f0ddf9c (patch)
treefd1eb2fe75df7c776d201429829716b4a6bc6dc2 /Master/texmf-dist/tex/generic/babel-french/frenchb.lua
parent2a3f80d33949f85ee55f2d478e94d9a53b9e44a4 (diff)
babel-french (22jun14)
git-svn-id: svn://tug.org/texlive/trunk@34367 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-french/frenchb.lua')
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.lua28
1 files changed, 23 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
index 253cbdfaac7..63c5cad1d94 100644
--- a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
+++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
@@ -1,5 +1,5 @@
--
--- File `frenchb.lua' generated from frenchb.dtx [2014/04/18 v3.0c]
+-- File `frenchb.lua' generated from frenchb.dtx [2014/06/21 v3.1a]
--
-- Copyright (C) 2014 Daniel Flipo <daniel.flipo at free.fr>
-- License LPPL: see frenchb.dtx.
@@ -15,9 +15,11 @@ local FB_punct_left =
[string.byte("?")] = true,
[string.byte(";")] = true,
[string.byte(":")] = true,
+ [0x14] = true,
[0xBB] = true}
local FB_punct_right =
- {[0xAB] = true}
+ {[0x13] = true,
+ [0xAB] = true}
local FB_punct_null =
{[string.byte("!")] = true,
[string.byte("?")] = true,
@@ -31,6 +33,7 @@ local FB_guil_null =
local new_node = node.new
local copy_node = node.copy
local node_id = node.id
+local KERN = node_id("kern")
local GLUE = node_id("glue")
local GSPEC = node_id("glue_spec")
local GLYPH = node_id("glyph")
@@ -114,7 +117,9 @@ local function french_punctuation (head)
insert_node_before(head, item, copy_node(fbglue))
end
elseif SIG and SIG > 0 then
- if glue or (prev_char and not FB_guil_null[prev_char]) then
+ local addgl = (prev_char and not FB_guil_null[prev_char]) or
+ (not prev_char)
+ if glue or addgl then
if glue then
head = remove_node(head,prev,true)
end
@@ -126,12 +131,23 @@ local function french_punctuation (head)
end
if lang == FR and FB_punct_right[char] and SIG and SIG > 0 then
local next = item.next
- local next_id, next_subtype, next_char
+ local next_id, next_subtype, next_char, kern_wd, nextnext
if next then
next_id = next.id
next_subtype = next.subtype
if next_id == GLYPH then
next_char = next.char
+ elseif next_id == KERN then
+ kern_wd = next.kern
+ if kern_wd == 0 then
+ nextnext = next.next
+ if nextnext then
+ next = nextnext
+ next_id = nextnext.id
+ next_subtype = nextnext.subtype
+ next_char = nextnext.char
+ end
+ end
end
end
local glue = next_id == GLUE and next_subtype == 0
@@ -140,7 +156,9 @@ local function french_punctuation (head)
glue_wd = glue_spec.width
end
glue = glue and glue_wd > 0
- if glue or (next_char and not FB_guil_null[next_char]) then
+ local addgl = (next_char and not FB_guil_null[next_char]) or
+ (not next_char)
+ if glue or addgl then
if glue then
head = remove_node(head,next,true)
end