diff options
Diffstat (limited to 'Master/texmf-dist/tex')
6 files changed, 198 insertions, 179 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/acadian.ldf b/Master/texmf-dist/tex/generic/babel-french/acadian.ldf index b036f98f44f..7ba570647ab 100644 --- a/Master/texmf-dist/tex/generic/babel-french/acadian.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/acadian.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{acadian} - [2020/01/30 v3.5g French support from the babel system] + [2020/04/18 v3.5h French support from the babel system] \PackageInfo{acadian.ldf}% {`acadian' dialect is currently\MessageBreak *absolutely identical* to the\MessageBreak diff --git a/Master/texmf-dist/tex/generic/babel-french/canadien.ldf b/Master/texmf-dist/tex/generic/babel-french/canadien.ldf index 28b084f24c4..0090e7c9c7f 100644 --- a/Master/texmf-dist/tex/generic/babel-french/canadien.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/canadien.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{canadien} - [2020/01/30 v3.5g French support from the babel system] + [2020/04/18 v3.5h French support from the babel system] \PackageWarning{canadien.ldf}% {Option `canadien' for Babel is *deprecated*,\MessageBreak it might be removed sooner or later. Please\MessageBreak diff --git a/Master/texmf-dist/tex/generic/babel-french/francais.ldf b/Master/texmf-dist/tex/generic/babel-french/francais.ldf index 0b2ceb9cfd6..b16b7bda52f 100644 --- a/Master/texmf-dist/tex/generic/babel-french/francais.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/francais.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{francais} - [2020/01/30 v3.5g French support from the babel system] + [2020/04/18 v3.5h French support from the babel system] \PackageWarning{francais.ldf}% {Option `francais' for Babel is *deprecated*,\MessageBreak it might be removed sooner or later. Please\MessageBreak diff --git a/Master/texmf-dist/tex/generic/babel-french/french.ldf b/Master/texmf-dist/tex/generic/babel-french/french.ldf index 7f3e9918a02..f67abcd9097 100644 --- a/Master/texmf-dist/tex/generic/babel-french/french.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/french.ldf @@ -24,10 +24,10 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{french} - [2020/01/30 v3.5g French support from the babel system] + [2020/04/18 v3.5h French support from the babel system] %% %% Babel package for LaTeX version 2e -%% Copyright © 1996-2019 +%% Copyright © 1996-2020 %% by Daniel Flipo <daniel (dot) flipo (at) free (dot) fr> %% \LdfInit\CurrentOption{FBclean@on@exit} @@ -299,9 +299,10 @@ LuaTeX,\\ use \noexpand\NoAutoSpacing *inside a group* instead.}% \else - \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?} is - helpless with LuaTeX,\MessageBreak use \protect\NoAutoSpacing - \space *inside a group* instead;\MessageBreak reported}% + \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?} + is helpless with LuaTeX,\MessageBreak + use \protect\NoAutoSpacing \space *inside a group* + instead;\MessageBreak reported}% \fi}% \def\shorthandon##1{}% } @@ -326,9 +327,9 @@ \fi \ifFB@xetex@punct \ifLaTeXe - \PackageInfo{french.ldf}{No need for active punctuation characters% - \MessageBreak with this version of XeTeX!% - \MessageBreak reported} + \PackageInfo{french.ldf}{No need for active punctuation + characters\MessageBreak with this + version of XeTeX!\MessageBreak reported} \else \fb@info{No need for active punctuation characters\\ with this version of XeTeX!} @@ -358,9 +359,10 @@ XeTeX,\\ use \noexpand\NoAutoSpacing *inside a group* instead.}% \else - \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?} is - helpless with XeTeX,\MessageBreak use \protect\NoAutoSpacing - \space *inside a group* instead;\MessageBreak reported}% + \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?} + is helpless with XeTeX,\MessageBreak + use \protect\NoAutoSpacing\space *inside a group* + instead;\MessageBreak reported}% \fi}% \def\shorthandon##1{}% \XeTeXinterchartokenstate=1 @@ -565,7 +567,8 @@ \def\og{\textquotedblleft} \def\fg{\ifdim\lastskip>\z@\unskip\fi\textquotedblright} \fi -\addto\extrasfrench{\babel@save\og \babel@save\fg \bbl@frenchguillemets} +\addto\extrasfrench{\babel@save\og \babel@save\fg + \bbl@frenchguillemets} \newcommand*{\ogi}{\FB@og} \newcommand*{\fgi}{\FB@fg} \newcommand*{\@ogi}{\ifmmode\hbox{\ogi}\else\ogi\fi} @@ -866,7 +869,7 @@ \addto\noextrasfrench{\std@math@comma} \fi \newcommand*{\nombre}[1]{{#1}\fb@warning{*** \noexpand\nombre - no longer formats numbers\string! ***}} + no longer formats numbers\string! ***}} \ifFB@luatex@punct \activate@luatexpunct \fi @@ -943,8 +946,8 @@ \SetString{\partsecond}{Deuxi\`eme} \SetString{\partnameord}{partie} \SetStringLoop{ordinal#1}{% - \partfirst,\partsecond,Troisi\`eme,Quatri\`eme,% - Cinqui\`eme,Sixi\`eme,Septi\`eme,Huiti\`eme,Neuvi\`eme,Dixi\`eme,% + \partfirst,\partsecond,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} @@ -1560,7 +1563,7 @@ \fi \ifFBShowOptions \GenericWarning{* }{% - ***** List of possible options for babel-french ****\MessageBreak + *** List of possible options for babel-french ***\MessageBreak [Default values between brackets when french is loaded *LAST*]% \MessageBreak ShowOptions [false]\MessageBreak @@ -1693,16 +1696,18 @@ \advance\itemindent by \labelsep \leftmargini\z@ \bbl@for\FB@dp {2, 3, 4, 5, 6}% - {\csname leftmargin\romannumeral\FB@dp\endcsname=\labelindentFB}% + {\csname leftmargin\romannumeral\FB@dp\endcsname = + \labelindentFB}% \else \leftmarginFB=\labelwidthFB \advance\leftmarginFB by \labelsep \bbl@for\FB@dp {1, 2, 3, 4, 5, 6}% - {\csname leftmargin\romannumeral\FB@dp\endcsname=\leftmarginFB}% + {\csname leftmargin\romannumeral\FB@dp\endcsname = + \leftmarginFB}% \advance\leftmargini by \listindentFB \fi - \leftmargin=\csname leftmargin\ifnum\@listdepth=\@ne i\else - ii\fi\endcsname + \leftmargin=\csname leftmargin% + \ifnum\@listdepth=\@ne i\else ii\fi\endcsname } \def\FB@itemizesettings{% \ifFBStandardListSpacing diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf index cd58fc2dfee..1baacedf171 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{frenchb} - [2020/01/30 v3.5g French support from the babel system] + [2020/04/18 v3.5h French support from the babel system] \def\bbl@tempa{frenchb} \ifx\CurrentOption\bbl@tempa \chardef\l@frenchb\l@french diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua index 371399bc9e8..25178e932f8 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua @@ -1,7 +1,7 @@ --[[ File `frenchb.lua’ generated from frenchb.dtx - [2020/01/30 v3.5g French support from the babel system] - Copyright © 2014-2019 Daniel Flipo + [2020/04/18 v3.5h French support from the babel system] + Copyright © 2014-2020 Daniel Flipo <daniel (dot) flipo (at) free (dot) fr> License LPPL: see french.ldf. --]] @@ -42,6 +42,7 @@ local GLYPH = node_id("glyph") local PENALTY = node_id("penalty") local nobreak = new_node(PENALTY) nobreak.penalty = 10000 +local nbspace = new_node(GLYPH) local insert_node_before = node.insert_before local insert_node_after = node.insert_after local remove_node = node.remove @@ -115,176 +116,189 @@ local addGUILspace = luatexbase.attributes['FB@addGUILspace'] local FBucsNBSP = luatexbase.attributes['FB@ucsNBSP'] local FBdialect = luatexbase.attributes['FB@dialect'] local has_attribute = node.has_attribute +-- Main function (to be added to the kerning callback). local function french_punctuation (head) node.kerning(head) for item in node.traverse_id(GLYPH, head) do local lang = item.lang local char = item.char - local fid = item.font - local FRspacing = has_attribute(item, FBspacing) - FRspacing = FRspacing and FRspacing > 0 - local FRucsNBSP = has_attribute(item, FBucsNBSP) - FRucsNBSP = FRucsNBSP and FRucsNBSP > 0 - local FRdialect = has_attribute(item, FBdialect) - FRdialect = FRdialect and FRdialect > 0 - local SIG = has_attribute(item, addGUILspace) - SIG = SIG and SIG >0 - if lang ~= FR_fr and lang ~= FR_ca then - FRspacing = nil - end - local nbspace = new_node("glyph") - if FRspacing and FB_punct_left[char] and fid > 0 then - local prev = item.prev - local prev_id, prev_subtype, prev_char - if prev then - prev_id = prev.id - prev_subtype = prev.subtype - if prev_id == GLYPH then - prev_char = prev.char - end - end - local is_glue = prev_id == GLUE - local glue_wd - if is_glue then - glue_wd = prev.width - end - 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 FB_punct_thick[char] and auto then + if (lang == FR_fr or lang == FR_ca) and + (FB_punct_left[char] or FB_punct_right[char]) then + local fid = item.font + local attr = item.attr + local FRspacing = has_attribute(item, FBspacing) + FRspacing = FRspacing and FRspacing > 0 + local FRucsNBSP = has_attribute(item, FBucsNBSP) + FRucsNBSP = FRucsNBSP and FRucsNBSP > 0 + local FRdialect = has_attribute(item, FBdialect) + FRdialect = FRdialect and FRdialect > 0 + local SIG = has_attribute(item, addGUILspace) + SIG = SIG and SIG >0 + if FRspacing and fid > 0 then + if FB_punct_left[char] then + local prev = item.prev + local prev_id, prev_subtype, prev_char + if prev then + prev_id = prev.id + prev_subtype = prev.subtype + if prev_id == GLYPH then + prev_char = prev.char + end + end + local is_glue = prev_id == GLUE + local glue_wd + if is_glue then + glue_wd = prev.width + end + 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 FB_punct_thick[char] and auto then + local next = item.next + local next_id + if next then + next_id = next.id + end + if next_id and next_id == GLYPH then + auto = false + end + end + if auto then + if (prev_char and FB_punct_null[prev_char]) or + (is_glue and glue_wd <= 1) or + (prev_id == HLIST and prev_subtype == 3) or + (prev_id == TEMP) then + auto = false + end + end + local fbglue + local t + if FB_punct_thick[char] then + if FRdialect then + t = FBsp.colon.gl.ac + nbspace.char = FBsp.colon.ch.ac + else + t = FBsp.colon.gl.fr + nbspace.char = FBsp.colon.ch.fr + end + else + if FRdialect then + t = FBsp.thin.gl.ac + nbspace.char = FBsp.thin.ch.ac + else + t = FBsp.thin.gl.fr + nbspace.char = FBsp.thin.ch.fr + end + end + fbglue = new_glue_scaled(fid, t) + if (realglue or auto) and fbglue then + if realglue then + head = remove_node(head,prev,true) + end + if (FRucsNBSP) then + nbspace.font = fid + nbspace.attr = attr + insert_node_before(head,item,copy_node(nbspace)) + else + nobreak.attr = attr + fbglue.attr = attr + insert_node_before(head,item,copy_node(nobreak)) + insert_node_before(head,item,copy_node(fbglue)) + end + end + elseif SIG then + local addgl = (prev_char and + not FB_guil_null[prev_char]) + or + (not prev_char and + prev_id ~= TEMP and + not (prev_id == HLIST and + prev_subtype == 3) + ) + if is_glue and glue_wd <= 1 then + addgl = false + end + local t = FBsp.guill.gl.fr + nbspace.char = FBsp.guill.ch.fr + if FRdialect then + t = FBsp.guill.gl.ac + nbspace.char = FBsp.guill.ch.ac + end + local fbglue = new_glue_scaled(fid, t) + if addgl and fbglue then + if is_glue then + head = remove_node(head,prev,true) + end + if (FRucsNBSP) then + nbspace.font = fid + nbspace.attr = attr + insert_node_before(head,item,copy_node(nbspace)) + else + nobreak.attr = attr + fbglue.attr = attr + insert_node_before(head,item,copy_node(nobreak)) + insert_node_before(head,item,copy_node(fbglue)) + end + end + end + elseif SIG then local next = item.next - local next_id + local next_id, next_subtype, next_char, nextnext, kern_wd 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 + if next_id == GLYPH then + next_char = nextnext.char + end + end + end + end end - if next_id and next_id == GLYPH then - auto = false - end - end - if auto then - if (prev_char and FB_punct_null[prev_char]) or - (is_glue and glue_wd <= 1) or - (prev_id == HLIST and prev_subtype == 3) or - (prev_id == TEMP) then - auto = false + local is_glue = next_id == GLUE + if is_glue then + glue_wd = next.width end - end - local fbglue - local t - if FB_punct_thick[char] then - if FRdialect then - t = FBsp.colon.gl.ac - nbspace.char = FBsp.colon.ch.ac - else - t = FBsp.colon.gl.fr - nbspace.char = FBsp.colon.ch.fr + local addgl = (next_char and not FB_guil_null[next_char]) + or (next and not next_char) + if is_glue and glue_wd == 0 then + addgl = false end - else + local fid = item.font + local t = FBsp.guill.gl.fr + nbspace.char = FBsp.guill.ch.fr if FRdialect then - t = FBsp.thin.gl.ac - nbspace.char = FBsp.thin.ch.ac - else - t = FBsp.thin.gl.fr - nbspace.char = FBsp.thin.ch.fr - end - end - fbglue = new_glue_scaled(fid, t) - if (realglue or auto) and fbglue then - if realglue then - head = remove_node(head,prev,true) - end - if (FRucsNBSP) then - nbspace.font = fid - insert_node_before(head, item, copy_node(nbspace)) - else - insert_node_before(head, item, copy_node(nobreak)) - insert_node_before(head, item, copy_node(fbglue)) - end - end - elseif SIG then - local addgl = (prev_char and not FB_guil_null[prev_char]) or - (not prev_char and - prev_id ~= TEMP and - not (prev_id == HLIST and prev_subtype == 3) - ) - if is_glue and glue_wd <= 1 then - addgl = false - end - local t = FBsp.guill.gl.fr - nbspace.char = FBsp.guill.ch.fr - if FRdialect then - t = FBsp.guill.gl.ac - nbspace.char = FBsp.guill.ch.ac - end - local fbglue = new_glue_scaled(fid, t) - if addgl and fbglue then - if is_glue then - head = remove_node(head,prev,true) - end - if (FRucsNBSP) then - nbspace.font = fid - insert_node_before(head, item, copy_node(nbspace)) - else - insert_node_before(head, item, copy_node(nobreak)) - insert_node_before(head, item, copy_node(fbglue)) + t = FBsp.guill.gl.ac + nbspace.char = FBsp.guill.ch.ac end - end - end - end - if FRspacing and FB_punct_right[char] - and fid > 0 and SIG then - local next = item.next - local next_id, next_subtype, next_char, nextnext, kern_wd - 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 - if next_id == GLYPH then - next_char = nextnext.char - end + local fbglue = new_glue_scaled(fid, t) + if addgl and fbglue then + if is_glue then + head = remove_node(head,next,true) + end + if (FRucsNBSP) then + nbspace.font = fid + nbspace.attr = attr + insert_node_after(head, item, copy_node(nbspace)) + else + nobreak.attr = attr + fbglue.attr = attr + insert_node_after(head, item, copy_node(fbglue)) + insert_node_after(head, item, copy_node(nobreak)) end end end end - 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 is_glue and glue_wd == 0 then - addgl = false - end - local fid = item.font - local t = FBsp.guill.gl.fr - nbspace.char = FBsp.guill.ch.fr - if FRdialect then - t = FBsp.guill.gl.ac - nbspace.char = FBsp.guill.ch.ac - end - local fbglue = new_glue_scaled(fid, t) - if addgl and fbglue then - if is_glue then - head = remove_node(head,next,true) - end - if (FRucsNBSP) then - nbspace.font = fid - insert_node_after(head, item, copy_node(nbspace)) - else - insert_node_after(head, item, copy_node(fbglue)) - insert_node_after(head, item, copy_node(nobreak)) - end - end end end return head |