summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-13 03:01:42 +0000
committerNorbert Preining <norbert@preining.info>2022-11-13 03:01:42 +0000
commit1b59c3c45170420996d629b296e2214933ee1add (patch)
tree34082741a3498a4d6ccbe007c7866ac855e7ef72 /macros
parent28e13f4c64ab0caee7ce56d51e9be2b93611d580 (diff)
CTAN sync 202211130301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.pdfbin159631 -> 185385 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.tex48
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.dtx200
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.pdfbin331352 -> 362890 bytes
4 files changed, 119 insertions, 129 deletions
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
index e531ee4cc4..27a788be19 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
index c5100059d6..ff9f5f6aec 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
@@ -121,11 +121,10 @@
\title{Mode d’emploi du module \ext{babel-french}}
\author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}}
-\newcommand*{\latestversion}{3.5n}
+\newcommand*{\latestversion}{3.5o}
\date{Version {\latestversion} -- \today}
\begin{document}
-\def\today{18 avril 2022}
\maketitle
\thispagestyle{empty}
@@ -159,9 +158,6 @@
\vspace{-\baselineskip}\noindent
\descindentFB=0pt
\begin{description}
- \item[14 mai 2016] Mise à jour pour TeXLive~2016,
- voir section~\ref{ssec:changes-3.2}. L’historique des changements
- antérieurs à la version~3.0 a été supprimé.
\item[3 juillet 2016] Ajout dans la version~3.2d, du paramètre
|\descindentFB| pour les listes \env{description}, voir
section~\ref{ssec:lists}.
@@ -186,6 +182,9 @@
p.~\pageref{frquote}.
\item[18 avril 2022] Nouvelle commande |\bname{}|, variante sans petites
capitales de |\bsc{}| voir p.~\pageref{bname}.
+ \item[11 novembre 2022] Avec Lua(La)TeX le codage |«~abc~»| ne produit plus
+ d’espace parasite. La redéfinition de |\shorthandoff{}|,
+ |\shorthandon{}| sous LuaTeX/XeTeX est supprimée.
\end{description}
\end{abstract}
\egroup
@@ -270,9 +269,10 @@ le faire dépend du format utilisé :
commandes\\
|\usepackage[T1]{fontenc}|\\
|\usepackage{lmodern}|\\
- et de déclarer le codage d’entrée (celui qui est utilisé par l’éditeur choisi),
- par exemple |utf8| (recommandé) ou |latin9| ou |latin1| ou |applemac|, etc.\\
- |\usepackage[utf8]{inputenc}|
+ la déclaration du codage d’entrée n’est nécessaire que si celui-ci n’est
+ pas le codage par défaut (|utf8| depuis 2018), par exemple |latin9| ou
+ |latin1| ou |applemac|, etc.\\
+ |\usepackage[latin9]{inputenc}|
\item avec LuaLaTeX ou XeLaTeX on peut ajouter |\usepackage{fontspec}| mais
ceci est devenu facultatif avec les formats LaTeX récents (2017).
\end{itemize}
@@ -304,7 +304,7 @@ L’utilisation de fontes de la famille CM/LM n’est pas du tout indispensable,
Il est également possible d’utiliser des fontes PostScript, pour plus de
détails consulter par exemple le chapitre~15 du livre
- \textit{\LaTeX, l’essentiel} de \bsc{D.~Bitouzé} et \bsc{J.-C.~Charpentier}.
+ \textit{LaTeX, l’essentiel} de \bsc{D.~Bitouzé} et \bsc{J.-C.~Charpentier}.
\end{itemize}
\section{Description de la francisation par babel-french}
@@ -549,9 +549,10 @@ Le codage est le suivant :
On obtient de vraies lettres supérieures
\begin{itemize}
\item avec les moteurs LuaTeX et XeTeX, à condition de charger les extensions
- \ext{fontspec} et \ext{realscripts} et d’utiliser une police de type
- OpenType qui connaisse la directive «\code{VerticalPosition=Superior}»
- (polices Linux Libertine O, Iwona, par exemple) ;
+ \ext{fontspec} \emph{et} \ext{realscripts} et d’utiliser une police de type
+ OpenType qui connaisse la directive «sups» (c’est le cas de la plupart
+ d’entre-elles, il est possible de s’en assurer sous linux grâce à la
+ commande |otfinfo -f `kpsewhich nom_police.otf`|) ;
\item sous (pdf)LaTeX avec certaines polices type~1 expertes
(Fourier-Utopia).
\end{itemize}
@@ -986,10 +987,11 @@ La liste étant longue, les options sont regroupées par thèmes.
\code{« guillemets »} (avec espaces à l’intérieur) pour obtenir «guillemets»
avec les espaces insécables adéquates en français. En revanche, si on active
cette option,
- \emph{il ne faut pas coder explicitement les espaces insécables} :
- \code{«}|~|\code{guillemets}|~|\code{»}
- produirait «~guillemets~» où l’espace qui suit le guillemet ouvrant est
- trop large.
+ \emph{il ne faut pas coder explicitement les espaces insécables}%
+ \footnote{Sauf avec le moteur LuaTeX qui permet de parer à cette
+ éventualité !}:
+ \code{«}|~|\code{guillemets}|~|\code{»} produirait avec pdfLaTeX ou XeLaTeX
+ une espace trop large après le guillemet ouvrant.
Les espaces insécables ne sont ajoutées que lorsque la langue
courante est le français : en allemand, le codage \code{(»Auf Deutsch«)}
@@ -1552,6 +1554,18 @@ La commande |\bname{}| (voir section~\pageref{bname}) a été ajoutée en
version~3.5n, la documentation concernant la commande |\bsc{}| a été revue
comme celle concernant la saisie des guillemets.
+À partir de la version 3.5o :
+\begin{itemize}
+\item Le codage (déconseillé) |«~abc~»| ne produit plus d’espace parasite
+ \emph{avec Lua(La)TeX}, ceci répond à la demande formulée
+ \href{https://tex.stackexchange.com/questions/661377/}{ici}.
+\item Les commandes |\shorthandoff{}| et |\shorthandon{}| affichent maintenant
+ le message standard de \pkg{babel} lorsqu’elles sont exécutées (à tort) sous
+ LuaTeX ou XeTeX. Leur redéfinition, qui permettait de conseiller
+ |\NoAutoSpacing| à la place, a été supprimée à la demande de Javier Bezos,
+ car elle cassait la variante |\shorthandoff*{}|.
+\end{itemize}
+
\subsection{Changements entre les versions 3.4d et 3.3d}
\label{ssec:changes-3.4}
@@ -1980,7 +1994,7 @@ La solution \biblatex/\biber{} présente des nombreux avantages par rapport
\end{itemize}
Pour la mise en œuvre pratique de \biblatex/\biber{}, consulter le manuel
-\textit{\LaTeX, l’essentiel} de \bsc{D.~Bitouzé} et \bsc{J.-C.~Charpentier} ou
+\textit{LaTeX, l’essentiel} de \bsc{D.~Bitouzé} et \bsc{J.-C.~Charpentier} ou
la documentation en anglais \file{biblatex.pdf}.
\section[Compatibilité avec e-french]
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.dtx b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
index fec387a0d4..11036d0c9c 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.dtx
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
@@ -1,5 +1,3 @@
-%\CheckSum{3741}
-%
%\iffalse
% Tell the LaTeX system who we are and write an entry on the
% transcript.
@@ -13,7 +11,7 @@
%<frenchb>\ProvidesLanguage{frenchb}
%<lua>--[[
%<lua> File `frenchb.lua’ generated from frenchb.dtx
- [2022/04/18 v3.5n French support from the babel system]
+ [2022/11/11 v3.5o French support from the babel system]
%<*internal>
\iffalse
%</internal>
@@ -79,7 +77,7 @@
\newcommand*\env[1]{\texttt{#1}}
\newcommand*\exe[1]{\texttt{#1}}
\newcommand*\fbo[1]{\texttt{\ColorArg #1}}
-\newcommand*\fbsetup[1]{\cs{frenchsetup\{\fbo{#1}\}}}
+\newcommand*\fbsetup[1]{\cs{frenchsetup}\{\fbo{#1}\}}
\renewcommand\meta[1]{\textit{<#1>}} % no math mode (see doc.sty)
\let\Module\meta % no math mode (see doc.sty)
\renewcommand*\descriptionlabel[1]{%
@@ -357,7 +355,7 @@
% \label{sssec-frenchbsetup}
%
% \vspace{.5\baselineskip}
-% |\frenchsetup{}| and |\frenchbsetup{}| are synonymous;
+% |\frenchbsetup{}| and |\frenchsetup{}| are synonymous;
% the latter should be preferred as the language name for
% French in \babel{} is no longer |frenchb| but |french|.
%
@@ -587,12 +585,15 @@
% 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}
-% \texttt{« guillemets »} or \texttt{«guillemets»} (with or
-% without spaces) to get properly typeset French quotes.
-% This option works with LuaLaTeX and XeLaTeX; with pdfLaTeX it
-% requires \file{inputenc} to be loaded with a proper encoding:
-% 8-bits encoding (latin1, latin9, ansinew, applemac,…) or
-% multi-byte encoding (utf8, utf8x).
+% \texttt{« guillemets »} or \texttt{«guillemets»}%
+% \footnote{Or even
+% \texttt{«\textasciitilde{}guillemets\textasciitilde{}»},
+% but \emph{only} with LuaLaTeX.}
+% (with or without spaces) to get properly typeset French quotes.
+% This option works with LuaLaTeX, XeLaTeX and with pdfLaTeX
+% (default encoding: utf8); with pdflatex other 8-bits encodings
+% (latin1, latin9, ansinew, applemac,…) are also supported
+% when properly declared with \file{inputenc}.
%
% \item [INGuillSpace=true (false)] resets the dimensions of spaces
% after opening French quotes and before closing French quotes to
@@ -777,6 +778,7 @@
% this kind of mismatch.
% \end{itemize}
%
+% \newpage
% \subsection{Changes}
% \label{ssec-changes}
%
@@ -918,9 +920,8 @@
% The best way to go is to upgrade to TL2016 or equivalent asap.
% Xe(La)TeX and pdf(La)TeX users can safely use \frenchb{} v.~3.2b
% and later on older installations too.
-% \enlargethispage*{.5\baselineskip}
%
-% Tne internals of commands |\NoAutoSpacing|, |\ttfamilyFB|,
+% The internals of commands |\NoAutoSpacing|, |\ttfamilyFB|,
% |\rmfamilyFB| and |\sffamilyFB| have been completely redesigned
% in version~3.2c, they behave now consistently with all engines.
%
@@ -1526,18 +1527,13 @@
% |\sffamilyFB|. These four commands will now behave the same with
% any engine (up to version 3.2b, results were engine dependent).
% \begin{macrocode}
-\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
+ \newcommand*{\FB@spacing@on}{\FB@spacing=1 \relax}
+ \newcommand*{\FB@spacing@off}{\FB@spacing=0 \relax}
+\else
+ \newcommand*{\FB@spacing@on}{\FB@spacingtrue}
+ \newcommand*{\FB@spacing@off}{\FB@spacingfalse}
+\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1674,7 +1670,7 @@
%</french>
% \end{macrocode}
%
-% \begin{macro}{frenchb.lua}
+% \begin{environment}{frenchb.lua}
% This is \file{frenchb.lua}. It holds Lua code to deal with `high
% punctuation’ and quotes. This code is based on suggestions from
% Paul Isambert.
@@ -2111,8 +2107,11 @@ local function french_punctuation (head)
% (i.e. in « \cs{texttt}\{a\} »).}
%
% \changes{v3.1g}{2015/06/26}{Flag addgl set to false for
-% `«’ at the end of an \cs{hbox} or a paragraph or when followed by
-% a null glue (i.e. springs).}
+% `«’ at the end of an \cs{hbox} or a paragraph or when followed by
+% a null glue (i.e. springs).}
+%
+% \changes{v3.5o}{2022/10/11}{Opening guill.: look ahead when next is
+% a penalty (nobreak space).}
%
% \begin{macrocode}
elseif SIG then
@@ -2121,13 +2120,30 @@ local function french_punctuation (head)
if next then
next_id = next.id
next_subtype = next.subtype
- if next_id == GLYPH then
- next_char = next.char
% \end{macrocode}
-% A |kern0| might hide a |glue|, so look ahead if |next| is a kern
-% (this occurs with |« \texttt{a} »|):
+% In case of coding |«~| remove the penalty and the glue:
+% \begin{macrocode}
+ if next_id == PENALTY then
+ nextnext = next.next
+ if nextnext and nextnext.id == GLUE then
+ head = remove_node(head,nextnext,true)
+ head = remove_node(head,next,true)
+ next = item.next
+ if next then
+ next_id = next.id
+ next_subtype = next.subtype
+ if next_id == GLYPH then
+ next_char = next.char
+ end
+ end
+ end
+ end
+% \end{macrocode}
+% A |kern0| might hide a |penalty| and/or |glue|, so look ahead if
+% |next| is a kern (this occurs with |« \texttt{a} »| and
+% |«~\texttt{a}~»|):
% \begin{macrocode}
- elseif next_id == KERN then
+ if next_id == KERN then
kern_wd = next.kern
if kern_wd == 0 then
nextnext = next.next
@@ -2135,17 +2151,32 @@ local function french_punctuation (head)
next = nextnext
next_id = nextnext.id
next_subtype = nextnext.subtype
- if next_id == GLYPH then
- next_char = nextnext.char
+ if next_id == PENALTY then
+ nextnext = next.next
+ if nextnext and nextnext.id == GLUE then
+ head = remove_node(head,next,true)
+ head = remove_node(head,nextnext,true)
+ next = item.next
+ if next then
+ next_id = next.id
+ next_subtype = next.subtype
+ end
+ end
end
end
end
end
+ if next_id == GLYPH then
+ next_char = next.char
+ end
end
local is_glue = next_id == GLUE
if is_glue then
glue_wd = next.width
end
+% \end{macrocode}
+% The |addgl| flag only depends on |next_char| and |is_glue|:
+% \begin{macrocode}
local addgl = (next_char and not FB_guil_null[next_char])
or (next and not next_char)
% \end{macrocode}
@@ -2188,41 +2219,7 @@ end
return french_punctuation
%</lua>
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\FB@luatex@punct@french}
-% As a language tag is part of glyph nodes in LuaTeX, no more
-% switching has to be done in |\extrasfrench|, setting the dialect
-% attribute has already be done (see above, p.~\pageref{extrapunct}).
-% We will just redefine |\shorthandoff| and |\shorthandon| in French
-% to issue a warning reminding the user that active characters are no
-% longer used in French with recent LuaTeX engines.
-%
-% \changes{v3.1l}{2016/02/07}{Use \cs{babel@save} to save and restore
-% \cs{shorthandon} and \cs{shorthandoff}.}
-%
-% \begin{macrocode}
-%<*french>
-\ifFB@luatex@punct
- \newcommand*{\FB@luatex@punct@french}{%
- \babel@save\shorthandon
- \babel@save\shorthandoff
- \def\shorthandoff##1{%
- \ifx\PackageWarning\@undefined
- \fb@warning{\noexpand\shorthandoff{;:!?} is helpless with
- LuaTeX,\\ use \noexpand\NoAutoSpacing
- *inside a group* instead.}%
- \else
- \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?}
- is helpless with LuaTeX,\MessageBreak
- use \protect\NoAutoSpacing \space *inside a group*
- instead;\MessageBreak reported}%
- \fi}%
- \def\shorthandon##1{}%
- }
- \addto\extrasfrench{\FB@luatex@punct@french}
-% \end{macrocode}
-% \end{macro}
+% \end{environment}
%
% \changes{v3.0b}{2014/02/13}{frenchb.lua was not found by
% Lua function dofile (not kpathsea aware).
@@ -2232,12 +2229,21 @@ return french_punctuation
% inserted at the end of the `kerning’ callback (no priority)
% instead of `hpack\_filter’ and `pre\_linebreak\_filter’.}
%
+% \changes{v3.5o}{2022/11/03}{\cs{shorthandon} and \cs{shorthandoff}
+% are no longer redefined in LuaTeX (it broke \cs{shorthandoff*}).}
+%
+% As a language tag is part of glyph nodes in LuaTeX, no more
+% switching has to be done in |\extrasfrench|, setting the dialect
+% attribute has already be done (see above, p.~\pageref{extrapunct}).
+%
% The next definition will be used to activate Lua punctuation: it
% loads \file{frenchb.lua} and adds function |french_punctuation|
% to the |kerning| callback; "adding" anything actually disables
% the built-in kerning for Type1 fonts (which is now added to
% |french_punctuation|).
% \begin{macrocode}
+%<*french>
+\ifFB@luatex@punct
\def\activate@luatexpunct{%
\directlua{%
FR_fr = \the\l@french ; FR_ca = \the\l@acadian ;
@@ -2374,8 +2380,7 @@ return french_punctuation
% \begin{macro}{\FB@xetex@punct@french}
% The following command will be executed when entering French, it
% first saves the values to be modified, then fits them to our
-% needs. It also redefines |\shorthandoff| and |\shorthandon|
-% (locally) to avoid error messages with XeTeX-based engines.
+% needs.
%
% \changes{v2.5g}{2011/12/31}{XeTeXcharclass(es) for French quotes will
% be set to \cs{FB@guilo} and \cs{FB@guilf} by options
@@ -2401,25 +2406,14 @@ return french_punctuation
% \changes{v3.2c}{2016/05/14}{Switch \cs{ifFB@spacing} added to all
% \cs{XeTeXinterchartoks} commands.}
%
+%% \changes{v3.5o}{2022/11/03}{\cs{shorthandon} and \cs{shorthandoff}
+% are no longer redefined (it broke \cs{shorthandoff*}).}
+%
% \begin{macrocode}
\newcommand*{\FB@xetex@punct@french}{%
\babel@savevariable{\XeTeXinterchartokenstate}%
- \babel@save{\shorthandon}%
- \babel@save{\shorthandoff}%
\bbl@for\FB@char\FB@charlist
{\FBsavevariable@loop{\XeTeXcharclass}{\FB@char}}%
- \def\shorthandoff##1{%
- \ifx\PackageWarning\@undefined
- \fb@warning{\noexpand\shorthandoff{;:!?} is helpless with
- XeTeX,\\ use \noexpand\NoAutoSpacing
- *inside a group* instead.}%
- \else
- \PackageWarning{french.ldf}{\protect\shorthandoff{;:!?}
- is helpless with XeTeX,\MessageBreak
- use \protect\NoAutoSpacing\space *inside a group*
- instead;\MessageBreak reported}%
- \fi}%
- \def\shorthandon##1{}%
% \end{macrocode}
% Let’s now set the classes and interactions between classes.
% When false, the flag |\ifFB@spacing| switches off any interaction
@@ -5252,7 +5246,7 @@ return french_punctuation
\addtolength{\partopsep}{\@tempdima}%
}
\def\listFB#1#2{\listORI{#1}{\FB@listVsettings #2}}
-\let\endlistFB\endlist
+\let\endlistFB\endlistORI
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5570,6 +5564,9 @@ return french_punctuation
% |\relax|, it will be redefined later `AtBeginDocument’ by
% |\FBprocess@options| as |\update@frenchlists|,
% see p.~\pageref{FB@ufl}.
+%
+% Lists’ layout changes at language switches only if
+% |GlobalLayoutFrench=false|.
% \begin{macrocode}
\def\FB@ufl{\relax}
\def\bbl@frenchlistlayout{%
@@ -5603,8 +5600,9 @@ return french_punctuation
% \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.
+% Indentation changes at language switches in only two cases:\\
+% a) |GlobalLayoutFrench=false|,\\
+% b) |IndentFirst=true| and French isn’t the main language.
%
% \begin{macrocode}
\def\bbl@frenchindent{%
@@ -6028,29 +6026,7 @@ return french_punctuation
% \end{macrocode}
%
% \Finale
-% \iffalse
-%<*!lua>
-% \fi
-%%
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-%%
-% \iffalse
-%</!lua>
-% \fi
+%
\endinput
%%% Local Variables:
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.pdf b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
index 086582ceff..61a6dfd316 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
Binary files differ