diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-french/frenchb.ldf')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/frenchb.ldf | 151 |
1 files changed, 84 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf index eb0939c313f..0e068808aad 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf @@ -33,7 +33,7 @@ %% extension .ins) which are part of the distribution. %% \ProvidesLanguage{frenchb} - [2016/04/18 v3.2b French support from the babel system] + [2016/05/14 v3.2c French support from the babel system] %% %% File `frenchb.ldf' %% Babel package for LaTeX version 2e @@ -168,13 +168,10 @@ \expandafter\addto\csname #1\FB@CurOpt\endcsname{#2}} \FB@addto{extras}{\bbl@frenchspacing} \FB@addto{noextras}{\bbl@nonfrenchspacing} -\newif\ifFBAutoSpaceGuill \FBAutoSpaceGuilltrue -\newif\ifFB@active@punct \FB@active@puncttrue +\newif\ifFB@active@punct \FB@active@puncttrue \newif\ifFB@luatex@punct \ifFBLuaTeX - \ifnum\luatexversion>94 - \FB@luatex@puncttrue\FB@active@punctfalse - \else + \ifnum\luatexversion<95 \ifx\PackageWarning\@undefined \fb@warning{Please upgrade LuaTeX to version 0.95 or above!\\% frenchb will make high punctuation characters (;:!?) active\\% @@ -185,6 +182,8 @@ frenchb will make high punctuation characters\MessageBreak (;:!?) active with LuaTeX < 0.95;\MessageBreak reported}% \fi + \else + \FB@luatex@puncttrue\FB@active@punctfalse \fi \fi \newcount\FB@nonchar @@ -193,24 +192,38 @@ \expandafter\ifx\csname XeTeXinterchartokenstate\endcsname\relax \else \FB@xetex@puncttrue\FB@active@punctfalse - \ifdim\the\XeTeXversion\XeTeXrevision pt<0.99996pt + \ifdim\the\XeTeXversion\XeTeXrevision pt<0.99994pt \FB@nonchar=255 \relax \else \FB@nonchar=4095 \relax \fi \fi \newcommand*{\FBcolonspace}{\space} -\newcommand*{\FBthinspace}{\hskip .16667em \relax} +\newcommand*{\FBthinspace}{\hskip.5\fontdimen2\font \relax} \newskip\FBcolonskip \FBcolonskip=3.33pt plus 1.665pt minus 1.11pt \relax \newskip\FBthinskip \FBthinskip=1.66672pt \relax +\newif\ifFB@spacing \FB@spacingtrue +\newcommand*{\FB@spacing@on}{% + \ifFB@luatex@punct + \FB@spacing=1 \relax + \else + \FB@spacingtrue + \fi} +\newcommand*{\FB@spacing@off}{% + \ifFB@luatex@punct + \FB@spacing=0 \relax + \else + \FB@spacingfalse + \fi} \ifFB@luatex@punct \directlua{tex.enableprimitives("", tex.extraprimitives("omega"))} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname newluafunction\endcsname\relax \input ltluatex.tex \fi + \newattribute\FB@spacing \FB@spacing=1 \relax \newattribute\FB@addDPspace \FB@addDPspace=1 \relax \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax \ifLaTeXe @@ -299,42 +312,46 @@ \XeTeXinterchartokenstate=1 \XeTeXcharclass `\: = \FB@punctthick \XeTeXinterchartoks \z@ \FB@punctthick = {% - \ifhmode\FDP@colonspace\fi}% + \ifFB@spacing\ifhmode\FDP@colonspace\fi\fi}% \XeTeXinterchartoks \FB@guilf \FB@punctthick = {% - \FDP@colonspace}% + \ifFB@spacing\FDP@colonspace\fi}% \XeTeXinterchartoks \FB@nonchar \FB@punctthick = {% - \ifhmode - \ifdim\lastskip>1sp - \unskip\penalty\@M\FBcolonspace - \else - \FDP@colonspace - \fi - \fi}% + \ifFB@spacing + \ifhmode + \ifdim\lastskip>1sp + \unskip\penalty\@M\FBcolonspace + \else + \FDP@colonspace + \fi + \fi + \fi}% \bbl@for\FB@char {`\;,`\!,`\?}% {\XeTeXcharclass\FB@char=\FB@punctthin}% \XeTeXinterchartoks \z@ \FB@punctthin = {% - \ifhmode\FDP@thinspace\fi}% + \ifFB@spacing\ifhmode\FDP@thinspace\fi\fi}% \XeTeXinterchartoks \FB@guilf \FB@punctthin = {% - \FDP@thinspace}% + \ifFB@spacing\FDP@thinspace\fi}% \XeTeXinterchartoks \FB@nonchar \FB@punctthin = {% - \ifhmode - \ifdim\lastskip>1sp - \unskip\penalty\@M\FBthinspace - \else - \FDP@thinspace - \fi - \fi}% + \ifFB@spacing + \ifhmode + \ifdim\lastskip>1sp + \unskip\penalty\@M\FBthinspace + \else + \FDP@thinspace + \fi + \fi + \fi}% \XeTeXinterchartoks \FB@guilo \z@ = {% - \ifFBAutoSpaceGuill\FBguillspace\fi}% + \ifFB@spacing\FBguillspace\fi}% \XeTeXinterchartoks \FB@guilo \FB@nonchar = {% - \ifFBAutoSpaceGuill\FBguillspace\ignorespaces\fi}% + \ifFB@spacing\FBguillspace\ignorespaces\fi}% \XeTeXinterchartoks \z@ \FB@guilf = {% - \ifFBAutoSpaceGuill\FBguillspace\fi}% + \ifFB@spacing\FBguillspace\fi}% \XeTeXinterchartoks \FB@punctthin \FB@guilf = {% - \ifFBAutoSpaceGuill\FBguillspace\fi}% + \ifFB@spacing\FBguillspace\fi}% \XeTeXinterchartoks \FB@nonchar \FB@guilf = {% - \ifFBAutoSpaceGuill\unskip\FBguillspace\fi}% + \ifFB@spacing\unskip\FBguillspace\fi}% \bbl@for\FB@char {`\[,`\(,"A0,"202F}% {\XeTeXcharclass\FB@char=\FB@punctnul}% @@ -350,6 +367,7 @@ \initiate@active@char{!}% \initiate@active@char{?}% \declare@shorthand{french}{;}{% + \ifFB@spacing \ifhmode \ifdim\lastskip>1sp \unskip\penalty\@M\FBthinspace @@ -357,8 +375,10 @@ \FDP@thinspace \fi \fi - \string;} + \fi + \string;} \declare@shorthand{french}{!}{% + \ifFB@spacing \ifhmode \ifdim\lastskip>1sp \unskip\penalty\@M\FBthinspace @@ -366,8 +386,10 @@ \FDP@thinspace \fi \fi - \string!} + \fi + \string!} \declare@shorthand{french}{?}{% + \ifFB@spacing \ifhmode \ifdim\lastskip>1sp \unskip\penalty\@M\FBthinspace @@ -375,8 +397,10 @@ \FDP@thinspace \fi \fi - \string?} + \fi + \string?} \declare@shorthand{french}{:}{% + \ifFB@spacing \ifhmode \ifdim\lastskip>1sp \unskip\penalty\@M\FBcolonspace @@ -384,7 +408,8 @@ \FDP@colonspace \fi \fi - \string:} + \fi + \string:} \declare@shorthand{system}{:}{\string:} \declare@shorthand{system}{!}{\string!} \declare@shorthand{system}{?}{\string?} @@ -419,33 +444,13 @@ \AutoSpaceBeforeFDP \fi \ifLaTeXe - \DeclareRobustCommand\ttfamilyFB{% - \FBAutoSpaceGuillfalse - \ifFB@luatex@punct\FB@addGUILspace=0 \fi - \noautospace@beforeFDP\ttfamilyORI}% - \DeclareRobustCommand\rmfamilyFB{% - \FBAutoSpaceGuilltrue - \ifFB@luatex@punct\FB@addGUILspace=1 \fi - \ifFBAutoSpacePunctuation - \autospace@beforeFDP - \else - \noautospace@beforeFDP - \fi - \rmfamilyORI}% - \DeclareRobustCommand\sffamilyFB{% - \FBAutoSpaceGuilltrue - \ifFB@luatex@punct\FB@addGUILspace=1 \fi - \ifFBAutoSpacePunctuation - \autospace@beforeFDP - \else - \noautospace@beforeFDP - \fi - \sffamilyORI}% + \DeclareRobustCommand\ttfamilyFB{\FB@spacing@off \ttfamilyORI} + \DeclareRobustCommand\rmfamilyFB{\FB@spacing@on \rmfamilyORI} + \DeclareRobustCommand\sffamilyFB{\FB@spacing@on \sffamilyORI} \fi -\DeclareRobustCommand*{\NoAutoSpacing}{\FBAutoSpaceGuillfalse - \ifFB@active@punct\noautospace@beforeFDP\shorthandoff{;:!?}\fi - \ifFB@xetex@punct\XeTeXinterchartokenstate=0 \fi - \ifFB@luatex@punct\FB@addDPspace=0 \FB@addGUILspace=0 \fi +\DeclareRobustCommand*{\NoAutoSpacing}{% + \FB@spacing@off + \ifFB@active@punct\shorthandoff{;:!?}\fi } \ifLaTeXe \else @@ -471,17 +476,19 @@ minus.8\fontdimen4\font} \ifFB@luatex@punct \DeclareRobustCommand*{\FB@og}{\leavevmode - \bgroup\FB@addGUILspace=1 \guillemotleft\egroup} + \bgroup\FB@spacing=0 \guillemotleft\egroup + \FBguillspace} \DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi - \bgroup\FB@addGUILspace=1 \guillemotright\egroup} + \FBguillspace + \bgroup\FB@spacing=0 \guillemotright\egroup} \fi \ifFB@xetex@punct \DeclareRobustCommand*{\FB@og}{\leavevmode - \bgroup\FBAutoSpaceGuillfalse\guillemotleft\egroup + \bgroup\FB@spacingfalse\guillemotleft\egroup \FBguillspace} \DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi \FBguillspace - \bgroup\FBAutoSpaceGuillfalse\guillemotright\egroup} + \bgroup\FB@spacingfalse\guillemotright\egroup} \fi \ifFB@active@punct \DeclareRobustCommand*{\FB@og}{\leavevmode @@ -1169,10 +1176,15 @@ \XeTeXcharclass"A0 = \FB@guilnul \XeTeXcharclass"202F = \FB@guilnul \fi + \ifFB@active@punct + \FBWarning{frenchb.ldf}% + {Option og=« not supported with this version + of\MessageBreak LuaTeX/XeTeX; reported}% + \fi \else \newcommand*{\FB@@og}{% \iflanguage{french}% - {\ifFBAutoSpaceGuill\FB@og\ignorespaces + {\ifFB@spacing\FB@og\ignorespaces \else\guillemotleft \fi}% {\guillemotleft}}% @@ -1210,10 +1222,15 @@ \XeTeXcharclass"A0 = \FB@guilnul \XeTeXcharclass"202F = \FB@guilnul \fi + \ifFB@active@punct + \FBWarning{frenchb.ldf}% + {Option fg=» not supported with this version + of\MessageBreak LuaTeX/XeTeX; reported}% + \fi \else \newcommand*{\FB@@fg}{% \iflanguage{french}% - {\ifFBAutoSpaceGuill\FB@fg + {\ifFB@spacing\FB@fg \else\guillemotright \fi}% {\guillemotright}}% |