From 7a0530fc446c4a173b43abcb0302be9e8c08ebd2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 6 Jul 2018 21:31:26 +0000 Subject: babel-french (6jul18) git-svn-id: svn://tug.org/texlive/trunk@48153 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/generic/babel-french/frenchb.dtx | 216 +++++++++++++++------ 1 file changed, 152 insertions(+), 64 deletions(-) (limited to 'Master/texmf-dist/source/generic') diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx index 3b4c68305ee..b6ba53391a8 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{3611} +%\CheckSum{3669} % %\iffalse % Tell the LaTeX system who we are and write an entry on the @@ -13,7 +13,7 @@ %\ProvidesLanguage{frenchb} %--[[ % File `frenchb.lua’ generated from frenchb.dtx - [2018/04/12 v3.4d French support from the babel system] + [2018/07/06 v3.5a French support from the babel system] %<*internal> \iffalse % @@ -390,6 +390,42 @@ % \fbo{false}, part titles will then be printed as ``Partie I’’, % ``Partie II’’. % +% \item [ListItemsAsPar=true (false)] setting this option to +% \fbo{true} is recommended: list items will be displayed as +% paragraphs with indented labels (in the ``Imprimerie Nationale’’ +% way) instead of having labels hanging into the left margin. +% How these two layouts differ is shown below:\\[.5\baselineskip] +% \fbox{\parbox[t]{.4\textwidth}{\raggedright +% \parindent=1.5em +% \def\FBlabel{\textemdash}% +% \settowidth{\labelwidth}{\FBlabel}% +% Text starting at `parindent’ \\ +% \noindent<= Leftmargin\par +% \textemdash{} first item running on two +% \hspace*{\parindent}\hspace*{\labelwidth} +% lines or more\dots{}\par +% \hspace*{\labelwidth} \textemdash{} first second level +% \hspace*{\parindent}\hspace*{\labelwidth}% +% \hspace*{\labelwidth} item on two lines\dots{}\par +% \hspace*{\labelwidth} \textemdash{} next one\dots{}\par +% \textemdash{} second item\dots +% }} +% \hfill \hlabel{ListAsPar}% +% \fbox{\parbox[t]{.4\textwidth}{\raggedright +% \parindent=1.5em +% \def\FBlabel{\textemdash}% +% \settowidth{\labelwidth}{\FBlabel}% +% Text starting at `parindent’ \\ +% \noindent<= Leftmargin\par +% \textemdash{} first item running on two +% lines or more\dots{}\par +% \hspace*{\labelwidth} \textemdash{} first second level +% \hspace*{\parindent} item on two lines\dots{}\par +% \hspace*{\labelwidth} \textemdash{} next one\dots{}\par +% \textemdash{} second item\dots +% }}\par +% Default French layout% +% \hspace{\fill}With \fbo{ListItemsAsPar=true}% % \item [ReduceListSpacing=false (true*)]; \frenchb{} reduces the % values of the vertical spaces used in the \emph{all} list % environments in French (this includes itemize, enumerate, @@ -696,6 +732,16 @@ % % \subsection{Changes} % \label{ssec-changes} +% +% \subsubsection*{What’s new in version 3.5?} +% +% Version 3.5a offers a new option \fbo{ListItemsAsPar}. The default +% layout of lists is unchanged (for backward compatibility), but +% users should try this new option which ensures a layout of lists +% closer to French typographic standards: see f.i.\ how lists are +% typeset in the book ``Lexique des règles typographiques en usage +% à l’Imprimerie Nationale’’. + % % \subsubsection*{What’s new in version 3.4?} % @@ -4027,6 +4073,9 @@ return french_punctuation % \changes{v3.3a}{2017/04/30}{Options INGuillSpace, ThinColonSpace no % longer delayed AtBeginDocument.} % +% \changes{v3.5a}{2018/07/04}{New option ListItemsAsPar for displaying +% lists' items ``as paragraphs''.} +% % \begin{macrocode} \newcommand*{\frenchsetup}[1]{% \setkeys{FB}{#1}% @@ -4048,6 +4097,7 @@ return french_punctuation \newif\ifFBGlobalLayoutFrench \FBGlobalLayoutFrenchtrue \newif\ifFBReduceListSpacing \newif\ifFBListOldLayout +\newif\ifFBListItemsAsPar \newif\ifFBCompactItemize \newif\ifFBStandardItemizeEnv \FBStandardItemizeEnvtrue \newif\ifFBStandardEnumerateEnv \FBStandardEnumerateEnvtrue @@ -4262,6 +4312,8 @@ return french_punctuation \FBStandardEnumerateEnvfalse \FBStandardItemLabelsfalse \fi}% + \define@key{FB}{ListItemsAsPar}[true]% + {\csname FBListItemsAsPar#1\endcsname} \define@key{FB}{IndentFirst}[true]% {\csname FBIndentFirst#1\endcsname}% \define@key{FB}{FrenchFootnotes}[true]% @@ -4417,8 +4469,8 @@ return french_punctuation % non-breaking spaces will be added automatically to French quotes. % The quote characters typed in depend on the input encoding, % it can be single-byte (latin1, latin9, applemac,\dots) or -% multi-bytes (utf-8, utf8x); the next command checks if a character -% is single-byte (then |\FB@second| is empty) or not. +% multi-bytes (utf-8, utf8x); the next command is meant for checking +% whether a character is single-byte (|\FB@second| is empty) or not. % \begin{macrocode} \def\FB@parse#1#2\endparse{\def\FB@second{#2}}% % \end{macrocode} @@ -4757,6 +4809,7 @@ return french_punctuation GlobalLayoutFrench=false [true]\MessageBreak PartNameFull=false [true]\MessageBreak IndentFirst=false [true]\MessageBreak + ListItemsAsPar=true [false]\MessageBreak ReduceListSpacing=false [true]\MessageBreak StandardItemizeEnv=true [false]\MessageBreak StandardEnumerateEnv=true [false]\MessageBreak @@ -4972,20 +5025,7 @@ return french_punctuation % \item Vertical spacing between items, before and after % the list, should be \emph{null} with \emph{no glue} added; % \item In French the labels of itemize-lists are vertically -% aligned as follows:\\ -% \fbox{\parbox[t]{.5\textwidth}{% -% \parindent=1.5em -% \def\FBlabel{\textemdash}% -% \settowidth{\labelwidth}{\FBlabel}% -% Text starting at `parindent’ \\ -% \noindent<= Leftmargin\\ -% \hspace*{\parindent}\textemdash{} first item\dots\\ -% \hspace*{\parindent}\hspace*{\labelwidth}% -% \textemdash{} first second level item\\ -% \hspace*{\parindent}\hspace*{\labelwidth}% -% \textemdash{} next one\dots{}\\ -% \hspace*{\parindent}\textemdash{} second item\dots -% }} +% aligned as shown p.~\pageref{ListAsPar}. % \end{itemize} % % \begin{macro}{\FrenchLabelItem} @@ -5011,43 +5051,67 @@ return french_punctuation % % \begin{macro}{\listindentFB} % \begin{macro}{\descindentFB} +% \begin{macro}{\labelindentFB} % \begin{macro}{\labelwidthFB} -% Let’s define three lengths |\listindentFB|, |\descindentFB| and -% |\labelwidthFB| to customise lists’ horizontal indentations. +% Let’s define four dimens |\listindentFB|, |\descindentFB|, +% |\labelindentFB| and |\labelwidthFB| to customise lists’ horizontal +% indentations. % They are given silly negative values here in order to eventually % enable their customisation in the preamble. They will get % reasonnable defaults later when entering French (see -% |\bbl@frenchlabelitems|) unless they have been customised. +% |\setlabelitemsFB| and |\setlistindentFB|) unless they have been +% customised. % \begin{macrocode} -\newlength\listindentFB +\newdimen\listindentFB \setlength{\listindentFB}{-1pt} -\newlength\descindentFB +\newdimen\descindentFB \setlength{\descindentFB}{-1pt} -\newlength\labelwidthFB +\newdimen\labelindentFB +\setlength{\labelindentFB}{-1pt} +\newdimen\labelwidthFB \setlength{\labelwidthFB}{-1pt} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \changes{v3.2e}{2016/10/28}{Add missing redefinitions for % \cs{leftmarginv}, \cs{leftmarginvi}. Suggested by J.F. Burnol.} % -% \begin{macro}{\FB@listHsettings} +% \changes{v3.5a}{2018/07/04}{New optional layout for lists: +% lists’ items can be typeset as paragraphs with indented labels +% while the default leaves the labels hanging into the left margin.} +% +%\begin{macro}{\FB@listHsettings} % \begin{macro}{\leftmarginFB} % |\FB@listHsettings| holds the new horizontal settings chosen for -% French lists itemize and enumerate starting with version~2.6a. -% They are based on the look resquested in French for -% itemize-lists. +% French lists itemize and enumerate (two possible layouts). % \begin{macrocode} -\newlength\leftmarginFB +\newdimen\leftmarginFB \def\FB@listHsettings{% - \leftmarginFB\labelwidthFB - \advance\leftmarginFB \labelsep - \bbl@for\FB@dp {1, 2, 3, 4, 5, 6}% - {\csname leftmargin\romannumeral\FB@dp\endcsname \leftmarginFB}% - \advance\leftmargini \listindentFB - \leftmargin\csname leftmargin\ifnum\@listdepth=\@ne i\else + \ifFBListItemsAsPar +% \end{macrocode} +% Optional layout: lists’ items are typeset as paragraphs with +% indented labels. +% \begin{macrocode} + \itemindent=\labelindentFB + \advance\itemindent by \labelwidthFB + \advance\itemindent by \labelsep + \leftmargini\z@ + \bbl@for\FB@dp {2, 3, 4, 5, 6}% + {\csname leftmargin\romannumeral\FB@dp\endcsname=\labelindentFB}% + \else +% \end{macrocode} +% Default layout: labels hanging into the left margin. +% \begin{macrocode} + \leftmarginFB=\labelwidthFB + \advance\leftmarginFB by \labelsep + \bbl@for\FB@dp {1, 2, 3, 4, 5, 6}% + {\csname leftmargin\romannumeral\FB@dp\endcsname=\leftmarginFB}% + \advance\leftmargini by \listindentFB + \fi + \leftmargin=\csname leftmargin\ifnum\@listdepth=\@ne i\else ii\fi\endcsname } % \end{macrocode} @@ -5099,7 +5163,7 @@ return french_punctuation % \begin{macrocode} \def\itemizeFB{% \ifnum \@itemdepth >\thr@@\@toodeep\else - \advance\@itemdepth\@ne + \advance\@itemdepth by \@ne \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% \expandafter \listORI @@ -5113,24 +5177,37 @@ return french_punctuation % \end{macro} % % \begin{macrocode} -\def\labelitemsFB{% - \let\labelitemi\Frlabelitemi - \let\labelitemii\Frlabelitemii - \let\labelitemiii\Frlabelitemiii - \let\labelitemiv\Frlabelitemiv - \ifdim\labelwidthFB<\z@ - \settowidth{\labelwidthFB}{\FrenchLabelItem}% +\def\setlabelitemsFB{% + \let\labelitemi\Frlabelitemi + \let\labelitemii\Frlabelitemii + \let\labelitemiii\Frlabelitemiii + \let\labelitemiv\Frlabelitemiv + \ifdim\labelwidthFB<\z@ + \settowidth{\labelwidthFB}{\FrenchLabelItem}% + \fi +} +\def\setlistindentFB{% + \ifdim\labelindentFB<\z@ + \ifdim\parindent=\z@ + \setlength{\labelindentFB}{1.5em}% + \else + \setlength{\labelindentFB}{\parindent}% \fi - \ifdim\listindentFB<\z@ - \ifdim\parindent=\z@ - \setlength{\listindentFB}{1.5em}% - \else - \setlength{\listindentFB}{\parindent}% - \fi + \fi + \ifdim\listindentFB<\z@ + \ifdim\parindent=\z@ + \setlength{\listindentFB}{1.5em}% + \else + \setlength{\listindentFB}{\parindent}% \fi - \ifdim\descindentFB<\z@ + \fi + \ifdim\descindentFB<\z@ + \ifFBListItemsAsPar + \setlength{\descindentFB}{\labelindentFB}% + \else \setlength{\descindentFB}{\listindentFB}% \fi + \fi } % \end{macrocode} % @@ -5145,7 +5222,7 @@ return french_punctuation % \begin{macrocode} \def\enumerateFB{% \ifnum \@enumdepth >\thr@@\@toodeep\else - \advance\@enumdepth\@ne + \advance\@enumdepth by \@ne \edef\@enumctr{enum\romannumeral\the\@enumdepth}% \expandafter \list @@ -5169,28 +5246,38 @@ return french_punctuation % \cs{descindentFB} which defaults to \cs{listindentFB}. % \cs{leftmargini} reduced when \cs{descindentFB} is null.} % +% \changes{v3.5a}{2018/07/04}{ListItemsAsPar option taken into account +% for description lists.} +% % Same tuning for the \env{description} environment (see % \file{classes.dtx} for the original definition). -% Customisable length |\descindentFB|, which defaults to +% Customisable dimen |\descindentFB|, which defaults to % |\listindentFB|, is added to |\itemindent| (first level only). % When |\descindentFB=0pt| (1rst level labels start at the left % margin), |\leftmargini| is reduced to |\listindentFB| instead % of |\listindentFB| + |\leftmarginFB|. % +% When option \fbo{ListItemsAsPar} is turned to \fbo{true}, the +% \env{description} items are also displayed as paragraphs; +% |\descindentFB=0pt| can be used to push labels to the left margin. % \begin{macrocode} \def\descriptionFB{% \list{}{\FB@listHsettings - \labelwidth\z@ - \itemindent-\leftmargin - \ifnum\@listdepth=1 - \ifdim\descindentFB=\z@ - \ifdim\listindentFB>\z@ - \leftmargini\listindentFB - \leftmargin\leftmargini - \itemindent-\leftmargin + \labelwidth=\z@ + \ifFBListItemsAsPar + \itemindent=\descindentFB + \else + \itemindent=-\leftmargin + \ifnum\@listdepth=1 + \ifdim\descindentFB=\z@ + \ifdim\listindentFB>\z@ + \leftmargini=\listindentFB + \leftmargin=\leftmargini + \itemindent=-\leftmargin + \fi + \else + \advance\itemindent by \descindentFB \fi - \else - \advance\itemindent by \descindentFB \fi \fi \let\makelabel\descriptionlabel}% @@ -5206,11 +5293,12 @@ return french_punctuation % |\FBprocess@options|). % \begin{macrocode} \def\update@frenchlists{% + \setlistindentFB \ifFBReduceListSpacing \let\list\listFB \fi \ifFBStandardItemizeEnv \else \let\itemize\itemizeFB \fi \ifFBStandardItemLabels - \else \labelitemsFB \fi + \else \setlabelitemsFB \fi \ifFBStandardEnumerateEnv \else \let\enumerate\enumerateFB \let\description\descriptionFB \fi } @@ -5374,7 +5462,7 @@ return french_punctuation % \begin{macrocode} \newcommand*{\dotFFN}{.} \newcommand*{\kernFFN}{\kern .5em} -\newlength\FBfnindent +\newdimen\FBfnindent % \end{macrocode} % |\@makefntextFB|’s definition is now tuned according to the % document’s class for better compatibility. -- cgit v1.2.3