summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-french
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-05-27 01:48:03 +0000
committerNorbert Preining <preining@logic.at>2013-05-27 01:48:03 +0000
commit6ad461c26efc18389005855955b2e0da752b6fa0 (patch)
tree66b817c2ce59fca5b548beb0d075ba89574a3949 /Master/texmf-dist/source/generic/babel-french
parent6d9bd3044a54f2f9d503da35e5078e4ebecff6d2 (diff)
babel-french update 5/27
git-svn-id: svn://tug.org/texlive/trunk@30709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/babel-french')
-rw-r--r--Master/texmf-dist/source/generic/babel-french/frenchb.dtx272
-rw-r--r--Master/texmf-dist/source/generic/babel-french/frenchb.ins20
2 files changed, 192 insertions, 100 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
index e510c25a130..6050abb0391 100644
--- a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
+++ b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
@@ -1,8 +1,8 @@
-% \CheckSum{2913}
+% \CheckSum{2958}
%
-% \iffalse
+%\iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
-% transcript. Nothing to write to the .cfg file, if generated.
+% transcript.
%<*dtx>
\ProvidesFile{frenchb.dtx}
%</dtx>
@@ -11,33 +11,33 @@
% no date/version information. The bug with \cs{listfiles}
% (introduced in v.~1.5!), was pointed out by Ulrike Fischer.}
%<code>\ProvidesLanguage{frenchb}
+%\fi
%\ProvidesFile{frenchb.dtx}
-%<*!cfg>
- [2013/03/14 v2.6b French support from the babel system]
-%</!cfg>
-%<*cfg>
-%% frenchb.cfg: configuration file for frenchb.ldf
-%% Daniel Flipo daniel.flipo at free.fr
-%</cfg>
+ [2013/05/20 v2.6c French support from the babel system]
+%\iffalse
+%<*dtx>
+%%
%% File `frenchb.dtx'
+%</dtx>
+%<*code>
+%%
+%% File `frenchb.ldf'
+%</code>
+%<*dtx|code>
%% Babel package for LaTeX version 2e
%% Copyright (C) 1989 - 2013
-%% by Daniel Flipo, GUTenberg
-%
-%<*!cfg>
-%% Frenchb language Definition File
-%% Copyright (C) 1989 - 2013
-%% by Daniel Flipo, GUTenberg
-%
-%% Please report errors to: Daniel Flipo, GUTenberg
-%% daniel.flipo at free.fr
-%</!cfg>
-%
-% This file is part of the babel system, it provides the source
-% code for the French language definition file.
-%
+%% by Daniel Flipo <daniel.flipo at free.fr>
+%%
+%</dtx|code>
+%<*dtx>
+%% This file is part of the babel system, it provides the source
+%% code for the French language definition file.
+%%
+%</dtx>
%<*filedriver>
\documentclass[a4paper]{ltxdoc}
+\usepackage{url}
+\usepackage[colorlinks,urlcolor=blue]{hyperref}
\DeclareFontEncoding{T1}{}{}
\DeclareFontSubstitution{T1}{lmr}{m}{n}
\DeclareTextCommand{\guillemotleft}{OT1}{%
@@ -58,12 +58,12 @@
Daniel \textsc{Flipo}\\
\texttt{daniel.flipo@free.fr}
\end{center}
+ \GetFileInfo{frenchb.dtx}
\RecordChanges
\DocInput{frenchb.dtx}
\end{document}
%</filedriver>
-% \fi
-% \GetFileInfo{frenchb.dtx}
+%\fi
%
% \section{The French language}
%
@@ -90,7 +90,7 @@
% subsection~\ref{ssec-changes} p.~\pageref{ssec-changes}.
%
% An extensive documentation is available in French here:\\
-% |http://daniel.flipo.free.fr/frenchb|
+% \url{http://daniel.flipo.free.fr/frenchb}
%
% \subsection{Basic interface}
%
@@ -143,7 +143,11 @@
% outside French.} for correct spacing in French;
% \item |\today| prints the date in French;
% \item the caption names are translated into French
-% (\LaTeX{} only);
+% (\LaTeX{} only). The separator following the table or
+% figure number in captions is printed as ` -- ' in French
+% instead of `: ', this setting can be changed by redefining
+% |\CaptionSeparator| for French and |\CaptionSeparatorORI|
+% for other languages.
% \item the space after |\dots| is removed in French.
% \end{enumerate}
%
@@ -211,12 +215,13 @@
% \label{ssec-custom}
%
% Up to version 1.6, customisation of |frenchb| was achieved
-% by entering commands in \file{frenchb.cfg}. This possibility
-% remains for compatibility, but \emph{should not longer be used}.
-% Version 2.0 introduces a new command |\frenchbsetup{}| using
+% by entering commands in \file{frenchb.cfg}.
+% Version 2.0 introduced a new command |\frenchbsetup{}| using
% the \file{keyval} syntax which should make it easier to choose
% among the many options available. The command |\frenchbsetup{}|
% is to appear in the preamble only (after loading \babel).
+% Usage of a \file{frenchb.cfg} file for customisation \emph{should
+% definitely be avoided}.
%
% \vspace{.5\baselineskip}
% |\frenchbsetup{ShowOptions}| prints all available options to
@@ -263,14 +268,15 @@
% (kept only for backward compatibility).
% \item |StandardItemizeEnv=true [false*]|; |frenchb| redefines
% the |itemize| environment to suppress any vertical space
-% between items of |itemize| lists in French and customize
+% between items of |itemize| lists in French and customise
% leftmargins. Setting this option to |false| reverts to the
% standard definition of |itemize|.
% \item |StandardEnumerateEnv=true [false*]|; starting with
-% version~2.6a |frenchb| redefines the |enumerate| environment
-% to make leftmargins match those of the French version of
-% |itemize| lists. Setting this option to |false| reverts to
-% the standard definition of |enumerate|.
+% version~2.6 |frenchb| redefines the |enumerate| and
+% |description| environments to make leftmargins match those of
+% the French version of |itemize| lists. Setting this option to
+% |false| reverts to the standard definition of |enumerate| and
+% |description|.
% \item |StandardItemLabels=true [false*]| when set to |true| this
% option stops |frenchb| from changing the labels in |itemize|
% lists in French.
@@ -440,7 +446,7 @@
% good 8-bits fonts are available now, so T1 encoding should
% be preferred for typesetting in French). A warning is issued
% when OT1 encoding is in use at the |\begin{document}|.
-% \item Customisation should now be handled by command
+% \item Customisation should now be handled only by command
% |\frenchbsetup{}|, \file{frenchb.cfg} (kept for compatibility)
% should no longer be used. See section~\ref{ssec-custom} for
% the list of available options.
@@ -550,39 +556,27 @@
% \subsubsection*{What's new in version 2.6?}
%
% The way |frenchb| handles list environments has been completely
-% redesigned in version~2.6a due to a long standing bug affecting
+% redesigned in version~2.6 due to a long standing bug affecting
% enumerate lists inside itemize lists. Horizontal indentation of
-% itemize and enumerate lists differs now from previous versions,
-% an option for backward compatibility is provided:
-% |\frenchbsetup{ListOldLayout}|.
+% itemize, enumerate and description lists differs now from
+% previous versions, an option for backward compatibility is
+% provided: |\frenchbsetup{ListOldLayout}|.
%
% |frenchb| is now compatible with the \file{paralist} package.
%
+% Regarding the layout of figures' and tables' captions, version
+% 2.6c is now fully compatible with AMS and koma-script classes
+% and with \file{caption} and \file{floatrow} packages.
+% Starting with version 2.6c, the \file{frenchb.cfg} file is no
+% longer generated from \file{frenchb.dtx}, but it is still loaded
+% (if found) for backward compatibility.
+%
% \StopEventually{}
%
-% \subsection{File frenchb.cfg}
-% \label{sec-cfg}
+% \changes{v2.6c}{2013/05/20}{Dummy file frenchb.cfg is no longer
+% generated from frenchb.dtx.}
%
-% \file{frenchb.cfg} is now a dummy file just kept for compatibility
-% with previous versions.
-%
-% \iffalse
-%<*cfg>
-% \fi
-% \begin{macrocode}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%% WARNING: THIS FILE SHOULD NO LONGER BE USED %%%%%%%%%
-%% If you want to customise frenchb, please DO NOT hack into the code!
-%% Do no put any code in this file either, please use the new command
-%% \frenchbsetup{} with the proper options to customise frenchb.
-%%
-%% Add \frenchbsetup{ShowOptions} to your preamble to see the list of
-%% available options and/or read the documentation.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \end{macrocode}
-% \iffalse
-%</cfg>
-% \fi
+% \section{The code}
%
% \subsection{Initial setup}
%
@@ -1982,10 +1976,22 @@
}{}
% \end{macrocode}
%
+% \changes{v2.4a}{2009/11/23}{\cs{PackageWarning} changed to
+% \cs{FBWarning} (in case \cs{@makecaption} has been customised).
+% \cs{FBWarning} is defined as \cs{PackageWarning} by default but
+% can be made silent using \cs{frenchbsetup}, (suggested by MPG).}
+%
+% \changes{v2.6c}{2013/05/18}{Former \cs{CaptionSeparator}
+% has been renamed as \cs{FBCaption@Separator};
+% \cs{CaptionSeparator} and \cs{CaptionSeparatorORI} are available
+% for customisation. Newif \cs{if@FBwarning@capsep} added.}
+%
% \begin{macro}{\CaptionSeparator}
+% \begin{macro}{\CaptionSeparatorORI}
% Let's consider now captions in figures and tables.
% In French, captions in figures and tables should be printed with
-% endash (`--') instead of the standard `:'.
+% the number followed by endash (` -- '), never as `Figure 1:' which
+% is the default in standard \LaTeXe{} classes.
%
% The standard definition of |\@makecaption| (e.g., the one provided
% in article.cls, report.cls, book.cls which is frozen for \LaTeXe{}
@@ -1995,51 +2001,124 @@
% its current definition (some classes like koma-script classes,
% AMS classes, ua-thesis.cls\dots change it).
% If they are identical, |frenchb| just adds a hook called
-% |\CaptionSeparator| to |\@makecaption|, |\CaptionSeparator|
-% defaults to `: ' as in the standard |\@makecaption|, and will be
-% changed to ` -- ' in French.
-% If the definitions differ, |frenchb| doesn't overwrite the changes,
-% but prints a message in the .log file.
+% |\FBCaption@Separator| to |\@makecaption|; |\FBCaption@Separator|
+% defaults to |\CaptionSeparatorORI| (`: ') as in the standard
+% |\@makecaption|, and will be changed to |\CaptionSeparator|
+% (` -- ') in French.
%
-% \changes{v2.4a}{2009/11/23}{\cs{PackageWarning} changed to
-% \cs{FBWarning} (in case \cs{@makecaption} has been customized).
-% \cs{FBWarning} is defined as \cs{PackageWarning} by default but
-% can be made silent using \cs{frenchbsetup}, (suggested by MPG).}
+% The \file{caption} and \file{floatrow} packages are compatible
+% with |frenchb| if they are loaded after babel (a warning is
+% printed in the .log file when they are loaded too early).
+%
+% No warning is issued for AMS classes as their layout of captions
+% is compatible with French typographic standards.
+%
+% With koma-script classes, frenchb customises |\captionformat| in
+% French and issues no warning.
+%
+% When |\@makecaption| has been changed by another class
+% or package, a warning is printed in the .log file.
%
% \begin{macrocode}
+\newif\if@FBwarning@capsep
+\@FBwarning@capseptrue
\newcommand{\FBWarning}[2]{\PackageWarning{#1}{#2}}
-\def\CaptionSeparator{\string:\space}
+\newcommand*{\CaptionSeparatorORI}{\string:\space}
+\newcommand*{\CaptionSeparator}{\space\textendash\space}
+\def\FBCaption@Separator{\CaptionSeparatorORI}
\long\def\FB@makecaption#1#2{%
\vskip\abovecaptionskip
- \sbox\@tempboxa{#1\CaptionSeparator #2}%
+ \sbox\@tempboxa{#1\FBCaption@Separator #2}%
\ifdim \wd\@tempboxa >\hsize
- #1\CaptionSeparator #2\par
+ #1\FBCaption@Separator #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v2.6c}{2013/05/18}{No warning about \cs{@makecaption} for
+% AMS classes.}
+%
+% Disable the standard warning with AMS classes.
+% \begin{macrocode}
+\@ifclassloaded{amsart}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{amsbook}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{amsdtx}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{amsldoc}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{amproc}{\@FBwarning@capsepfalse}{}
+% \end{macrocode}
+%
+% \changes{v2.6c}{2013/05/18}{No warning about \cs{@makecaption} for
+% koma-script classes. \cs{captionformat} customised in French.}
+%
+% No warning with koma-script classes: they change |\makecaption|
+% but we will manage to customise |\captionformat| in French later
+% on (see below after executing |\FBprocess@options|).
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{captionformat}%
+ {\let\captionformat\undefined}%
+ {\@FBwarning@capsepfalse}%
+}
+% \end{macrocode}
+%
+% \changes{v2.6c}{2013/05/18}{Warning added when the caption
+% or floatrow package is loaded before babel/frenchb.}
+%
+% Check if package \file{caption} is loaded now (before
+% babel/frenchb), then issue a warning advising to load it
+% after babel/frenchb and disable the standard warning.
+% \begin{macrocode}
+\@ifpackageloaded{caption}
+ {\FBWarning{frenchb.ldf}%
+ {Please load the "caption" package\MessageBreak
+ AFTER babel/frenchb; reported}%
+ \@FBwarning@capsepfalse}%
+ {}
+% \end{macrocode}
+%
+% Same for package \file{floatrow}.
+% \begin{macrocode}
+\@ifpackageloaded{floatrow}
+ {\FBWarning{frenchb.ldf}%
+ {Please load the "floatrow" package\MessageBreak
+ AFTER babel/frenchb; reported}%
+ \@FBwarning@capsepfalse}%
+ {}
+% \end{macrocode}
+%
+% Check the definition of |\@makecaption|, change it or issue a
+% warning in case it has been changed by a class or package not
+% (yet) compatible with |frenchb|.
+% \begin{macrocode}
\AtBeginDocument{%
\ifx\@makecaption\STD@makecaption
\global\let\@makecaption\FB@makecaption
- \else
- \@ifundefined{@makecaption}%
- {\let\@makecaption\undefined}%
- {\FBWarning{frenchb.ldf}%
- {The definition of \protect\@makecaption\space
- has been changed,\MessageBreak
- frenchb will NOT customise it;\MessageBreak reported}%
- }%
+ \@FBwarning@capsepfalse
+ \fi
+ \if@FBwarning@capsep
+ \FBWarning{frenchb.ldf}%
+ {The definition of \protect\@makecaption\space
+ has been changed,\MessageBreak
+ frenchb will NOT customise it;\MessageBreak reported}%
\fi
\let\FB@makecaption\relax
\let\STD@makecaption\relax
}
+% \end{macrocode}
+% |\FB@makecaption| uses |\CaptionSeparator| (default ` -- ') in
+% French, |\CaptionSeparatorORI| (default `: ') for other
+% languages.
+% \begin{macrocode}
\addto\extrasfrench{%
- \def\CaptionSeparator{\space\textendash\space}}
+ \def\FBCaption@Separator{\CaptionSeparator}}
\addto\noextrasfrench{%
- \def\CaptionSeparator{\string:\space}}
+ \def\FBCaption@Separator{\CaptionSeparatorORI}}
% \end{macrocode}
-% \end{macro}
%
% \subsection{French lists}
% \label{sec-lists}
@@ -3471,6 +3550,11 @@
% So we have to define |\bbl@nonfrenchspacing| as |\relax| here
% and restore it's meaning afterwards.
%
+% It is also the right time, when a koma-script class is in use, to
+% save the value of |\captionformat| in |\CaptionSeparatorORI}| and
+% to add the redefinitions of |\captionformat| to
+% |\(no)extrasfrench|.
+%
% \changes{v2.5a}{2010/08/15}{Define \cs{bbl@nonfrenchspacing} locally
% as \cs{relax}, otherwise the \cs{bbl@frenchspacing} command
% included in germanb.ldf is overwritten here by
@@ -3484,10 +3568,22 @@
% In this case \cs{l@french} and \cs{l@english} are 0.
% Pointed out by G\"unter Milde.}
%
+% \changes{v2.6c}{2013/05/18}{With koma-script classes, save the value
+% of \cs{captionformat} in \cs{CaptionSeparatorORI} NOW, then add
+% the redefinitions of \cs{captionformat} to \cs{(no)extrasfrench}.}
+%
% \begin{macrocode}
\FBprocess@options
\let\bbl@nonfrenchspacingORI\bbl@nonfrenchspacing
\let\bbl@nonfrenchspacing\relax
+ \@ifundefined{captionformat}%
+ {\let\captionformat\undefined}%
+ {\let\CaptionSeparatorORI\captionformat
+ \addto\extrasfrench{%
+ \renewcommand*{\captionformat}{\CaptionSeparator}}%
+ \addto\noextrasfrench{%
+ \renewcommand*{\captionformat}{\CaptionSeparatorORI}}%
+ }%
\ifx\bbl@main@language\FB@french
\extrasfrench\captionsfrench
\else
@@ -3525,7 +3621,7 @@
%
% \subsection{Clean up and exit}
%
-% Load |frenchb.cfg| (should do nothing, just for compatibility).
+% Load |frenchb.cfg| (kept just for backward compatibility).
% \begin{macrocode}
\loadlocalcfg{frenchb}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.ins b/Master/texmf-dist/source/generic/babel-french/frenchb.ins
index d6ffaa5abcd..51b58f2e9a4 100644
--- a/Master/texmf-dist/source/generic/babel-french/frenchb.ins
+++ b/Master/texmf-dist/source/generic/babel-french/frenchb.ins
@@ -10,11 +10,11 @@
%%
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
-%% Either version 1.2 or, at your option, any later version.
+%% Either version 1.3 or, at your option, any later version.
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2013/03/22}
+\def\filedate{2013/05/19}
\def\batchfile{frenchb.ins}
\input docstrip.tex
@@ -22,7 +22,7 @@
\Msg{**********************************************}
\Msg{*}
\Msg{* This installation requires docstrip}
-\Msg{* version 2.3c or later.}
+\Msg{* version 2.4e or later.}
\Msg{*}
\Msg{* An older version of docstrip has been input}
\Msg{*}
@@ -86,26 +86,22 @@ of this file under its original name.
\keepsilent
-\usedir{tex/generic/babel}
+\usedir{tex/generic/babel-french}
\usepreamble\mainpreamble
\generate{\file{frenchb.ldf}{\from{frenchb.dtx}{code}}
}
-\nopreamble
-\nopostamble
-\generate{\file{frenchb.cfg}{\from{frenchb.dtx}{cfg}}
- }
\ifToplevel{
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
-\Msg{* files into a directory searched by TeX:}
+\Msg{* file into a directory searched by TeX:}
\Msg{*}
-\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty}
+\Msg{* \space\space frenchb.ldf}
\Msg{*}
-\Msg{* To produce the documentation run the files ending with}
-\Msg{* '.dtx' and `.fdd' through LaTeX.}
+\Msg{* To produce the documentation run the file frenchb.dtx}
+\Msg{* through pdfLaTeX.}
\Msg{*}
\Msg{* Happy TeXing}
\Msg{***********************************************************}