diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-14 21:47:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-14 21:47:39 +0000 |
commit | 1c7a73fbd40f13ad63c7f7a40c1947e98578895c (patch) | |
tree | 751ea3d9bd22375790aea0bcb0e23d13cd02e805 /Master/texmf-dist | |
parent | 0c27b92841f29375f8faf1e42527c90fd7c226df (diff) |
babel-french (14mar14)
git-svn-id: svn://tug.org/texlive/trunk@33177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/babel-french/frenchb.pdf | bin | 234821 -> 235810 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/generic/babel-french/frenchb.dtx | 79 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/frenchb.ldf | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/frenchb.lua (renamed from Master/texmf-dist/doc/generic/babel-french/frenchb.lua) | 4 |
4 files changed, 90 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/generic/babel-french/frenchb.pdf b/Master/texmf-dist/doc/generic/babel-french/frenchb.pdf Binary files differindex 3ca90183bc8..f11b7aebac8 100644 --- a/Master/texmf-dist/doc/generic/babel-french/frenchb.pdf +++ b/Master/texmf-dist/doc/generic/babel-french/frenchb.pdf 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 diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf index 910bab413da..2862ce94b67 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf @@ -33,7 +33,7 @@ %% extension .ins) which are part of the distribution. %% \ProvidesLanguage{frenchb} - [2014/02/28 v3.0a French support from the babel system] + [2014/03/14 v3.0b French support from the babel system] %% %% File `frenchb.ldf' %% Babel package for LaTeX version 2e @@ -185,20 +185,27 @@ \newskip\FBthinskip \FBthinskip=1.66672pt \relax \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 +\ifFB@luatex@punct \newcommand*{\FB@luatex@punct@french}{% \ifx\shorthandoffORI\@undefined \let\shorthandonORI\shorthandon @@ -226,15 +233,24 @@ \FB@addto{extras}{\FB@luatex@punct@french} \FB@addto{noextras}{\FB@luatex@punct@nonfrench} \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) - }% - } + \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 \newcount\FB@interchartokenstateORI \ifFB@xetex@punct @@ -415,11 +431,12 @@ \FBAutoSpacePunctuationtrue} \def\NoAutoSpaceBeforeFDP{\noautospace@beforeFDP \FBAutoSpacePunctuationfalse} + \AtEndOfPackage{\AutoSpaceBeforeFDP} \else \let\AutoSpaceBeforeFDP\autospace@beforeFDP \let\NoAutoSpaceBeforeFDP\noautospace@beforeFDP + \AutoSpaceBeforeFDP \fi -\AutoSpaceBeforeFDP \ifLaTeXe %\let\ttfamilyORI\ttfamily %\let\rmfamilyORI\rmfamily diff --git a/Master/texmf-dist/doc/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua index c1ce1bb4d8c..7d0ffb50de4 100644 --- a/Master/texmf-dist/doc/generic/babel-french/frenchb.lua +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua @@ -1,5 +1,5 @@ -- --- 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. @@ -39,7 +39,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 local thin10 = tex.skip['FBthinskip'] local thinwd = thin10.width/65536/3.33 local thinst = thin10.stretch/65536/1.665 |