diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-30 23:23:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-30 23:23:45 +0000 |
commit | edd5eca5b6e0a7fd2e06c0773db98005b25adfa7 (patch) | |
tree | fc030ac21520f24f664355ee9debf01132c3aa03 /Master/texmf-dist/source | |
parent | 3f30cad80839bb6f0464f54c6caf66622ba1d783 (diff) |
babel-french (30dec13)
git-svn-id: svn://tug.org/texlive/trunk@32507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/generic/babel-french/frenchb.dtx | 101 |
1 files changed, 60 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx index ab2ab10999e..144aa16623e 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{2955} +%\CheckSum{2958} % %\iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -13,7 +13,7 @@ %<code>\ProvidesLanguage{frenchb} %\fi %\ProvidesFile{frenchb.dtx} - [2013/11/25 v2.6f French support from the babel system] + [2013/12/30 v2.6g French support from the babel system] %\iffalse %<*dtx> %% @@ -313,11 +313,11 @@ % and |\FrenchFootnotes| are still there, |\StandardFootnotes| % can be useful when some footnotes are numbered with letters % (inside minipages for instance). -% \item |AutoSpaceFootnotes=false [true*]| ; by default |frenchb| +% \item |AutoSpaceFootnotes=false [true*]|; by default |frenchb| % adds a thin space in the running text before the number or % symbol calling the footnote. Making this option |false| % reverts to the standard setting (no space added). -% \item |FrenchSuperscripts=false [true]| ; then +% \item |FrenchSuperscripts=false [true]|; then % |\up=\textsuperscript| (option added in version 2.1). % Should only be made |false| to recompile older documents. % By default |\up| now relies on |\fup| designed to produce @@ -349,7 +349,7 @@ % so that the same amount of space is added before any of the % four double punctuation characters. The default setting is % supported by the French Imprimerie nationale. -% \item |LowercaseSuperscripts=false [true]| ; by default |frenchb| +% \item |LowercaseSuperscripts=false [true]|; by default |frenchb| % inhibits the uppercasing of superscripts (for instance when they % are moved to page headers). Making this option |false| % will disable this behaviour (not recommended). @@ -542,8 +542,8 @@ % of typed spaces with suitable unbreabable ones, tuning of the % spaces width) remain available and the user interface is % unchanged. The use of active characters is replaced by the -% |\XeTeXinterchartoks| mechanism (as in package -% \file{polyglossia}). +% |\XeTeXinterchartoks| mechanism (adapted from the +% \file{polyglossia} package). % % A new command |\NoAutoSpacing| has been added. It should be used % \emph{inside a group} instead of |\shorthandoff{;:!?}| whenever @@ -709,8 +709,8 @@ % French. % % \begin{macro}{\ifFBunicode} -% \begin{macro}{\ifFLuaTeX} -% \begin{macro}{\ifFXeTeX} +% \begin{macro}{\ifFBLuaTeX} +% \begin{macro}{\ifFBXeTeX} % French hyphenation patterns are now coded in Unicode, see file % \file{hyph-fr.tex}. XeTeX and LuaTeX engines require some extra % code to deal with the French ``apostrophe''. @@ -726,6 +726,9 @@ % \cs{FBLuaTeX} as XeTeX and behave differently regarding the status % of the French ``apostrophe''.} % +% \changes{v2.6g}{2013/12/15}{lccode values for the French +% ``apostrophe'' are now the same for XeTeX and LuaTeX.} +% % \begin{macrocode} \newif\ifFBunicode \newif\ifFBLuaTeX @@ -745,11 +748,13 @@ % words like |d'aventure|, |l'utopie|, with all TeX engines % (XeTeX, LuaTeX, pdfTeX) using \file{hyph-fr.tex} patterns. % \begin{macrocode} -\@namedef{extras\CurrentOption}{\lccode`\'=`\' - \ifFBLuaTeX \lccode`\'="2019 \fi - \ifFBXeTeX \lccode"2019=`\' \fi} -\@namedef{noextras\CurrentOption}{\lccode`\'=0 - \ifFBXeTeX \lccode"2019=0 \fi} +\@namedef{extras\CurrentOption}{% + \ifFBunicode \lccode`\'="2019 \lccode"2019="2019 + \else \lccode`\'=`\' + \fi} +\@namedef{noextras\CurrentOption}{% + \ifFBunicode \lccode"2019=\z@\fi + \lccode`\'=\z@} % \end{macrocode} % \end{macro} % \end{macro} @@ -830,13 +835,14 @@ % \end{macro} % % If |\XeTeXinterchartokenstate| is available, we use the -% ``inter char'' mechanism (as in polyglossia, see -% \file{gloss-french.ldf}) to provide correct spacing in French -% before the four characters |;| |!| |?| and |:|. We use the same -% mechanism for French quotes (\texttt{\guillemotleft} and -% \texttt{\guillemotright}), when automatic spacing for quotes is -% required by options \texttt{og=} and \texttt{fg=} in -% |\frenchbsetup{}| (see section~\ref{sec-keyval}). +% ``inter char'' mechanism to provide correct spacing in French +% before the four characters |;| |!| |?| and |:|. The basis of the +% following code was borrowed from the polyglossia package, see +% \file{gloss-french.ldf}. We use the same mechanism for French +% quotes (\texttt{\guillemotleft} and \texttt{\guillemotright}), +% when automatic spacing for quotes is required by options +% \texttt{og=} and \texttt{fg=} in |\frenchbsetup{}| (see +% section~\ref{sec-keyval}). % % For every character used in French text-mode (except spaces), % |\XeTeXcharclass| value must be 0. @@ -903,6 +909,11 @@ % \changes{v2.5j}{2012/05/08}{Previous fix removed: bug fixed in % \file{xeCJK.sty} version 3.0.4 (06-May-2012).} % +% \changes{v2.6g}{2013/12/09}{U+00A0 (Unicode nobreakspace) and U+202F +% (Unicode nobreakthinspace) added to class \cs{FB@punctnul} +% to prevent frenchb from adding it's own space before `double +% punctuation' characters.} +% % Five new character classes are defined for |frenchb|. % \begin{macrocode} \newXeTeXintercharclass\FB@punctthick @@ -946,8 +957,9 @@ % \begin{macrocode} \ifx\FB@charclassesORI\empty \FB@interchartokenstateORI=\XeTeXinterchartokenstate - \@for\FB@char:={`\:,`\;,`\!,`\?,"AB,"BB,`\(,`\[,`\{,`\,,`\.,% - `\-,`\),`\],`\},`\%,"22,"27,"60,"2019}\do + \@for\FB@char:={`\:,`\;,`\!,`\?,"AB,"BB,% + `\(,`\[,`\{,`\,,`\.,`\-,`\),`\],`\},% + `\%,"22,"27,"60,"2019,"A0,"202F}\do {\edef\FB@charclassesORI{\FB@charclassesORI% \the\XeTeXcharclass\FB@char,}}% \let\shorthandonORI\shorthandon @@ -983,9 +995,10 @@ \XeTeXinterchartoks 255 \FB@punctguilf = {% \ifFBAutoSpaceGuill\unskip\FBguill@spacing\fi}% % \end{macrocode} -% This avoids spurious spaces in (!), [?], etc. +% This avoids spurious spaces in (!), [?] and with Unicode +% nobreakspaces (U+00A0, U+202F). % \begin{macrocode} - \@for\FB@char:={`\[,`\(}\do + \@for\FB@char:={`\[,`\(,"A0,"202F}\do {\XeTeXcharclass\FB@char=\FB@punctnul}% % \end{macrocode} % These characters have their class changed by \file{xeCJK.sty}, @@ -1020,8 +1033,9 @@ \newcommand*{\FB@xetex@punct@nonfrench}{% \ifx\FB@charclassesORI\empty \else - \@for\FB@char:={`\:,`\;,`\!,`\?,"AB,"BB,`\(,`\[,`\{,`\,,`\.,% - `\-,`\),`\],`\},"22,"25,"27,"60,"2019}\do + \@for\FB@char:={`\:,`\;,`\!,`\?,"AB,"BB,% + `\(,`\[,`\{,`\,,`\.,`\-,`\),`\],`\},% + `\%,"22,"27,"60,"2019,"A0,"202F}\do {\expandafter\FB@parse\FB@charclassesORI\endparse \XeTeXcharclass\FB@char=\FB@class}% \def\FB@charclassesORI{}% @@ -2115,9 +2129,9 @@ \let\STD@makecaption\relax } % \end{macrocode} -% |\FB@makecaption| uses |\CaptionSeparator| (default ` -- ') in -% French, |\CaptionSeparatorORI| (default `: ') for other -% languages. +% In French, |\FB@makecaption| uses |\CaptionSeparator| which +% defaults to ` -- ' and |\CaptionSeparatorORI| (default `: ') for +% other languages. % \begin{macrocode} \addto\extrasfrench{% \def\FBCaption@Separator{\CaptionSeparator}} @@ -2331,13 +2345,17 @@ % set \cs{labelwidth} to 0 (see proof environment in amsthm.sty). % Bug pointed out by Julien Hauseux.} % +% \changes{v2.6g}{2013/12/30}{Suppress all vertical spaces only if +% ReduceListSpacing is true. Pointed out by Pierre Willaime.} +% % New environment for French itemize-lists.\\ |\FB@itemizesettings| % does two things: first suppress all vertical spaces including -% glue, then set horizontal indentations according to -% |\FB@listHsettings| unless option |ListOldLayout| is true -% (compatibility with lists up to v.~2.5k). +% glue when option ReduceListSpacing is set, then set horizontal +% indentations according to |\FB@listHsettings| unless option +% |ListOldLayout| is true (compatibility with lists up to v.~2.5k). % \begin{macrocode} \def\FB@itemizesettings{% + \ifFBReduceListSpacing \setlength{\itemsep}{\z@}% \setlength{\parsep}{\z@}% \setlength{\topsep}{\z@}% @@ -2345,14 +2363,15 @@ \@tempdima=\parskip \addtolength{\topsep}{-\@tempdima}% \addtolength{\partopsep}{\@tempdima}% - \settowidth{\labelwidth}{\csname\@itemitem\endcsname}% - \ifFBListOldLayout - \setlength{\leftmargin}{\labelwidth}% - \addtolength{\leftmargin}{\labelsep}% - \addtolength{\leftmargin}{\parindent}% - \else - \FB@listHsettings - \fi + \fi + \settowidth{\labelwidth}{\csname\@itemitem\endcsname}% + \ifFBListOldLayout + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \addtolength{\leftmargin}{\parindent}% + \else + \FB@listHsettings + \fi } % \end{macrocode} % The definition of |\itemizeFB| follows the one of |\itemize| |