summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-french
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-02 18:26:31 +0000
committerKarl Berry <karl@freefriends.org>2018-05-02 18:26:31 +0000
commitac73f1b110ba60d5da94718ea8e0c5c098cb3f8b (patch)
treed0196cfa2a8a527550e66695587a57cefcd42ab9 /Master/texmf-dist/source/generic/babel-french
parent986752733eb91fe2ebdb22f9e2e058794042f51e (diff)
ltximg (12apr18)
git-svn-id: svn://tug.org/texlive/trunk@47567 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.dtx131
1 files changed, 69 insertions, 62 deletions
diff --git a/Master/texmf-dist/source/generic/babel-french/frenchb.dtx b/Master/texmf-dist/source/generic/babel-french/frenchb.dtx
index fe64cd9f8da..3b4c68305ee 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{3600}
+%\CheckSum{3611}
%
%\iffalse
% Tell the LaTeX system who we are and write an entry on the
@@ -13,7 +13,7 @@
%<frenchb>\ProvidesLanguage{frenchb}
%<lua>--[[
%<lua> File `frenchb.lua’ generated from frenchb.dtx
- [2018/03/25 v3.4c French support from the babel system]
+ [2018/04/12 v3.4d French support from the babel system]
%<*internal>
\iffalse
%</internal>
@@ -4383,23 +4383,11 @@ return french_punctuation
% available on the keyboard (through a compose key for instance)
% is more comfortable than typing |\og| and |\fg|.
%
-% With pdfTeX (or old LuaTeX and XeTeX engines), quote characters
-% are made active and expand to |\og\ignorespaces| and |{\fg}|
-% respectively if the current language is French, and to
-% |\guillemotleft| and |\guillemotright| otherwise (think of German
-% quotes), this is done by |\FB@@og| and |\FB@@fg|; thus correct
-% non-breaking spaces will be added automatically to French quotes.
-% The quote characters typed in depend on the input encoding,
-% it can be single-byte (latin1, latin9, applemac,\dots) or
-% multi-bytes (utf-8, utf8x); the \pkg{inputenc} package has to
-% be loaded before the |\begin{document}| with the proper coding
-% option, so we check if |\DeclareInputText| is defined.
-%
-% Life is much simpler here with modern LuaTeX or XeTeX engines: we
-% just have to activate the |\FB@addGUILspace| attribute for LuaTeX
-% or set |\XeTeXcharclass| of quotes to the proper value for XeTeX.
+% Life is simple here with modern LuaTeX or XeTeX engines: we just
+% have to activate the |\FB@addGUILspace| attribute for LuaTeX or
+% set |\XeTeXcharclass| of quotes to the proper value for XeTeX.
%
-% \changes{v2.4c}{2010/05/23}{In \cs{ttfamilyFB}, also cancel
+%\changes{v2.4c}{2010/05/23}{In \cs{ttfamilyFB}, also cancel
% automatic spaces inside French guillemets coded as characters
% (see \cs{frenchbsetup}).}
%
@@ -4418,6 +4406,23 @@ return french_punctuation
% \changes{v3.2c}{2016/05/03}{Add a warning about options og/fg for old
% XeTeX or LuaTeX engines requiring active characters.}
%
+% \changes{v3.4d}{2018/04/11}{New test for deciding about utf8 encoding
+% for keys og and fg (the former one fails with LaTeX 2018 release).}
+%
+% With pdfTeX (or old LuaTeX and XeTeX engines), quote characters
+% are made active and expand to |\og\ignorespaces| and |{\fg}|
+% respectively if the current language is French, and to
+% |\guillemotleft| and |\guillemotright| otherwise (think of German
+% quotes), this is done by |\FB@@og| and |\FB@@fg|; thus correct
+% non-breaking spaces will be added automatically to French quotes.
+% The quote characters typed in depend on the input encoding,
+% it can be single-byte (latin1, latin9, applemac,\dots) or
+% multi-bytes (utf-8, utf8x); the next command checks if a character
+% is single-byte (then |\FB@second| is empty) or not.
+% \begin{macrocode}
+ \def\FB@parse#1#2\endparse{\def\FB@second{#2}}%
+% \end{macrocode}
+%
% \begin{macrocode}
\define@key{FB}{og}%
{\ifFBunicode
@@ -4461,43 +4466,45 @@ return french_punctuation
\fi
\else\guillemotleft\fi}%
\AtBeginDocument{%
- \ifdefined\DeclareInputText
- \ifdefined\uc@dclc
+ \ifdefined\uc@dclc
% \end{macrocode}
-% Package \pkg{inputenc} with utf8x encoding loaded, use |\uc@dclc|,
+% Package \pkg{inputenc} with utf8x (ucs) encoding loaded,
+% use |\uc@dclc|:
% \begin{macrocode}
- \uc@dclc{171}{default}{\FB@@og}%
- \else
+ \uc@dclc{171}{default}{\FB@@og}%
+ \else
% \end{macrocode}
-% if encoding is not utf8x, try utf8\dots
+% if encoding is not utf8x, check if the argument of |og|
+% is a single-byte character:
% \begin{macrocode}
- \ifdefined\DeclareUnicodeCharacter
+ \FB@parse#1\endparse
+ \ifx\FB@second\@empty
% \end{macrocode}
-% utf8 loaded, use |\DeclareUnicodeCharacter|,
+% This means 8-bit character encoding.
+% Package \pkg{MULEenc} (from CJK) defines |\mule@def|
+% to map characters to control sequences.
% \begin{macrocode}
- \DeclareUnicodeCharacter{00AB}{\FB@@og}%
+ \ifdefined\mule@def
+ \mule@def{11}{\FB@@og}%
\else
+ \ifdefined\DeclareInputText
+ \@tempcnta`#1\relax
+ \DeclareInputText{\the\@tempcnta}{\FB@@og}%
+ \else
% \end{macrocode}
-% if utf8 is not loaded either, we assume 8-bit character input
-% encoding. Package \pkg{MULEenc} (from CJK) defines |\mule@def|
-% to map characters to control sequences.
+% Package \pkg{inputenc} not loaded, no way\dots{}
% \begin{macrocode}
- \@tempcnta`#1\relax
- \ifdefined\mule@def
- \mule@def{11}{\FB@@og}%
- \else
- \DeclareInputText{\the\@tempcnta}{\FB@@og}%
+ \FBWarning{Option `og' requires package
+ inputenc;\MessageBreak reported}%
\fi
\fi
- \fi
- \else
+ \else
% \end{macrocode}
-% Package \pkg{inputenc} not loaded, no way\dots{}
+% This means multi-byte character encoding, we assume UTF-8
% \begin{macrocode}
- \FBWarning{Option `og' requires package inputenc;%
- \MessageBreak reported}%
- \fi
- }%
+ \DeclareUnicodeCharacter{00AB}{\FB@@og}%
+ \fi
+ \fi}%
\fi
}%
% \end{macrocode}
@@ -4527,26 +4534,26 @@ return french_punctuation
\fi
\else\guillemotright\fi}%
\AtBeginDocument{%
- \ifdefined\DeclareInputText
- \ifdefined\uc@dclc
- \uc@dclc{187}{default}{\FB@@fg}%
- \else
- \ifdefined\DeclareUnicodeCharacter
- \DeclareUnicodeCharacter{00BB}{\FB@@fg}%
- \else
- \@tempcnta`#1\relax
- \ifdefined\mule@def
- \mule@def{27}{{\FB@@fg}}%
- \else
- \DeclareInputText{\the\@tempcnta}{\FB@@fg}%
- \fi
- \fi
- \fi
- \else
- \FBWarning{Option `fg' requires package inputenc;%
- \MessageBreak reported}%
- \fi
- }%
+ \ifdefined\uc@dclc
+ \uc@dclc{187}{default}{\FB@@fg}%
+ \else
+ \FB@parse#1\endparse
+ \ifx\FB@second\@empty
+ \ifdefined\mule@def
+ \mule@def{27}{{\FB@@fg}}%
+ \else
+ \ifdefined\DeclareInputText
+ \@tempcnta`#1\relax
+ \DeclareInputText{\the\@tempcnta}{\FB@@fg}%
+ \else
+ \FBWarning{Option `fg' requires package
+ inputenc;\MessageBreak reported}%
+ \fi
+ \fi
+ \else
+ \DeclareUnicodeCharacter{00BB}{\FB@@fg}%
+ \fi
+ \fi}%
\fi
}%
}