summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-03 00:02:32 +0000
committerKarl Berry <karl@freefriends.org>2016-05-03 00:02:32 +0000
commitaa8cd19f05a7e49e3b95f7d46750a85e80fa6e8b (patch)
tree6a0fbf43684b6e15df2fac3000b470de5f229459 /Master/texmf-dist/tex/generic
parent07d14d88e9e67dacfd1d8955fc7fdb16aea0b324 (diff)
babel-french
git-svn-id: svn://tug.org/texlive/trunk@40853 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.ldf64
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.lua37
2 files changed, 54 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
index 4f81c129600..eb0939c313f 100644
--- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
+++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
@@ -33,7 +33,7 @@
%% extension .ins) which are part of the distribution.
%%
\ProvidesLanguage{frenchb}
- [2016/03/18 v3.2a French support from the babel system]
+ [2016/04/18 v3.2b French support from the babel system]
%%
%% File `frenchb.ldf'
%% Babel package for LaTeX version 2e
@@ -92,13 +92,13 @@
\begingroup
\newlinechar=`\^^J
\def\\{^^J(frenchb.ldf) }%
- \errhelp{#2}\errmessage{\\#1}%
+ \errhelp{#2}\errmessage{\\#1^^J}%
\endgroup}
\def\fb@warning#1{%
\begingroup
\newlinechar=`\^^J
\def\\{^^J(frenchb.ldf) }%
- \message{\\#1}%
+ \message{\\#1^^J}%
\endgroup}
\def\fb@info#1{%
\begingroup
@@ -172,15 +172,32 @@
\newif\ifFB@active@punct \FB@active@puncttrue
\newif\ifFB@luatex@punct
\ifFBLuaTeX
- \ifnum\luatexversion>75
+ \ifnum\luatexversion>94
\FB@luatex@puncttrue\FB@active@punctfalse
+ \else
+ \ifx\PackageWarning\@undefined
+ \fb@warning{Please upgrade LuaTeX to version 0.95 or above!\\%
+ frenchb will make high punctuation characters (;:!?) active\\%
+ with LuaTeX < 0.95.}%
+ \else
+ \PackageWarning{frenchb.ldf}{Please upgrade LuaTeX
+ to version 0.95 or above!\MessageBreak
+ frenchb will make high punctuation characters\MessageBreak
+ (;:!?) active with LuaTeX < 0.95;\MessageBreak reported}%
+ \fi
\fi
\fi
+\newcount\FB@nonchar
\newif\ifFB@xetex@punct
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname XeTeXinterchartokenstate\endcsname\relax
\else
\FB@xetex@puncttrue\FB@active@punctfalse
+ \ifdim\the\XeTeXversion\XeTeXrevision pt<0.99996pt
+ \FB@nonchar=255 \relax
+ \else
+ \FB@nonchar=4095 \relax
+ \fi
\fi
\newcommand*{\FBcolonspace}{\space}
\newcommand*{\FBthinspace}{\hskip .16667em \relax}
@@ -192,21 +209,10 @@
\directlua{tex.enableprimitives("", tex.extraprimitives("omega"))}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newluafunction\endcsname\relax
- \ifLaTeXe
- \AtEndOfPackage{%
- \RequirePackage{luatexbase}%
- \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
- }
- \else
- \input luatexbase.sty
- \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
- \fi
- \else
- \newattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
+ \input ltluatex.tex
\fi
+ \newattribute\FB@addDPspace \FB@addDPspace=1 \relax
+ \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
\ifLaTeXe
\PackageInfo{frenchb.ldf}{No need for active punctuation
characters\MessageBreak with this version
@@ -296,7 +302,7 @@
\ifhmode\FDP@colonspace\fi}%
\XeTeXinterchartoks \FB@guilf \FB@punctthick = {%
\FDP@colonspace}%
- \XeTeXinterchartoks 255 \FB@punctthick = {%
+ \XeTeXinterchartoks \FB@nonchar \FB@punctthick = {%
\ifhmode
\ifdim\lastskip>1sp
\unskip\penalty\@M\FBcolonspace
@@ -311,7 +317,7 @@
\ifhmode\FDP@thinspace\fi}%
\XeTeXinterchartoks \FB@guilf \FB@punctthin = {%
\FDP@thinspace}%
- \XeTeXinterchartoks 255 \FB@punctthin = {%
+ \XeTeXinterchartoks \FB@nonchar \FB@punctthin = {%
\ifhmode
\ifdim\lastskip>1sp
\unskip\penalty\@M\FBthinspace
@@ -321,13 +327,13 @@
\fi}%
\XeTeXinterchartoks \FB@guilo \z@ = {%
\ifFBAutoSpaceGuill\FBguillspace\fi}%
- \XeTeXinterchartoks \FB@guilo 255 = {%
+ \XeTeXinterchartoks \FB@guilo \FB@nonchar = {%
\ifFBAutoSpaceGuill\FBguillspace\ignorespaces\fi}%
\XeTeXinterchartoks \z@ \FB@guilf = {%
\ifFBAutoSpaceGuill\FBguillspace\fi}%
\XeTeXinterchartoks \FB@punctthin \FB@guilf = {%
\ifFBAutoSpaceGuill\FBguillspace\fi}%
- \XeTeXinterchartoks 255 \FB@guilf = {%
+ \XeTeXinterchartoks \FB@nonchar \FB@guilf = {%
\ifFBAutoSpaceGuill\unskip\FBguillspace\fi}%
\bbl@for\FB@char
{`\[,`\(,"A0,"202F}%
@@ -436,10 +442,10 @@
\fi
\sffamilyORI}%
\fi
-\newcommand*{\NoAutoSpacing}{\FBAutoSpaceGuillfalse
- \ifFB@active@punct\shorthandoff{;:!?}\fi
- \ifFB@xetex@punct\XeTeXinterchartokenstate=0 \fi
- \ifFB@luatex@punct\FB@addDPspace=0 \FB@addGUILspace=0 \fi
+\DeclareRobustCommand*{\NoAutoSpacing}{\FBAutoSpaceGuillfalse
+ \ifFB@active@punct\noautospace@beforeFDP\shorthandoff{;:!?}\fi
+ \ifFB@xetex@punct\XeTeXinterchartokenstate=0 \fi
+ \ifFB@luatex@punct\FB@addDPspace=0 \FB@addGUILspace=0 \fi
}
\ifLaTeXe
\else
@@ -894,6 +900,12 @@
AFTER babel/frenchb; reported}%
\@FBwarning@capsepfalse}%
{}
+\@ifpackageloaded{subcaption}
+ {\FBWarning{frenchb.ldf}%
+ {Please load the "subcaption" package\MessageBreak
+ AFTER babel/frenchb; reported}%
+ \@FBwarning@capsepfalse}%
+ {}
\@ifpackageloaded{floatrow}
{\FBWarning{frenchb.ldf}%
{Please load the "floatrow" package\MessageBreak
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
index 508bf77ec5a..cbc79319e72 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 [2016/03/18 v3.2a]
+-- File `frenchb.lua' generated from frenchb.dtx [2016/04/18 v3.2b]
--
-- Copyright © 2014-2016 Daniel Flipo
-- <daniel (dot) flipo (at) free (dot) fr>
@@ -38,7 +38,6 @@ 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")
local GLYPH = node_id("glyph")
local PENALTY = node_id("penalty")
local nobreak = new_node(PENALTY)
@@ -70,12 +69,10 @@ local function new_glue_scaled (fid,width,stretch,shrink)
end
end
local gl = new_node(GLUE,0)
- local gl_spec = new_node(GSPEC)
if fp then
- gl_spec.width = width * fp.space
- gl_spec.stretch = stretch * fp.space_stretch
- gl_spec.shrink = shrink * fp.space_shrink
- gl.spec = gl_spec
+ gl.width = width * fp.space
+ gl.stretch = stretch * fp.space_stretch
+ gl.shrink = shrink * fp.space_shrink
return gl
else
return nil
@@ -103,19 +100,18 @@ local function french_punctuation (head)
prev_char = prev.char
end
end
- local glue = prev_id == GLUE and prev_subtype == 0
+ local is_glue = prev_id == GLUE
local glue_wd
- if glue then
- glue_spec = prev.spec
- glue_wd = glue_spec.width
+ if is_glue then
+ glue_wd = prev.width
end
- local realglue = glue and glue_wd > 1
+ local realglue = is_glue and glue_wd > 1
if FB_punct_thin[char] or FB_punct_thick[char] then
local SBDP = has_attribute(item, addDPspace)
local auto = SBDP and SBDP > 0
if auto then
if (prev_char and FB_punct_null[prev_char]) or
- (glue and glue_wd <= 1) or
+ (is_glue and glue_wd <= 1) or
(prev_id == HLIST and prev_subtype == 3) or
(prev_id == TEMP) then
auto = false
@@ -140,12 +136,12 @@ local function french_punctuation (head)
prev_id ~= TEMP and
not (prev_id == HLIST and prev_subtype == 3)
)
- if glue and glue_wd <= 1 then
+ if is_glue and glue_wd <= 1 then
addgl = false
end
local fbglue = new_glue_scaled(fid,guilwd,guilst,guilsh)
if addgl and fbglue then
- if glue then
+ if is_glue then
head = remove_node(head,prev,true)
end
insert_node_before(head, item, copy_node(nobreak))
@@ -177,20 +173,19 @@ local function french_punctuation (head)
end
end
end
- local glue = next_id == GLUE and next_subtype == 0
- if glue then
- glue_spec = next.spec
- glue_wd = glue_spec.width
+ local is_glue = next_id == GLUE
+ if is_glue then
+ glue_wd = next.width
end
local addgl = (next_char and not FB_guil_null[next_char]) or
(next and not next_char)
- if glue and glue_wd == 0 then
+ if is_glue and glue_wd == 0 then
addgl = false
end
local fid = item.font
local fbglue = new_glue_scaled(fid,guilwd,guilst,guilsh)
if addgl and fbglue then
- if glue then
+ if is_glue then
head = remove_node(head,next,true)
end
insert_node_after(head, item, copy_node(fbglue))