[efrench] [61] Les derniers changements ont eu pour effet que \NouveauLangage fonctionnait bien pour language .dat, mais non pour l'utilisateur voulant une nouvelle langue. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/efrench Archives
]
- To: efrench@xxxxxxxxxxxxxxxxxxx
- Subject: [efrench] [61] Les derniers changements ont eu pour effet que \NouveauLangage fonctionnait bien pour language .dat, mais non pour l'utilisateur voulant une nouvelle langue.
- From: subversion@xxxxxxxxxxxxx
- Date: Thu, 20 Oct 2011 11:03:30 +0200
Revision: 61
Author: rayj
Date: 2011-10-20 11:03:29 +0200 (Thu, 20 Oct 2011)
Log Message:
-----------
Les derniers changements ont eu pour effet que \NouveauLangage fonctionnait bien pour language.dat, mais non pour l'utilisateur voulant une nouvelle langue. Il y a maintenant un morceau de code autonome pour chaque cas, original pour l'utilisateur ou la modification pour language.dat
Raymond, le 20 octobre 2011
Modified Paths:
--------------
trunk/doc/french_doc.txt
trunk/inputs/french/french.sty
trunk/inputs/french/frenchle.sty
Modified: trunk/doc/french_doc.txt
===================================================================
--- trunk/doc/french_doc.txt 2011-10-10 18:51:20 UTC (rev 60)
+++ trunk/doc/french_doc.txt 2011-10-20 09:03:29 UTC (rev 61)
@@ -107,7 +107,7 @@
\ifx\@unexpandable@protect\undefined\let\protect\empty%
\else\let\protect\@unexpandable@protect%
\fi%
- \xdef\FSfd{15 septembre 2011}% eFrench
+ \xdef\FSfd{20 octobre 2011}% eFrench
\xdef\FSfv{V5,9995}% r j +
\xdef\frenchstyleid{\FSfv\space-- \FSfd\space --}%
}}%
@@ -3829,7 +3829,28 @@
\if@FE\expandafter\@@input##2\relax\fi\fi}%
\ifx\undefined\@excn\@tempc%
\else\ifx\@tempb\@excn\@tempc\fi\fi}%
-\gdef\NouveauLangage[##1]##2{% -....................... \NouveauLangage[##]{name}
+\gdef\NouveauLangage[##1]##2{%....................... \NouveauLangage[##]{name}
+%-- check for an anormal change in language.dat:
+\expandafter\@ifundefined{l@##2}{}% do nothing, unused at initex
+{% First accept babel definitions (\chardef) of languages.
+\chardef\l@no##1\expandafter\if\csname l@##2\endcsname\l@no\else%
+\edef\l@no{##1}\expandafter%
+% Secondly accept our own defs.
+\ifx\csname l@##2\endcsname\l@no% OK
+\else\f@issue\typeout{^^J \frenchname.sty \string: -27- %
+%\@txt@msg{language \l@no\space (##2) was initially }%
+%\@txt@msg{(at initex) numbered \csname l@##2\endcsname\space(ERROR!)}%
+}[##2]\f@ERRdat%
+\fi\fi}%
+%--
+\expandafter\tl@ng\csname##2TeXmods\endcsname%
+\expandafter\gdef\csname##2 \endcsname% The protected language cs.
+{\expandafter\switchtolanguage\csname ##2TeXmods\endcsname%
+\@Hif\language=##1\@Hfi\relax}%
+\expandafter\gdef\csname##2\endcsname% The language cs.
+{\protect\csname##2 \endcsname}%
+}%\NouveauLangage
+\gdef\Nouveau@Langage[##1]##2{% -....................... \Nouveau@Langage[##]{name}
%arabic as a language should not change the definition of \arabic V5,9995
% the same is valid for future similar cases V5,9995
\expandafter\@ifundefined{##2}{\lang@defifalse}% V5,9995
@@ -3865,24 +3886,24 @@
\expandafter\gdef\csname##2\endcsname% -The language cs.
{\protect\csname##2 \endcsname}%
\fi% V5,9995
- }% -\NouveauLangage
+ }% -\Nouveau@Langage
% test if #1 equal ``='' that means same language hyphenation but a dialect.
\edef\@temp@{=}%
\def\@langue##1##2 ##3 ##4/##5{\def\@tempa{=}\def\@tempb{##1}%
\ifx\@tempa\@tempb%
\ifnum\@FrCount > 0 \advance\@FrCount by -1\fi%
\relax% -relax Max! Why is it absolutely needed?
- \expandafter\NouveauLangage\expandafter[\the\@FrCount]{##2}%
+ \expandafter\Nouveau@Langage\expandafter[\the\@FrCount]{##2}%
\ifnum\@FrCount \@temp@ 0 \@FrCount= -1\fi%
\else\edef\@temp@{<}\@l@ngue##1##2 ##3 ##4/{##5}%
\fi}%
-\def\@l@ngue##1 ##2 ##3/##4{\NouveauLangage[##4]{##1}%
+\def\@l@ngue##1 ##2 ##3/##4{\Nouveau@Langage[##4]{##1}%
%%%\typeout{La langue ##1 est utilis\'ee sous le num\'ero \the\@FrCount}
%\expandafter\@@input##2\relax%% loading of patterns is done at initex
%% % \if@FE
\@rhef##1/##3/% -Check if reload of exceptions file is needed.
%%%\fi
- }% -end of \NouveauLangage
+ }% -end of \Nouveau@Langage
%
\let\hyphenation\f@hyphenation% -use our new macro.
\openin\@inputcheck = language.dat \def\@tempb{}%
Modified: trunk/inputs/french/french.sty
===================================================================
--- trunk/inputs/french/french.sty 2011-10-10 18:51:20 UTC (rev 60)
+++ trunk/inputs/french/french.sty 2011-10-20 09:03:29 UTC (rev 61)
@@ -10,7 +10,7 @@
\ifx\@unexpandable@protect\undefined\let\protect\empty%
\else\let\protect\@unexpandable@protect%
\fi%
- \xdef\FSfd{26 septembre 2011}% eFrench
+ \xdef\FSfd{20 octobre 2011}% eFrench
\xdef\FSfv{V5,9995}%
\xdef\frenchstyleid{\FSfv\space-- \FSfd\space --}%
}}%
@@ -2781,7 +2781,26 @@
\if@FE\expandafter\@@input##2\relax\fi\fi}%
\ifx\undefined\@excn\@tempc%
\else\ifx\@tempb\@excn\@tempc\fi\fi}%
-\gdef\NouveauLangage[##1]##2{% > def nouveau langage 1
+\gdef\NouveauLangage[##1]##2{%
+ \expandafter\@ifundefined{l@##2}{}%
+ {%
+ \chardef\l@no##1\expandafter\if\csname l@##2\endcsname\l@no\else%
+ \edef\l@no{##1}\expandafter%
+ %
+ \ifx\csname l@##2\endcsname\l@no%
+ \else\f@issue\typeout{^^J \frenchname.sty \string: -27- %
+ %
+ %
+ }[##2]\f@ERRdat%
+ \fi\fi}%
+ \expandafter\tl@ng\csname##2TeXmods\endcsname%
+ \expandafter\gdef\csname##2 \endcsname%
+ {\expandafter\switchtolanguage\csname ##2TeXmods\endcsname%
+ \@Hif\language=##1\@Hfi\relax}%
+ \expandafter\gdef\csname##2\endcsname%
+ {\protect\csname##2 \endcsname}%
+ }%
+\def\Nouveau@Langage[##1]##2{% > def nouveau langage 1
%arabic as a language should not change the definition of \arabic
% the same is valid for future similar cases
\expandafter\@ifundefined{##2}{\lang@defifalse}%
@@ -2821,11 +2840,11 @@
\ifx\@tempa\@tempb%
\ifnum\@FrCount > 0 \advance\@FrCount by -1\fi%
\relax%
- \expandafter\NouveauLangage\expandafter[\the\@FrCount]{##2}%
+ \expandafter\Nouveau@Langage\expandafter[\the\@FrCount]{##2}%
\ifnum\@FrCount \@temp@ 0 \@FrCount= -1\fi%
\else\edef\@temp@{<}\@l@ngue##1##2 ##3 ##4/{##5}%
\fi}%
-\def\@l@ngue##1 ##2 ##3/##4{\NouveauLangage[##4]{##1}%
+\def\@l@ngue##1 ##2 ##3/##4{\Nouveau@Langage[##4]{##1}%
%
\@rhef##1/##3/%
}%
Modified: trunk/inputs/french/frenchle.sty
===================================================================
--- trunk/inputs/french/frenchle.sty 2011-10-10 18:51:20 UTC (rev 60)
+++ trunk/inputs/french/frenchle.sty 2011-10-20 09:03:29 UTC (rev 61)
@@ -1,9 +1,7 @@
%
% This is frenchle.sty (informations en francais ci-dessous.tex)
-% This is the light version of THE multilingual "FrenchPro" package for LaTeX.
+% This is the light version of THE multilingual "e-French" package for LaTeX.
% Copyright Bernard Gaulle, 2000-2007, Copyright notice is LPLL.
-% If you want to have informations about the professional version
-% ask Bernard GAULLE <frenchprobg -At- free.fr>, otherwise <frenchlebg -AT- free.fr>.
%
% Cette extension << french allegee >> a pour objectif de resoudre un maximum
% de problemes de francisation de LaTeX sans avoir a connaitre la moindre
@@ -46,7 +44,7 @@
\ifx\@unexpandable@protect\undefined\let\protect\empty%
\else\let\protect\@unexpandable@protect%
\fi%
- \xdef\FSfd{26 septembre 2011}%
+ \xdef\FSfd{20 octobre 2011}%
\xdef\FSfv{V5,9995}%
\xdef\frenchstyleid{\FSfv\space-- \FSfd\space --}%
}}%
@@ -1915,7 +1913,26 @@
\if@FE\expandafter\@@input##2\relax\fi\fi}%
\ifx\undefined\@excn\@tempc%
\else\ifx\@tempb\@excn\@tempc\fi\fi}%
-\gdef\NouveauLangage[##1]##2{% > def nouveau langage 1
+\gdef\NouveauLangage[##1]##2{%
+ \expandafter\@ifundefined{l@##2}{}%
+ {%
+ \chardef\l@no##1\expandafter\if\csname l@##2\endcsname\l@no\else%
+ \edef\l@no{##1}\expandafter%
+ %
+ \ifx\csname l@##2\endcsname\l@no%
+ \else\f@issue\typeout{^^J \frenchname.sty \string: -27- %
+ \@txt@msg{language \l@no\space (##2) was initially }%
+ \@txt@msg{(at initex) numbered \csname l@##2\endcsname\space(ERROR!)}%
+ }[##2]\f@ERRdat%
+ \fi\fi}%
+ \expandafter\tl@ng\csname##2TeXmods\endcsname%
+ \expandafter\gdef\csname##2 \endcsname%
+ {\expandafter\switchtolanguage\csname ##2TeXmods\endcsname%
+ \@Hif\language=##1\@Hfi\relax}%
+ \expandafter\gdef\csname##2\endcsname%
+ {\protect\csname##2 \endcsname}%
+ }%
+\def\Nouveau@Langage[##1]##2{% > def nouveau langage 1
%arabic as a language should not change the definition of \arabic
% the same is valid for future similar cases
\expandafter\@ifundefined{##2}{\lang@defifalse}%
@@ -1955,11 +1972,11 @@
\ifx\@tempa\@tempb%
\ifnum\@FrCount > 0 \advance\@FrCount by -1\fi%
\relax%
- \expandafter\NouveauLangage\expandafter[\the\@FrCount]{##2}%
+ \expandafter\Nouveau@Langage\expandafter[\the\@FrCount]{##2}%
\ifnum\@FrCount \@temp@ 0 \@FrCount= -1\fi%
\else\edef\@temp@{<}\@l@ngue##1##2 ##3 ##4/{##5}%
\fi}%
-\def\@l@ngue##1 ##2 ##3/##4{\NouveauLangage[##4]{##1}%
+\def\@l@ngue##1 ##2 ##3/##4{\Nouveau@Langage[##4]{##1}%
%
\@rhef##1/##3/%
}%