% Language definition file (part of polyglossia v2.2 -- 2024/07/15) % \ProvidesFile{gloss-french.ldf}[polyglossia: module for French] \PolyglossiaSetup{french}{% bcp47=fr-FR, bcp47-language=fr, bcp47-region=FR, bcp47-script=Latn, language=French, script=Latin, langtag=FRA, hyphennames={french,francais}, frenchspacing=true, indentfirst=true, hyphenmins={2,2}, fontsetup=true} % BCP-47 compliant aliases \setlanguagealias*{french}{fr} \setlanguagealias*[variant=french]{french}{fr-FR} \setlanguagealias*[variant=acadian]{french}{fr-CA-u-sd-canb} \setlanguagealias*[variant=canadian]{french}{fr-CA} \setlanguagealias*[variant=swiss]{french}{fr-CH} % Babel aliases \setlanguagealias[variant=acadian]{french}{acadian} \setlanguagealias[variant=canadian]{french}{canadien} \def\french@variant{french} \def\french@language{% \SetupPolyglossiaLangPatterns{\french@variant}% }% \ifluatex \directlua{require('polyglossia-french')}% \else \newXeTeXintercharclass\french@openbrackets % ( [ { \newXeTeXintercharclass\french@closebrackets % ) ] } \newXeTeXintercharclass\french@questionexclamation % ! ? et autres \newXeTeXintercharclass\french@punctthin % ; (et :) \newXeTeXintercharclass\french@punctthick % : \newXeTeXintercharclass\french@punctguillstart % « ‹ \newXeTeXintercharclass\french@punctguillend % » › \fi \def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi} % Save original footnote definition % Do this at the end of the preamble to catch other % packages' footnote changes (#391) \AddToHook{begindocument/before}{% \let\xpg@orig@makefntext\@makefntext } % name is for compatibility with babel \let\french@ttfamilyORI\ttfamily \DeclareRobustCommand\french@ttfamilyFB{\nofrench@punctuation\french@ttfamilyORI} % Configuration of item labels \def\french@itemi{\textemdash} \def\french@itemii{\textemdash} \def\french@itemiii{\textemdash} \def\french@itemiv{\textemdash} \newif\iffrench@autospacetypewriter \french@autospacetypewriterfalse \newif\iffrench@autospacing \french@autospacingtrue \newif\iffrench@frenchpart \french@frenchparttrue \newif\iffrench@autospaceguillemets \french@autospaceguillemetstrue \DeclareKeys[polyglossia/gloss/french] { variant.choice:, variant / french.code = {% \def\french@variant{french}% \SetLanguageKeys{french}{babelname=french,bcp47=fr-FR,bcp47-language=fr,bcp47-region=FR}% \french@thincolonspacefalse }, variant / canadian.code = {% \def\french@variant{canadien}% \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-caqc}% \IfLanguageDefinedF{canadien}% {\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak I will use the standard patterns for French instead}% \adddialect\l@canadien\l@french\relax}% \french@thincolonspacefalse }, variant / acadian.code = {% \def\french@variant{acadian}% \SetLanguageKeys{french}{babelname=acadian,bcp47=fr-CA-u-sd-canb,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-canb}% \IfLanguageDefinedF{acadian}% {\xpg@warning{No hyphenation patterns were loaded for "French (Canada, Acadian)"\MessageBreak I will use the standard patterns for French instead}% \adddialect\l@acadian\l@french\relax}% \french@thincolonspacefalse }, variant / swiss.code = {% \def\french@variant{swissfrench}% \SetLanguageKeys{french}{babelname=french,bcp47=fr-CH,bcp47-language=fr,bcp47-region=CH}% \adddialect\l@swissfrench\l@french\relax% \french@thincolonspacetrue }, variant.default:n = french, variant/unknown.code = \xpg@warning{Unknown French variant `#1'}, frenchfootnote.if = french@frenchfootnote, frenchfootnote.default:n = true, autospacing.if = french@autospacing, autospacing.default:n = true, frenchpart.if = french@frenchpart, frenchpart.default:n = true, autospaceguillemets.if = french@autospaceguillemets, autospaceguillemets.default:n = true, thincolonspace.if = french@thincolonspace, thincolonspace.default:n = true, automaticspacesaroundguillemets.meta:n = {autospaceguillemets=#1}, autospacetypewriter.if = french@autospacetypewriter, autospacetypewriter.default:n = true, originaltypewriter.meta:n = {autospacetypewriter=#1}, itemlabeli.store = \french@itemi, itemlabelii.store = \french@itemii, itemlabeliii.store = \french@itemiii, itemlabeliv.store = \french@itemiv, frenchitemlabels.if = french@frenchitemlabels, frenchitemlabels.default:n = true, itemlabels.code = \def\french@itemi{#1}% \def\french@itemii{#1}% \def\french@itemiii{#1}% \def\french@itemiv{#1}, itemlabels.default:n = \textemdash } % Register default options \InitializeGlossOptions{french}{variant=french,autospacing=true,thincolonspace=false, autospaceguillemets=true,autospacetypewriter=false, frenchfootnote=false,frenchitemlabels=false, itemlabels=\textemdash,itemlabeli=\textemdash,itemlabelii=\textemdash, itemlabeliii=\textemdash,itemlabeliv=\textemdash} % Register alias options \SetLanguageAliasValues{french}{variant}{canadian,acadian} \def\french@fontsetup{% \unless\iffrench@autospacetypewriter \let\ttfamily\french@ttfamilyFB \fi } \def\nofrench@fontsetup{% \let\ttfamily\french@ttfamilyORI } \def\xpg@french@thinsp{\kern 0.5\fontdimen2\font\nobreak\hskip\z@skip} \def\french@punctuation{% \lccode"2019="2019 \ifluatex \iffrench@thincolonspace \iffrench@autospaceguillemets \directlua{polyglossia.activate_french_punct(true, true)}% \else \directlua{polyglossia.activate_french_punct(true, false)}% \fi \else \iffrench@autospaceguillemets \directlua{polyglossia.activate_french_punct(false, true)}% \else \directlua{polyglossia.activate_french_punct(false, false)}% \fi \fi \else \XeTeXinterchartokenstate=1 \XeTeXcharclass `\! \french@questionexclamation \XeTeXcharclass `\? \french@questionexclamation \XeTeXcharclass `\‼ \french@questionexclamation \XeTeXcharclass `\⁇ \french@questionexclamation \XeTeXcharclass `\⁈ \french@questionexclamation \XeTeXcharclass `\⁉ \french@questionexclamation \XeTeXcharclass `\‽ \french@questionexclamation % U+203D (interrobang) \XeTeXcharclass `\; \french@punctthin \iffrench@thincolonspace \XeTeXcharclass `\: \french@punctthin \else \XeTeXcharclass `\: \french@punctthick \fi \XeTeXcharclass `\« \french@punctguillstart \XeTeXcharclass `\» \french@punctguillend \XeTeXcharclass `\‹ \french@punctguillstart \XeTeXcharclass `\› \french@punctguillend \XeTeXcharclass `\( \french@openbrackets \XeTeXcharclass `\) \french@closebrackets \XeTeXcharclass `\[ \french@openbrackets \XeTeXcharclass `\] \french@closebrackets \XeTeXcharclass `\{ \french@openbrackets \XeTeXcharclass `\} \french@closebrackets \XeTeXcharclass `\⟨ \french@openbrackets \XeTeXcharclass `\⟩ \french@closebrackets \XeTeXinterchartoks \z@ \french@questionexclamation = {\xpg@french@thinsp}% \XeTeXinterchartoks \z@ \french@punctthin = {\xpg@french@thinsp}% \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}% \XeTeXinterchartoks \xpg@boundaryclass \french@questionexclamation = {\xpg@unskip\xpg@french@thinsp}% \XeTeXinterchartoks \xpg@boundaryclass \french@punctthin = {\xpg@unskip\xpg@french@thinsp}% \XeTeXinterchartoks \xpg@boundaryclass \french@punctthick = {\xpg@unskip\nobreakspace}% \iffrench@autospaceguillemets \let\xpg@french@guillspace\xpg@french@thinsp% \XeTeXinterchartoks \french@punctguillstart \z@ = {\xpg@french@guillspace}% "«a" -> "«\,a" \XeTeXinterchartoks \french@punctguillstart \french@punctguillstart = {\xpg@french@guillspace}% "«‹" -> "«\,‹" % \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged? % \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged? \XeTeXinterchartoks \z@ \french@punctguillend = {\xpg@french@guillspace}% "a»" -> "a\,»" \XeTeXinterchartoks \french@punctguillstart \xpg@boundaryclass = {\xpg@french@guillspace\ignorespaces}% "« " -> "«\," \XeTeXinterchartoks \xpg@boundaryclass \french@punctguillend = {\xpg@unskip\xpg@french@guillspace}% " »" -> "\,»" \XeTeXinterchartoks \french@closebrackets \french@punctguillend = {\xpg@french@guillspace}% ")»" -> ")\,»" \XeTeXinterchartoks \french@questionexclamation \french@punctguillend = {\xpg@french@guillspace}% "?»" -> "?\,»" \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@guillspace}% ";»" -> ";\,»" \XeTeXinterchartoks \french@punctguillend \french@punctguillend = {\xpg@french@guillspace}% "›»" -> "›\,»" \else \def\xpg@french@guillspace{}% \fi \XeTeXinterchartoks \french@punctguillend \french@questionexclamation = {\xpg@french@thinsp}% "»?" -> "»\,?" \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\xpg@french@thinsp}% "»;" -> "»\,;" \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :" \XeTeXinterchartoks \french@questionexclamation \french@punctthin = {\xpg@french@thinsp}% "?;" -> "?\,;" \XeTeXinterchartoks \french@questionexclamation \french@punctthick = {\xpg@french@thinsp}% "?:" -> "?\,:" \XeTeXinterchartoks \french@openbrackets \french@questionexclamation = {\xpg@unskip}% "(?" -> "(?" and not "( ?" \XeTeXinterchartoks \french@openbrackets \french@punctthin = {\xpg@unskip}% "(;" -> "(;" and not "( ;" \XeTeXinterchartoks \french@punctthin \french@closebrackets = {\xpg@unskip}% "?)" -> "?)" (code not need, just for symetry with previous one) \XeTeXinterchartoks \french@closebrackets \french@punctthin = {\xpg@french@thinsp}% ")?" -> ")\,?" \XeTeXinterchartoks \french@closebrackets \french@punctthick = {\nobreakspace}% "):" -> ") :" \fi } \def\nofrench@punctuation{% \lccode"2019=\z@ \ifluatex \directlua{polyglossia.deactivate_french_punct()}% \else \XeTeXcharclass `\! \z@ \XeTeXcharclass `\? \z@ \XeTeXcharclass `\‼ \z@ \XeTeXcharclass `\⁇ \z@ \XeTeXcharclass `\⁈ \z@ \XeTeXcharclass `\⁉ \z@ \XeTeXcharclass `\‽ \z@ \XeTeXcharclass `\; \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\« \z@ \XeTeXcharclass `\» \z@ \XeTeXcharclass `\‹ \z@ \XeTeXcharclass `\› \z@ \XeTeXcharclass `\( \z@ \XeTeXcharclass `\) \z@ \XeTeXcharclass `\[ \z@ \XeTeXcharclass `\] \z@ \XeTeXcharclass `\{ \z@ \XeTeXcharclass `\} \z@ \XeTeXcharclass `\⟨ \z@ \XeTeXcharclass `\⟩ \z@ \XeTeXinterchartokenstate=0 \fi } \def\captionsfrench{% \def\refname{Références}% \def\abstractname{Résumé}% \def\bibname{Bibliographie}% \def\prefacename{Préface}% \def\chaptername{Chapitre}% \def\appendixname{Annexe}% \def\contentsname{Table des matières}% \def\listfigurename{Table des figures}% \def\listtablename{Liste des tableaux}% \def\indexname{Index}% \def\figurename{\textsc{Fig.}}% \def\tablename{\textsc{Tab.}}% \iffrench@frenchpart \def\partname{partie}% \else \def\partname{Partie}% \fi% \def\pagename{page}% \def\seename{voir}% \def\alsoname{voir aussi}% \def\enclname{P.~J. }% \def\ccname{Copie à }% \def\headtoname{}% \def\proofname{Démonstration}% } \def\datefrench{% \def\today{\ifx\ier\undefined\def\ier{er}\fi \ifnum\day=1\relax 1\ier% \else \number\day\fi \space \ifcase\month% \or janvier\or février\or mars\or avril\or mai\or juin\or juillet\or août\or septembre\or octobre\or novembre\or décembre\fi \space \number\year}} \def\xpg@french@part{\ifcase\value{part}\or Première\or Deuxième\or% Troisième\or Quatrième\or Cinquième\or Sixième\or% Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or% Douzième\or Treizième\or Quatorzième\or Quinzième\or% Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or% Vingtième\fi}% \def\french@capsformat{% % Change part heading % With titlesec \@ifundefined{titleformat}{% % With KOMA \@ifundefined{sectionformat}{% % With memoir \@ifundefined{@memptsize}{% (not \ifdefined\@memptsize) % With standard classes \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for French}}}% }% (end \ifdefined \@part) }{% Hyperref \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for French}}% }% (end \ifdefined\NR@part) }{% \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}% {\partnamefont\xpg@french@part\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for French}}% }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}% {\partnamefont\xpg@french@part\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for French}}% }% }% (end \ifdefined\@memptsize) }{% (\ifdefined\sectionformat) \@ifundefined{partformat}{}{% \let\xpg@save@part@format\partformat% \renewcommand{\partformat}{\xpg@french@part~\partname}% }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for French}}% }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for French}}% }% }% (end \ifdefined\titleformat) } \def\nofrench@capsformat{% % Reset chapter and part heading \@ifundefined{titleformat}{% \@ifundefined{sectionformat}{% % With memoir and standard classes \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format% }{% \let\NR@part\xpg@save@part@format% }% }% }{% % With KOMA \@ifundefined{xpg@save@part@format}{}{% \let\partformat\xpg@save@part@format }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) % With titlesec \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format% }{% \let\NR@part\xpg@save@part@format% }% }% }% (end \ifdefined\titleformat) } \newif\if@xpg@french@footnote@set \@xpg@french@footnote@setfalse \def\set@french@footnote{% % Set French footnote once if requested \if@xpg@french@footnote@set% \else% \iffrench@frenchfootnote% \IfMainLanguageTF{french}{% \ifx\@makefntext\undefined\else% \long\def\french@makefntext##1{% \parindent1em \noindent\quad% \ifx\@thefnmark\empty\else% \@thefnmark.\space\fi ##1% }% \let\@makefntext\french@makefntext% \fi% }{\xpg@warning{Option 'frenchfootnote' only supported if French is main language!}}% \else% \let\@makefntext\xpg@orig@makefntext% \fi% \@xpg@french@footnote@settrue% \fi% } \newif\if@xpg@french@itemlabels@set \@xpg@french@itemlabels@setfalse \def\set@french@itemlabels{% % Set French itemlabels once if requested \if@xpg@french@itemlabels@set% \else% \iffrench@frenchitemlabels \IfMainLanguageTF{french}{% \renewcommand{\labelitemi}{\french@itemi}% \renewcommand{\labelitemii}{\french@itemii}% \renewcommand{\labelitemiii}{\french@itemiii}% \renewcommand{\labelitemiv}{\french@itemiv}% }{\xpg@warning{Option 'frenchitemlabels' only supported if French is main language!}}% \fi \@xpg@french@itemlabels@settrue% \fi% } \def\noextras@french{% \nofrench@punctuation% \nofrench@fontsetup% \nofrench@capsformat% } \def\blockextras@french{% % Set French itemlabels and footnote, % if so requested, once in the document body \ifx\@onlypreamble\@notprerr% \set@french@footnote% \set@french@itemlabels% \fi% \iffrench@autospacing% \french@punctuation% \fi% \french@fontsetup% \iffrench@frenchpart% \french@capsformat% \fi% } \def\inlineextras@french{% \iffrench@autospacing \french@punctuation% \fi \french@fontsetup% } \def\NoAutoSpacing{% \nofrench@punctuation% } \def\AutoSpacing{% \french@punctuation% } \def\ier{\textsuperscript{er}} \def\iers{\textsuperscript{ers}} \def\iere{\textsuperscript{re}} \def\ieres{\textsuperscript{res}} \def\ieme{\textsuperscript{e}} \def\iemes{\textsuperscript{es}} \def\nd{\textsuperscript{nd}} \def\nds{\textsuperscript{nds}} \def\nde{\textsuperscript{nde}} \def\ndes{\textsuperscript{ndes}} \def\no{\textsuperscript{o}} \def\nos{\textsuperscript{os}} \def\mme{M\textsuperscript{me}\space} \def\mmes{M\textsuperscript{mes}\space} \def\mr{M.\space} \def\mrs{MM.\space} \endinput