diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/generic/babel-french/frenchb.dtx | 130 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/babel-french/frenchb.ins | 4 |
2 files changed, 89 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx index 11036d0c9ca..441b411aee2 100644 --- a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx +++ b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx @@ -11,7 +11,7 @@ %<frenchb>\ProvidesLanguage{frenchb} %<lua>--[[ %<lua> File `frenchb.lua’ generated from frenchb.dtx - [2022/11/11 v3.5o French support from the babel system] + [2023/01/02 v3.5p French support from the babel system] %<*internal> \iffalse %</internal> @@ -82,7 +82,7 @@ \let\Module\meta % no math mode (see doc.sty) \renewcommand*\descriptionlabel[1]{% \hspace{\labelsep}\normalfont \fbo{#1}} -\let\up\textsuperscript +\NewCommandCopy{\up}{\textsuperscript} \newcommand*{\FRguillspace}{\penalty 10000 \hskip.8\fontdimen2\font plus.3\fontdimen3\font @@ -318,8 +318,8 @@ % ordinary character \emph{when the current language is French} % (no space added); % as a counterpart, if |\DecimalMathComma| is active, an -% explicit space has to be added in lists and intervals: -% |$[0,\ 1]$|, |$(x,\ y)$|. |\StandardMathComma| switches +% explicit thin space has to be added in lists and intervals: +% |$(x,\,y)$|, |$[0,\,1]$|. |\StandardMathComma| switches % back to the standard behaviour of the comma in French. % % The \pkg{icomma} package is an alternative workaround. @@ -1458,8 +1458,8 @@ \ifFB@luatex@punct \edef\bbl@tempa{\detokenize\expandafter{\languagename}}% \edef\bbl@tempb{\detokenize{french}}% - \ifx\bbl@tempa\bbl@tempb \FB@dialect=0 \relax - \else \FB@dialect=1 \relax + \ifx\bbl@tempa\bbl@tempb \FB@dialect=\z@ + \else \FB@dialect=\@ne \fi % \end{macrocode} % When first entering French, we must set the LuaTeX @@ -1528,8 +1528,8 @@ % any engine (up to version 3.2b, results were engine dependent). % \begin{macrocode} \ifFB@luatex@punct - \newcommand*{\FB@spacing@on}{\FB@spacing=1 \relax} - \newcommand*{\FB@spacing@off}{\FB@spacing=0 \relax} + \newcommand*{\FB@spacing@on}{\FB@spacing=\@ne} + \newcommand*{\FB@spacing@off}{\FB@spacing=\z@} \else \newcommand*{\FB@spacing@on}{\FB@spacingtrue} \newcommand*{\FB@spacing@off}{\FB@spacingfalse} @@ -1602,11 +1602,11 @@ % which parts of the glue table (|.fr| or |.ac|) are taken into % account. % \begin{macrocode} - \newattribute\FB@spacing \FB@spacing=1 \relax - \newattribute\FB@addDPspace \FB@addDPspace=1 \relax - \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax - \newattribute\FB@ucsNBSP \FB@ucsNBSP=0 \relax - \newattribute\FB@dialect \FB@dialect=0 \relax + \newattribute\FB@spacing \FB@spacing=\@ne + \newattribute\FB@addDPspace \FB@addDPspace=\@ne + \newattribute\FB@addGUILspace \FB@addGUILspace=\z@ + \newattribute\FB@ucsNBSP \FB@ucsNBSP=\z@ + \newattribute\FB@dialect \FB@dialect=\z@ \ifLaTeXe \PackageInfo{french.ldf}{No need for active punctuation characters\MessageBreak with this version @@ -2421,7 +2421,7 @@ return french_punctuation % |\NoAutoSpacing|; this flag is also set to false when the current % font is a typewriter font). % \begin{macrocode} - \XeTeXinterchartokenstate=1 + \XeTeXinterchartokenstate=\@ne \XeTeXcharclass `\: = \FB@punctthick \XeTeXinterchartoks \z@ \FB@punctthick = {% \ifFB@spacing\ifhmode\FDP@colonspace\fi\fi}% @@ -2656,11 +2656,11 @@ return french_punctuation % Set the default now for Plain (done later for LaTeX). % \begin{macrocode} \def\autospace@beforeFDP{% - \ifFB@luatex@punct\FB@addDPspace=1 \fi + \ifFB@luatex@punct \FB@addDPspace=\@ne \fi \def\FDP@thinspace{\penalty\@M\FBthinspace}% \def\FDP@colonspace{\penalty\@M\FBcolonspace}} \def\noautospace@beforeFDP{% - \ifFB@luatex@punct\FB@addDPspace=0 \fi + \ifFB@luatex@punct \FB@addDPspace=\z@ \fi \let\FDP@thinspace\@empty \let\FDP@colonspace\@empty} \ifLaTeXe @@ -2838,11 +2838,11 @@ return french_punctuation \newif\ifFBucsNBSP \ifFB@luatex@punct \DeclareRobustCommand*{\@FB@og}{\leavevmode - \bgroup\FB@spacing=0 \guillemotleft\egroup + \bgroup\FB@spacing=\z@ \guillemotleft\egroup \ifFBucsNBSP\FBgspchar\else\FB@guillspace\fi} \DeclareRobustCommand*{\@FB@fg}{\ifdim\lastskip>\z@\unskip\fi \ifFBucsNBSP\FBgspchar\else\FB@guillspace\fi - \bgroup\FB@spacing=0 \guillemotright\egroup} + \bgroup\FB@spacing=\z@ \guillemotright\egroup} \fi % \end{macrocode} % With XeTeX, |\ifFB@spacing| is set to |false| locally for the @@ -3046,17 +3046,20 @@ return french_punctuation % \changes{v3.5e}{2019/03/23}{reset \cs{FB@addGUILspace} attribute % inside \cs{localleftbox} (LuaTeX).} % +% \changes{v3.5p}{2022/12/04}{\cs{FBeveryline@quote}: no need for +% a penalty inside a \cs{localleftbox}.} +% % \begin{macrocode} \ifx\FBeverylineguill\FBguillopen - \def\FBeveryline@quote{\FB@addGUILspace=0 \guillemotleft - \FB@guillspace}% + \def\FBeveryline@quote{\FB@addGUILspace=\z@ + \guillemotleft\FBguillspace}% \localleftbox{\FBeveryline@quote}% \let\FBeverypar@quote\relax \@ogi #1\ifFBcloseguill\@fgi\fi \else \ifx\FBeverylineguill\FBguillclose - \def\FBeveryline@quote{\FB@addGUILspace=0 \guillemotright - \FB@guillspace}% + \def\FBeveryline@quote{\FB@addGUILspace=\z@ + \guillemotright\FBguillspace}% \localleftbox{\FBeveryline@quote}% \let\FBeverypar@quote\relax \@ogi #1\ifFBcloseguill\@fgi\fi @@ -3585,6 +3588,10 @@ return french_punctuation % \changes{v3.5f}{2019/09/07}{Fixed bug with the acadian language. % Warning added if used with the icomma package.} % +% \changes{v3.5p}{2023/01/02}{\cs{DecimalMathComma} can again be +% used in the preamble for a global action. It now works as +% expected inside a group.} +% % Unfortunately, |\newcount| inside |\if| breaks Plain formats. % \begin{macrocode} \newif\ifFB@icomma @@ -3615,19 +3622,30 @@ return french_punctuation \newcommand*{\dec@math@comma}{\mathcode`\,=\dec@mcc} \newcommand*{\std@math@comma}{\mathcode`\,=\std@mcc} \fi +\let\dec@m@c\relax % \end{macrocode} -% |\DecimalMathComma| operates in French or Acadian independently. +% If |\DecimalMathComma| is issued in the document body +% (when the current language is French or Acadian) its effect will +% survive to a language switch, unless issued inside a group +% (see |\dec@m@c|’s expansion). +% The \pkg{icomma} inhibits |\DecimalMathComma|. % \begin{macrocode} +\newif\if@FBpreamble \ifLaTeXe \@FBpreambletrue \fi +\newif\if@preamble@DecimalMathComma \newcommand*{\DecimalMathComma}{% - \ifFB@icomma - \PackageWarning{french.ldf}{% - icomma package loaded, \protect\DecimalMathComma\MessageBreak - does nothing. Reported}% + \if@FBpreamble \@preamble@DecimalMathCommatrue \else - \ifFBfrench - \dec@math@comma - \expandafter\addto\csname extras\languagename\endcsname - {\dec@math@comma}% + \ifFB@icomma + \PackageWarning{french.ldf}{% + icomma package loaded, \protect\DecimalMathComma\MessageBreak + does nothing. Reported}% + \else + \ifFBfrench + \dec@math@comma + \let\dec@m@c\dec@math@comma + \expandafter\addto\csname extras\languagename\endcsname + {\dec@m@c}% + \fi \fi \fi } @@ -3637,19 +3655,45 @@ return french_punctuation icomma package loaded, \protect\StandardMathComma\MessageBreak does nothing. Reported}% \else - \std@math@comma - \expandafter\addto\csname extras\languagename\endcsname - {\std@math@comma}% + \ifFBfrench + \std@math@comma + \let\dec@m@c\relax + \fi \fi } +% \end{macrocode} +% Ii issued in the preamble, |\DecimalMathComma| works globally on +% all parts of the document that are typeset in a French dialect. +% Can be canceled anytime by |\StandardMathComma|. +% \begin{macrocode} \ifLaTeXe - \AtBeginDocument{\@ifpackageloaded{icomma}% - {\FB@icommatrue}% - {\addto\noextrasfrench{\std@math@comma}% - \ifdefined\noextrasacadian - \addto\noextrasacadian{\std@math@comma}% - \fi - }% + \AtBeginDocument{% + \@FBpreamblefalse + \@ifpackageloaded{icomma}% + {\FB@icommatrue + \if@preamble@DecimalMathComma + \PackageWarning{french.ldf}{% + icomma package loaded, \protect\DecimalMathComma% + \MessageBreak does nothing. Reported}% + \fi + }% + {\if@preamble@DecimalMathComma + \ifFB@mainlanguage@FR \dec@math@comma \fi + \let\dec@m@c\dec@math@comma + \addto\extrasfrench{\dec@m@c}% + \ifdefined\extrasacadian + \addto\extrasacadian{\dec@m@c}% + \fi + \fi +% \end{macrocode} +% The comma is reset to type |\mathpunct| when leaving French +% dialects (only if the icomma package is not loaded). +% \begin{macrocode} + \addto\noextrasfrench{\std@math@comma}% + \ifdefined\noextrasacadian + \addto\noextrasacadian{\std@math@comma}% + \fi + }% } \else \addto\noextrasfrench{\std@math@comma} @@ -4673,7 +4717,7 @@ return french_punctuation \define@key{FB}{UnicodeNoBreakSpaces}[true]% {\ifFB@luatex@punct \csname FBucsNBSP#1\endcsname - \ifFBucsNBSP \FB@ucsNBSP=1 \fi + \ifFBucsNBSP \FB@ucsNBSP=\@ne \fi \else \FBWarning{Option `UnicodeNoBreakSpaces' skipped:% \MessageBreak this option is for @@ -5510,7 +5554,7 @@ return french_punctuation \itemindent=\descindentFB \else \itemindent=-\leftmargin - \ifnum\@listdepth=1 + \ifnum\@listdepth=\@ne \ifdim\descindentFB=\z@ \ifdim\listindentFB>\z@ \leftmargini=\listindentFB diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.ins b/Master/texmf-dist/source/generic/babel-french/frenchb.ins index 10f64910faf..0f973a54dfd 100644 --- a/Master/texmf-dist/source/generic/babel-french/frenchb.ins +++ b/Master/texmf-dist/source/generic/babel-french/frenchb.ins @@ -2,7 +2,7 @@ %% This file will generate fast loadable files and documentation driver %% files from the doc files in this package when run through LuaTeX. %% -%% Copyright 2001-2022 Daniel Flipo. All rights reserved. +%% Copyright 2001-2023 Daniel Flipo. All rights reserved. %% %% This is a generated file part of the the babel-french bundle %% to be used with the Babel system. @@ -14,7 +14,7 @@ %% %% --------------- start of docstrip commands ------------------ %% -\def\filedate{2022/04/18} +\def\filedate{2023/01/02} \def\batchfile{frenchb.ins} \input docstrip.tex |