summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-french/frenchb.lua')
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.lua31
1 files changed, 22 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
index 172fb8eb82d..685ce072e07 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 [2015/04/10 v3.1e]
+-- File `frenchb.lua' generated from frenchb.dtx [2015/06/26 v3.1g]
--
-- Copyright (C) 2014-2015 Daniel Flipo
-- <daniel (dot) flipo (at) free (dot) fr>
@@ -34,6 +34,8 @@ local FB_guil_null =
local new_node = node.new
local copy_node = node.copy
local node_id = node.id
+local HLIST = node_id("hlist")
+local TEMP = node_id("temp")
local KERN = node_id("kern")
local GLUE = node_id("glue")
local GSPEC = node_id("glue_spec")
@@ -107,7 +109,8 @@ local function french_punctuation (head)
if auto then
if (prev_char and FB_punct_null[prev_char]) or
(glue and glue_wd <= 1) or
- (prev_id == 0 and prev_subtype == 3) then
+ (prev_id == HLIST and prev_subtype == 3) or
+ (prev_id == TEMP) then
auto = false
end
end
@@ -126,8 +129,14 @@ local function french_punctuation (head)
end
elseif SIG and SIG > 0 then
local addgl = (prev_char and not FB_guil_null[prev_char]) or
- (not prev_char)
- if glue or addgl then
+ (not prev_char and
+ prev_id ~= TEMP and
+ not (prev_id == HLIST and prev_subtype == 3)
+ )
+ if glue and glue_wd <= 1 then
+ addgl = false
+ end
+ if addgl then
if glue then
head = remove_node(head,prev,true)
end
@@ -140,7 +149,7 @@ local function french_punctuation (head)
if lang == FR and FB_punct_right[char] and fid > 0
and SIG and SIG > 0 then
local next = item.next
- local next_id, next_subtype, next_char, kern_wd, nextnext
+ local next_id, next_subtype, next_char, nextnext, kern_wd
if next then
next_id = next.id
next_subtype = next.subtype
@@ -154,7 +163,9 @@ local function french_punctuation (head)
next = nextnext
next_id = nextnext.id
next_subtype = nextnext.subtype
- next_char = nextnext.char
+ if next_id == GLYPH then
+ next_char = nextnext.char
+ end
end
end
end
@@ -164,10 +175,12 @@ local function french_punctuation (head)
glue_spec = next.spec
glue_wd = glue_spec.width
end
- glue = glue and glue_wd > 0
local addgl = (next_char and not FB_guil_null[next_char]) or
- (not next_char)
- if glue or addgl then
+ (next and not next_char)
+ if glue and glue_wd == 0 then
+ addgl = false
+ end
+ if addgl then
if glue then
head = remove_node(head,next,true)
end