From 371ddd4c16bf1b16d9bd81caf9525e53128d3087 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 4 Feb 2018 21:38:49 +0000 Subject: babel-french (4feb18) git-svn-id: svn://tug.org/texlive/trunk@46543 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/generic/babel-french/frenchb.dtx | 76 ++++++++++++---------- 1 file changed, 42 insertions(+), 34 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx index ee9b8d9d19d..2bf0b16bd0d 100644 --- a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx +++ b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx @@ -1,4 +1,4 @@ -%\CheckSum{3593} +%\CheckSum{3597} % %\iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -13,7 +13,7 @@ %\ProvidesLanguage{frenchb} %--[[ % File `frenchb.lua’ generated from frenchb.dtx - [2018/01/30 v3.4a French support from the babel system] + [2018/02/04 v3.4b French support from the babel system] %<*internal> \iffalse % @@ -699,6 +699,8 @@ % spacing before high punctuation and inside quotes independently for % \Lopt{french} and \Lopt{acadian}, see p.~\pageref{FBsetspaces}. % +% Version 3.4 requires eTeX and LuaTeX 1.0.4 or newer. +% % \subsubsection*{What’s new in version 3.3?} % % In version~3.3d the automatic insertion of non-breaking spaces @@ -811,7 +813,7 @@ % TL2013 and up): active characters are no longer used in French % for `high punctuation’% % \footnote{The current \frenchb{} version requires LuaTeX -% v.~0.95 as included in TL2016, see above.}. +% v.~1.0.4 as included in TL2017, see above.}. % Functionalities and user interface are unchanged. % % Many thanks to Paul Isambert who provided the basis for the @@ -1117,22 +1119,22 @@ % \end{macro} % % \begin{macro}{\ifFB@luatex@punct} -% With LuaTeX, starting with version 0.95, callbacks are used to +% With LuaTeX, starting with version 1.0.4, callbacks are used to % get rid of active punctuation. With previous versions, `high % punctuation’ characters remain active (see below). % \begin{macrocode} \newif\ifFB@luatex@punct \ifFBLuaTeX - \ifnum\luatexversion<95 + \ifnum\luatexversion<100 \ifx\PackageWarning\@undefined - \fb@warning{Please upgrade LuaTeX to version 0.95 or above!\\% + \fb@warning{Please upgrade LuaTeX to version 1.0.4 or above!\\% babel-french will make high punctuation characters (;:!?)\\% - active with LuaTeX < 0.95.}% + active with LuaTeX < 1.0.4.}% \else \PackageWarning{french.ldf}{Please upgrade LuaTeX - to version 0.95 or above!\MessageBreak + to version 1.0.4 or above!\MessageBreak babel-french will make high punctuation characters% - \MessageBreak (;:!?) active with LuaTeX < 0.95;% + \MessageBreak (;:!?) active with LuaTeX < 1.0.4;% \MessageBreak reported}% \fi \else @@ -1306,9 +1308,9 @@ % language, |\extrasfrench| has been executed before! % \begin{macrocode} \ifdefined\FB@once\else - \set@glue@table{FBcolonspace}{colon}% - \set@glue@table{FBthinspace}{thin}% - \set@glue@table{FBguillspace}{guill}% + \set@glue@table{colon}% + \set@glue@table{thin}% + \set@glue@table{guill}% \def\FB@once{}% \fi \fi @@ -1387,7 +1389,7 @@ % through callbacks with LuaTeX engines.} % % The following part holds specific code for punctuation with modern -% LuaTeX engines, i.e. version 0.95 (included in TL2016) or newer. +% LuaTeX engines, i.e. version 1.0.4 (included in TL2017) or newer. % % \changes{v3.0b}{2014/02/13}{Require luatexbase with LaTeXe in case % fontspec has not been loaded before babel.} @@ -1471,35 +1473,39 @@ % The matching space characters for option \fbo{UnicodeNoBreakSpaces} % are set as word space, thin space or null space according to the % \textit{width} parameter. +% +% \changes{v3.4a}{2018/01/30}{Lua function token.get\_meaning requires +% LuaTeX 1.0.} +% % \begin{macrocode} - \newcommand*{\set@glue@table}[2]{% + \newcommand*{\set@glue@table}[1]{% \directlua { - local s = token.get_meaning("#1") + local s = token.get_meaning("FB#1space") local t = FBget_glue(s) if t then - FBsp.#2.gl.fr = t - if not FBsp.#2.gl.ac[1] then - FBsp.#2.gl.ac = t + FBsp.#1.gl.fr = t + if not FBsp.#1.gl.ac[1] then + FBsp.#1.gl.ac = t end - if FBsp.#2.gl.fr[1] > 0.6 then - FBsp.#2.ch.fr = 0xA0 - elseif FBsp.#2.gl.fr[1] > 0.2 then - FBsp.#2.ch.fr = 0x202F + if FBsp.#1.gl.fr[1] > 0.6 then + FBsp.#1.ch.fr = 0xA0 + elseif FBsp.#1.gl.fr[1] > 0.2 then + FBsp.#1.ch.fr = 0x202F else - FBsp.#2.ch.fr = 0x200B + FBsp.#1.ch.fr = 0x200B end - if not FBsp.#2.ch.ac then - FBsp.#2.ch.ac = FBsp.#2.ch.fr + if not FBsp.#1.ch.ac then + FBsp.#1.ch.ac = FBsp.#1.ch.fr end else texio.write_nl('term and log', '') texio.write_nl('term and log', - '*** french.ldf warning: Unexpected syntax in FB#2space,') + '*** french.ldf warning: Unexpected syntax in FB#1space,') texio.write_nl('term and log', '*** french.ldf warning: LuaTeX table FBsp unchanged.') texio.write_nl('term and log', '*** french.ldf warning: Consider using FBsetspaces to ') - texio.write('term and log', 'customise FB#2space.') + texio.write('term and log', 'customise FB#1space.') texio.write_nl('term and log', '') end }% @@ -2854,10 +2860,10 @@ return french_punctuation % \begin{macro}{\frenchdate} % \begin{macro}{\datefrench} % The following code creates a macro |\datefrench| which in turn -% defines commands |\frenchdate| and |\frenchtoday| to produce French -% dates (|\today| is defined as |\frenchtoday| in French). -% The corresponding commands for the French dialect, |\dateacadian|, -% |\acadiandate| and |\acadiantoday| are also created btw. +% defines command |\frenchtoday| (|\today| is defined as +% |\frenchtoday| in French). +% The corresponding commands for the French dialect, |\dateacadian| +% and |\acadiantoday| are also created btw. % This new implementation relies on commands |\SetString| and % |\SetStringLoop|, therefore requires \babel~3.10 or newer. % @@ -2870,11 +2876,12 @@ return french_punctuation % \changes{v3.0a}{2014/02/18}{Take advantage of babel’s \cs{SetString} % commands for \cs{datefrench}. Doesn’t work with Plain (yet?).} % -% \changes{v3.4a}{2017/12/14}{Creates new command \cs{frenchdate}.} -% % \changes{v3.4a}{2018/01/04}{Specific code for Plain finally removed % (babel bug reported).} % +% \changes{v3.4b}{2018/02/44}{Do not redefine \cs{date} as +% \cs{frenchdate} in French.} +% % Explicitly defining |\BabelLanguages| as the list of all French % dialects defines \emph{both} |\datefrench| and |\dateacadian|; % this is required as \file{french.ldf} is read only once even if @@ -2893,7 +2900,6 @@ return french_punctuation \SetStringLoop{month#1name}{% janvier,f\'evrier,mars,avril,mai,juin,juillet,% ao\^ut,septembre,octobre,novembre,d\'ecembre} - \SetString\date{\FBdatebox\FB@date} \SetString\today{\FB@date{\year}{\month}{\day}} \EndBabelCommands % \end{macrocode} @@ -2907,6 +2913,8 @@ return french_punctuation \ifx#1\@empty\else\FBdatespace\number#1\fi}} \newcommand*{\FBdatebox}{\hbox} \newcommand*{\FBdatespace}{\space} +\newcommand*{\frenchdate}{\FBdatebox\FB@date} +\newcommand*{\acadiandate}{\FBdatebox\FB@date} % \end{macrocode} % \end{macro} % \end{macro} -- cgit v1.2.3