summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-french
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-09 21:16:56 +0000
committerKarl Berry <karl@freefriends.org>2017-05-09 21:16:56 +0000
commitab7e88889752839c4c564b3f931b2ee0c906bf2e (patch)
treeacd700dbb34a25fbb4a841c33549fe1215f58aa8 /Master/texmf-dist/tex/generic/babel-french
parent2d42acb5090a08806f0533c9688b548b064b0324 (diff)
babel-french (8may17)
git-svn-id: svn://tug.org/texlive/trunk@44270 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-french')
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.ldf161
-rw-r--r--Master/texmf-dist/tex/generic/babel-french/frenchb.lua56
2 files changed, 114 insertions, 103 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
index 1d689979bc8..b1f5be0de66 100644
--- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
+++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf
@@ -33,9 +33,9 @@
%% extension .ins) which are part of the distribution.
%%
\ProvidesLanguage{frenchb}
- [2017/01/30 v3.2g French support from the babel system]
+ [2017/04/30 v3.3a French support from the babel system]
%%
-%% File `frenchb.ldf'
+%% File `frenchb.ldf’
%% Babel package for LaTeX version 2e
%% Copyright © 1996 - 2017
%% by Daniel Flipo <daniel (dot) flipo (at) free (dot) fr>
@@ -200,10 +200,8 @@
\fi
\newcommand*{\FBcolonspace}{\space}
\newcommand*{\FBthinspace}{\hskip.5\fontdimen2\font \relax}
-\newskip\FBcolonskip
-\FBcolonskip=3.33pt plus 1.665pt minus 1.11pt \relax
-\newskip\FBthinskip
-\FBthinskip=1.6667pt \relax
+\newtoks\FBcolonsp
+\newtoks\FBthinsp
\newif\ifFB@spacing \FB@spacingtrue
\newcommand*{\FB@spacing@on}{%
\ifFB@luatex@punct
@@ -218,7 +216,6 @@
\FB@spacingfalse
\fi}
\ifFB@luatex@punct
- \directlua{tex.enableprimitives("", tex.extraprimitives("omega"))}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newluafunction\endcsname\relax
\input ltluatex.tex
@@ -343,15 +340,15 @@
\fi
\fi}%
\XeTeXinterchartoks \FB@guilo \z@ = {%
- \ifFB@spacing\FBguillspace\fi}%
+ \ifFB@spacing\FB@guillspace\fi}%
\XeTeXinterchartoks \FB@guilo \FB@nonchar = {%
- \ifFB@spacing\FBguillspace\ignorespaces\fi}%
+ \ifFB@spacing\FB@guillspace\ignorespaces\fi}%
\XeTeXinterchartoks \z@ \FB@guilf = {%
- \ifFB@spacing\FBguillspace\fi}%
+ \ifFB@spacing\FB@guillspace\fi}%
\XeTeXinterchartoks \FB@punctthin \FB@guilf = {%
- \ifFB@spacing\FBguillspace\fi}%
+ \ifFB@spacing\FB@guillspace\fi}%
\XeTeXinterchartoks \FB@nonchar \FB@guilf = {%
- \ifFB@spacing\unskip\FBguillspace\fi}%
+ \ifFB@spacing\unskip\FB@guillspace\fi}%
\bbl@for\FB@char
{`\[,`\(,"A0,"202F}%
{\XeTeXcharclass\FB@char=\FB@punctnul}%
@@ -469,33 +466,33 @@
\fi
\let\xspace\relax
\fi
-\newskip\FBguillskip
-\FBguillskip=2.664pt plus 0.500pt minus 0.888pt \relax
-\newcommand*{\FBguillspace}{\penalty\@M\hskip.8\fontdimen2\font
- plus.3\fontdimen3\font
- minus.8\fontdimen4\font}
+\newcommand*{\FBguillspace}{\hskip.8\fontdimen2\font
+ plus.3\fontdimen3\font
+ minus.8\fontdimen4\font \relax}
+\newcommand*{\FB@guillspace}{\penalty\@M\FBguillspace}
+\newtoks\FBguillsp
\ifFB@luatex@punct
\DeclareRobustCommand*{\FB@og}{\leavevmode
\bgroup\FB@spacing=0 \guillemotleft\egroup
- \FBguillspace}
+ \FB@guillspace}
\DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi
- \FBguillspace
+ \FB@guillspace
\bgroup\FB@spacing=0 \guillemotright\egroup}
\fi
\ifFB@xetex@punct
\DeclareRobustCommand*{\FB@og}{\leavevmode
\bgroup\FB@spacingfalse\guillemotleft\egroup
- \FBguillspace}
+ \FB@guillspace}
\DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi
- \FBguillspace
+ \FB@guillspace
\bgroup\FB@spacingfalse\guillemotright\egroup}
\fi
\ifFB@active@punct
\DeclareRobustCommand*{\FB@og}{\leavevmode
\guillemotleft
- \FBguillspace}
+ \FB@guillspace}
\DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi
- \FBguillspace
+ \FB@guillspace
\guillemotright}
\fi
\newcommand*{\og}{\@empty}
@@ -536,38 +533,37 @@
\newcommand{\fr@quote}[1]{%
\leavevmode
\advance\FBguill@level by \@ne
- \def\FB@quotespace{\kern.8\fontdimen2\font}%
\ifcase\FBguill@level
\or
\FB@everypar=\everypar
\ifx\FBeveryparguill\FBguillnone
\else
- \def\FBeverypar@quote{\FBeveryparguill\FB@quotespace}%
+ \def\FBeverypar@quote{\FBeveryparguill\FB@guillspace}%
\everypar=\expandafter{\the\everypar \FBeverypar@quote}%
\fi
\ogi #1\fgi
\or
\ifx\FBeverylineguill\FBguillopen
- \localleftbox{\guillemotleft\FB@quotespace}%
+ \localleftbox{\guillemotleft\FB@guillspace}%
\let\FBeverypar@quote\relax
\ogi #1\ifFBcloseguill\fgi\fi
\else
\ifx\FBeverylineguill\FBguillclose
- \localleftbox{\guillemotright\FB@quotespace}%
+ \localleftbox{\guillemotright\FB@guillspace}%
\let\FBeverypar@quote\relax
\ogi #1\ifFBcloseguill\fgi\fi
\else
\let\FBeverypar@quote\relax
\ifFBInnerGuillSingle
\def\ogii{\leavevmode
- \guilsinglleft\FBguillspace}%
+ \guilsinglleft\FB@guillspace}%
\def\fgii{\ifdim\lastskip>\z@\unskip\fi
- \FBguillspace\guilsinglright}%
+ \FB@guillspace\guilsinglright}%
\ifx\FBeveryparguill\FBguillopen
- \def\FBeverypar@quote{\guilsinglleft\FB@quotespace}%
+ \def\FBeverypar@quote{\guilsinglleft\FB@guillspace}%
\fi
\ifx\FBeveryparguill\FBguillclose
- \def\FBeverypar@quote{\guilsinglright\FB@quotespace}%
+ \def\FBeverypar@quote{\guilsinglright\FB@guillspace}%
\fi
\fi
\ogii #1\ifFBcloseguill \fgii \fi
@@ -575,11 +571,11 @@
\fi
\else
\ifx\PackageWarning\@undefined
- \fb@warning{\noexpand\frquote\space accepts no more than
+ \fb@warning{\noexpand\frquote\space handles up to
two levels.\\ Quotation not printed.}%
\else
\PackageWarning{frenchb.ldf}{%
- \protect\frquote\space accepts no more than two levels
+ \protect\frquote\space handles up to two levels.
\MessageBreak Quotation not printed. Reported}
\fi
\fi
@@ -820,18 +816,20 @@
}
\ifx\FBfigtabshape\@undefined \let\FBfigtabshape\scshape \fi
\StartBabelCommands*{\BabelLanguages}{captions}
- [unicode, fontenc=EU1 EU2, charset=utf8]
+ [unicode, fontenc=EU1 EU2 TU, charset=utf8]
\SetString{\refname}{Références}
\SetString{\abstractname}{Résumé}
\SetString{\prefacename}{Préface}
\SetString{\contentsname}{Table des matières}
\SetString{\ccname}{Copie à }
\SetString{\proofname}{Démonstration}
+ \SetString{\partfirst}{Première}
+ \SetString{\partsecond}{Deuxième}
\SetStringLoop{ordinal#1}{%
- Première,Deuxième,Troisième,Quatrième,Cinquième,%
- Sixième,Septième,Huitième,Neuvième,Dixième,Onzième,%
- Douzième,Treizième,Quatorzième,Quinzième,Seizième,%
- Dix-septième,Dix-huitième,Dix-neuvième,Vingtième}
+ \frenchpartfirst,\frenchpartsecond,Troisième,Quatrième,%
+ Cinquième,Sixième,Septième,Huitième,Neuvième,Dixième,Onzième,%
+ Douzième,Treizième,Quatorzième,Quinzième,Seizième,%
+ Dix-septième,Dix-huitième,Dix-neuvième,Vingtième}
\StartBabelCommands*{\BabelLanguages}{captions}
\SetString{\refname}{R\'ef\'erences}
\SetString{\abstractname}{R\'esum\'e}
@@ -853,21 +851,25 @@
\SetString{\headtoname}{}
\SetString{\proofname}{D\'emonstration}
\SetString{\glossaryname}{Glossaire}
+ \SetString{\partfirst}{Premi\`ere}
+ \SetString{\partsecond}{Deuxi\`eme}
+ \SetString{\partnameord}{partie}
\SetStringLoop{ordinal#1}{%
- Premi\`ere,Deuxi\`eme,Troisi\`eme,Quatri\`eme,Cinqui\`eme,%
- Sixi\`eme,Septi\`eme,Huiti\`eme,Neuvi\`eme,Dixi\`eme,Onzi\`eme,%
- Douzi\`eme,Treizi\`eme,Quatorzi\`eme,Quinzi\`eme,Seizi\`eme,%
- Dix-septi\`eme,Dix-huiti\`eme,Dix-neuvi\`eme,Vingti\`eme}
+ \frenchpartfirst,\frenchpartsecond,Troisi\`eme,Quatri\`eme,%
+ Cinqui\`eme,Sixi\`eme,Septi\`eme,Huiti\`eme,Neuvi\`eme,Dixi\`eme,%
+ Onzi\`eme,Douzi\`eme,Treizi\`eme,Quatorzi\`eme,Quinzi\`eme,%
+ Seizi\`eme,Dix-septi\`eme,Dix-huiti\`eme,Dix-neuvi\`eme,%
+ Vingti\`eme}
\AfterBabelCommands{%
- \DeclareRobustCommand*{\FB@emptypart}{\def\thepart{}}%
- \DeclareRobustCommand*{\FB@partname}{%
- \ifFBPartNameFull
- \csname ordinal\romannumeral\value{part}\endcsname\space
- partie\FB@emptypart
- \else
- Partie%
- \fi}%
- }
+ \DeclareRobustCommand*{\FB@emptypart}{\def\thepart{}}%
+ \DeclareRobustCommand*{\FB@partname}{%
+ \ifFBPartNameFull
+ \csname ordinal\romannumeral\value{part}\endcsname\space
+ \frenchpartnameord\FB@emptypart
+ \else
+ Partie%
+ \fi}%
+ }
\SetString{\partname}{\FB@partname}
\EndBabelCommands
\AtEndOfPackage{%
@@ -1010,9 +1012,11 @@
BEFORE babel/frenchb; reported}%
\fi
}
-\newcommand*{\frenchbsetup}[1]{%
+\newcommand*{\frenchsetup}[1]{%
\setkeys{FB}{#1}%
}%
+\@onlypreamble\frenchsetup
+\let\frenchbsetup\frenchsetup
\@onlypreamble\frenchbsetup
\newif\ifFBShowOptions \FBShowOptionsfalse
\newif\ifFBStandardLayout \FBStandardLayouttrue
@@ -1092,6 +1096,7 @@
\ifFBGlobalLayoutFrench
\ifx\bbl@main@language\FB@french
\else
+ \FBGlobalLayoutFrenchfalse
\PackageWarning{frenchb.ldf}%
{Option `GlobalLayoutFrench' skipped:\MessageBreak
French is *not* babel's last option.\MessageBreak
@@ -1157,7 +1162,10 @@
\define@key{FB}{OriginalTypewriter}[true]%
{\csname FBOriginalTypewriter#1\endcsname}%
\define@key{FB}{ThinColonSpace}[true]%
- {\csname FBThinColonSpace#1\endcsname}%
+ {\csname FBThinColonSpace#1\endcsname
+ \ifFBThinColonSpace
+ \renewcommand*{\FBcolonspace}{\FBthinspace}%
+ \fi}%
\define@key{FB}{ThinSpaceInFrenchNumbers}[true]%
{\csname FBThinSpaceInFrenchNumbers#1\endcsname}%
\define@key{FB}{FrenchSuperscripts}[true]%
@@ -1187,7 +1195,10 @@
\renewcommand{\FBWarning}[1]{}%
\fi}%
\define@key{FB}{INGuillSpace}[true]%
- {\csname FBINGuillSpace#1\endcsname}%
+ {\csname FBINGuillSpace#1\endcsname
+ \ifFBINGuillSpace
+ \renewcommand*{\FBguillspace}{\space}%
+ \fi}%
\define@key{FB}{InnerGuillSingle}[true]%
{\csname FBInnerGuillSingle#1\endcsname}%
\define@key{FB}{EveryParGuill}[open]%
@@ -1200,8 +1211,8 @@
\let\FBeveryparguill\FBguillopen
\PackageWarning{frenchb.ldf}%
{Wrong value for `EveryParGuill':
- try `open’,\MessageBreak
- `close’ or `none’. Reported}%
+ try `open',\MessageBreak
+ `close' or `none'. Reported}%
\fi
\fi
\fi}%
@@ -1215,8 +1226,8 @@
\else
\let\FBeverylineguill\FBguillnone
\FBWarning{Wrong value for `EveryLineGuill':
- try `open’,\MessageBreak
- `close’ or `none’. Reported}%
+ try `open',\MessageBreak
+ `close' or `none'. Reported}%
\fi
\fi
\fi
@@ -1382,20 +1393,6 @@
\let\rmfamily\rmfamilyFB
\let\sffamily\sffamilyFB
\fi
- \ifFBThinColonSpace
- \ifFB@luatex@punct
- \FBcolonskip=\FBthinskip\relax
- \else
- \renewcommand*{\FBcolonspace}{\FBthinspace}%
- \fi
- \fi
- \ifFBINGuillSpace
- \ifFB@luatex@punct
- \FBguillskip=3.33pt plus 1.665pt minus 1.11pt \relax
- \else
- \renewcommand*{\FBguillspace}{\space}%
- \fi
- \fi
\@ifpackageloaded{numprint}%
{\ifnprt@autolanguage
\providecommand*{\npstylefrench}{}%
@@ -1499,7 +1496,7 @@
og= <left quote character>, fg= <right quote character>%
\MessageBreak
*********************************************%
- \MessageBreak\protect\frenchbsetup{ShowOptions}}
+ \MessageBreak\protect\frenchsetup{ShowOptions}}
\fi
}
\AtBeginDocument{%
@@ -1533,6 +1530,9 @@
\fi
\FBprocess@options
\ifFB@luatex@punct
+ \FBcolonsp=\expandafter{\meaning\FBcolonspace}
+ \FBthinsp= \expandafter{\meaning\FBthinspace}
+ \FBguillsp=\expandafter{\meaning\FBguillspace}
\activate@luatexpunct
\fi
\ifFBunicode
@@ -1685,18 +1685,15 @@
\babel@save\enumerate \babel@save\description
\babel@save\labelitemi \babel@save\labelitemii
\babel@save\labelitemiii \babel@save\labelitemiv
- \fi
- \FB@ufl
-}
-\def\bbl@nonfrenchlistlayout{%
- \ifFBGlobalLayoutFrench
- \update@frenchlists
+ \FB@ufl
\fi
}
\FB@addto{extras}{\bbl@frenchlistlayout}
-\FB@addto{noextras}{\bbl@nonfrenchlistlayout}
\def\bbl@frenchindent{%
- \ifFBGlobalLayoutFrench\else\babel@save\@afterindentfalse\fi
+ \ifFBGlobalLayoutFrench
+ \else
+ \babel@save\@afterindentfalse
+ \fi
\ifFBIndentFirst
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
@@ -1756,7 +1753,7 @@
\def\insertfootnotemarkFB{%
\usebeamercolor[fg]{footnote mark}%
\usebeamerfont*{footnote mark}%
- \@thefnmark\dotFFN\kernFFN}%
+ \llap{\@thefnmark}\dotFFN\kernFFN}%
}{}
\providecommand*{\insertfootnotemarkFB}{%
\parindent=\parindentFFN
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua
index 45b37a71d3d..f8e10ef8ceb 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 [2017/01/30 v3.2g]
+-- File `frenchb.lua’ generated from frenchb.dtx [2017/04/30 v3.3a]
--
-- Copyright © 2014-2017 Daniel Flipo
-- <daniel (dot) flipo (at) free (dot) fr>
@@ -45,20 +45,34 @@ nobreak.penalty = 10000
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
local remove_node = node.remove
-local thin10 = tex.skip['FBthinskip']
-local thinwd = thin10.width/65536/3.33
-local thinst = thin10.stretch/65536/1.665
-local thinsh = thin10.shrink/65536/1.11
-local coln10 = tex.skip['FBcolonskip']
-local colnwd = coln10.width/65536/3.33
-local colnst = coln10.stretch/65536/1.665
-local colnsh = coln10.shrink/65536/1.11
-local guil10 = tex.skip['FBguillskip']
-local guilwd = guil10.width/65536/3.33
-local guilst = guil10.stretch/65536/1.665
-local guilsh = guil10.shrink/65536/1.11
+local function get_glue(toks)
+ local t = nil
+ local f = string.match(toks, "\092hskip%s*([%d%.]*)%s*\092fontdimen")
+ if f == "" then f = 1 end
+ if f then
+ t = {f, 0, 0}
+ f = string.match(toks, "plus%s*([%d%.]*)%s*\092fontdimen")
+ if f == "" then f = 1 end
+ if f then
+ t[2] = f
+ f = string.match(toks, "minus%s*([%d%.]*)%s*\092fontdimen")
+ if f == "" then f = 1 end
+ if f then
+ t[3] = f
+ end
+ end
+ elseif string.match(toks, "\092F?B?thinspace") then
+ t = {0.5, 0, 0}
+ elseif string.match(toks, "\092space") then
+ t = {1, 1, 1}
+ end
+ return t
+end
+local colngl = get_glue(tex.toks['FBcolonsp']) or {1, 1, 1}
+local thingl = get_glue(tex.toks['FBthinsp']) or {.5, 0, 0}
+local guilgl = get_glue(tex.toks['FBguillsp']) or {.8, .3, .8}
local font_table = {}
-local function new_glue_scaled (fid,width,stretch,shrink)
+local function new_glue_scaled (fid,table)
if fid > 0 then
local fp = font_table[fid]
if not fp then
@@ -70,9 +84,9 @@ local function new_glue_scaled (fid,width,stretch,shrink)
end
local gl = new_node(GLUE,0)
if fp then
- gl.width = width * fp.space
- gl.stretch = stretch * fp.space_stretch
- gl.shrink = shrink * fp.space_shrink
+ node.setglue(gl, table[1]*fp.space,
+ table[2]*fp.space_stretch,
+ table[3]*fp.space_shrink)
return gl
else
return nil
@@ -124,9 +138,9 @@ local function french_punctuation (head)
end
local fbglue
if FB_punct_thick[char] then
- fbglue = new_glue_scaled(fid,colnwd,colnst,colnsh)
+ fbglue = new_glue_scaled(fid,colngl)
else
- fbglue = new_glue_scaled(fid,thinwd,thinst,thinsh)
+ fbglue = new_glue_scaled(fid,thingl)
end
if (realglue or auto) and fbglue then
if realglue then
@@ -144,7 +158,7 @@ local function french_punctuation (head)
if is_glue and glue_wd <= 1 then
addgl = false
end
- local fbglue = new_glue_scaled(fid,guilwd,guilst,guilsh)
+ local fbglue = new_glue_scaled(fid,guilgl)
if addgl and fbglue then
if is_glue then
head = remove_node(head,prev,true)
@@ -188,7 +202,7 @@ local function french_punctuation (head)
addgl = false
end
local fid = item.font
- local fbglue = new_glue_scaled(fid,guilwd,guilst,guilsh)
+ local fbglue = new_glue_scaled(fid,guilgl)
if addgl and fbglue then
if is_glue then
head = remove_node(head,next,true)