summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/babel-contrib/french/frenchb.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/babel-contrib/french/frenchb.dtx')
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.dtx163
1 files changed, 82 insertions, 81 deletions
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.dtx b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
index 4630c18ef4..fec387a0d4 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.dtx
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
@@ -1,4 +1,4 @@
-%\CheckSum{3732}
+%\CheckSum{3741}
%
%\iffalse
% Tell the LaTeX system who we are and write an entry on the
@@ -13,12 +13,12 @@
%<frenchb>\ProvidesLanguage{frenchb}
%<lua>--[[
%<lua> File `frenchb.lua’ generated from frenchb.dtx
- [2021/07/20 v3.5m French support from the babel system]
+ [2022/04/18 v3.5n French support from the babel system]
%<*internal>
\iffalse
%</internal>
%<*lua>
- Copyright © 2014-2021 Daniel Flipo
+ Copyright © 2014-2022 Daniel Flipo
<daniel (dot) flipo (at) free (dot) fr>
License LPPL: see french.ldf.
--]]
@@ -32,7 +32,7 @@
%<*dtx|french>
%%
%% Babel package for LaTeX version 2e
-%% Copyright © 1996-2021
+%% Copyright © 1996-2022
%% by Daniel Flipo <daniel (dot) flipo (at) free (dot) fr>
%%
%</dtx|french>
@@ -228,44 +228,36 @@
% Some commands are provided by \frenchb{} to make typesetting
% easier:
% \begin{enumerate}
-% \item French quotation marks can be entered using the commands
-% |\og| and |\fg| which work in LaTeX2e and PlainTeX,
-% their appearance depending on what is available to draw
-% them; even if you use LaTeX2e \emph{and} |T1|-encoding,
-% you should refrain from entering them as
-% |<<~French quotation~>>|: |\og| and |\fg| provide
-% better horizontal spacing (controlled by |\FBguillspace|).
-% If French quote characters are available on your keyboard,
-% you can use them, to get proper spacing in LaTeX2e see
-% option \fbo{og=«, fg=»} p.~\pageref{option-og-fg}.
-%
-% |\og| and |\fg| can be used outside French, they typeset
-% then English quotes `` and ’’.
-%
-% A new command |\frquote{}| has been added in version~3.1 to
-% enter French quotations. |\frquote{|\textit{texte}|}| is
-% equivalent to |\og| \textit{texte} |\fg{}| for short
-% quotations.\hlabel{frquote}
-% For quotations spreading over more than one paragraph,
-% |\frquote| will add at the beginning of every paragraph of
-% the quotation either an opening French guillemet («), or
-% a closing one (») or nothing depending on option
-% \fbo{EveryParGuill=open} or \fbo{=close} or \fbo{=none},
-% see p.~\pageref{everyparguill}.
-% Command |\NoEveryParQuote| is provided to locally suppress
-% unwanted guillemets (typically when lists are embedded in
-% |\frquote{}|), it is meant to be used inside an environment
-% or a group.
-%
-% |\frquote| is recommended to enter embedded quotations ``à la
-% française’’, several variants are provided through options.
-% \begin{itemize}
-% \item with all engines: the inner quotation
-% is surrounded by double quotes (``\textit{texte}’’)
-% unless option \fbo{InnerGuillSingle=true}, then
-% a) the inner quotation is printed as
+% \item French quotation marks can be entered using the command
+% |\frquote{}|: |\frquote{some text}| will output
+% «~some text~». Former commands |\og| and |\fg| are kept
+% for backward compatibility: |\og some text\fg{}| is an
+% alternative to |\frquote{some text}|.\hlabel{frquote}
+%
+% If French quote characters are available on your keyboard,
+% you can use them, to get proper spacing in LaTeX2e see
+% option \fbo{og=«, fg=»} p.~\pageref{option-og-fg}.
+%
+% For quotations spreading over more than one paragraph,
+% |\frquote| will add at the beginning of every paragraph of
+% the quotation either an opening French guillemet («), or
+% a closing one (») or nothing depending on option
+% \fbo{EveryParGuill=open} or \fbo{=close} or \fbo{=none},
+% see p.~\pageref{everyparguill}.
+% Command |\NoEveryParQuote| is provided to locally suppress
+% unwanted guillemets (typically when lists are embedded in
+% |\frquote{}|), it is meant to be used inside an environment
+% or a group.
+%
+% |\frquote| is recommended to enter embedded quotations ``à la
+% française’’, several variants are provided through options.
+% \begin{itemize}
+% \item with all engines: the inner quotation
+% is surrounded by double quotes (``\textit{texte}’’)
+% unless option \fbo{InnerGuillSingle=true}, then
+% a) the inner quotation is printed as
% \guilsinglleft\FRguillspace\textit{texte}\FRguillspace
-% \guilsinglright{} and b) if the inner quotation
+% \guilsinglright{} and b) if the inner quotation
% spreads over more than one paragraph, every paragraph
% included in the inner quotation starts with
% a \guilsinglleft{} or a \guilsinglright{} or nothing,
@@ -280,12 +272,12 @@
% option \fbo{InnerGuillSingle};
% the default is \fbo{EveryLineGuill=none} so that
% |\frquote{}| behaves as with non-LuaTeX engines.
-% \end{itemize}
-% A starred variant |\frquote*| is meant for inner quotations
-% which end together with the outer one: using |\frquote*| for
-% the inner quotation will print only one closing quote
-% character (the outer one) as recommended by the French
-% `Imprimerie Nationale’.
+% \end{itemize}
+% A starred variant |\frquote*| is meant for inner quotations
+% which end together with the outer one: using |\frquote*| for
+% the inner quotation will print only one closing quote
+% character (the outer one) as recommended by the French
+% `Imprimerie Nationale’.
%
% \item |\frenchdate|\marg{year}\marg{month}\marg{day} helps
% typesetting dates in French: |\frenchdate{2001}{01}{01}|
@@ -300,12 +292,12 @@
% All these commands take advantage of real superscript
% letters when they are available in the current font.
%
-% \item Family names should be typeset in small capitals and never
-% be hyphenated, the macro |\bsc| (boxed small caps) does
-% this, e.g., |L.~\bsc{Lamport}| will print the same as
-% |L.~\mbox{\textsc{Lamport}}|. Note that composed names
-% (such as Dupont-Durant) may now be hyphenated on explicit
-% hyphens, this differs from \frenchb~v.~1.x.
+% \item Command |\bname{}| (boxed name) is provided to typeset
+% family names: its argument will not be hyphenated except on
+% explicit hyphens. |\bsc{}| (boxed small caps) is a variant
+% that prints its argument in small capitals, it is meant for
+% bibliographies, signatures, etc.
+% Usage: |Albert~\bsc{Camus}|.
%
% \item Commands |\primo|, |\secundo|, |\tertio| and |\quarto|
% print 1\up{o}, 2\up{o}, 3\up{o}, 4\up{o}.
@@ -591,7 +583,7 @@
%
% \item [og=«, fg=»]; when guillemets characters are available on
% the keyboard (through a compose key for instance), it is nice
-% to use them instead of typing |\og| and |\fg|. This option
+% to use them instead of typing |\frquote{}|. This option
% tells \frenchb{} which characters are opening and closing
% French guillemets (they depend on the input encoding), then
% you can type either \hlabel{option-og-fg}
@@ -831,6 +823,9 @@
% |\textorpdfstring{}{}|.
% \end{itemize}
%
+% Version 3.5n introduces a new command |\bname{}| (an alternative to
+% |\bsc{}|).
+%
% \subsubsection*{What’s new in version 3.4?}
%
% Version 3.4a adds a new command |\frenchdate| (see
@@ -3454,15 +3449,14 @@ return french_punctuation
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\bname}
% \begin{macro}{\bsc}
-% As family names should be written in small capitals and never be
-% hyphenated, we provide a command (its name comes from Boxed Small
-% Caps) to input them easily. Note that this command has changed
-% with version~2 of \frenchb: a |\kern0pt| is used instead of |\hbox|
-% because |\hbox| would break microtype’s font expansion; as a
-% (positive?) side effect, composed names (such as Dupont-Durand)
-% can now be hyphenated on explicit hyphens.
-% Usage: |Jean~\bsc{Duchemin}|.
+% These commands are meant to easily enter family names (in small
+% capitals for the latter) while avoidind hyphenation.
+% A |\kern0pt| is used instead of |\mbox| because |\mbox| would break
+% microtype’s font expansion; as a positive side effect, composed
+% names (such as Dupont-Durand) can now be hyphenated on explicit
+% hyphens.
%
% \changes{v2.0}{2006/11/06}{\cs{hbox} dropped, replaced by
% \cs{kern0pt}.}
@@ -3470,17 +3464,24 @@ return french_punctuation
% \changes{v3.5k}{2020/07/18}{\cs{bsc} now relies on
% \cs{texorpdfstring} to be safe in bookmarks.}
%
+% \changes{v3.5n}{2022/04/01}{Added command \cs{bname} (no small caps).}
+%
% \begin{macrocode}
\ifLaTeXe
+ \DeclareRobustCommand*{\bname}[1]{%
+ \texorpdfstring{\leavevmode\begingroup\kern0pt #1\endgroup}{#1}%
+ }
\DeclareRobustCommand*{\bsc}[1]{%
\texorpdfstring{\leavevmode\begingroup\kern0pt \scshape #1\endgroup}%
{\textsc{#1}}%
}
\else
- \newcommand*{\bsc}[1]{\leavevmode\begingroup\kern0pt #1\endgroup}
+ \newcommand*{\bname}[1]{\leavevmode\begingroup\kern0pt #1\endgroup}
+ \let\bsc\bname
\fi
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% Some definitions for special characters. We won’t define |\tilde|
% as a Text Symbol not to conflict with the macro |\tilde| for math
@@ -4429,6 +4430,9 @@ return french_punctuation
% section~\ref{ssec-loading-order}; a light customisation is
% compatible with the \pkg{beamerarticle} package.
%
+% \changes{v3.5n}{2022/04/18}{\cs{FBGlobalLayoutFrench} no longer set to
+% false when French is not the main language.}
+%
% \begin{macrocode}
\def\FB@french{french}
\def\FB@acadian{acadian}
@@ -4461,8 +4465,6 @@ return french_punctuation
\FBFrenchFootnotestrue
\FBAutoSpaceFootnotestrue
\FBCustomiseFigTabCaptionstrue
- \else
- \FBGlobalLayoutFrenchfalse
\fi
% \end{macrocode}
% \frenchb{} being an option of \babel, it cannot load a package
@@ -4482,7 +4484,7 @@ return french_punctuation
\csname FBStandardLayout#1\endcsname
\else
\PackageWarning{french.ldf}%
- {Option `StandardlLayout' skipped:\MessageBreak
+ {Option `StandardLayout' skipped:\MessageBreak
French is *not* babel's last option.\MessageBreak
Reported}%
\fi
@@ -4494,7 +4496,6 @@ return french_punctuation
\FBIndentFirstfalse
\FBFrenchFootnotesfalse
\FBAutoSpaceFootnotesfalse
- \FBGlobalLayoutFrenchfalse
\else
\FBStandardListSpacingfalse
\FBStandardItemizeEnvfalse
@@ -4517,7 +4518,7 @@ return french_punctuation
% If this key is set to \fbo{true} when French is the main language,
% nothing to do: all flags keep their default value.
% If this key is set to \fbo{false}, nothing to do either:
-% |\babel@save| will do the job.
+% |\babel@save| will do the job at every language’s switch.
% \begin{macrocode}
\define@key{FB}{ReduceListSpacing}[true]%
{\csname FBReduceListSpacing#1\endcsname
@@ -4934,6 +4935,14 @@ return french_punctuation
\def\FB@ufl{\update@frenchlists}
\ifFB@mainlanguage@FR
\update@frenchlists
+ \else
+ \ifFBStandardItemizeEnv
+ \else
+ \PackageWarning{french.ldf}%
+ {babel-french will not customize lists' layout\MessageBreak
+ when French is not the main language,\MessageBreak
+ reported}%
+ \fi
\fi
% \end{macrocode}
% The layout of footnotes is handled at the |\begin{document}|
@@ -5582,7 +5591,6 @@ return french_punctuation
% \label{ssec-indent}
%
% \begin{macro}{\bbl@frenchindent}
-% \begin{macro}{\bbl@nonfrenchindent}
% In French the first paragraph of each section should be indented,
% this is another difference with US-English. This is controlled
% by the flag |\if@afterindent|.
@@ -5592,30 +5600,23 @@ return french_punctuation
% French which is correct for English but wrong for some languages
% like Spanish. Pointed out by Juan José Torrens.}
%
+% \changes{v3.5n}{2022/04/18}{\cs{bbl@frenchindent} changed.
+% \cs{bbl@nonfrenchindent} removed.}
+%
% We will need to save the value of the flag |\if@afterindent|
% `AtBeginDocument’ before eventually changing its value.
%
% \begin{macrocode}
\def\bbl@frenchindent{%
- \ifFBGlobalLayoutFrench
- \else
- \babel@save\@afterindentfalse
- \fi
+ \ifFBGlobalLayoutFrench\else\babel@save\@afterindentfalse\fi
\ifFBIndentFirst
+ \ifFB@mainlanguage@FR\else\babel@save\@afterindentfalse\fi
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
\fi}
-\def\bbl@nonfrenchindent{%
- \ifFBGlobalLayoutFrench
- \ifFBIndentFirst
- \@afterindenttrue
- \fi
- \fi}
\addto\extrasfrench{\bbl@frenchindent}
-\addto\noextrasfrench{\bbl@nonfrenchindent}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \subsection{Formatting footnotes}
% \label{ssec-footnotes}