summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-french
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-26 22:31:06 +0000
committerKarl Berry <karl@freefriends.org>2015-11-26 22:31:06 +0000
commit2a0144212b1303089330e19563accfcce05f074c (patch)
treefb82ae1b7a443b97568c24b29cde4185ceba5409 /Master/texmf-dist/source/generic/babel-french
parent77f3c70030f7f916ddf1ccc01d9f83c307b9f8f0 (diff)
babel-french (26nov15)
git-svn-id: svn://tug.org/texlive/trunk@38954 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.dtx191
1 files changed, 117 insertions, 74 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
index dd545b215d2..31edc4a859b 100644
--- a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
+++ b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
@@ -1,4 +1,4 @@
-%\CheckSum{3226}
+%\CheckSum{3258}
%
%\iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -13,14 +13,14 @@
%<ldf>\ProvidesLanguage{frenchb}
%\ProvidesFile{frenchb.dtx}
%<*!lua>
- [2015/10/04 v3.1i French support from the babel system]
+ [2015/11/25 v3.1j French support from the babel system]
%</!lua>
%<*internal>
\iffalse
%</internal>
%<*lua>
--
--- File `frenchb.lua' generated from frenchb.dtx [2015/06/26 v3.1g]
+-- File `frenchb.lua' generated from frenchb.dtx [2015/11/25 v3.1j]
--
-- Copyright (C) 2014-2015 Daniel Flipo
-- <daniel (dot) flipo (at) free (dot) fr>
@@ -82,8 +82,10 @@
\lefthyphenmin=2 \righthyphenmin=3
\RecordChanges
\AtEndDocument{%
- \GlossaryPrologue{\section{{Change History}}}%
- \clearpage\PrintChanges
+ \clearpage
+ \section{Change History}%
+ \GlossaryPrologue{}%
+ \PrintChanges
}
\begin{document}
\sffamily
@@ -1202,37 +1204,52 @@
% \changes{v3.1i}{2015/10/04}{Compatibility code added due to changes
% in the 2015/10/01 LaTeX release, see ltnews23.tex.}
%
+% \changes{v3.1j}{2015/10/16}{Loading luatexbase.sty is no longer
+% needed with LaTeX release 2015/10/01 or later.}
+%
% The following |\directlua| call ensures compatibility with LaTeX
-% releases prior to 2015/10/01: with this release prefix ``luatex''
-% has been stripped off the LuaTeX primitive names, see
-% \file{ltnews23.tex} for details.
+% releases prior to 2015/10/01: the |\localleftbox| primitive%
+% \footnote{used by \cs{frquote}, see p.~\pageref{cs:localleftbox}.}
+% introduced by Omega was prefixed with ``luatex'', it should no
+% longer be, see \file{ltnews23.tex} for details.
% \begin{macrocode}
\ifFB@luatex@punct
- \directlua{tex.enableprimitives("",
- tex.extraprimitives(
- "omega", "aleph", "luatex"))}
+ \directlua{tex.enableprimitives("", tex.extraprimitives("omega"))}
% \end{macrocode}
%
% We define two LuaTeX attributes to control spacing in French
% for `high punctuation' and quotes, making sure that
-% |\newluatexattribute| is defined.
+% |\newattribute| or former |\newluatexattribute| is defined.
% \begin{macrocode}
- \ifLaTeXe
- \AtEndOfPackage{%
- \RequirePackage{luatexbase}%
- \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
- }
- \PackageInfo{frenchb.ldf}{No need for active punctuation characters%
- \MessageBreak with this version of LuaTeX!%
- \MessageBreak reported}
- \else
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname newluatexattribute\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname newluafunction\endcsname\relax
+% \end{macrocode}
+% This code is for Plain or LaTeX versions prior to 2015/10/01.
+% \begin{macrocode}
+ \ifLaTeXe
+ \AtEndOfPackage{%
+ \RequirePackage{luatexbase}%
+ \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
+ \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
+ }
+ \else
\input luatexbase.sty
+ \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
+ \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
\fi
- \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
+ \else
+% \end{macrocode}
+% This code is for recent LaTeX versions (starting with 2015/10/01)
+% or Plain when \file{ltluatex.tex} has been loaded before \babel.
+% \begin{macrocode}
+ \newattribute\FB@addDPspace \FB@addDPspace=1 \relax
+ \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
+ \fi
+ \ifLaTeXe
+ \PackageInfo{frenchb.ldf}{No need for active punctuation
+ characters\MessageBreak with this version
+ of LuaTeX!\MessageBreak reported}
+ \else
\fb@info{No need for active punctuation characters\\
with this version of LuaTeX!}
\fi
@@ -2012,7 +2029,7 @@ return french_punctuation
\let\AutoSpaceBeforeFDP\autospace@beforeFDP
\let\NoAutoSpaceBeforeFDP\noautospace@beforeFDP
\AutoSpaceBeforeFDP
- \fi
+\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2266,6 +2283,7 @@ return french_punctuation
% and the needed technical stuff to handle options:
% \begin{macrocode}
\newcount\FBguill@level
+\newtoks\FB@everypar
\newif\ifFBcloseguill \FBcloseguilltrue
\newif\ifFBInnerGuillSingle
\def\FBguillopen{\bgroup\NoAutoSpacing\guillemotleft\egroup}
@@ -2291,76 +2309,101 @@ return french_punctuation
\newcommand\frquote[1]{\fr@quote{#1}}
\fi
% \end{macrocode}
+%
+% \changes{v3.1j}{2015/11/25}{\cs{fr@quote} completely rewritten:
+% \cs{leavevmode} added and explicitly save/retore \cs{everypar} and
+% \cs{localleftbox} instead of using a group in order to ensure
+% compatibility with package wrapfig.}
+%
+% \changes{v3.1j}{2015/11/21}{\cs{PackageWarning} is undefined in
+% Plain, use \cs{fb@warning} instead.}
+%
% The internal command |\fr@quote| takes one (long) argument: the
% quotation text.
% \begin{macrocode}
\newcommand{\fr@quote}[1]{%
- \bgroup
- \ifnum\FBguill@level=2
- \PackageWarning{frenchb.ldf}{%
- \protect\frquote\space accepts no more than two levels
- \MessageBreak of quotations. Reported}
- \else
- \advance\FBguill@level by \@ne
- \fi
- \ifnum\FBguill@level=1
+ \leavevmode
+ \advance\FBguill@level by \@ne
% \end{macrocode}
-% Set |\FBeverypar@quote| for level 1 quotations:
+% Kern used inside French quotes; must match the fixed part of
+% |\FBguillspace|.
% \begin{macrocode}
- \ifx\FBeveryparguill\relax
- \let\FBeverypar@quote\relax
- \else
- \def\FBeverypar@quote{\FBeveryparguill
- \kern.8\fontdimen2\font}%
- \fi
- \ogi
- \everypar \expandafter{\the\everypar \FBeverypar@quote}%
- #1\fgi
+ \def\FB@quotespace{\kern.8\fontdimen2\font}%
+ \ifcase\FBguill@level
+ \or
+% \end{macrocode}
+% This for level 1 (outer) quotations: save |\everypar| before
+% customising it, set |\FBeverypar@quote| for level 1 quotations
+% and add it to |\everypar|, then print the quotation:
+% \begin{macrocode}
+ \FB@everypar=\everypar
+ \ifx\FBeveryparguill\relax
\else
+ \def\FBeverypar@quote{\FBeveryparguill\FB@quotespace}%
+ \everypar=\expandafter{\the\everypar \FBeverypar@quote}%
+ \fi
+ \ogi #1\fgi
+ \or
% \end{macrocode}
% This for level 2 (inner) quotations: Omega's command
% |\localleftbox| included in LuaTeX, formerly named
% |\luatexlocalleftbox|, is convenient for repeating guillemets
-% at the beginning of every line.
+% at the beginning of every line.\label{cs:localleftbox}
%
% \changes{v3.1i}{2015/10/04}{\cs{luatexlocalleftbox} changed to
-% \cs{localleftbox} for new LaTeX release 2015/10/01.}
+% \cs{localleftbox} by new LaTeX release 2015/10/01.}
%
% \begin{macrocode}
- \ifx\FBeverylineguill\FBguillopen
- \localleftbox{\guillemotleft\kern.8\fontdimen2\font}%
+ \ifx\FBeverylineguill\FBguillopen
+ \localleftbox{\guillemotleft\FB@quotespace}%
+ \let\FBeverypar@quote\relax
+ \ogi #1\ifFBcloseguill\fgi\fi
+ \else
+ \ifx\FBeverylineguill\FBguillclose
+ \localleftbox{\guillemotright\FB@quotespace}%
\let\FBeverypar@quote\relax
- \FB@og #1\ifFBcloseguill\FB@fg\fi
+ \ogi #1\ifFBcloseguill\fgi\fi
\else
- \ifx\FBeverylineguill\FBguillclose
- \localleftbox{\guillemotright\kern.8\fontdimen2\font}%
- \let\FBeverypar@quote\relax
- \FB@og #1\ifFBcloseguill\FB@fg\fi
- \else
% \end{macrocode}
% otherwise we need to redefine |\FBeverypar@quote| (and eventually
% |\ogii|, |\fgii|) for level 2 quotations:
% \begin{macrocode}
- \let\FBeverypar@quote\relax
- \ifFBInnerGuillSingle
- \def\ogii{\leavevmode
- \guilsinglleft\FBguillspace}%
- \def\fgii{\ifdim\lastskip>\z@\unskip\fi
- \FBguillspace\guilsinglright}%
- \ifx\FBeveryparguill\FBguillopen
- \def\FBeverypar@quote{\guilsinglleft
- \kern.8\fontdimen2\font}%
- \fi
- \ifx\FBeveryparguill\FBguillclose
- \def\FBeverypar@quote{\guilsinglright
- \kern.8\fontdimen2\font}%
- \fi
- \fi
- \ogii #1\ifFBcloseguill \fgii \fi
- \fi
+ \let\FBeverypar@quote\relax
+ \ifFBInnerGuillSingle
+ \def\ogii{\leavevmode
+ \guilsinglleft\FBguillspace}%
+ \def\fgii{\ifdim\lastskip>\z@\unskip\fi
+ \FBguillspace\guilsinglright}%
+ \ifx\FBeveryparguill\FBguillopen
+ \def\FBeverypar@quote{\guilsinglleft\FB@quotespace}%
+ \fi
+ \ifx\FBeveryparguill\FBguillclose
+ \def\FBeverypar@quote{\guilsinglright\FB@quotespace}%
+ \fi
+ \fi
+ \ogii #1\ifFBcloseguill \fgii \fi
\fi
\fi
- \egroup
+ \else
+% \end{macrocode}
+% Warn if |\FBguill@level| $\ge 3$:
+% \begin{macrocode}
+ \ifx\PackageWarning\@undefined
+ \fb@warning{\noexpand\frquote\space accepts no more than
+ two levels.\\ Quotation not printed.}%
+ \else
+ \PackageWarning{frenchb.ldf}{%
+ \protect\frquote\space accepts no more than two levels
+ \MessageBreak Quotation not printed. Reported}
+ \fi
+ \fi
+% \end{macrocode}
+% Clean on exit: adjust |\FBguill@level| and restore
+% |\localleftbox| and |\everypar|.
+% \begin{macrocode}
+ \advance\FBguill@level by \m@ne
+ \ifx\FBeverylineguill\FBguillnone\else\localleftbox{}\fi
+ \ifx\FBeveryparguill\relax\else\everypar=\FB@everypar\fi
}
% \end{macrocode}
% \end{macro}