summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-french
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-14 21:47:39 +0000
committerKarl Berry <karl@freefriends.org>2014-03-14 21:47:39 +0000
commit1c7a73fbd40f13ad63c7f7a40c1947e98578895c (patch)
tree751ea3d9bd22375790aea0bcb0e23d13cd02e805 /Master/texmf-dist/source/generic/babel-french
parent0c27b92841f29375f8faf1e42527c90fd7c226df (diff)
babel-french (14mar14)
git-svn-id: svn://tug.org/texlive/trunk@33177 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.dtx79
1 files changed, 52 insertions, 27 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
index abad36efa2c..2bb07d3ce57 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{3052}
+%\CheckSum{3066}
%
%\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>
- [2014/02/28 v3.0a French support from the babel system]
+ [2014/03/14 v3.0b French support from the babel system]
%</!lua>
%<*internal>
\iffalse
%</internal>
%<*lua>
--
--- File `frenchb.lua' generated from frenchb.dtx [2014/02/28 v3.0a]
+-- File `frenchb.lua' generated from frenchb.dtx [2014/03/14 v3.0b]
--
-- Copyright (C) 2014 Daniel Flipo <daniel.flipo at free.fr>
-- License LPPL: see frenchb.dtx.
@@ -75,6 +75,10 @@
\providecommand*\eTeX{\leavevmode\hbox{$\varepsilon$}-\TeX}
\hyphenation{Lua-TeX Lua-LaTeX Xe-LaTeX}
\lefthyphenmin=2 \righthyphenmin=3
+\AtEndDocument{%
+ \GlossaryPrologue{\section{{Change History}}}%
+ \clearpage\PrintChanges
+}
\begin{document}
\setlength{\parindent}{0pt}
\GetFileInfo{frenchb.dtx}
@@ -87,7 +91,6 @@
\end{center}
\vspace{2\baselineskip}
\thispagestyle{empty}
-\GlossaryPrologue{\section{{Change History}}}
\tableofcontents
\clearpage
\DocInput{frenchb.dtx}
@@ -1073,25 +1076,34 @@
% The following part holds specific code for punctuation with modern
% LuaTeX engines (version $\ge 0.76$).
%
+% \changes{v3.0b}{2014/02/13}{Require luatexbase with LaTeXe in case
+% fontspec has not been loaded before babel.}
+%
% We define two LuaTeX attributes to control spacing in French
% for `high punctuation' and quotes, making sure that
% |\newluatexattribute| is defined.
% \begin{macrocode}
\ifFB@luatex@punct
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname newluatexattribute\endcsname\relax
- \input luaotfload.sty
- \fi
- \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
\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
- \fb@info{No need for active punctuation characters\\
- with this version of LuaTeX!}
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname newluatexattribute\endcsname\relax
+ \input luaotfload.sty
+ \newluatexattribute\FB@addDPspace \FB@addDPspace=1 \relax
+ \newluatexattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
+ \fb@info{No need for active punctuation characters\\
+ with this version of LuaTeX!}
+ \fi
\fi
+\fi
% \end{macrocode}
%
% \iffalse
@@ -1158,7 +1170,7 @@ local nobreak = new_node(PENALTY)
nobreak.penalty = 10000
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
-local remove_node = nodes.remove
+local remove_node = node.remove
% \end{macrocode}
% Some variables to store |\FBthinskip|, |\FBcolonskip| and
% |\FBguillskip| (given for |lmr10|); width/stretch/shrink are
@@ -1333,6 +1345,7 @@ return french_punctuation
% warning reminding the user that active characters are no longer
% used in French with recent LuaTeX engines.
% \begin{macrocode}
+\ifFB@luatex@punct
\newcommand*{\FB@luatex@punct@french}{%
\ifx\shorthandoffORI\@undefined
\let\shorthandonORI\shorthandon
@@ -1360,6 +1373,11 @@ return french_punctuation
\FB@addto{extras}{\FB@luatex@punct@french}
\FB@addto{noextras}{\FB@luatex@punct@nonfrench}
% \end{macrocode}
+%
+% \changes{v3.0b}{2014/02/13}{frenchb.lua was not found by
+% Lua function dofile (not kpathsea aware).
+% Call function kpse.find\_file first, as suggested by Paul Gaborit.}
+%
% In \LaTeXe, file \file{frenchb.lua} will be loaded
% `AtBeginDocument' \emph{after} processing options
% (\fbo{ThinColonSpace} needs to be taken into account). The next
@@ -1370,20 +1388,27 @@ return french_punctuation
% (|\hbox| building).
% \begin{macrocode}
\def\activate@luatexpunct{%
- \directlua{%
- FR = \the\l@french
- local f = dofile("frenchb.lua")
- luatexbase.add_to_callback("pre_linebreak_filter",
- f, "frenchb.french_punctuation",1)
- luatexbase.add_to_callback("hpack_filter",
- f, "frenchb.french_punctuation",1)
- }%
- }
-% \end{macrocode}
-% End of specific code for punctuation with LuaTeX engines.
-% \begin{macrocode}
+ \directlua{%
+ FR = \the\l@french
+ local path = kpse.find_file("frenchb.lua", "lua")
+ if path then
+ local f = dofile(path)
+ luatexbase.add_to_callback("pre_linebreak_filter",
+ f, "frenchb.french_punctuation",1)
+ luatexbase.add_to_callback("hpack_filter",
+ f, "frenchb.french_punctuation",1)
+ else
+ texio.write_nl('')
+ texio.write_nl('*****************************')
+ texio.write_nl('Error: frenchb.lua not found.')
+ texio.write_nl('*****************************')
+ texio.write_nl('')
+ end
+ }%
+ }
\fi
% \end{macrocode}
+% End of specific code for punctuation with LuaTeX engines.
%
% \subsubsection{Punctuation with XeTeX}
% \label{sssec-punct-xetex}
@@ -1751,11 +1776,12 @@ return french_punctuation
\FBAutoSpacePunctuationtrue}
\def\NoAutoSpaceBeforeFDP{\noautospace@beforeFDP
\FBAutoSpacePunctuationfalse}
+ \AtEndOfPackage{\AutoSpaceBeforeFDP}
\else
\let\AutoSpaceBeforeFDP\autospace@beforeFDP
\let\NoAutoSpaceBeforeFDP\noautospace@beforeFDP
+ \AutoSpaceBeforeFDP
\fi
-\AutoSpaceBeforeFDP
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4141,5 +4167,4 @@ return french_punctuation
% \fi
%
% \Finale
-% \clearpage\PrintChanges
\endinput