diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-french/french.ldf')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/french.ldf | 299 |
1 files changed, 159 insertions, 140 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/french.ldf b/Master/texmf-dist/tex/generic/babel-french/french.ldf index dd45998b7e2..7ecb9bda3f4 100644 --- a/Master/texmf-dist/tex/generic/babel-french/french.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/french.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{french} - [2017/07/08 v3.3b French support from the babel system] + [2017/09/07 v3.3c French support from the babel system] %% %% Babel package for LaTeX version 2e %% Copyright © 1996 - 2017 @@ -182,6 +182,7 @@ \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 \ifLaTeXe \PackageInfo{french.ldf}{No need for active punctuation characters\MessageBreak with this version @@ -381,23 +382,23 @@ \fi \newif\ifFBAutoSpacePunctuation \FBAutoSpacePunctuationtrue \def\autospace@beforeFDP{% - \ifFB@luatex@punct\FB@addDPspace=1 \fi - \def\FDP@thinspace{\penalty\@M\FBthinspace}% - \def\FDP@colonspace{\penalty\@M\FBcolonspace}} + \ifFB@luatex@punct\FB@addDPspace=1 \fi + \def\FDP@thinspace{\penalty\@M\FBthinspace}% + \def\FDP@colonspace{\penalty\@M\FBcolonspace}} \def\noautospace@beforeFDP{% - \ifFB@luatex@punct\FB@addDPspace=0 \fi - \let\FDP@thinspace\@empty - \let\FDP@colonspace\@empty} + \ifFB@luatex@punct\FB@addDPspace=0 \fi + \let\FDP@thinspace\@empty + \let\FDP@colonspace\@empty} \ifLaTeXe - \def\AutoSpaceBeforeFDP{\autospace@beforeFDP - \FBAutoSpacePunctuationtrue} - \def\NoAutoSpaceBeforeFDP{\noautospace@beforeFDP - \FBAutoSpacePunctuationfalse} - \AtEndOfPackage{\AutoSpaceBeforeFDP} + \def\AutoSpaceBeforeFDP{\autospace@beforeFDP + \FBAutoSpacePunctuationtrue} + \def\NoAutoSpaceBeforeFDP{\noautospace@beforeFDP + \FBAutoSpacePunctuationfalse} + \AtEndOfPackage{\AutoSpaceBeforeFDP} \else - \let\AutoSpaceBeforeFDP\autospace@beforeFDP - \let\NoAutoSpaceBeforeFDP\noautospace@beforeFDP - \AutoSpaceBeforeFDP + \let\AutoSpaceBeforeFDP\autospace@beforeFDP + \let\NoAutoSpaceBeforeFDP\noautospace@beforeFDP + \AutoSpaceBeforeFDP \fi \ifLaTeXe \DeclareRobustCommand\ttfamilyFB{\FB@spacing@off \ttfamilyORI} @@ -626,10 +627,10 @@ \def\iers{\up{ers}\xspace} \def\iere{\up{re}\xspace} \def\ieres{\up{res}\xspace} -\newcommand*{\FrenchEnumerate}[1]{% - #1\up{o}\kern+.3em} -\newcommand*{\FrenchPopularEnumerate}[1]{% - #1\up{o})\kern+.3em} +\newcommand*{\FBmedkern}{\kern+.2em} +\newcommand*{\FBthickkern}{\kern+.3em} +\newcommand*{\FrenchEnumerate}[1]{#1\up{o}\FBthickkern} +\newcommand*{\FrenchPopularEnumerate}[1]{#1\up{o})\FBthickkern} \def\primo{\FrenchEnumerate1} \def\secundo{\FrenchEnumerate2} \def\tertio{\FrenchEnumerate3} @@ -638,10 +639,10 @@ \def\fsecundo){\FrenchPopularEnumerate2} \def\ftertio){\FrenchPopularEnumerate3} \def\fquarto){\FrenchPopularEnumerate4} -\DeclareRobustCommand*{\No}{N\up{o}\kern+.2em} -\DeclareRobustCommand*{\no}{n\up{o}\kern+.2em} -\DeclareRobustCommand*{\Nos}{N\up{os}\kern+.2em} -\DeclareRobustCommand*{\nos}{n\up{os}\kern+.2em} +\DeclareRobustCommand*{\No}{N\up{o}\FBmedkern} +\DeclareRobustCommand*{\no}{n\up{o}\FBmedkern} +\DeclareRobustCommand*{\Nos}{N\up{os}\FBmedkern} +\DeclareRobustCommand*{\nos}{n\up{os}\FBmedkern} \DeclareRobustCommand*{\bsc}[1]{\leavevmode\begingroup\kern0pt \scshape #1\endgroup} \ifLaTeXe\else\let\scshape\relax\fi @@ -773,6 +774,7 @@ {#1}% \fi } +\newcommand*{\FBthousandsep}{~} \ifx\FBfigtabshape\@undefined \let\FBfigtabshape\scshape \fi \StartBabelCommands*{\BabelLanguages}{captions} [unicode, fontenc=EU1 EU2 TU, charset=utf8] @@ -842,6 +844,7 @@ \fi \fi } +\newcommand{\FBWarning}[1]{\PackageWarning{french.ldf}{#1}} \bgroup \catcode`:=12 \catcode`>=12 \relax \long\gdef\STD@makecaption#1#2{% @@ -856,8 +859,7 @@ \vskip\belowcaptionskip} \egroup \newif\if@FBwarning@capsep -\@FBwarning@capseptrue -\newcommand{\FBWarning}[1]{\PackageWarning{french.ldf}{#1}} +\ifFB@active@punct\@FBwarning@capseptrue\fi \newcommand*{\CaptionSeparator}{\space\textendash\space} \def\FBCaption@Separator{: } \long\def\FB@makecaption#1#2{% @@ -870,6 +872,7 @@ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} +\@ifclassloaded{acmart}{\@FBwarning@capsepfalse}{} \@ifclassloaded{amsart}{\@FBwarning@capsepfalse}{} \@ifclassloaded{amsbook}{\@FBwarning@capsepfalse}{} \@ifclassloaded{amsdtx}{\@FBwarning@capsepfalse}{} @@ -877,7 +880,6 @@ \@ifclassloaded{amproc}{\@FBwarning@capsepfalse}{} \@ifclassloaded{smfart}{\@FBwarning@capsepfalse}{} \@ifclassloaded{smfbook}{\@FBwarning@capsepfalse}{} -\ifFB@active@punct\else\@FBwarning@capsepfalse\fi \newif\ifFB@koma \@ifclassloaded{memoir}{\@FBwarning@capsepfalse}{} \@ifclassloaded{scrartcl}{\@FBwarning@capsepfalse\FB@komatrue}{} @@ -885,27 +887,16 @@ \@ifclassloaded{scrreprt}{\@FBwarning@capsepfalse\FB@komatrue}{} \@ifclassloaded{beamer}{\@FBwarning@capsepfalse}{} \ifdefined\@makecaption\else\@FBwarning@capsepfalse\fi -\@ifpackageloaded{caption} - {\FBWarning{Please load the "caption" package\MessageBreak - AFTER babel/frenchb; reported}% - \@FBwarning@capsepfalse}% - {} -\@ifpackageloaded{subcaption} - {\FBWarning{Please load the "subcaption" package\MessageBreak - AFTER babel/frenchb; reported}% - \@FBwarning@capsepfalse}% - {} -\@ifpackageloaded{floatrow} - {\FBWarning{Please load the "floatrow" package\MessageBreak - AFTER babel/frenchb; reported}% - \@FBwarning@capsepfalse}% - {} +\newcounter{FBcaption@count} +\@ifpackageloaded{caption3}{\addtocounter{FBcaption@count}{4}}{} +\@ifpackageloaded{subcaption}{\addtocounter{FBcaption@count}{2}}{} +\@ifpackageloaded{floatrow}{\stepcounter{FBcaption@count}}{} \AtBeginDocument{% \ifx\@makecaption\STD@makecaption \global\let\@makecaption\FB@makecaption \ifFBOldFigTabCaptions \else - \def\FBCaption@Separator{{\autospace@beforeFDP : }}% + \def\FBCaption@Separator{\ifFBfrench\space\fi : }% \fi \ifFBCustomiseFigTabCaptions \ifx\bbl@main@language\FB@french @@ -914,12 +905,32 @@ \fi \@FBwarning@capsepfalse \fi + \@ifpackageloaded{caption3}{% + \ifnum\value{FBcaption@count}=0 \@FBwarning@capsepfalse\fi + }{}% \if@FBwarning@capsep - \FBWarning + \ifnum\value{FBcaption@count}>0 + \FBWarning {Figures' and tables' captions might look like\MessageBreak - `Figure 1:' which is wrong in French.\MessageBreak - Check your class or packages to change this;\MessageBreak - reported}% + `Figure 1:' in French instead of `Figure 1 :'.\MessageBreak + If you have loaded any of the packages caption,\MessageBreak + subcaption or floatrow BEFORE babel/french,\MessageBreak + please move them AFTER babel/french.\MessageBreak + If one of them is loaded by your class,\MessageBreak + you can still add AFTER babel/french\MessageBreak + \protect\usepackage[labelsep=period]{caption} or\MessageBreak + \protect\usepackage[labelsep=endash]{caption} or\MessageBreak + ... live with it; reported}% + \else + \FBWarning + {Figures' and tables' captions might look like\MessageBreak + `Figure 1:' in French instead of `Figure 1 :'.\MessageBreak + If it happens, see your class documentation to\MessageBreak + fix this issue or add AFTER babel/french\MessageBreak + \protect\usepackage[labelsep=period]{caption} or\MessageBreak + \protect\usepackage[labelsep=endash]{caption} or\MessageBreak + or ... live with it; reported}% + \fi \fi \let\FB@makecaption\relax \let\STD@makecaption\relax @@ -942,8 +953,9 @@ \FB@addto{extras}{\bbl@frenchdots} \ifFB@active@punct \@ifpackageloaded{listings} - {\FBWarning{Please load the "listings" package\MessageBreak - AFTER babel/frenchb; reported}% + {\AtBeginDocument{% + \FBWarning{Please load the "listings" package\MessageBreak + AFTER babel/french; reported}}% }{} \fi \newif\if@FBwarning@natbib @@ -956,7 +968,7 @@ \fi \if@FBwarning@natbib \FBWarning{Please load the "natbib" package\MessageBreak - BEFORE babel/frenchb; reported}% + BEFORE babel/french; reported}% \fi } \newif\if@FBwarning@beamerarticle @@ -968,7 +980,7 @@ \fi \if@FBwarning@beamerarticle \FBWarning{Please load the "beamerarticle" package\MessageBreak - BEFORE babel/frenchb; reported}% + BEFORE babel/french; reported}% \fi } \newcommand*{\frenchsetup}[1]{% @@ -977,30 +989,32 @@ \@onlypreamble\frenchsetup \let\frenchbsetup\frenchsetup \@onlypreamble\frenchbsetup -\newif\ifFBShowOptions \FBShowOptionsfalse +\newif\ifFBShowOptions \newif\ifFBStandardLayout \FBStandardLayouttrue \newif\ifFBGlobalLayoutFrench \FBGlobalLayoutFrenchtrue -\newif\ifFBReduceListSpacing \FBReduceListSpacingfalse -\newif\ifFBListOldLayout \FBListOldLayoutfalse -\newif\ifFBCompactItemize \FBCompactItemizefalse +\newif\ifFBReduceListSpacing +\newif\ifFBListOldLayout +\newif\ifFBCompactItemize \newif\ifFBStandardItemizeEnv \FBStandardItemizeEnvtrue \newif\ifFBStandardEnumerateEnv \FBStandardEnumerateEnvtrue \newif\ifFBStandardItemLabels \FBStandardItemLabelstrue \newif\ifFBStandardLists \FBStandardListstrue -\newif\ifFBIndentFirst \FBIndentFirstfalse -\newif\ifFBFrenchFootnotes \FBFrenchFootnotesfalse -\newif\ifFBAutoSpaceFootnotes \FBAutoSpaceFootnotesfalse -\newif\ifFBOriginalTypewriter \FBOriginalTypewriterfalse -\newif\ifFBThinColonSpace \FBThinColonSpacefalse -\newif\ifFBThinSpaceInFrenchNumbers \FBThinSpaceInFrenchNumbersfalse +\newif\ifFBIndentFirst +\newif\ifFBFrenchFootnotes +\newif\ifFBAutoSpaceFootnotes +\newif\ifFBOriginalTypewriter +\newif\ifFBThinColonSpace +\newif\ifFBThinSpaceInFrenchNumbers \newif\ifFBFrenchSuperscripts \FBFrenchSuperscriptstrue \newif\ifFBLowercaseSuperscripts \FBLowercaseSuperscriptstrue \newif\ifFBPartNameFull \FBPartNameFulltrue -\newif\ifFBCustomiseFigTabCaptions \FBCustomiseFigTabCaptionsfalse -\newif\ifFBOldFigTabCaptions \FBOldFigTabCaptionsfalse +\newif\ifFBCustomiseFigTabCaptions +\newif\ifFBOldFigTabCaptions \newif\ifFBSmallCapsFigTabCaptions \FBSmallCapsFigTabCaptionstrue -\newif\ifFBSuppressWarning \FBSuppressWarningfalse -\newif\ifFBINGuillSpace \FBINGuillSpacefalse +\newif\ifFBSuppressWarning +\newif\ifFBINGuillSpace +\newif\ifFBucsNBSP + \edef\FB@french{\CurrentOption} \AtEndOfPackage{% \ifx\bbl@main@language\FB@french @@ -1168,10 +1182,9 @@ \else\ifx\FBeveryparguill\FBguillnone \else \let\FBeveryparguill\FBguillopen - \PackageWarning{french.ldf}% - {Wrong value for `EveryParGuill': - try `open',\MessageBreak - `close' or `none'. Reported}% + \FBWarning{Wrong value for `EveryParGuill': + try `open',\MessageBreak + `close' or `none'. Reported}% \fi \fi \fi}% @@ -1195,6 +1208,16 @@ \MessageBreak this option is for LuaTeX *only*.\MessageBreak Reported}% \fi}% + \define@key{FB}{UnicodeNoBreakSpaces}[true]% + {\ifFB@luatex@punct + \csname FBucsNBSP#1\endcsname + \ifFBucsNBSP \FB@ucsNBSP=1 \fi + \else + \FBWarning{Option `UnicodeNoBreakSpaces' skipped:% + \MessageBreak this option is for + LuaTeX *only*.\MessageBreak Reported}% + \fi + }% \define@key{FB}{og}% {\ifFBunicode \ifFB@luatex@punct @@ -1207,9 +1230,8 @@ \XeTeXcharclass"202F = \FB@guilnul \fi \ifFB@active@punct - \PackageWarning{french.ldf}% - {Option og=« not supported with this version - of\MessageBreak LuaTeX/XeTeX; reported}% + \FBWarning{Option og=« not supported with this version + of\MessageBreak LuaTeX/XeTeX; reported}% \fi \else \newcommand*{\FB@@og}{% @@ -1235,9 +1257,8 @@ \fi \fi \else - \PackageWarning{french.ldf}% - {Option `og' requires package inputenc;% - \MessageBreak reported}% + \FBWarning{Option `og' requires package inputenc;% + \MessageBreak reported}% \fi }% \fi @@ -1254,9 +1275,8 @@ \XeTeXcharclass"202F = \FB@guilnul \fi \ifFB@active@punct - \PackageWarning{french.ldf}% - {Option fg=» not supported with this version - of\MessageBreak LuaTeX/XeTeX; reported}% + \FBWarning{Option fg=» not supported with this version + of\MessageBreak LuaTeX/XeTeX; reported}% \fi \else \newcommand*{\FB@@fg}{% @@ -1282,9 +1302,8 @@ \fi \fi \else - \PackageWarning{french.ldf}% - {Option `fg' requires package inputenc;% - \MessageBreak reported}% + \FBWarning{Option `fg' requires package inputenc;% + \MessageBreak reported}% \fi }% \fi @@ -1353,29 +1372,14 @@ \let\sffamily\sffamilyFB \fi \@ifpackageloaded{numprint}% - {\ifnprt@autolanguage - \providecommand*{\npstylefrench}{}% - \ifFBThinSpaceInFrenchNumbers - \renewcommand*\npstylefrench{% - \npthousandsep{\,}% - \npdecimalsign{,}% - \npproductsign{\cdot}% - \npunitseparator{\,}% - \npdegreeseparator{}% - \nppercentseparator{\nprt@unitsep}% - }% - \else - \renewcommand*\npstylefrench{% - \npthousandsep{~}% - \npdecimalsign{,}% - \npproductsign{\cdot}% - \npunitseparator{\,}% - \npdegreeseparator{}% - \nppercentseparator{\nprt@unitsep}% - }% + {\ifnprt@autolanguage + \providecommand*{\npstylefrench}{}% + \ifFBThinSpaceInFrenchNumbers + \renewcommand*{\FBthousandsep}{\,}% + \fi + \g@addto@macro\npstylefrench{\npthousandsep{\FBthousandsep}}% \fi - \npaddtolanguage{french}{french}% - \fi}{}% + }{}% \ifFBFrenchSuperscripts \DeclareRobustCommand*{\up}{\@ifstar{\FB@up@fake}{\fup}}% \else @@ -1452,6 +1456,7 @@ EveryParGuill=open, close, none [open]\MessageBreak EveryLineGuill=open, close, none [open in LuaTeX, none otherwise]\MessageBreak + UnicodeNoBreakSpaces=true [false]\MessageBreak og= <left quote character>, fg= <right quote character>% \MessageBreak *********************************************% @@ -1489,30 +1494,43 @@ \fi \FBprocess@options \ifFB@luatex@punct - \FBcolonsp=\expandafter{\meaning\FBcolonspace} - \FBthinsp= \expandafter{\meaning\FBthinspace} - \FBguillsp=\expandafter{\meaning\FBguillspace} + \FBcolonsp=\expandafter{\meaning\FBcolonspace}% + \FBthinsp= \expandafter{\meaning\FBthinspace}% + \FBguillsp=\expandafter{\meaning\FBguillspace}% \activate@luatexpunct \fi - \ifFBunicode - \@ifpackageloaded{fontspec}{}% - {\@ifpackageloaded{luainputenc}{}% - {\PackageWarning{french.ldf}% - {Add \protect\usepackage{fontspec} to the\MessageBreak - preamble of your document, reported}% - }% - } - \else - \begingroup \newcommand{\FBOTone}{OT1}% - \ifx\encodingdefault\FBOTone - \PackageWarning{french.ldf}% - {OT1 encoding should not be used for French.% - \MessageBreak - Add \protect\usepackage[T1]{fontenc} to the - preamble\MessageBreak of your document; reported}% + \ifFBucsNBSP + \renewcommand*{\FBguillspace}{\char"A0\relax}% + \renewcommand*{\FBmedkern}{\char"202F\relax}% + \renewcommand*{\FBthickkern}{\char"A0\relax}% + \ifFBThinSpaceInFrenchNumbers + \renewcommand*{\FBthousandsep}{\char"202F\relax}% + \else + \renewcommand*{\FBthousandsep}{\char"A0\relax}% \fi - \endgroup \fi + \begingroup + \newcommand{\FBTU}{TU}% + \newcommand{\FBOTone}{OT1}% + \ifFBunicode + \ifx\encodingdefault\FBTU + \else + \@ifpackageloaded{fontspec}{}% + {\@ifpackageloaded{luainputenc}{}% + {\FBWarning{Add \protect\usepackage{fontspec} to the% + \MessageBreak preamble of your document, reported}% + }% + } + \fi + \else + \ifx\encodingdefault\FBOTone + \FBWarning{OT1 encoding should not be used for French.% + \MessageBreak + Add \protect\usepackage[T1]{fontenc} to the + preamble\MessageBreak of your document; reported}% + \fi + \fi + \endgroup } \let\listORI\list \let\endlistORI\endlist @@ -1722,6 +1740,7 @@ \llap{\@thefnmark}\dotFFN\kernFFN \fi} \providecommand\@makefntextFB[1]{\insertfootnotemarkFB #1} +\providecommand\localleftbox[1]{} \AtBeginDocument{% \@ifpackageloaded{bigfoot}{}% {\ifdim\parindentFFN<10in @@ -1735,18 +1754,18 @@ \ifFB@koma \let\@@makefnmarkORI\@@makefnmark \long\def\@makefntext#1{% - \ifFBFrenchFootnotes - \ifx\footnote\thanks - \let\@@makefnmark\@@makefnmarkTH - \@makefntextTH{#1}% - \else - \let\@@makefnmark\@@makefnmarkFB - \@makefntextFB{#1}% - \fi - \else - \let\@@makefnmark\@@makefnmarkORI - \@makefntextORI{#1}% - \fi}% + \ifFBFrenchFootnotes + \ifx\footnote\thanks + \let\@@makefnmark\@@makefnmarkTH + \begingroup\localleftbox{}\@makefntextTH{#1}\endgroup + \else + \let\@@makefnmark\@@makefnmarkFB + \begingroup\localleftbox{}\@makefntextFB{#1}\endgroup + \fi + \else + \let\@@makefnmark\@@makefnmarkORI + \@makefntextORI{#1}% + \fi}% \else \@ifclassloaded{memoir}% {\ifFBFrenchFootnotes @@ -1764,12 +1783,12 @@ \fi \fi }{}% - \long\def\@makefntext#1{% - \ifFBFrenchFootnotes - \@makefntextFB{#1}% - \else - \@makefntextORI{#1}% - \fi}% + \long\def\@makefntext#1{\begingroup\localleftbox{}% + \ifFBFrenchFootnotes + \@makefntextFB{#1}% + \else + \@makefntextORI{#1}% + \fi\endgroup}% \fi }% } |