summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-01 15:38:05 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-01 15:38:05 +0000
commit48e2b240973977c208bc840b589b75b91a6f4c30 (patch)
treea6b6d259215fb70e4e3a7d35407f2838acafc921 /Master/texmf-dist/source/generic/babel
parente9926b95c40eff33cfb6906adf9fcd75f197d1d7 (diff)
babel update 01Jul08
git-svn-id: svn://tug.org/texlive/trunk@9141 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/babel')
-rw-r--r--Master/texmf-dist/source/generic/babel/frenchb.dtx835
-rw-r--r--Master/texmf-dist/source/generic/babel/germanb.dtx7
-rw-r--r--Master/texmf-dist/source/generic/babel/spanish.dtx48
3 files changed, 632 insertions, 258 deletions
diff --git a/Master/texmf-dist/source/generic/babel/frenchb.dtx b/Master/texmf-dist/source/generic/babel/frenchb.dtx
index 803f3dcd3df..f58deb29aae 100644
--- a/Master/texmf-dist/source/generic/babel/frenchb.dtx
+++ b/Master/texmf-dist/source/generic/babel/frenchb.dtx
@@ -26,7 +26,7 @@
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{1809}
+% \CheckSum{2047}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -34,10 +34,14 @@
%<*dtx>
\ProvidesFile{frenchb.dtx}
%</dtx>
-%<code>\ProvidesLanguage{french}
+% \changes{v2.1d}{2008/05/04}{Argument of \cs{ProvidesLanguage} changed
+% from `french' to `frenchb', otherwise \cs{listfiles} prints
+% no date/version information. The bug with \cs{listfiles}
+% (introduced in v.1.5!), was pointed out by Ulrike Fischer.}
+%<code>\ProvidesLanguage{frenchb}
%\ProvidesFile{frenchb.dtx}
%<*!cfg>
- [2007/10/05 v2.0e French support from the babel system]
+ [2008/05/08 v2.2a French support from the babel system]
%</!cfg>
%<*cfg>
%% frenchb.cfg: configuration file for frenchb.ldf
@@ -45,12 +49,12 @@
%</cfg>
%% File `frenchb.dtx'
%% Babel package for LaTeX version 2e
-%% Copyright (C) 1989 - 2007
+%% Copyright (C) 1989 - 2008
%% by Johannes Braams, TeXniek
%
%<*!cfg>
%% Frenchb language Definition File
-%% Copyright (C) 1989 - 2007
+%% Copyright (C) 1989 - 2008
%% by Johannes Braams, TeXniek
%% Daniel Flipo, GUTenberg
%
@@ -76,16 +80,17 @@
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
\begin{document}
-\parindent = 0pt
+\setlength{\parindent}{0pt}
\begin{center}
\textbf{\Large A Babel language definition file for French}\\[3mm]^^A\]
Daniel \textsc{Flipo}\\
\texttt{Daniel.Flipo@univ-lille1.fr}
\end{center}
+ \RecordChanges
\DocInput{frenchb.dtx}
\end{document}
%</filedriver>
-%\fi
+% \fi
% \GetFileInfo{frenchb.dtx}
%
% \section{The French language}
@@ -107,9 +112,9 @@
% people, mainly from Jacques Andr\'e, Michel Bovani, Thierry Bouche,
% and Vincent Jalby. Thanks to all of them!
%
-% This new version (2.0) has been designed to be used with \LaTeXe{}
+% This new version (2.x) has been designed to be used with \LaTeXe{}
% and Plain\TeX{} formats only. \LaTeX-2.09 is no longer supported.
-% Changes between version 1.6 and 2.0 are listed in
+% Changes between version 1.6 and \fileversion{} are listed in
% subsection~\ref{ssec-changes} p.~\pageref{ssec-changes}.
%
% An extensive documentation is available in French here:\\
@@ -117,29 +122,55 @@
%
% \subsection{Basic interface}
%
-% The command |\selectlanguage{french}| switches to the French
-% language%
-% \footnote{\texttt{\textbackslash selectlanguage\{francais\}}
-% and \texttt{\textbackslash selectlanguage\{frenchb\}} are kept
-% for backward compatibility but should no longer be used.},
-% with the following effects:
+% In a multilingual document, some typographic rules are language
+% dependent, i.e. spaces before `double punctuation' (|:| |;| |!|
+% |?|) in French, others concern the general layout (i.e. layout of
+% lists, footnotes, indentation of first paragraphs of sections) and
+% should apply to the whole document.
+%
+% Starting with version~2.2, |frenchb| behaves differently according
+% to \babel's \emph{main language} defined as the \emph{last}
+% option\footnote{Its name is kept in \texttt{\textbackslash
+% bbl@main@language}.} at \babel's loading. When French is
+% not \babel's main language, |frenchb| no longer alters the global
+% layout of the document (even in parts where French is the current
+% language): the layout of lists, footnotes, indentation of first
+% paragraphs of sections are not customised by |frenchb|.
+%
+% When French is loaded as the last option of \babel, |frenchb|
+% makes the following changes to the global layout, \emph{both in
+% French and in all other languages}\footnote{%
+% For each item, hooks are provided to reset standard
+% \LaTeX{} settings or to emulate the behavior of former versions
+% of \texttt{frenchb} (see command
+% \texttt{\textbackslash frenchbsetup\{\}},
+% section~\ref{ssec-custom}).}:
% \begin{enumerate}
-% \item French hyphenation patterns are made active;
-% \item `double punctuation' (|:| |;| |!| |?|) is made active for
-% correct spacing in French;
-% \item |\today| prints the date in French;
-% \item the caption names are translated into French
+% \item the first paragraph of each section is indented
% (\LaTeX{} only);
% \item the default items in itemize environment are set to `--'
% instead of `\textbullet', and all vertical spacing and glue
-% is deleted, hooks to reset standard \LaTeX{} settings
-% are provided (see |\frenchbsetup{}|);
-% it is possible to change `--' to something else (`---'
-% for instance) using |\frenchbsetup{}|;
+% is deleted; it is possible to change `--' to something else
+% (`---' for instance) using |\frenchbsetup{}|;
% \item vertical spacing in general \LaTeX{} lists is
-% shortened, a hook to reset standard \LaTeX{} settings
-% is provided (see |\frenchbsetup{}|);
-% \item the first paragraph of each section is indented
+% shortened;
+% \item footnotes are displayed ``\`a la fran\c{c}aise''.
+% \end{enumerate}
+%
+% Regarding local typography, the command |\selectlanguage{french}|
+% switches to the French language\footnote{%
+% \texttt{\textbackslash selectlanguage\{francais\}}
+% and \texttt{\textbackslash selectlanguage\{frenchb\}} are kept
+% for backward compatibility but should no longer be used.},
+% with the following effects:
+% \begin{enumerate}
+% \item French hyphenation patterns are made active;
+% \item `double punctuation' (|:| |;| |!| |?|) is made
+% active%\footnote{Actually, they are active in the whole
+% document, only their expansions differ in French and
+% outside French} for correct spacing in French;
+% \item |\today| prints the date in French;
+% \item the caption names are translated into French
% (\LaTeX{} only);
% \item the space after |\dots| is removed in French.
% \end{enumerate}
@@ -151,7 +182,7 @@
% |\og| and |\fg| which work in \LaTeXe and Plain\TeX,
% their appearance depending on what is available to draw
% them; even if you use \LaTeXe{} \emph{and} |T1|-encoding,
-% you should refrain from entering them as
+% you should refrain from entering them as
% |<<~French quotation marks~>>|: |\og| and |\fg| provide
% better horizontal spacing.
% |\og| and |\fg| can be used outside French, they typeset
@@ -168,9 +199,13 @@
% (such as Dupont-Durant) may now be hyphenated on explicit
% hyphens, this differs from |frenchb|~v.1.x.
% \item Commands |\primo|, |\secundo|, |\tertio| and |\quarto|
-% may be used to enumerate in lists.
-% \item Abbreviations for ``Num\'ero'' and ``num\'ero'' are
-% obtained via the commands |\No|, |\no|.
+% print 1\textsuperscript{o}, 2\textsuperscript{o},
+% 3\textsuperscript{o}, 4\textsuperscript{o}.
+% |\FrenchEnumerate{6}| prints 6\textsuperscript{o}.
+% \item Abbreviations for ``Num\'ero(s)'' and ``num\'ero(s)''
+% (N\textsuperscript{o} N\textsuperscript{os}
+% n\textsuperscript{o} and n\textsuperscript{os}~)
+% are obtained via the commands |\No|, |\Nos|, |\no|, |\nos|.
% \item Two commands are provided to typeset the symbol for
% ``degr\'e'': |\degre| prints the raw character and
% |\degres| should be used to typeset temperatures (e.g.,
@@ -219,83 +254,65 @@
% |ShowOptions=true| or just |ShowOptions|, the `|=true|' part
% can be omitted.
%
-% \vspace{.5\baselineskip}
-% The other options are (their default value is shown between
-% brackets):
+% \vspace{.5\baselineskip}
+% The other options are listed below. Their default value is shown
+% between brackets, sometimes followed be a `\texttt{*}'.
+% The `\texttt{*}' means that the default shown applies when
+% |frenchb| is loaded as the \emph{last} option of \babel{}
+% ---\babel's \emph{main language}---, and is toggled otherwise:
% \begin{itemize}
-% \item |StandardLayout=true [false]| forces |frenchb| not to
+% \item |StandardLayout=true [false*]| forces |frenchb| not to
% interfere with the layout: no action on any kind of lists,
% first paragraphs of sections are not indented (as in English),
% no action on footnotes. This option replaces the former
-% command |\StandardLayout|. It can be used either for unifying
-% the layout of a document so that it is no longer language
-% dependent or to avoid conflicts with classes or packages which
-% customise lists or footnotes.
-% \item |GlobalLayoutFrench=true [false]| is also meant for unifying
-% the layout of a document: lists typeset in other languages than
-% French look the same as in French and first paragraphs of
-% sections are all indented. Note that the layout of footnotes is
-% language independent anyway (see below |FrenchFootnotes| and
-% |AutoSpaceFootnotes|). This option replaces the former
-% command |\FrenchLayout|.
-% \item |AutoSpacePunctuation=false [true]|; in French, the user
-% \emph{should} input a space before the four characters `|:;!?|'
-% but as many people forget about it (even among native French
-% writers!), the default behaviour of |frenchb| is to
-% automatically add a |\thinspace| before `|;|' `|!|' `|?|' and a
-% normal (unbreakable) space before~`|:|' (recommended by the
-% French Imprimerie nationale). This is convenient in most cases
-% but can lead to addition of spurious spaces in URLs or in MS-DOS
-% paths. Choosing |AutoSpacePunctuation=false| will ensure that
-% a proper space will be added before `|:;!?|' \emph{if and only
-% if} a (normal) space has been typed in. Those who are unsure
-% about their typing in this area should stick to the default
-% option and type |\string;| |\string:| |\string!| |\string?|
-% instead of |;| |:| |!| |?| whenever no space should be added
-% before them (mostly in URLs and MS-DOS paths).
-% \item |ThinColonSpace=true [false]| changes the normal
-% (unbreakable) space added before the colon `:' to a thin space,
-% 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 |ReduceListSpacing=false [true]|; |frenchb| normally
+% command |\StandardLayout|. It can be used to avoid conflicts
+% with classes or packages which customise lists or footnotes.
+% \item |GlobalLayoutFrench=false [true*]| can be used, when French
+% is the main language, to emulate what prior versions of
+% |frenchb| (pre-2.2) did: lists, and first paragraphs
+% of sections will be displayed the standard way in other
+% languages than French, and ``\`a la fran\c{c}aise'' in French.
+% Note that the layout of footnotes is language independent
+% anyway (see below |FrenchFootnotes| and |AutoSpaceFootnotes|).
+% This option replaces the former command |\FrenchLayout|.
+% \item |ReduceListSpacing=false [true*]|; |frenchb| normally
% reduces the values of the vertical spaces used in the
% environment |list| in French; setting this option to |false|
% reverts to the standard settings of |list|. This option
% replaces the former command |\FrenchListSpacingfalse|.
-% \item |CompactItemize=false [true]|; |frenchb| normally
+% \item |CompactItemize=false [true*]|; |frenchb| normally
% suppresses any vertical space between items of |itemize| lists
% in French; setting this option to |false| reverts to the
% standard settings of |itemize| lists. This option replaces
% the former command |\FrenchItemizeSpacingfalse|.
-% \item |StandardItemLabels=true [false]| when set to |true| this
+% \item |StandardItemLabels=true [false*]| when set to |true| this
% option stops |frenchb| from changing the labels in |itemize|
% lists in French.
% \item |ItemLabels=\textemdash|, |\textbullet|, |\ding{43}|,
-% \dots, |[\textendash]|; when |StandardItemLabels=false| (the
+% \dots, |[\textendash*]|; when |StandardItemLabels=false| (the
% default), this option enables to choose the label used in
% |itemize| lists for all levels. The next three options do
% the same but each one for one level only. Note that the
% example |\ding{43}| requires |\usepackage{pifont}|.
% \item |ItemLabeli=\textemdash|, |\textbullet|, |\ding{43}|,
-% \dots,|[\textendash]|
+% \dots,|[\textendash*]|
% \item |ItemLabelii=\textemdash|, |\textbullet|, |\ding{43}|,
-% \dots, |[\textendash]|
+% \dots, |[\textendash*]|
% \item |ItemLabeliii=\textemdash|, |\textbullet|, |\ding{43}|,
-% \dots, |[\textendash]|
+% \dots, |[\textendash*]|
% \item |ItemLabeliv=\textemdash|, |\textbullet|, |\ding{43}|,
-% \dots, |[\textendash]|
-% \item |StandardLists=true [false]| forbids |frenchb| to
-% customize any kind of list. Do activate the option
+% \dots, |[\textendash*]|
+% \item |StandardLists=true [false*]| forbids |frenchb| to
+% customise any kind of list. Do activate the option
% |StandardLists| when using classes or packages that customise
% lists too (|enumitem|, |paralist|, \dots{}) to avoid conflicts.
% This option is just a shorthand for |ReduceListSpacing=false|
% and |CompactItemize=false| and |StandardItemLabels=true|.
-% \item |IndentFirst=false [true]|; |frenchb| normally forces
-% indentation of the first paragraph of sections (in French only).
+% \item |IndentFirst=false [true*]|; |frenchb| normally forces
+% indentation of the first paragraph of sections.
% When this option is set to |false|, the first paragraph of
% will look the same in French and in English (not indented).
-% \item |FrenchFootnotes=false [true]| reverts to the standard
+% \item |FrenchFootnotes=false [true*]| reverts to the standard
% layout of footnotes. By default |frenchb| typesets leading
% numbers as `1.\hspace{.5em}' instead of `$\hbox{}^1$', but
% has no effect on footnotes numbered with symbols (as in the
@@ -303,10 +320,39 @@
% 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).
+% symbol calling the footnote. Making this option |false|
+% reverts to the standard setting (no space added).
+% \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
+% better looking superscripts.
+% \item |AutoSpacePunctuation=false [true]|; in French, the user
+% \emph{should} input a space before the four characters `|:;!?|'
+% but as many people forget about it (even among native French
+% writers!), the default behaviour of |frenchb| is to
+% automatically add a |\thinspace| before `|;|' `|!|' `|?|' and a
+% normal (unbreakable) space before~`|:|' (recommended by the
+% French Imprimerie nationale). This is convenient in most cases
+% but can lead to addition of spurious spaces in URLs or in MS-DOS
+% paths. Choosing |AutoSpacePunctuation=false| will ensure that
+% a proper space will be added before `|:;!?|' \emph{if and only
+% if} a (normal) space has been typed in. Those who are unsure
+% about their typing in this area should stick to the default
+% option and type |\string;| |\string:| |\string!| |\string?|
+% instead of |;| |:| |!| |?| whenever no space should be added
+% before them (mostly in URLs and MS-DOS paths).
+% \item |ThinColonSpace=true [false]| changes the normal
+% (unbreakable) space added before the colon `:' to a thin space,
+% 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|
+% inhibits the uppercasing of superscripts (for instance when they
+% are moved to page headers). Making this option |false|
+% will disable this behaviour (not recommended).
% \item |PartNameFull=false [true]|; when true, |frenchb| numbers
% the title of |\part{}| commands as ``Premi\`ere partie'',
% ``Deuxi\`eme partie'' and so on. With some classes which change
@@ -430,13 +476,33 @@
% for instance).
% \end{itemize}
%
+% \subsubsection*{What's new in version 2.1?}
+%
+% New command |\fup| to typeset better looking superscripts.
+% Former command |\up| is now defined as |\fup|, but an option
+% |\frenchbsetup{FrenchSuperscripts=false}| is provided for
+% backward compatibility. |\fup| was designed using ideas from
+% Jacques Andr\'e, Thierry Bouche and Ren\'e Fritz, thanks to them!
+%
+% \subsubsection*{What's new in version 2.2?}
+%
+% Starting with version 2.2a, |frenchb| alters the layout of
+% lists, footnotes, and the indentation of first paragraphs of
+% sections) \emph{only if} French is the ``main language''
+% (i.e. babel's last language option). The layout is global for
+% the whole document: lists, etc. look the same in French and in
+% other languages, everything is typeset ``\`a la fran\c caise''
+% if French is the ``main language'', otherwise frenchb doesn't
+% change anything regarding lists, footnotes, and indentation of
+% paragraphs.
+%
% \StopEventually{}
%
% \subsection{File frenchb.cfg}
% \label{sec-cfg}
%
-% \file{frenchb.cfg} is now a dummy file just kept for
-% compatibility with previous versions.
+% \file{frenchb.cfg} is now a dummy file just kept for compatibility
+% with previous versions.
%
% \iffalse
%<*cfg>
@@ -460,33 +526,50 @@
%
% \subsection{Initial setup}
%
-% The macro |\LdfInit| takes care of preventing that this file is
-% loaded more than once, checking the category code of the
-% \texttt{@} sign, etc.
+% \changes{v2.1d}{2008/05/02}{Argument of \cs{ProvidesLanguage} changed
+% above from `french' to `frenchb' (otherwise \cs{listfiles} prints
+% no date/version information). The real name of current language
+% (french) as to be corrected before calling \cs{LdfInit}.}
%
% \iffalse
%<*code>
% \fi
%
+% While this file was read through the option \Lopt{frenchb} we make
+% it behave as if \Lopt{french} was specified.
+% \begin{macrocode}
+\def\CurrentOption{french}
+% \end{macrocode}
+%
+% The macro |\LdfInit| takes care of preventing that this file is
+% loaded more than once, checking the category code of the
+% \texttt{@} sign, etc.
+%
% \begin{macrocode}
\LdfInit\CurrentOption\datefrench
% \end{macrocode}
%
+% \changes{v2.1d}{2008/05/04}{Avoid warning ``\cs{end} occurred
+% when \cs{ifx} ... incomplete'' with LaTeX-2.09.}
+%
% \begin{macro}{\ifLaTeXe}
% No support is provided for late \LaTeX-2.09: issue a warning
% and exit if \LaTeX-2.09 is in use. Plain is still supported.
% \begin{macrocode}
\newif\ifLaTeXe
+\let\bbl@tempa\relax
\ifx\magnification\@undefined
\ifx\@compatibilitytrue\@undefined
- \PackageError{frenchb.ldf}%
+ \PackageError{frenchb.ldf}
{LaTeX-2.09 format is no longer supported.\MessageBreak
- Aborting here.}%
- \endinput
+ Aborting here}
+ {Please upgrade to LaTeX2e!}
+ \let\bbl@tempa\endinput
\else
\LaTeXetrue
\fi
\fi
+\bbl@tempa
% \end{macrocode}
% \end{macro}
%
@@ -516,8 +599,8 @@
% \end{macrocode}
% Now |\l@french| is always defined.
%
-% The internal name for the French language will be `french';
-% `francais' and `frenchb' will be synonymous for `french':
+% The internal name for the French language is |french|;
+% |francais| and |frenchb| are synonymous for |french|:
% first let both names use the same hyphenation patterns.
% Later we will have to set aliases for |\captionsfrench|,
% |\datefrench|, |\extrasfrench| and |\noextrasfrench|.
@@ -525,7 +608,6 @@
% and |\righthyphenmin| (3), no special setting is required here.
%
% \begin{macrocode}
-\def\CurrentOption{french}
\ifx\l@francais\@undefined
\let\l@francais\l@french
\fi
@@ -752,7 +834,7 @@
% call |aeguill.sty| or a similar package. In both cases the
% commands |\guillemotleft| and |\guillemotright| will print the
% French opening and closing quote characters from the output font.
-% For XeLaTeX, |\guillemotleft| and |\guillemotright| are defined
+% For XeLaTeX, |\guillemotleft| and |\guillemotright| are defined
% by package \file{xunicode.sty}.
% We will check `AtBeginDocument' that the proper output encodings
% are in use (see end of section~\ref{sec-keyval}).
@@ -784,8 +866,8 @@
% Thierry Bouche. French quotes (including spacing) are printed by
% |\FB@og| and |\FB@fg|, the expansion of the top level commands
% |\og| and |\og| is different in and outside French.
-% We'll try to be smart to users of D.~Carlisle's |xspace| package:
-% if this package is loaded there will be no need for |{}|
+% We'll try to be smart to users of David~Carlisle's |xspace|
+% package: if this package is loaded there will be no need for |{}|
% or |\ | to get a space after |\fg|, otherwise |\xspace| will be
% defined as |\relax| (done at the end of this file).
%
@@ -829,13 +911,19 @@
% The macro |\datefrench| redefines the command |\today| to
% produce French dates.
%
+% \changes{v2.0}{2006/11/06}{2 '\cs{relax}' added in
+% \cs{today}'s definition.}
+%
+% \changes{v2.1a}{2008/03/25}{\cs{today} changed (correction in 2.0
+% was wrong: \cs{today} was printed without spaces in toc).}
+%
% \begin{macrocode}
\@namedef{date\CurrentOption}{%
- \def\today{\number\day \ifnum1=\day {\ier}\fi \relax \space
+ \def\today{{\number\day}\ifnum1=\day {\ier}\fi \space
\ifcase\month
\or janvier\or f\'evrier\or mars\or avril\or mai\or juin\or
juillet\or ao\^ut\or septembre\or octobre\or novembre\or
- d\'ecembre\fi \relax
+ d\'ecembre\fi
\space \number\year}}
% \end{macrocode}
% \end{macro}
@@ -844,20 +932,150 @@
%
% Let's provide the French user with some extra utilities.
%
+% \changes{v2.1a}{2008/03/24}{Command \cs{fup} added to produce
+% better superscripts than \cs{textsuperscript}.}
+%
% \begin{macro}{\up}
-% \begin{macro}{\ieme}
-% |\up| eases the typesetting of superscripts like
-% `1\raise0.55ex\hbox{\small er}'. |\up| is just a shortcut for
-% |\textsuperscript| in \LaTeXe.
%
-% \begin{macrocode}
+% \changes{v2.1c}{2008/04/29}{Provide a temporary definition
+% (hyperref safe) of \cs{up} in case it has to be expanded in
+% the preamble (by beamer's \cs{title} command for instance).}
+%
+% \begin{macro}{\fup}
+%
+% \changes{v2.1b}{2008/04/02}{Command \cs{fup} changed to use
+% real superscripts from fourier v. 1.6.}
+%
+% \changes{v2.2a}{2008/05/08}{\cs{newif} and \cs{newdimen} moved
+% before \cs{ifLaTeXe} to avoid an error with plainTeX.}
+%
+% |\up| eases the typesetting of superscripts like
+% `1\textsuperscript{er}'. Up to version 2.0 of |frenchb| |\up| was
+% just a shortcut for |\textsuperscript| in \LaTeXe, but several
+% users complained that |\textsuperscript| typesets superscripts
+% too high and too big, so we now define |\fup| as an attempt to
+% produce better looking superscripts. |\up| is defined as |\fup|
+% but can be redefined by |\frenchbsetup{FrenchSuperscripts=false}|
+% as |\textsuperscript| for compatibility with previous versions.
+%
+% When a font has built-in superscripts, the best thing to do is
+% to just use them, otherwise |\fup| has to simulate superscripts
+% by scaling and raising ordinary letters. Scaling is done using
+% package \file{scalefnt} which will be loaded at the end of
+% \babel's loading (|frenchb| being an option of babel, it cannot
+% load a package while being read).
+%
+% \begin{macrocode}
+\newif\ifFB@poorman
+\newdimen\FB@Mht
\ifLaTeXe
- \newcommand*{\up}[1]{\textsuperscript{#1}}
+ \AtEndOfPackage{\RequirePackage{scalefnt}}
+% \end{macrocode}
+% |\FB@up@fake| holds the definition of fake superscripts.
+% The scaling ratio is 0.65, raising is computed to put the top of
+% lower case letters (like `m') just under the top of upper case
+% letters (like `M'), precisely 12\% down. The chosen settings
+% look correct for most fonts, but can be tuned by the end-user
+% if necessary by changing |\FBsupR| and |\FBsupS| commands.
+%
+% |\FB@lc| is defined as |\lowercase| to inhibit the uppercasing of
+% superscripts (this may happen in page headers with the standard
+% classes but is wrong); |\FB@lc| can be redefined to do nothing
+% by option |LowercaseSuperscripts=false| of |\frenchbsetup{}|.
+% \begin{macrocode}
+ \newcommand*{\FBsupR}{-0.12}
+ \newcommand*{\FBsupS}{0.65}
+ \newcommand*{\FB@lc}[1]{\lowercase{#1}}
+ \DeclareRobustCommand*{\FB@up@fake}[1]{%
+ \settoheight{\FB@Mht}{M}%
+ \addtolength{\FB@Mht}{\FBsupR \FB@Mht}%
+ \addtolength{\FB@Mht}{-\FBsupS ex}%
+ \raisebox{\FB@Mht}{\scalefont{\FBsupS}{\FB@lc{#1}}}%
+ }
+% \end{macrocode}
+% The only packages I currently know to take advantage of real
+% superscripts are a) \file{xltxtra} used in conjunction with
+% XeLaTeX and OpenType fonts having the font feature
+% 'VerticalPosition=Superior' (\file{xltxtra} defines
+% |\realsuperscript| and |\fakesuperscript|) and b) \file{fourier}
+% (from version 1.6) when Expert Utopia fonts are available.
+%
+% |\FB@up| checks whether the current font is a Type1 `Expert'
+% (or `Pro') font with real superscripts or not (the code works
+% currently only with \file{fourier-1.6} but could work with any
+% Expert Type1 font with built-in superscripts, see below), and
+% decides to use real or fake superscripts.
+% It works as follows: the content of |\f@family| (family name of
+% the current font) is split by |\FB@split| into two pieces, the
+% first three characters (`|fut|' for Fourier, `|ppl|' for Adobe's
+% Palatino, \dots) stored in |\FB@firstthree| and the rest stored
+% in |\FB@suffix| which is expected to be `|x|' or `|j|' for expert
+% fonts.
+% \begin{macrocode}
+ \def\FB@split#1#2#3#4\@nil{\def\FB@firstthree{#1#2#3}%
+ \def\FB@suffix{#4}}
+ \def\FB@x{x}
+ \def\FB@j{j}
+ \DeclareRobustCommand*{\FB@up}[1]{%
+ \bgroup \FB@poormantrue
+ \expandafter\FB@split\f@family\@nil
+% \end{macrocode}
+% Then |\FB@up| looks for a \file{.fd} file named \file{t1fut-sup.fd}
+% (Fourier) or \file{t1ppl-sup.fd} (Palatino), etc. supposed to
+% define the subfamily (|fut-sup| or |ppl-sup|, etc.) giving access
+% to the built-in superscripts. If the \file{.fd} file is not found
+% by |\IfFileExists|, |\FB@up| falls back on fake superscripts,
+% otherwise |\FB@suffix| is checked to decide whether to use fake or
+% real superscripts.
+% \begin{macrocode}
+ \edef\reserved@a{\lowercase{%
+ \noexpand\IfFileExists{\f@encoding\FB@firstthree -sup.fd}}}%
+ \reserved@a
+ {\ifx\FB@suffix\FB@x \FB@poormanfalse\fi
+ \ifx\FB@suffix\FB@j \FB@poormanfalse\fi
+ \ifFB@poorman \FB@up@fake{#1}%
+ \else \FB@up@real{#1}%
+ \fi}%
+ {\FB@up@fake{#1}}%
+ \egroup}
+% \end{macrocode}
+% |\FB@up@real| just picks up the superscripts from the subfamily
+% (and forces lowercase).
+% \begin{macrocode}
+ \newcommand*{\FB@up@real}[1]{\bgroup
+ \fontfamily{\FB@firstthree -sup}\selectfont \FB@lc{#1}\egroup}
+% \end{macrocode}
+% |\fup| is now defined as |\FB@up| unless |\realsuperscript| is
+% defined (occurs with XeLaTeX calling \file{xltxtra.sty}).
+% \begin{macrocode}
+ \DeclareRobustCommand*{\fup}[1]{%
+ \@ifundefined{realsuperscript}%
+ {\FB@up{#1}}%
+ {\bgroup\let\fakesuperscript\FB@up@fake
+ \realsuperscript{\FB@lc{#1}}\egroup}}
+% \end{macrocode}
+% Temporary definition of |up| (redefined `AtBeginDocument').
+% \begin{macrocode}
+ \newcommand*{\up}{\relax}
+% \end{macrocode}
+% Poor man's definition of |\up| for Plain. In \LaTeXe,
+% |\up| will be defined as |\fup| or |\textsuperscript| later on
+% while processing the options of |\frenchbsetup{}|.
+% \begin{macrocode}
\else
\newcommand*{\up}[1]{\leavevmode\raise1ex\hbox{\sevenrm #1}}
\fi
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\ieme}
+% \begin{macro}{\ier}
+% \begin{macro}{\iere}
+% \begin{macro}{\iemes}
+% \begin{macro}{\iers}
+% \begin{macro}{\ieres}
+% Some handy macros for those who don't know how to abbreviate ordinals:
% \begin{macrocode}
\def\ieme{\up{\lowercase{e}}\xspace}
\def\iemes{\up{\lowercase{es}}\xspace}
@@ -868,12 +1086,21 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v2.1c}{2008/04/29}{Added commands \cs{Nos} and \cs{nos}.}
%
% \begin{macro}{\No}
% \begin{macro}{\no}
+% \begin{macro}{\Nos}
+% \begin{macro}{\nos}
% \begin{macro}{\primo}
% \begin{macro}{\fprimo)}
-% And some more macros for numbering, first two support macros.
+% And some more macros relying on |\up| for numbering,
+% first two support macros.
% \begin{macrocode}
\newcommand*{\FrenchEnumerate}[1]{%
#1\up{\lowercase{o}}\kern+.3em}
@@ -896,29 +1123,33 @@
\def\fquarto){\FrenchPopularEnumerate4}
% \end{macrocode}
%
-% Let's provide two macros for the common abbreviations
+% Let's provide four macros for the common abbreviations
% of ``Num\'ero''.
% \begin{macrocode}
\DeclareRobustCommand*{\No}{N\up{\lowercase{o}}\kern+.2em}
\DeclareRobustCommand*{\no}{n\up{\lowercase{o}}\kern+.2em}
+\DeclareRobustCommand*{\Nos}{N\up{\lowercase{os}}\kern+.2em}
+\DeclareRobustCommand*{\nos}{n\up{\lowercase{os}}\kern+.2em}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \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|
+% 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}|.
%
-% \changes{frenchb-2.0}{2006/11/06}{\cs{hbox} dropped, replaced by
-% \kern0pt.}
+% \changes{v2.0}{2006/11/06}{\cs{hbox} dropped, replaced by
+% \cs{kern0pt}.}
%
% \begin{macrocode}
\DeclareRobustCommand*{\bsc}[1]{\leavevmode\begingroup\kern0pt
@@ -975,8 +1206,13 @@
% our definition of |\degres|. We also advice the user (once only)
% to use TS1-encoding.
%
+% \changes{v2.1c}{2008/04/29}{Provide a temporary definition (hyperref
+% safe) of \cs{degres} in case it has to be expanded in the preamble
+% (by beamer's \cs{title} command for instance).}
+%
% \begin{macrocode}
\ifLaTeXe
+ \newcommand*{\degres}{\degre}
\def\Warning@degree@TSone{%
\PackageWarning{frenchb.ldf}{%
Degrees would look better in TS1-encoding:
@@ -1034,10 +1270,10 @@
% \end{macro}
% \end{macro}
%
-% \changes{frenchb-2.0}{2006/11/06}{\cs{nombre} requires now
-% numprint.sty.}
-%
% \begin{macro}{\nombre}
+%
+% \changes{v2.0}{2006/11/06}{\cs{nombre} requires now numprint.sty.}
+%
% The command |\nombre| is now borrowed from |numprint.sty| for
% \LaTeXe. There is no point to maintain the former tricky code
% when a package is dedicated to do the same job and more.
@@ -1045,10 +1281,10 @@
% it prints them as is and issues a warning about the change.
%
% Fake command |\nombre| for Plain based formats, warning users of
-% frenchb v.1.x. of the change.
+% |frenchb| v.1.x. of the change.
% \begin{macrocode}
\newcommand*{\nombre}[1]{{#1}\message{%
- *** \noexpand\nombre no longer formats numbers\string! ***}}%
+ *** \noexpand\nombre no longer formats numbers\string! ***}}%
% \end{macrocode}
% \end{macro}
%
@@ -1073,7 +1309,7 @@
% We redefine |\nombre| for \LaTeXe. A warning is issued
% at the first call of |\nombre| if |\numprint| is not
% defined, suggesting what to do. The package |numprint|
-% is \emph{not} loaded automatically by frenchb because of
+% is \emph{not} loaded automatically by |frenchb| because of
% possible options conflict.
%
% \begin{macrocode}
@@ -1093,12 +1329,12 @@
}
% \end{macrocode}
%
-% \changes{frenchb-2.0c}{2007/06/25}{No need to define here numprint's
-% command \cs{npstylefrench}, it will be redefined `AtBeginDocument'
-% by \cs{FBprocess@options}.}
+% \changes{v2.0c}{2007/06/25}{There is no need to define here
+% numprint's command \cs{npstylefrench}, it will be redefined
+% `AtBeginDocument' by \cs{FBprocess@options}.}
%
-% \changes{frenchb-2.0c}{2007/06/25}{\cs{ThinSpaceInFrenchNumbers}
-% added for compatibility with frenchb-1.x.}
+% \changes{v2.0c}{2007/06/25}{\cs{ThinSpaceInFrenchNumbers} added
+% for compatibility with frenchb-1.x.}
%
% \begin{macrocode}
\newcommand*{\ThinSpaceInFrenchNumbers}{%
@@ -1117,12 +1353,12 @@
% Let's first define |\captionsfrench| which sets all strings used
% in the four standard document classes provided with \LaTeX.
%
-% \changes{frenchb-2.0}{2006/11/06}{`Fig.' changed to `Figure' and
+% \changes{v2.0}{2006/11/06}{`Fig.' changed to `Figure' and
% `Tab.' to `Table'.}
%
-% \changes{frenchb-2.0}{2006/12/15}{Set \cs{CaptionSeparator} in
-% \cs{extrasfrench} now instead of \cs{captionsfrench} because
-% it has to be reset when leaving French.}
+% \changes{v2.0}{2006/12/15}{Set \cs{CaptionSeparator} in
+% \cs{extrasfrench} now instead of \cs{captionsfrench}
+% because it has to be reset when leaving French.}
%
% \begin{macrocode}
\@namedef{captions\CurrentOption}{%
@@ -1208,11 +1444,11 @@
% (see section~\ref{sec-punct}). `AtBeginDocument' we compare it to
% 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
+% 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,
+% If the definitions differ, |frenchb| doesn't overwrite the changes,
% but prints a message in the .log file.
%
% \begin{macrocode}
@@ -1418,15 +1654,15 @@
% \subsection{Formatting footnotes}
% \label{sec-footnotes}
%
-% \changes{frenchb-2.0}{2006/11/06}{Footnotes are now printed
+% \changes{v2.0}{2006/11/06}{Footnotes are now printed
% by default `\`a la fran\c caise' for the whole document.}
%
-% \changes{frenchb-2.0b}{2007/04/18}{Just do nothing (except warning)
-% when the bigfoot package is loaded.}
+% \changes{v2.0b}{2007/04/18}{Footnotes: Just do nothing
+% (except warning) when the bigfoot package is loaded.}
%
% The |bigfoot| package deeply changes the way footnotes are
% handled. When |bigfoot| is loaded, we just warn the user that
-% frenchb will drop the customisation of footnotes.
+% |frenchb| will drop the customisation of footnotes.
%
% The layout of footnotes is controlled by two flags
% |\ifFBAutoSpaceFootnotes| and |\ifFBFrenchFootnotes| which are
@@ -1462,20 +1698,20 @@
% which is responsible for the layout of footnotes, to match the
% specifications of the French `Imprimerie Nationale': footnotes
% will be indented by |\parindentFFN|, numbers (if any) typeset on
-% the baseline (instead of textsuperscripts) and followed by a dot
+% the baseline (instead of superscripts) and followed by a dot
% and an half quad space. Whenever symbols are used to number
% footnotes (as in |\thanks| for instance), we switch back to the
% standard layout (the French layout of footnotes is meant for
-% footnotes numbered by arabic or roman digits).
+% footnotes numbered by Arabic or Roman digits).
%
-% \changes{frenchb-2.0}{2006/11/06}{\cs{parindentFFN} not changed if
-% already defined (for cah-gut.cls, JA wants \cs{parindentFFN}=0pt.}
+% \changes{v2.0}{2006/11/06}{\cs{parindentFFN} not changed if
+% already defined (required by JA for cah-gut.cls).}
%
% The value of |\parindentFFN| will be redefined at the
% |\begin{document}|, as the maximum of |\parindent| and 1.5em
-% \emph{only if} unless it has been set in the preamble (the weird
-% value 10in is just for testing whether |\parindentFFN| has been
-% set or not).
+% \emph{unless} it has been set in the preamble (the weird value
+% 10in is just for testing whether |\parindentFFN| has been set
+% or not).
%
% \begin{macrocode}
\newdimen\parindentFFN
@@ -1516,7 +1752,7 @@
% \end{macrocode}
%
% For compatibility reasons, we provide definitions for the commands
-% dealing with the layout of footnotes in frenchb version~1.6.
+% dealing with the layout of footnotes in |frenchb| version~1.6.
% |\frenchbsetup{}| (see in section \ref{sec-keyval}) should be
% preferred for setting these options. |\StandardFootnotes| may
% still be used locally (in minipages for instance), that's why the
@@ -1538,30 +1774,37 @@
% (see~\ref{sec-footnotes}), and the indentation of the first
% paragraph of sections (see~\ref{sec-indent}).
%
-% From version 2.0 on, two flags control the global layout, their
-% values are chosen in |\frenchbsetup{}| (see
-% section~\ref{sec-keyval}). The default behaviour of frenchb is
-% to customise the layout (i.e. lists, indentation of the first
-% paragraphs of sections) only when the current language is French.
-% Unifying the layout can be done in two ways: frenchb will leave
-% the standard layout provided by the \LaTeX{} class untouched
-% in French when the option |StandardLayout| is made true in
-% |\frenchbsetup{}| or frenchb will (try to) force the layout
-% outside French to be the same as in French when the option
-% |GlobalLayoutFrench| is made true in |\frenchbsetup{}|.
-% Of course, the second option only works if the other languages
-% do not alter the layout.
+% From version 2.2 on, if |frenchb| is \babel's ``main language''
+% (i.e. last language option at \babel's loading), |frenchb|
+% customises the layout (i.e. lists, indentation of the first
+% paragraphs of sections and footnotes) in the whole document
+% regardless the current language. On the other hand, if |frenchb|
+% is \emph{not} \babel's ``main language'', it leaves the layout
+% unchanged both in French and in other languages.
%
+% \begin{macro}{\FrenchLayout}
+% \begin{macro}{\StandardLayout}
% The former commands |\FrenchLayout| and |\StandardLayout| are kept
% for compatibility reasons but should no longer be used.
%
+% \changes{v2.0g}{2008/03/23}{Flag \cs{ifFBStandardLayout} not checked
+% by \cs{FBprocess@options}, low-level flags have to be set
+% one by one.}
+%
% \begin{macrocode}
-\newcommand*{\FrenchLayout}{\FBGlobalLayoutFrenchtrue
- \PackageWarning{frenchb.ldf}%
+\newcommand*{\FrenchLayout}{%
+ \FBGlobalLayoutFrenchtrue
+ \PackageWarning{frenchb.ldf}%
{\protect\FrenchLayout\space is obsolete. Please use\MessageBreak
\protect\frenchbsetup{GlobalLayoutFrench} instead.}%
}
-\newcommand*{\StandardLayout}{\FBStandardLayouttrue
+\newcommand*{\StandardLayout}{%
+ \FBReduceListSpacingfalse
+ \FBCompactItemizefalse
+ \FBStandardItemLabelstrue
+ \FBIndentFirstfalse
+ \FBFrenchFootnotesfalse
+ \FBAutoSpaceFootnotesfalse
\PackageWarning{frenchb.ldf}%
{\protect\StandardLayout\space is obsolete. Please use\MessageBreak
\protect\frenchbsetup{StandardLayout} instead.}%
@@ -1569,6 +1812,8 @@
\@onlypreamble\FrenchLayout
\@onlypreamble\StandardLayout
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \subsection{Dots\dots}
% \label{sec-dots}
@@ -1586,8 +1831,8 @@
% this has to be done `AtBeginDocument' not to be overwritten
% when \file{amsmath.sty} is loaded after \babel.
%
-% \changes{frenchb-2.0}{2006/11/06}{Added special case for LY1
-% encoding, see bug report from Bruno Voisin (2004/05/18).}
+% \changes{v2.0}{2006/11/06}{Added special case for LY1 encoding,
+% see bug report from Bruno Voisin (2004/05/18).}
%
% LY1 has a ready made character for |\textellipsis|, it should be
% used in French too (pointed out by Bruno Voisin).
@@ -1607,7 +1852,7 @@
\newcommand*{\Tdots@ORI}{\@xp\textellipsis}
\newcommand*{\Tdots@}{\Tdots@ORI}
\newcommand*{\Mdots@}{\@xp\mdots@}
-\AtBeginDocument{\DeclareRobustCommand{\dots}{\relax
+\AtBeginDocument{\DeclareRobustCommand*{\dots}{\relax
\csname\ifmmode M\else T\fi dots@\endcsname}%
\@ifundefined{@xp}{\let\@xp\relax}{}%
\@ifundefined{mdots@}{\let\Tdots@ORI\textellipsis
@@ -1624,56 +1869,112 @@
% \subsection{Setup options: keyval stuff}
% \label{sec-keyval}
%
-% \changes{frenchb-2.0}{2006/11/06}{New command \cs{frenchbsetup}
-% added for global customisation.}
+% \changes{v2.0}{2006/11/06}{New command \cs{frenchbsetup} added
+% for global customisation.}
%
-% \changes{frenchb-2.0c}{2007/06/25}{Option ThinSpaceInFrenchNumbers
-% added.}
+% \changes{v2.0c}{2007/06/25}{Option ThinSpaceInFrenchNumbers added.}
%
-% \changes{frenchb-2.0d}{2007/07/15}{Options og and fg changed: limit
-% the definition to French so that quote characters can be used
-% in German.}
+% \changes{v2.0d}{2007/07/15}{Options og and fg changed: limit
+% the definition to French so that quote characters can be used
+% in German.}
%
-% \changes{frenchb-2.0e}{2007/10/05}{New option: StandardLists.}
+% \changes{v2.0e}{2007/10/05}{New option: StandardLists.}
%
-% \begin{macro}{\frenchbsetup}
-% From version 2.0 on, all setup options are handled by \emph{one}
-% command |\frenchbsetup| using the keyval syntax.
+% \changes{v2.0f}{2008/03/23}{Two typos corrected in
+% option StandardLists: [false] $\to$ [true] and
+% StandardLayout $\to$ StandardLists.}
+%
+% \changes{v2.0f}{2008/03/23}{StandardLayout option had no
+% effect on lists. Test moved to \cs{FBprocess@options}.}
+%
+% \changes{v2.0g}{2008/03/23}{Revert previous change to
+% StandardLayout. This option must set the three flags
+% \cs{FBReduceListSpacingfalse}, \cs{FBCompactItemizefalse},
+% and \cs{FBStandardItemLabeltrue} instead of
+% \cs{FBStandardListstrue}, so that later options can still
+% change their value before executing \cs{FBprocess@options}.
+% Same thing for option StandardLists.}
+%
+% \changes{v2.1a}{2008/03/24}{New option: FrenchSuperscripts
+% to define \cs{up} as \cs{fup} or as \cs{textsuperscript}.}
+%
+% \changes{v2.1a}{2008/03/30}{New option: LowercaseSuperscripts.}
+%
+% \changes{v2.2a}{2008/05/08}{The global layout of the document is
+% no longer changed when frenchb is not the last option of babel
+% (\cs{bbl@main@language}). Suggested by Ulrike Fischer.}
+%
+% \changes{v2.2a}{2008/05/08}{Values of flags
+% \cs{ifFBReduceListSpacing}, \cs{ifFBCompactItemize},
+% \cs{ifFBStandardItemLabels}, \cs{ifFBIndentFirst},
+% \cs{ifFBFrenchFootnotes}, \cs{ifFBAutoSpaceFootnotes} changed:
+% default now means `StandardLayout', it will be changed to
+% `FrenchLayout' AtEndOfPackage only if french is
+% \cs{bbl@main@language}.}
+%
+% \changes{v2.2a}{2008/05/08}{When frenchb is babel's last option,
+% French becomes the document's main language, so
+% GlobalLayoutFrench applies.}
%
% We first define a collection of conditionals with their defaults
% (true or false).
%
% \begin{macrocode}
-\newif\ifFBStandardLayout \FBStandardLayoutfalse
+\newif\ifFBStandardLayout \FBStandardLayouttrue
\newif\ifFBGlobalLayoutFrench \FBGlobalLayoutFrenchfalse
+\newif\ifFBReduceListSpacing \FBReduceListSpacingfalse
+\newif\ifFBCompactItemize \FBCompactItemizefalse
+\newif\ifFBStandardItemLabels \FBStandardItemLabelstrue
+\newif\ifFBStandardLists \FBStandardListstrue
+\newif\ifFBIndentFirst \FBIndentFirstfalse
+\newif\ifFBFrenchFootnotes \FBFrenchFootnotesfalse
+\newif\ifFBAutoSpaceFootnotes \FBAutoSpaceFootnotesfalse
\newif\ifFBAutoSpacePunctuation \FBAutoSpacePunctuationtrue
\newif\ifFBThinColonSpace \FBThinColonSpacefalse
-\newif\ifFBReduceListSpacing \FBReduceListSpacingtrue
-\newif\ifFBCompactItemize \FBCompactItemizetrue
-\newif\ifFBStandardItemLabels \FBStandardItemLabelsfalse
-\newif\ifFBStandardLists \FBStandardListsfalse
-\newif\ifFBIndentFirst \FBIndentFirsttrue
-\newif\ifFBFrenchFootnotes \FBFrenchFootnotestrue
-\newif\ifFBAutoSpaceFootnotes \FBAutoSpaceFootnotestrue
\newif\ifFBThinSpaceInFrenchNumbers \FBThinSpaceInFrenchNumbersfalse
+\newif\ifFBFrenchSuperscripts \FBFrenchSuperscriptstrue
+\newif\ifFBLowercaseSuperscripts \FBLowercaseSuperscriptstrue
\newif\ifFBPartNameFull \FBPartNameFulltrue
\newif\ifFBShowOptions \FBShowOptionsfalse
% \end{macrocode}
%
-% Let's now define the main configuration command |\frenchbsetup|
-% which reads and sets the options which will be processed later
-% (at |\begin{document}|). It can only be called in the preamble.
+% The defaults values of these flags have been set so that |frenchb|
+% does not change anything regarding the global layout.
+% |\bbl@main@language| (set by the last option of babel) controls
+% the global layout of the document. We check the current language
+% `AtEndOfPackage' (it is |\bbl@main@language|); if it is French,
+% the values of some flags have to be changed to ensure a French
+% looking layout for the whole document (even in parts written in
+% languages other than French); the end-user will then be able to
+% customise the values of all these flags with |\frenchbsetup{}|.
+% \begin{macrocode}
+\AtEndOfPackage{%
+ \iflanguage{french}{\FBReduceListSpacingtrue
+ \FBCompactItemizetrue
+ \FBStandardItemLabelsfalse
+ \FBIndentFirsttrue
+ \FBFrenchFootnotestrue
+ \FBAutoSpaceFootnotestrue
+ \FBGlobalLayoutFrenchtrue}%
+ {}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\frenchbsetup}
+% From version 2.0 on, all setup options are handled by \emph{one}
+% command |\frenchbsetup| using the keyval syntax.
+% Let's now define this command which reads and sets the options
+% to be processed later (at |\begin{document}|) by
+% |\FBprocess@options|. It can only be called in the preamble.
% \begin{macrocode}
\newcommand*{\frenchbsetup}[1]{%
\setkeys{FB}{#1}%
}%
\@onlypreamble\frenchbsetup
% \end{macrocode}
-% \end{macro}
-%
-% frenchb being an option of babel, it cannot load a package (keyval)
-% while frenchb.ldf is read, so we defer the loading of \file{keyval}
-% and the options setup at the end of \babel's loading.
+% |frenchb| being an option of babel, it cannot load a package
+% (keyval) while |frenchb.ldf| is read, so we defer the loading of
+% \file{keyval} and the options setup at the end of \babel's loading.
%
% |StandardLayout| resets the layout in French to the standard layout
% defined par the \LaTeX{} class and packages loaded. It deals with
@@ -1682,23 +1983,40 @@
% |\frenchbsetup|, can overrule some of the |StandardLayout|
% settings.
%
+% |GlobalLayoutFrench| forces the layout in French and (as far as
+% possible) outside French to meet the French typographic standards.
+%
% \begin{macrocode}
\AtEndOfPackage{%
\RequirePackage{keyval}%
\define@key{FB}{StandardLayout}[true]%
{\csname FBStandardLayout#1\endcsname
\ifFBStandardLayout
- \FBStandardListstrue
+ \FBReduceListSpacingfalse
+ \FBCompactItemizefalse
+ \FBStandardItemLabelstrue
\FBIndentFirstfalse
\FBFrenchFootnotesfalse
\FBAutoSpaceFootnotesfalse
+ \FBGlobalLayoutFrenchfalse
+ \else
+ \FBReduceListSpacingtrue
+ \FBCompactItemizetrue
+ \FBStandardItemLabelsfalse
+ \FBIndentFirsttrue
+ \FBFrenchFootnotestrue
+ \FBAutoSpaceFootnotestrue
\fi}%
\define@key{FB}{GlobalLayoutFrench}[true]%
- {\csname FBGlobalLayoutFrench#1\endcsname}%
- \define@key{FB}{AutoSpacePunctuation}[true]%
- {\csname FBAutoSpacePunctuation#1\endcsname}%
- \define@key{FB}{ThinColonSpace}[true]%
- {\csname FBThinColonSpace#1\endcsname}%
+ {\csname FBGlobalLayoutFrench#1\endcsname
+ \ifFBGlobalLayoutFrench
+ \FBReduceListSpacingtrue
+ \FBCompactItemizetrue
+ \FBStandardItemLabelsfalse
+ \FBIndentFirsttrue
+ \FBFrenchFootnotestrue
+ \FBAutoSpaceFootnotestrue
+ \fi}%
\define@key{FB}{ReduceListSpacing}[true]%
{\csname FBReduceListSpacing#1\endcsname}%
\define@key{FB}{CompactItemize}[true]%
@@ -1715,12 +2033,16 @@
\renewcommand*{\Frlabelitemiii}{#1}}%
\define@key{FB}{ItemLabeliv}{%
\renewcommand*{\Frlabelitemiv}{#1}}%
- \define@key{FB}{StandardLists}[false]%
- {\csname FBStandardLayout#1\endcsname
+ \define@key{FB}{StandardLists}[true]%
+ {\csname FBStandardLists#1\endcsname
\ifFBStandardLists
\FBReduceListSpacingfalse
\FBCompactItemizefalse
\FBStandardItemLabelstrue
+ \else
+ \FBReduceListSpacingtrue
+ \FBCompactItemizetrue
+ \FBStandardItemLabelsfalse
\fi}%
\define@key{FB}{IndentFirst}[true]%
{\csname FBIndentFirst#1\endcsname}%
@@ -1728,8 +2050,16 @@
{\csname FBFrenchFootnotes#1\endcsname}%
\define@key{FB}{AutoSpaceFootnotes}[true]%
{\csname FBAutoSpaceFootnotes#1\endcsname}%
+ \define@key{FB}{AutoSpacePunctuation}[true]%
+ {\csname FBAutoSpacePunctuation#1\endcsname}%
+ \define@key{FB}{ThinColonSpace}[true]%
+ {\csname FBThinColonSpace#1\endcsname}%
\define@key{FB}{ThinSpaceInFrenchNumbers}[true]%
{\csname FBThinSpaceInFrenchNumbers#1\endcsname}%
+ \define@key{FB}{FrenchSuperscripts}[true]%
+ {\csname FBFrenchSuperscripts#1\endcsname}
+ \define@key{FB}{LowercaseSuperscripts}[true]%
+ {\csname FBLowercaseSuperscripts#1\endcsname}
\define@key{FB}{PartNameFull}[true]%
{\csname FBPartNameFull#1\endcsname}%
\define@key{FB}{ShowOptions}[true]%
@@ -1836,31 +2166,18 @@
}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\FBprocess@options}
% |\FBprocess@options| processes the options, it is called \emph{once}
% at |\begin{document}|.
% \begin{macrocode}
\newcommand*{\FBprocess@options}{%
% \end{macrocode}
-% Nothing has to be done here for |StandardLayout| (the involved
-% flags have already been set in |\frenchbsetup{}|).
+% Nothing has to be done here for |StandardLayout| and
+% |StandardLists| (the involved flags have already been set in
+% |\frenchbsetup{}| or before (at babel's EndOfPackage).
%
-% |AutoSpacePunctuation| adds an unbreakable space (in French only)
-% before the four active characters (:;!?) even if none has been
-% typed before them.
-% \begin{macrocode}
- \ifFBAutoSpacePunctuation
- \AutoSpaceBeforeFDP
- \else
- \NoAutoSpaceBeforeFDP
- \fi
-% \end{macrocode}
-%
-% |ThinColonSpace| changes the normal unbreakable space typeset in
-% French before `:' to a thin space.
-% \begin{macrocode}
- \ifFBThinColonSpace\renewcommand*{\Fcolonspace}{\thinspace}\fi
-% \end{macrocode}
% The next three options deal with the layout of lists in French.
%
% |ReduceListSpacing| reduces the vertical spaces between list
@@ -1947,8 +2264,25 @@
% and |AutoSpaceFootnotes| (see section~\ref{sec-footnotes}),
% nothing has to be done here for footnotes.
%
+% |AutoSpacePunctuation| adds an unbreakable space (in French only)
+% before the four active characters (:;!?) even if none has been
+% typed before them.
+% \begin{macrocode}
+ \ifFBAutoSpacePunctuation
+ \AutoSpaceBeforeFDP
+ \else
+ \NoAutoSpaceBeforeFDP
+ \fi
+% \end{macrocode}
+%
+% |ThinColonSpace| changes the normal unbreakable space typeset in
+% French before `:' to a thin space.
+% \begin{macrocode}
+ \ifFBThinColonSpace\renewcommand*{\Fcolonspace}{\thinspace}\fi
+% \end{macrocode}
+%
% When |true|, |ThinSpaceInFrenchNumbers| redefines |numprint.sty|'s
-% |\npstylefrench| command to set |\npthousandsep| to |\,|
+% command |\npstylefrench| to set |\npthousandsep| to |\,|
% (thinspace) instead of |~| (default) . This option has no effect
% if package |numprint.sty| is not loaded with `|autolanguage|'.
% As old versions of |numprint.sty| did not define |\npstylefrench|,
@@ -1980,6 +2314,29 @@
\fi}{}%
% \end{macrocode}
%
+% |FrenchSuperscripts|: if |true| |\up=\fup|, else
+% |\up=\textsuperscript|. Anyway |\up*=\FB@up@fake|. The star-form
+% |\up*{}| is provided for fonts that lack some superior letters:
+% Adobe Jenson Pro and Utopia Expert have no ``g superior'' for
+% instance.
+% \begin{macrocode}
+ \ifFBFrenchSuperscripts
+ \DeclareRobustCommand*{\up}{\@ifstar{\FB@up@fake}{\fup}}%
+ \else
+ \DeclareRobustCommand*{\up}{\@ifstar{\FB@up@fake}%
+ {\textsuperscript}}%
+ \fi
+% \end{macrocode}
+%
+% |LowercaseSuperscripts|: if |true| let |\FB@lc| be |\lowercase|,
+% else |\FB@lc| is redefined to do nothing.
+% \begin{macrocode}
+ \ifFBLowercaseSuperscripts
+ \else
+ \renewcommand*{\FB@lc}[1]{##1}%
+ \fi
+% \end{macrocode}
+%
% |PartNameFull|: if |false|, redefine |\partname|.
% \begin{macrocode}
\ifFBPartNameFull
@@ -1992,12 +2349,11 @@
\ifFBShowOptions
\GenericWarning{* }{%
* **** List of possible options for frenchb ****\MessageBreak
- [Default values between brackets]\MessageBreak
+ [Default values between brackets when frenchb is loaded *LAST*]%
+ \MessageBreak
ShowOptions=true [false]\MessageBreak
StandardLayout=true [false]\MessageBreak
- GlobalLayoutFrench=true [false]\MessageBreak
- AutoSpacePunctuation=false [true]\MessageBreak
- ThinColonSpace=true [false]\MessageBreak
+ GlobalLayoutFrench=false [true]\MessageBreak
StandardLists=true [false]\MessageBreak
ReduceListSpacing=false [true]\MessageBreak
CompactItemize=false [true]\MessageBreak
@@ -2015,7 +2371,11 @@
IndentFirst=false [true]\MessageBreak
FrenchFootnotes=false [true]\MessageBreak
AutoSpaceFootnotes=false [true]\MessageBreak
+ AutoSpacePunctuation=false [true]\MessageBreak
+ ThinColonSpace=true [false]\MessageBreak
ThinSpaceInFrenchNumbers=true [false]\MessageBreak
+ FrenchSuperscripts=false [true]\MessageBreak
+ LowercaseSuperscripts=false [true]\MessageBreak
PartNameFull=false [true]\MessageBreak
og= <left quote character>, fg= <right quote character>
\MessageBreak
@@ -2024,6 +2384,16 @@
\fi
}
% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.0}{2006/12/15}{AtBeginDocument, save again the
+% definitions of the `list' and `itemize' environments and the
+% values of labelitems. As of frenchb v.1.6, `ORI' values were
+% set when reading frenchb.ldf, later changes were ignored.}
+%
+% \changes{v2.0}{2006/12/06}{Added warning for OT1 encoding.}
+%
+% \changes{v2.1b}{2008/04/07}{Disable some commands in bookmarks.}
%
% At |\begin{document}| we save again the definitions of the `list'
% and `itemize' environments and the values of labelitems so that
@@ -2032,13 +2402,6 @@
% option. We also have to provide an |\xspace| command in case the
% |xspace.sty| package is not loaded.
%
-% \changes{frenchb-2.0}{2006/12/15}{AtBeginDocument, save again the
-% definitions of the `list' and `itemize' environments and the
-% values of labelitems. As of frenchb v.1.6, `ORI' values were
-% set when reading frenchb.ldf, later changes were ignored.}
-%
-% \changes{frenchb-2.0}{2006/12/06}{Added warning for OT1 encoding.}
-%
% \begin{macrocode}
\AtBeginDocument{%
\let\listORI\list
@@ -2051,6 +2414,29 @@
\let\@ltivORI\labelitemiv
\providecommand*{\xspace}{\relax}%
% \end{macrocode}
+% Let's redefine some commands in \file{hyperref}'s bookmarks.
+% \begin{macrocode}
+ \@ifundefined{pdfstringdefDisableCommands}{}%
+ {\pdfstringdefDisableCommands{%
+ \let\up\relax
+ \def\ieme{e\xspace}%
+ \def\iemes{es\xspace}%
+ \def\ier{er\xspace}%
+ \def\iers{ers\xspace}%
+ \def\iere{re\xspace}%
+ \def\ieres{res\xspace}%
+ \def\FrenchEnumerate#1{#1\degre\space}%
+ \def\FrenchPopularEnumerate#1{#1\degre)\space}%
+ \def\No{N\degre\space}%
+ \def\no{n\degre\space}%
+ \def\Nos{N\degre\space}%
+ \def\nos{n\degre\space}%
+ \def\og{\guillemotleft\space}%
+ \def\fg{\space\guillemotright}%
+ \let\bsc\textsc
+ \let\degres\degre
+ }}%
+% \end{macrocode}
% It is time to process the options set with |\frenchboptions{}|.
% Then execute either |\extrasfrench| and |\captionsfrench| or
% |\noextrasfrench| according to the current language at the
@@ -2098,10 +2484,10 @@
% The macro |\ldf@quit| takes care for setting the main language
% to be switched on at |\begin{document}| and resetting the
% category code of \texttt{@} to its original value.
-% The config file searched for has to be `frenchb.cfg', and
+% The config file searched for has to be |frenchb.cfg|, and
% |\CurrentOption| has been set to `french', so
% |\ldf@finish\CurrentOption| cannot be used: we first load
-% `frenchb.cfg', then call |\ldf@quit\CurrentOption|.
+% |frenchb.cfg|, then call |\ldf@quit\CurrentOption|.
% \begin{macrocode}
\FBclean@on@exit
\ldf@quit\CurrentOption
@@ -2133,3 +2519,4 @@
%
% \Finale
\endinput
+
diff --git a/Master/texmf-dist/source/generic/babel/germanb.dtx b/Master/texmf-dist/source/generic/babel/germanb.dtx
index dfd72c63938..ab3b7956fdd 100644
--- a/Master/texmf-dist/source/generic/babel/germanb.dtx
+++ b/Master/texmf-dist/source/generic/babel/germanb.dtx
@@ -37,7 +37,7 @@
%<code>\ProvidesLanguage{germanb}
%\fi
%\ProvidesFile{germanb.dtx}
- [2008/03/17 v2.6l German support from the babel system]
+ [2008/06/01 v2.6m German support from the babel system]
%\iffalse
%% File `germanb.dtx'
%% Babel package for LaTeX version 2e
@@ -176,7 +176,8 @@
% When this file was read through the option \Lopt{germanb} we make
% it behave as if \Lopt{german} was specified.
% \changes{german-2.6l}{2008/03/17}{Making germanb behave like german
-% needs som more work besides defining \cs{CurrentOption}}
+% needs some more work besides defining \cs{CurrentOption}}
+% \changes{germanb-2.6m}{2008/06/01}{Correted a typo}
% \begin{macrocode}
\def\bbl@tempa{germanb}
\ifx\CurrentOption\bbl@tempa
@@ -187,7 +188,7 @@
\fi
\let\l@germanb\l@german
\AtBeginDocument{%
- \let\captionsgermanb\coptionsgerman
+ \let\captionsgermanb\captionsgerman
\let\dategermanb\dategerman
\let\extrasgermanb\extrasgerman
\let\noextrasgermanb\noextrasgerman
diff --git a/Master/texmf-dist/source/generic/babel/spanish.dtx b/Master/texmf-dist/source/generic/babel/spanish.dtx
index 3563516bf80..733b5e4f437 100644
--- a/Master/texmf-dist/source/generic/babel/spanish.dtx
+++ b/Master/texmf-dist/source/generic/babel/spanish.dtx
@@ -26,13 +26,13 @@
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{2143}
+% \CheckSum{2059}
% \ProvidesFile{spanish.dtx}
-% [2007/02/21 v5.0a Spanish support from the babel system]
+% [2008/05/24 v5.0d Spanish support from the babel system]
%\iffalse
%% File `spanish.dtx'
%% Babel package for LaTeX version 2e
-%% Copyright (C) 1989 - 2008
+%% Copyright (C) 1989 - 2004
%% by Johannes Braams, TeXniek
%
%% Spanish Language Definition File
@@ -140,7 +140,7 @@
% \title{Estilo \textsf{spanish}\\
% para el sistema \babel.\footnote{Este
% archivo est\'a actualmente en la versi\'on
-% 5.0a con fecha 21 de febrero del 2007. ^^A@#
+% 5.0d con fecha 25 de mayo del 2008. ^^A@#
% Esta copia del manual se compuso el~\today.}}
%
% \author{Javier Bezos\footnote{Por favor, env\'{\i}en comentarios y
@@ -152,7 +152,7 @@
% \textit{Tipograf'ia espa'nola con \TeX.} Para informaci'on sobre
% actualizaciones: http://www.cervantex.org/}}
%
-% \date{21 de febrero del 2007} ^^A@#
+% \date{25 de mayo del 2008} ^^A@#
%
% \maketitle
%
@@ -1641,6 +1641,8 @@
% \changes{spanish~5.0a}{2007-02-21}{Reimplemented in full, which some
% parts rewritten from scratch. Added the es- mechanism and the mexico
% option. Many bug fixes.}
+% \changes{spanish~5.0d}{2008-05-25}{Fixed two bugs: misplaced
+% subscripts with lim and the like; problem with \cs{roman} and hyperref.}
%
% This file provides definition for both \LaTeXe{} and non
% \LaTeXe{} formats.
@@ -1648,7 +1650,7 @@
% \begin{macrocode}
%<*code>
\ProvidesLanguage{spanish.ldf}
- [2007/02/21 v5.0a Spanish support from the babel system]
+ [2008/05/25 v5.0d Spanish support from the babel system]
\LdfInit{spanish}\captionsspanish
\edef\es@savedcatcodes{%
@@ -2061,16 +2063,18 @@
\def\acute{\noexpand\es@op@ac}%
\edef\es@a{\endgroup
\noexpand\es@sdef\expandafter\noexpand\es@b{%
- \mathop{\noexpand\operator@font##1}\nolimits}}%
+ \mathop{\noexpand\operator@font##1}\es@c}}%
\es@a % restores itself
\es@a
\fi}%
\fi}%
\let\es@b\spanishoperators
\addto\es@b{ }%
+ \let\es@c\@empty
\expandafter\es@a\es@b l\acute{i}m l\acute{i}m\,sup
- l\acute{i}m\,inf m\acute{a}x \acute{i}nf m\acute{i}n
- sen tg arc\,sen arc\,cos arc\,tg & }
+ l\acute{i}m\,inf m\acute{a}x \acute{i}nf m\acute{i}n & %
+ \def\es@c{\nolimits}%
+ \expandafter\es@a\es@b sen tg arc\,sen arc\,cos arc\,tg & }
\def\spanishoperators{cotg cosec senh tgh }
% \end{macrocode}
%
@@ -2477,8 +2481,9 @@
\def\@roman{\@Roman}}}
{\def\es@romandef{%
\def\esromanindex##1##2{##1{\protect\es@roman{##2}}}%
- \def\@roman##1{\protect\es@roman{\romannumeral##1}}%
- \def\es@roman{\es@xlsc\uppercase\@firstofone}}}
+ \def\@roman##1{\es@roman{\number##1}}%
+ \def\es@roman##1{\es@scroman{\romannumeral##1}}%
+ \DeclareRobustCommand\es@scroman{\es@xlsc\uppercase\@firstofone}}}
\es@optlayout{lcroman}{\es@romandef}
\newcommand\spanishlcroman{\def\@roman##1{\romannumeral##1}}
\newcommand\spanishucroman{\def\@roman{\@Roman}}
@@ -2697,26 +2702,8 @@
\typeout{*****************}
\@ifundefined{es@sdef}{\@@end}{}
-%%
-%% \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 \~}
-%%
+
\endinput
-%%
-%% End of file `romanidx.tex'.
%</indexes>
% \end{macrocode}
%
@@ -2744,4 +2731,3 @@
-