diff options
author | Karl Berry <karl@freefriends.org> | 2017-10-21 21:38:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-10-21 21:38:12 +0000 |
commit | 6bb8f06468e4c4b7717cce9e4227e7465431506d (patch) | |
tree | 58513a7e34c5b2311682bffbb5f55d2432cb5d61 /Master/texmf-dist | |
parent | 8c965e5ca448a84cc51fea64d297cdcf00c4a1f2 (diff) |
babel-french (21oct17)
git-svn-id: svn://tug.org/texlive/trunk@45567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/babel-french/frenchb.pdf | bin | 285434 -> 287379 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/generic/babel-french/frenchb.dtx | 79 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/acadian.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/canadien.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/francais.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/french.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/frenchb.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-french/frenchb.lua | 12 |
8 files changed, 75 insertions, 26 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 b00a00cb7b0..618961eb02d 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 61afd11a004..03bbe841547 100644 --- a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx +++ b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx @@ -13,7 +13,7 @@ %<frenchb>\ProvidesLanguage{frenchb} %<lua>--[[ %<lua> File `frenchb.lua’ generated from frenchb.dtx - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] %<*internal> \iffalse %</internal> @@ -191,10 +191,15 @@ % \begin{enumerate} % \item French hyphenation patterns are made active; % \item `high punctuation’ characters (|:| |;| |!| |?|) -% automatically add correct spacing in French; this is -% achieved using callbacks in Lua(La)TeX or `XeTeXinterchar’ -% mechanism in Xe(La)TeX; with TeX’82 and pdf(La)TeX these -% four characters are made active in the whole document; +% automatically add correct spacing% +% \footnote{Well, the automatic insertion may add unwanted +% spaces in some cases, for correction see +% \fbo{AutoSpacePunctuation} option and \cs{NoAutoSpacing} +% command p.~\pageref{autospacepunctuation}.} +% in French; this is achieved using callbacks in Lua(La)TeX +% or `XeTeXinterchar’ mechanism in Xe(La)TeX; with TeX’82 and +% pdf(La)TeX these four characters are made active in the +% whole document; % \item |\today| prints the date in French; % \item the caption names are translated into French % (\LaTeX{} only). For customisation of caption names see @@ -442,6 +447,7 @@ % before 2008 without changes: by default |\up| now relies on % |\fup| designed to produce better looking superscripts. % \item [AutoSpacePunctuation=false (true)]; in French, the user +% \hlabel{autospacepunctuation} % \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 @@ -451,9 +457,10 @@ % `|:|’; the defaults follow the French `Imprimerie Nationale’s % recommendations. This is convenient in most cases but can lead % to addition of spurious spaces in URLs, in MS-DOS paths or in -% timetables (10:55), except if they are typed in |\texttt| or -% verbatim mode. When the current font is a monospaced -% (typewriter) font, no spurious space is added in that case% +% timetables (10:55) ---this no longer occurs with LuaTeX---, +% except if they are typed in |\texttt| or verbatim mode. +% When the current font is a monospaced (typewriter) font, +% no spurious space is added in that case% % \footnote{Unless option \fbo{OriginalTypewriter} is set, % \cs{ttfamily} is redefined in French to switch off space % tuning, see below.}, @@ -462,11 +469,16 @@ % % Choosing \fbo{AutoSpacePunctuation=false} will ensure that % a proper space is 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 use the provided |\NoAutoSpacing| command +% a (normal) space has been typed in. This option gives full +% control on space insertion before `|:;!?|’. Those who are +% unsure about their typing in this area should stick to the +% default option and use the provided |\NoAutoSpacing| command % inside a group in case an unwanted space is added by \frenchb{} -% (i.e.\ |{\NoAutoSpacing 10:55}|). +% (i.e.\ |{\NoAutoSpacing http://mysite}|% +% \footnote{Actually, this is needed only with the XeTeX and +% pdfTeX engines. LuaTeX no longer inserts any space in strings +% like http://mysite, C:\textbackslash Foo, 10:55…} +% or |{\NoAutoSpacing ???}| (needed for pdfTeX only). % \item [ThinColonSpace=true (false)] changes the inter-word % non-breaking space added before the colon `:’ to a thin space, % so that the same amount of space is added before any of the @@ -664,6 +676,13 @@ % % \subsubsection*{What’s new in version 3.3?} % +% In version~3.3d the automatic insertion of non-breaking spaces +% before the colon character has been improved \emph{with engine +% LuaTeX only}: a spurious space is no longer inserted in strings +% like http://mysite, C:\textbackslash Program Files or 10:55. +% Unfortunately, my attempts to do the same with XeTeX or pdfTeX +% were unsuccessful. +% % A few internal changes have been made in version~3.3c to improve % the convertion into HTML of non-breaking spaces added by \frenchb. % Usage of \exe{lwarp} (v.0.37 and up) is recommended for HTML @@ -1500,7 +1519,7 @@ local function french_punctuation (head) % (v3.0c) did not work properly. Fixed now (I hope!). % Pointed out by Jacques André.} % -% If the previous item is a glue, check its natural width, only +% If the previous node is a glue, check its natural width, only % positive glues (actually glues > 1 sp, for tabular `l’ % columns) are to be replaced by a non-breaking space. % \begin{macrocode} @@ -1511,6 +1530,11 @@ local function french_punctuation (head) end local realglue = is_glue and glue_wd > 1 % \end{macrocode} +% +% \changes{v3.3d}{2017/10/17}{In default mode, for `:’ only, check +% if next node is a glyph or not. If it is, turn the `auto’ flag +% to false (avoids spurious spaces in URLs, MSDOS paths or 10:35).} +% % For characters for which |FB_punct_thin| or |FB_punct_thick| is % \emph{true}, the amount of spacing to be typeset before them % is controlled by commands |\FBthinspace| and |\FBcolonspace| @@ -1520,17 +1544,32 @@ local function french_punctuation (head) % nobreak penalty and the required \emph{glue}. % Otherwise (|auto| option), the penalty and the required % \emph{glue} are inserted if attribute |\FB@addDPspace| is set, -% unless one of these three conditions is met: -% a) the previous character is part of type |FB_punct_null| (this -% avoids spurious spaces in strings like |(!)| or |??|), -% b) a null glue (actually glues <= 1 sp for tabulars) preceeds the -% punctuation character, -% c) the punctuation character starts a paragraph or an |\hbox{}|. -% +% unless any of these four conditions is met: +% a) node is `:’ and the next one is of type GLYPH (avoids spurious +% spaces in http://mysite, C:\textbackslash{} or 10:35); +% b) the previous character is part of type |FB_punct_null| +% (avoids spurious spaces in strings like |(!)| or |??|); +% c) a null glue (actually glues <= 1 sp for tabulars) preceeds +% the punctuation character (for tabulars and listings); +% d) the punctuation character starts a paragraph or an |\hbox{}|. +% +% When option \fbo{UnicodeNoBreakSpaces} is set to \fbo{true}, +% a Unicode character U+00A0 or U+202F is inserted instead of +% penalty and glue. % \begin{macrocode} if FB_punct_thin[char] or FB_punct_thick[char] then local SBDP = has_attribute(item, addDPspace) local auto = SBDP and SBDP > 0 + if FB_punct_thick[char] and auto then + local next = item.next + local next_id + if next then + next_id = next.id + end + if next_id and next_id == GLYPH then + auto = false + end + end if auto then if (prev_char and FB_punct_null[prev_char]) or (is_glue and glue_wd <= 1) or diff --git a/Master/texmf-dist/tex/generic/babel-french/acadian.ldf b/Master/texmf-dist/tex/generic/babel-french/acadian.ldf index 4537821aaa7..f63fb203c91 100644 --- a/Master/texmf-dist/tex/generic/babel-french/acadian.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/acadian.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{acadian} - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] \input french.ldf\relax %% %% \CharacterTable diff --git a/Master/texmf-dist/tex/generic/babel-french/canadien.ldf b/Master/texmf-dist/tex/generic/babel-french/canadien.ldf index c09a508d3cc..2964357b86b 100644 --- a/Master/texmf-dist/tex/generic/babel-french/canadien.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/canadien.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{canadien} - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] \PackageWarning{canadien.ldf}% {Option `canadien' for Babel is *deprecated*,\MessageBreak it might be removed sooner or later. Please\MessageBreak diff --git a/Master/texmf-dist/tex/generic/babel-french/francais.ldf b/Master/texmf-dist/tex/generic/babel-french/francais.ldf index cade83da2d9..51cd44b61dd 100644 --- a/Master/texmf-dist/tex/generic/babel-french/francais.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/francais.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{francais} - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] \PackageWarning{francais.ldf}% {Option `francais' for Babel is *deprecated*,\MessageBreak it might be removed sooner or later. Please\MessageBreak diff --git a/Master/texmf-dist/tex/generic/babel-french/french.ldf b/Master/texmf-dist/tex/generic/babel-french/french.ldf index 7ecb9bda3f4..c15b624580b 100644 --- a/Master/texmf-dist/tex/generic/babel-french/french.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/french.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{french} - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] %% %% Babel package for LaTeX version 2e %% Copyright © 1996 - 2017 diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf index 8727ecfd604..c81e0f58666 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.ldf @@ -24,7 +24,7 @@ %% Please report errors to: <daniel (dot) flipo (at) free (dot) fr> %% \ProvidesLanguage{frenchb} - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] \def\bbl@tempa{frenchb} \ifx\CurrentOption\bbl@tempa \let\l@frenchb\l@french diff --git a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua index bbad9953a99..1e706920577 100644 --- a/Master/texmf-dist/tex/generic/babel-french/frenchb.lua +++ b/Master/texmf-dist/tex/generic/babel-french/frenchb.lua @@ -1,6 +1,6 @@ --[[ File `frenchb.lua’ generated from frenchb.dtx - [2017/09/07 v3.3c French support from the babel system] + [2017/10/19 v3.3d French support from the babel system] Copyright © 2014-2017 Daniel Flipo <daniel (dot) flipo (at) free (dot) fr> License LPPL: see french.ldf. @@ -148,6 +148,16 @@ local function french_punctuation (head) if FB_punct_thin[char] or FB_punct_thick[char] then local SBDP = has_attribute(item, addDPspace) local auto = SBDP and SBDP > 0 + if FB_punct_thick[char] and auto then + local next = item.next + local next_id + if next then + next_id = next.id + end + if next_id and next_id == GLYPH then + auto = false + end + end if auto then if (prev_char and FB_punct_null[prev_char]) or (is_glue and glue_wd <= 1) or |