From 4b61f97e62ad8f5277d9851da26809e8a080fa74 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 Jan 2017 23:11:54 +0000 Subject: babel-french (15jan17) git-svn-id: svn://tug.org/texlive/trunk@42971 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/generic/babel-french/frenchb.dtx | 55 ++++++++++++---------- 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'Master/texmf-dist/source/generic') diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx index 06768510249..d4c7e7213ed 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{3410} +%\CheckSum{3424} % %\iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -13,14 +13,14 @@ %\ProvidesLanguage{frenchb} %\ProvidesFile{frenchb.dtx} %<*!lua> - [2017/01/10 v3.2e French support from the babel system] + [2017/01/15 v3.2f French support from the babel system] % %<*internal> \iffalse % %<*lua> -- --- File `frenchb.lua' generated from frenchb.dtx [2017/01/10 v3.2e] +-- File `frenchb.lua' generated from frenchb.dtx [2017/01/15 v3.2f] -- -- Copyright © 2014-2017 Daniel Flipo -- @@ -292,6 +292,8 @@ % |$[0,\ 1]$|, |$(x,\ y)$|. |\StandardMathComma| switches % back to the standard behaviour of the comma in French. % +% The \pkg{icomma} package is an alternative workaround. +% % \item A command |\nombre| was provided in 1.x versions to easily % format numbers in slices of three digits separated either % by a comma in English or with a space in French; |\nombre| @@ -2902,8 +2904,12 @@ return french_punctuation % \changes{v3.2e}{2017/01/09}{\cs{DecimalMathComma} didn’t work % with LuaTeX. Fixed now.} % +% \changes{v3.2f}{2017/01/15}{Fixed conflict with the icomma +% package.} +% % Unfortunately, |\newcount| inside |\if| breaks Plain formats. % \begin{macrocode} +\newif\ifFB@icomma \newcount\mc@charclass \newcount\mc@charfam \newcount\mc@charslot @@ -2911,6 +2917,16 @@ return french_punctuation \newcount\dec@mcc \ifFBLuaTeX \mc@charclass=\Umathcharclass`\, + \newcommand*{\dec@math@comma}{% + \mc@charfam=\Umathcharfam`\, + \mc@charslot=\Umathcharslot`\, + \Umathcode`\,= 0 \mc@charfam \mc@charslot + } + \newcommand*{\std@math@comma}{% + \mc@charfam=\Umathcharfam`\, + \mc@charslot=\Umathcharslot`\, + \Umathcode`\,= \mc@charclass \mc@charfam \mc@charslot + } \else \std@mcc=\mathcode`\, \dec@mcc=\std@mcc @@ -2918,34 +2934,25 @@ return french_punctuation \divide\@tempcnta by "1000 \multiply\@tempcnta by "1000 \advance\dec@mcc by -\@tempcnta + \newcommand*{\dec@math@comma}{\mathcode`\,=\dec@mcc} + \newcommand*{\std@math@comma}{\mathcode`\,=\std@mcc} \fi -\newcommand*{\dec@math@comma}{% - \ifFBLuaTeX - \mc@charfam=\Umathcharfam`\, - \mc@charslot=\Umathcharslot`\, - \Umathcode`\,= 0 \mc@charfam \mc@charslot - \else - \mathcode`\,=\dec@mcc - \fi -} -\newcommand*{\std@math@comma}{% - \ifFBLuaTeX - \mc@charfam=\Umathcharfam`\, - \mc@charslot=\Umathcharslot`\, - \Umathcode`\,= \mc@charclass \mc@charfam \mc@charslot - \else - \mathcode`\,=\std@mcc - \fi -} \newcommand*{\DecimalMathComma}{% \iflanguage{french}{\dec@math@comma}{}% - \FB@addto{extras}{\dec@math@comma}% + \ifFB@icomma\else\FB@addto{extras}{\dec@math@comma}\fi } \newcommand*{\StandardMathComma}{% \std@math@comma - \FB@addto{extras}{\std@math@comma}% + \ifFB@icomma\else\FB@addto{extras}{\std@math@comma}\fi } -\FB@addto{noextras}{\std@math@comma} +\ifLaTeXe + \AtBeginDocument{\@ifpackageloaded{icomma}% + {\FB@icommatrue}% + {\FB@addto{noextras}{\std@math@comma}}% + } +\else + \FB@addto{noextras}{\std@math@comma} +\fi % \end{macrocode} % \end{macro} % \end{macro} -- cgit v1.2.3