texlive[46159] Master/texmf-dist: fmtcount (28dec17)

commits+karl at tug.org commits+karl at tug.org
Fri Dec 29 00:44:52 CET 2017


Revision: 46159
          http://tug.org/svn/texlive?view=revision&revision=46159
Author:   karl
Date:     2017-12-29 00:44:51 +0100 (Fri, 29 Dec 2017)
Log Message:
-----------
fmtcount (28dec17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fmtcount/CHANGES
    trunk/Master/texmf-dist/doc/latex/fmtcount/README
    trunk/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf
    trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
    trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-american.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-british.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-french.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-german.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def
    trunk/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty
    trunk/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty
    trunk/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/fmtcount/fc-brazilian.def

Modified: trunk/Master/texmf-dist/doc/latex/fmtcount/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fmtcount/CHANGES	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/doc/latex/fmtcount/CHANGES	2017-12-28 23:44:51 UTC (rev 46159)
@@ -1,5 +1,16 @@
 fmtcount package versions:
 
+Version 3.05:
+
+* Fix issue #28 (works now with lualatex: actually from 3.05 fmtcount
+  does not test any longer for what compiler is used but only for what
+  multilingual package --- such as polyglossia or babel --- are used).
+
+* Fixe pull request #29 (Fix European Portuguese cardinal
+  numbers). Portuguese formatting prior to 3.05 is renamed brazilian,
+  and the portuguese is fixed to reflect European Portuguese
+  spelling.
+
 Version 3.04:
 
 * Fix issue #27 (New definition of `\Numberstring` is now causing

Modified: trunk/Master/texmf-dist/doc/latex/fmtcount/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fmtcount/README	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/doc/latex/fmtcount/README	2017-12-28 23:44:51 UTC (rev 46159)
@@ -1,6 +1,6 @@
-LaTeX Package : fmtcount v3.04
+LaTeX Package : fmtcount v3.05
 
-Last Modified : 2017-09-16
+Last Modified : 2017-12-26
 
 Author        : Nicola Talbot and Vincent Belaïche
 

Modified: trunk/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx	2017-12-28 23:44:51 UTC (rev 46159)
@@ -1,11 +1,11 @@
 %\iffalse
 % fmtcount.dtx generated using makedtx version 1.2 (c) Nicola Talbot
 % Command line args:
+%   -author "Nicola Talbot and Vincent Bela\xEFche"
 %   -doc "fmtcount-manual.tex"
 %   -src "(.+)\.(sty|def)$=>\1.\2"
-%   -author "Nicola Talbot and Vincent Bela\xEFche"
 %   fmtcount
-% Created on 2017/9/17 22:04
+% Created on 2017/12/26 22:09
 %\fi
 %\iffalse
 %<*package>
@@ -77,7 +77,7 @@
             pdftitle={fmtcount.sty: Displaying the Values of LaTeX Counters},
             pdfkeywords={LaTeX,counter}]{hyperref}
 
-\CheckSum{10120}
+\CheckSum{10334}
 
 \doxitem{Option}{option}{options}
 
@@ -104,7 +104,7 @@
 % \url{www.dickimaw-books.com}
 % \and
 % Vincent Bela\"iche}
-% \date{2017-09-16 (version 3.04)\relax
+% \date{2017-12-26 (version 3.05)\relax
 %}
 % \maketitle
 % \tableofcontents
@@ -490,25 +490,33 @@
 %Italian support was added in version 1.31.\footnote{Thanks to
 %Edoardo Pasca for supplying the information.}
 %
+%Actually, \sty{fmtcount} has two modes:
+%\begin{itemize}
+%\item a multilingual mode, in which the commands \cs{numberstring}, \cs{ordinalstring}, \cs{ordinal}, and
+%  their variants will be formatted in the currently selected language, as per the \cs{languagename} macro set
+%  by \sty{babel}, \sty{polyglossia} or suchlikes, and
+%\item a default mode for backward compatibility in which these commands are formatted in English irrespective
+%  of \cs{languagename}, and to which \sty{fmtcount} falls back when it cannot detects packages such as
+%  \sty{babel} or \sty{polyglossia} are loaded.
+%\end{itemize}
 %
-%To ensure the language definitions are loaded correctly for document
-%dialects, use
+%For multilingual mode, \sty{fmtcount} needs to load correctly the language definition for document dialects. To
+%do this use
 %\begin{definition}[\DescribeMacro{\FCloadlang}]
 %\cs{FCloadlang}\marg{dialect}
 %\end{definition}
-%in the preamble. The \meta{dialect} should match the options passed to \sty{babel} or
-%\sty{polyglossia}. \sty{fmtcount} currently supports the following \meta{dialect}:
-%\LanguagePackageOptionList. If you don't use this,
-%\sty{fmtcount} will attempt to detect the required dialects, but
-%this isn't guaranteed to work.
+%in the preamble --- this will both switch on multilingual mode, and load the \meta{dialect} definition. The
+%\meta{dialect} should match the options passed to \sty{babel} or \sty{polyglossia}. \sty{fmtcount} currently
+%supports the following \meta{dialect}'s: \LanguagePackageOptionList.
 %
-%The commands
-%\cs{ordinal}, \cs{ordinalstring} and \cs{numberstring} (and their
-%variants) will be formatted in the currently selected language.
-%If the current language hasn't been loaded (via \cs{FCloadlang}
-%above) and \sty{fmtcount} detects a definition file for that
-%language it will attempt to load it, but this isn't robust and may
-%cause problems, so it's best to use \cs{FCloadlang}.
+%If you don't use \cs{FCloadlang}, \sty{fmtcount} will attempt to detect the required dialects and call
+%\cs{FCloadlang} for you, but this isn't guaranteed to work.  Notably, when \cs{FCloadlang} is not used and
+%\sty{fmtcount} has switched on multilingual mode, but without detecting the needed dialects in the preamble,
+%and \sty{fmtcount} has to format a number for a dialect for which definition has not been loaded (via
+%\cs{FCloadlang} above), then if \sty{fmtcount} detects a definition file for this dialect it will attempt to
+%load it, and cause an error otherwise. This loading in body has not been tested extensively, and may may cause
+%problems such as spurious spaces insertion before the first formatted number, so it's best to use
+%\cs{FCloadlang} explicitely in the preamble.
 %
 %If the French language is selected, the \texttt{french} option let you
 %configure the dialect and other aspects. The \texttt{abbr} also has
@@ -935,6 +943,152 @@
 %\fi
 %\iffalse
 %    \begin{macrocode}
+%<*fc-brazilian.def>
+%    \end{macrocode}
+%\fi
+% \subsubsection{fc-brazilian.def}
+% Brazilian definitions.
+%    \begin{macrocode}
+\ProvidesFCLanguage{brazilian}[2017/12/26]%
+%    \end{macrocode}
+% Load \sty{fc-portuges.def} if not already loaded.
+%    \begin{macrocode}
+\FCloadlang{portuges}%
+%    \end{macrocode}
+% Set |brazilian| to be equivalent to |portuges| for all the numeral ordinals, and string ordinals.
+%    \begin{macrocode}
+\global\let\@ordinalMbrazilian=\@ordinalMportuges
+\global\let\@ordinalFbrazilian=\@ordinalFportuges
+\global\let\@ordinalNbrazilian=\@ordinalNportuges
+\global\let\@ordinalstringFbrazilian\@ordinalstringFportuges
+\global\let\@ordinalstringMbrazilian\@ordinalstringMportuges
+\global\let\@ordinalstringNbrazilian\@ordinalstringMportuges
+\global\let\@OrdinalstringMbrazilian\@OrdinalstringMportuges
+\global\let\@OrdinalstringFbrazilian\@OrdinalstringFportuges
+\global\let\@OrdinalstringNbrazilian\@OrdinalstringMportuges
+%    \end{macrocode}
+% Convert a number to a textual representation. To make it easier, split it up into units, tens, teens and
+% hundreds. Units, tens, and hundreds are the same as for |portuges| and are not redefined, only the teens are
+% Brazilian specific.\\
+% Teens (argument must be a number from 0 to 9):
+%    \begin{macrocode}
+\newcommand*\@@teenstringbrazilian[1]{%
+  \ifcase#1\relax
+    dez%
+    \or onze%
+    \or doze%
+    \or treze%
+    \or quatorze%
+    \or quinze%
+    \or dezesseis%
+    \or dezessete%
+    \or dezoito%
+    \or dezenove%
+  \fi
+}%
+\global\let\@@teenstringbrazilian\@@teenstringbrazilian
+%    \end{macrocode}
+% Teens (with initial letter in upper case):
+%    \begin{macrocode}
+\newcommand*\@@Teenstringbrazilian[1]{%
+  \ifcase#1\relax
+    Dez%
+    \or Onze%
+    \or Doze%
+    \or Treze%
+    \or Quatorze%
+    \or Quinze%
+    \or Dezesseis%
+    \or Dezessete%
+    \or Dezoito%
+    \or Dezenove%
+  \fi
+}%
+\global\let\@@Teenstringbrazilian\@@Teenstringbrazilian
+%    \end{macrocode}
+% This has changed in version 1.08, so that it now stores
+% the result in the second argument, but doesn't display
+% anything. Since it only affects internal macros, it shouldn't
+% affect documents created with older versions. (These internal
+% macros are not meant for use in documents.)
+% \changes{3.02}{2016/01/12}{Replace \cs{DeclareRobustCommand} by
+% \cs{newcommand*} as robustness is handled now at top level in
+% \texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned macros
+% are \cs{@numberstringMbrazilian}, \cs{@numberstringFbrazilian},
+% \cs{@NumberstringMbrazilian}, \cs{@NumberstringFbrazilian},
+% \cs{@ordinalstringMbrazilian}, \cs{@ordinalstringFbrazilian},
+% \cs{@OrdinalstringMbrazilian}, and \cs{@OrdinalstringFbrazilian}.}
+% \changes{3.03}{2017/07/21}{Fix bug
+% \#\href{https://github.com/nlct/fmtcount/issues/25}{25}.}
+%    \begin{macrocode}
+\newcommand*{\@numberstringMbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringportuges
+  \let\@teenstring=\@@teenstringbrazilian
+  \let\@tenstring=\@@tenstringportuges
+  \let\@hundredstring=\@@hundredstringportuges
+  \def\@hundred{cem}\def\@thousand{mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@numberstringMbrazilian\@numberstringMbrazilian
+%    \end{macrocode}
+% As above, but feminine form:
+%    \begin{macrocode}
+\newcommand*{\@numberstringFbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringFportuges
+  \let\@teenstring=\@@teenstringbrazilian
+  \let\@tenstring=\@@tenstringportuges
+  \let\@hundredstring=\@@hundredstringFportuges
+  \def\@hundred{cem}\def\@thousand{mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@numberstringFbrazilian\@numberstringFbrazilian
+%    \end{macrocode}
+% Make neuter same as masculine:
+%    \begin{macrocode}
+\global\let\@numberstringNbrazilian\@numberstringMbrazilian
+%    \end{macrocode}
+% As above, but initial letters in upper case:
+%    \begin{macrocode}
+\newcommand*{\@NumberstringMbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringportuges
+  \let\@teenstring=\@@Teenstringbrazilian
+  \let\@tenstring=\@@Tenstringportuges
+  \let\@hundredstring=\@@hundredstringportuges
+  \def\@hundred{Cem}\def\@thousand{Mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@NumberstringMbrazilian\@NumberstringMbrazilian
+%    \end{macrocode}
+% As above, but feminine form:
+%    \begin{macrocode}
+\newcommand*{\@NumberstringFbrazilian}[2]{%
+  \let\@unitstring=\@@UnitstringFportuges
+  \let\@teenstring=\@@Teenstringbrazilian
+  \let\@tenstring=\@@Tenstringportuges
+  \let\@hundredstring=\@@HundredstringFportuges
+  \def\@hundred{Cem}\def\@thousand{Mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@NumberstringFbrazilian\@NumberstringFbrazilian
+%    \end{macrocode}
+% Make neuter same as masculine:
+%    \begin{macrocode}
+\global\let\@NumberstringNbrazilian\@NumberstringMbrazilian
+%    \end{macrocode}
+\iffalse Local variables: \fi
+\iffalse mode: docTeX     \fi
+\iffalse End:             \fi
+%\iffalse
+%    \begin{macrocode}
+%</fc-brazilian.def>
+%    \end{macrocode}
+%\fi
+%\iffalse
+%    \begin{macrocode}
 %<*fc-british.def>
 %    \end{macrocode}
 %\fi
@@ -4172,9 +4326,9 @@
 %    \end{macrocode}
 %\fi
 % \subsubsection{fc-portuges.def}
-% Portuguse definitions
+% Portuguese definitions
 %    \begin{macrocode}
-\ProvidesFCLanguage{portuges}[2016/01/12]%
+\ProvidesFCLanguage{portuges}[2017/12/26]%
 %    \end{macrocode}
 % Define macro that converts a number or count register (first
 % argument) to an ordinal, and stores the result in the second
@@ -4264,6 +4418,8 @@
 \global\let\@@tenstringportuges\@@tenstringportuges
 %    \end{macrocode}
 % Teens (argument must be a number from 0 to 9):
+% \changes{3.05}{2017/12/26}{Take fix of teen contributed by \href{https://github.com/sant0s}{sant0s}, prior
+% definitions pushed to \sty{fc-brazilian.def}.}
 %    \begin{macrocode}
 \newcommand*\@@teenstringportuges[1]{%
   \ifcase#1\relax
@@ -4271,12 +4427,12 @@
     \or onze%
     \or doze%
     \or treze%
-    \or quatorze%
+    \or catorze%
     \or quinze%
-    \or dezesseis%
-    \or dezessete%
+    \or dezasseis%
+    \or dezassete%
     \or dezoito%
-    \or dezenove%
+    \or dezanove%
   \fi
 }%
 \global\let\@@teenstringportuges\@@teenstringportuges
@@ -4370,6 +4526,8 @@
 \global\let\@@Tenstringportuges\@@Tenstringportuges
 %    \end{macrocode}
 % Teens (with initial letter in upper case):
+% \changes{3.05}{2017/12/26}{Take fix of teen contributed by \href{https://github.com/sant0s}{sant0s}, prior
+% definitions pushed to \sty{fc-brazilian.def}.}
 %    \begin{macrocode}
 \newcommand*\@@Teenstringportuges[1]{%
   \ifcase#1\relax
@@ -4377,12 +4535,12 @@
     \or Onze%
     \or Doze%
     \or Treze%
-    \or Quatorze%
+    \or Catorze%
     \or Quinze%
-    \or Dezesseis%
-    \or Dezessete%
+    \or Dezasseis%
+    \or Dezassete%
     \or Dezoito%
-    \or Dezenove%
+    \or Dezanove%
   \fi
 }%
 \global\let\@@Teenstringportuges\@@Teenstringportuges
@@ -4997,7 +5155,7 @@
 %    \begin{macrocode}
 \ProvidesFCLanguage{portuguese}[2014/06/09]%
 %    \end{macrocode}
-% Load fc-portuges.def if not already loaded
+% Load \sty{fc-portuges.def} if not already loaded.
 %    \begin{macrocode}
 \FCloadlang{portuges}%
 %    \end{macrocode}
@@ -7262,7 +7420,7 @@
 % This section deals with the code for |fmtcount.sty|
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2017/09/16 v3.04]
+\ProvidesPackage{fmtcount}[2017/12/24 v3.05]
 \RequirePackage{ifthen}
 %    \end{macrocode}
 % \changes{3.01}{2014/12/03}{Use \styfmt{xkeyval} instead of \styfmt{keyval}, so that we do not get in trouble
@@ -7273,11 +7431,9 @@
 \RequirePackage{fcprefix}
 %    \end{macrocode}
 % \changes{3.00}{2014/07/3}{Add \cs{RequirePackage} for \texttt{ifxetex}}
-%    \begin{macrocode}
-\RequirePackage{ifxetex}
-%    \end{macrocode}
-% \changes{1.3}{2007/7/19}{no
-%longer using xspace package}
+% \changes{3.05}{2017/12/24}{Stop using \cs{ifxetex} to trigger multilingual mode. Instead only packages are
+% tested for being loaded.}
+% \changes{1.3}{2007/7/19}{no longer using xspace package}
 %\changes{1.31}{2009/10/02}{amsgen now loaded (\cs{new at ifnextchar}
 % needed)}
 % Need to use \cs{new at ifnextchar} instead of \cs{@ifnextchar} in
@@ -7419,15 +7575,18 @@
 %    be some corner cases when a package would be required --- as a result of loading language definition for
 %    one language --- between a \cs{DeclareOption} and a \cs{ProcessOption} which is forbidden by \LaTeXe.
 %\changes{3.00}{2014/07/3}{new}
+%\changes{3.05}{2017/12/26}{Add brazilian and portuguese.}
 %    \begin{macrocode}
 \newcommand*\fc at supported@language at list{%
 english,%
 UKenglish,%
+brazilian,%
 british,%
 USenglish,%
 american,%
 spanish,%
 portuges,%
+portuguese,%
 french,%
 frenchb,%
 francais,%
@@ -7493,16 +7652,20 @@
 % 
 %\changes{2.03}{2012/11/03}{renamed \cs{@fc at loadifbabelldf} to
 % \cs{@fc at loadifbabelorpolyglossialdf}}
-%\changes{2.03}{2012/11/03}{added check for polyglossia language}
-%\changes{3.00}{2014/07/03}{use \cs{ifxetex} to discriminate between \styfmt{babel} and \styfmt{polyglossia}}
+%\changes{2.03}{2012/11/03}{added check for polyglossia language.}
+%\changes{3.00}{2014/07/03}{use \cs{ifxetex} to discriminate between \styfmt{babel} and \styfmt{polyglossia}.}
+%\changes{3.05}{2017/12/24}{Stop using \cs{ifxetex} to discriminate between \styfmt{babel} and
+% \styfmt{polyglossia}, instead just test which package is loaded.}
 %    \begin{macrocode}
-\newcommand*{\@fc at loadifbabelorpolyglossialdf}[1]{%
-  \ifxetex
-    \IfFileExists{gloss-#1.ldf}{\ifcsundef{#1 at loaded}{}{\FCloadlang{#1}}}{}%
-  \else
-     \ifcsundef{ver@#1.ldf}{}{\FCloadlang{#1}}%
-  \fi
-}
+\newcommand*\@fc at loadifbabelldf[1]{\ifcsundef{ver@#1.ldf}{}{\FCloadlang{#1}}}
+\newcommand*{\@fc at loadifbabelorpolyglossialdf}[1]{}
+\@ifpackageloaded{polyglossia}{%
+  \def\@fc at loadifbabelorpolyglossialdf#1{\IfFileExists{gloss-#1.ldf}{\ifcsundef{#1 at loaded}{}{\FCloadlang{#1}}}{}%
+    \@fc at loadifbabelldf{#1}%
+  }%
+}{\@ifpackageloaded{babel}{%
+  \let\@fc at loadifbabelorpolyglossialdf\@fc at loadifbabelldf
+}{}}
 %    \end{macrocode}
 %\end{macro}
 %
@@ -7568,7 +7731,7 @@
     }%
   }{%
 %    \end{macrocode}
-% When the language \#1 is an alias, do the same as the language of which it is an alias:
+% When the language \texttt{\#1} is an alias, do the same as the language of which it is an alias:
 %    \begin{macrocode}
     \expandafter\let\expandafter\@tempa\csname KV@\csname fc@#1 at alias@of\endcsname @fmtord\endcsname
     \expandafter\let\csname KV@#1 at fmtord\endcsname\@tempa
@@ -9050,13 +9213,22 @@
 %\end{macro}
 %
 %\subsubsection{Multilinguage Definitions}
+% Flag \cs{fc at languagemode@detected} allows to stop scanning for multilingual mode trigger conditions. It is
+% initialized to \texttt{false} as no such scanning as taken place yet.
+%\changes{3.05}{2017/12/22}{New flag \cs{iffc at languagemode@detected}.}
+%    \begin{macrocode}
+\newif\iffc at languagemode@detected
+\fc at languagemode@detectedfalse
+%    \end{macrocode}
 %\begin{macro}{\@setdef at ultfmtcount}
 % If multilingual support is provided, make \cs{@numberstring}
 % etc use the correct language (if defined).
 % Otherwise use English definitions. \cs{@setdef at ultfmtcount}
 % sets the macros to use English.
+%\changes{3.05}{2017/12/22}{Set flag \cs{iffc at languagemode@detected}.}
 %    \begin{macrocode}
 \def\@setdef at ultfmtcount{%
+  \fc at languagemode@detectedtrue
   \ifcsundef{@ordinalMenglish}{\FCloadlang{english}}{}%
   \def\@ordinalstringM{\@ordinalstringMenglish}%
   \let\@ordinalstringF=\@ordinalstringMenglish
@@ -9125,8 +9297,10 @@
 % \cs{languagename}:
 %\changes{2.0}{2012/06/03}{changed errors to warnings for
 %unsupported languages}
+%\changes{3.05}{2017/12/22}{Set flag \cs{iffc at languagemode@detected}.}
 %    \begin{macrocode}
 \def\@set at mulitling@fmtcount{%
+  \fc at languagemode@detectedtrue
 %    \end{macrocode}
 % The masculine version of \cs{numberstring}:
 %    \begin{macrocode}
@@ -9225,59 +9399,93 @@
 }
 %    \end{macrocode}
 %\end{macro}
-% Check to see if \styfmt{babel}, \styfmt{polyglossia} or \styfmt{ngerman} packages have been loaded, and if
-% yes set \styfmt{fmtcount} in multiling.
+%\changes{3.05}{2017/12/22}{Change all the code about detecting multiling. \cs{ifxetex} is no longer used,
+% instead we loop on the list of packages of interest \styfmt{babel}, \styfmt{polyglossia}, \styfmt{mlp}, or
+% \styfmt{ngerman}, and set or not \cs{iffc at languagemode@detected} flag as a result.}
+% Check to see if \styfmt{babel}, \styfmt{polyglossia}, \styfmt{mlp}, or \styfmt{ngerman} packages have been
+% loaded, and if yes set \styfmt{fmtcount} in multiling. First we define some \cs{fc at check@for at multiling}
+% macro to do such action where \texttt{\#1} is the package name, and \texttt{\#2} is a callback.
 %    \begin{macrocode}
-\expandafter\@ifpackageloaded
-\expandafter{\ifxetex polyglossia\else babel\fi}%
-{%
-  \@set at mulitling@fmtcount
-}%
-{%
-  \@ifpackageloaded{ngerman}%
-  {%
-    \FCloadlang{ngerman}%
-    \@set at mulitling@fmtcount
-  }%
-  {%
+\def\fc at check@for at multiling#1:#2\@nil{%
+  \@ifpackageloaded{#1}{%
+    #2\@set at mulitling@fmtcount
+  }{}%
+}
 %    \end{macrocode}
-% In the case that neither babel/polyglossia, nor ngerman has been loaded, then we go to multiling if a
-% language has been loaded by package option, and to delfault language otherwise.
+% Now we define \cs{fc at loop@on at multiling@pkg} as an iterator to scan whether any of \styfmt{babel},
+% \styfmt{polyglossia}, \styfmt{mlp}, or \styfmt{ngerman} packages has been loaded, and if so set multilingual
+% mode.
 %    \begin{macrocode}
-    \iffmtcount at language@option
+\def\fc at loop@on at multiling@pkg#1,{%
+  \def\@tempb{#1}%
+  \ifx\@tempb\@nnil
+%    \end{macrocode}
+% We have reached the end of the loop, so stop here.
+%    \begin{macrocode}
+     \let\fc at loop@on at multiling@pkg\@empty
+  \else
+%    \end{macrocode}
+% Make the \cs{@ifpackageloaded} test and break the loop if it was positive.
+%    \begin{macrocode}
+     \fc at check@for at multiling#1\@nil
+     \iffc at languagemode@detected
+       \def\fc at loop@on at multiling@pkg##1\@nil,{}%
+     \fi
+  \fi
+  \fc at loop@on at multiling@pkg   
+}
+%    \end{macrocode}
+% Now, do the loop itself, we do this at beginning of document not to constrain the order of loading
+% \styfmt{fmtcount} and the multilingual package \styfmt{babel}, \styfmt{polyglossia}, etc.:
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \fc at loop@on at multiling@pkg babel:,polyglossia:,ngerman:\FCloadlang{ngerman},\@nil,
+%    \end{macrocode}
+% In the case that no multilingual package (such as
+% \styfmt{babel}/\styfmt{polyglossia}/\styfmt{ngerman}) has been loaded, then we go to multiling
+% if a language has been loaded by package option.
+%    \begin{macrocode}
+   \unless\iffc at languagemode@detected\iffmtcount at language@option
+%    \end{macrocode}
+% If the multilingual mode has not been yet activated, but a language option has been passed to
+% \styfmt{fmtcount}, we should go to multilingual mode. However, first of, we do some sanity check, as this
+% may help the end user understand what is wrong: we check that macro \cs{languagename} is defined, and
+% activate the multilingual mode only then, and otherwise fall back to default legacy mode.
+%    \begin{macrocode}
+      \ifcsundef{languagename}%
+      {%
+         \PackageWarning{fmtcount}{%
+            `\protect\languagename' is undefined, you should use a language package such as babel/polyglossia
+             when loading a language via package option. Reverting to default language.
+         }%
+         \@setdef at ultfmtcount
+      }{%
         \@set at mulitling@fmtcount
+        
 %    \end{macrocode}
-% Some sanity check at the beginning of document may help the end user understand what is wrong:
+% Now, some more checking, having activated multilingual mode after a language option has been passed to
+% \styfmt{fmtcount}, we check that the \styfmt{fmtcount} language definitions corresponding to
+% \cs{languagename} have been loaded, and otherwise fall \cs{languagename} back to the latest
+% \styfmt{fmtcount} language definition loaded.
 %    \begin{macrocode}
-        \AtBeginDocument{%
-          \ifcsundef{languagename}%
-          {%
+        \@FC at iflangloaded{\languagename}{}{%
+%    \end{macrocode}
+% The current \cs{languagename} is not a \styfmt{fmtcount} language that has been previously loaded. The
+% correction is to have \cs{languagename} let to \cs{fc at mainlang}. Please note that, as
+% \cs{iffmtcount at language@option} is true, we know that \texttt{fmtcount} has loaded some language.
+%    \begin{macrocode}
             \PackageWarning{fmtcount}{%
-              `\protect\languagename' is undefined, you should use package babel/polyglossia when loading a
-              language via package option. Reverting to default language.
+               Setting `\protect\languagename' to `\fc at mainlang'.\MessageBreak
+               Reason is that `\protect\languagename' was `\languagename',\MessageBreak
+               but `\languagename' was not loaded by fmtcount,\MessageBreak
+               whereas `\fc at mainlang' was the last language loaded by fmtcount ;
             }%
-            \@setdef at ultfmtcount
-          }{%
-            \@FC at iflangloaded{\languagename}{}{%
-%    \end{macrocode}
-% The current \cs{languagename} is not a language that has been previously loaded. The correction is to have
-% \cs{languagename} let to \cs{fc at mainlang}. Please note that, as \cs{iffmtcount at language@option} is true,
-% we know that \texttt{fmtcount} has loaded some language.
-%    \begin{macrocode}
-              \PackageWarning{fmtcount}{%
-                Setting `\protect\languagename' to `\fc at mainlang'.\MessageBreak
-                Reason is that `\protect\languagename' was `\languagename',\MessageBreak
-                but `\languagename' was not loaded by fmtcount,\MessageBreak
-                whereas `\fc at mainlang' was the last language loaded by fmtcount ;
-              }%
-              \let\languagename\fc at mainlang
-            }
-          }%
-        }
-    \else
+            \let\languagename\fc at mainlang
+         }%
+      }%
+   \else
        \@setdef at ultfmtcount
-    \fi
-  }%
+   \fi\fi
 }
 %    \end{macrocode}
 % \changes{3.01}{2014/12/03}{Substitute \cs{textsuperscript} for \cs{fc at textsuperscript}, and define

Modified: trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins	2017-12-28 23:44:51 UTC (rev 46159)
@@ -1,4 +1,4 @@
-% fmtcount.ins generated using makedtx version 1.2 2017/9/17 22:04
+% fmtcount.ins generated using makedtx version 1.2 2017/12/26 22:09
 \input docstrip
 
 \preamble
@@ -18,7 +18,7 @@
 
  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 
- This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+ This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 
 \endpreamble
 
@@ -26,6 +26,8 @@
 
 \generate{\file{fc-american.def}{\usepreamble\defaultpreamble
 \usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-american.def,package}}
+\file{fc-brazilian.def}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-brazilian.def,package}}
 \file{fc-british.def}{\usepreamble\defaultpreamble
 \usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-british.def,package}}
 \file{fc-english.def}{\usepreamble\defaultpreamble

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-american.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-american.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-american.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Added: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-brazilian.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-brazilian.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-brazilian.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -0,0 +1,142 @@
+%%
+%% This is file `fc-brazilian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fmtcount.dtx  (with options: `fc-brazilian.def,package')
+%% 
+%%  fmtcount.dtx
+%%  Copyright 2017 Nicola Talbot and Vincent Bela\xEFche
+%% 
+%%  This work may be distributed and/or modified under the
+%%  conditions of the LaTeX Project Public License, either version 1.3
+%%  of this license or (at your option) any later version.
+%%  The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%%  and version 1.3 or later is part of all distributions of LaTeX
+%%  version 2005/12/01 or later.
+%% 
+%%  This work has the LPPL maintenance status `maintained'.
+%% 
+%%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
+%% 
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%% 
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+%%\subsection{Prefixes}
+%%\label{sec:latin-prefixes}
+%%
+%%\begin{definition}[\DescribeMacro{\latinnumeralstring}]
+%%\cs{latinnumeralstring}\marg{counter}\oarg{prefix options}
+%%\end{definition}
+%%
+%%\begin{definition}[\DescribeMacro{\latinnumeralstringnum}]
+%%\cs{latinnumeralstringnum}\marg{number}\oarg{prefix options}
+%%\end{definition}
+%% Local Variables:
+%% coding: utf-8
+%% End:
+\ProvidesFCLanguage{brazilian}[2017/12/26]%
+\FCloadlang{portuges}%
+\global\let\@ordinalMbrazilian=\@ordinalMportuges
+\global\let\@ordinalFbrazilian=\@ordinalFportuges
+\global\let\@ordinalNbrazilian=\@ordinalNportuges
+\global\let\@ordinalstringFbrazilian\@ordinalstringFportuges
+\global\let\@ordinalstringMbrazilian\@ordinalstringMportuges
+\global\let\@ordinalstringNbrazilian\@ordinalstringMportuges
+\global\let\@OrdinalstringMbrazilian\@OrdinalstringMportuges
+\global\let\@OrdinalstringFbrazilian\@OrdinalstringFportuges
+\global\let\@OrdinalstringNbrazilian\@OrdinalstringMportuges
+\newcommand*\@@teenstringbrazilian[1]{%
+  \ifcase#1\relax
+    dez%
+    \or onze%
+    \or doze%
+    \or treze%
+    \or quatorze%
+    \or quinze%
+    \or dezesseis%
+    \or dezessete%
+    \or dezoito%
+    \or dezenove%
+  \fi
+}%
+\global\let\@@teenstringbrazilian\@@teenstringbrazilian
+\newcommand*\@@Teenstringbrazilian[1]{%
+  \ifcase#1\relax
+    Dez%
+    \or Onze%
+    \or Doze%
+    \or Treze%
+    \or Quatorze%
+    \or Quinze%
+    \or Dezesseis%
+    \or Dezessete%
+    \or Dezoito%
+    \or Dezenove%
+  \fi
+}%
+\global\let\@@Teenstringbrazilian\@@Teenstringbrazilian
+\newcommand*{\@numberstringMbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringportuges
+  \let\@teenstring=\@@teenstringbrazilian
+  \let\@tenstring=\@@tenstringportuges
+  \let\@hundredstring=\@@hundredstringportuges
+  \def\@hundred{cem}\def\@thousand{mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@numberstringMbrazilian\@numberstringMbrazilian
+\newcommand*{\@numberstringFbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringFportuges
+  \let\@teenstring=\@@teenstringbrazilian
+  \let\@tenstring=\@@tenstringportuges
+  \let\@hundredstring=\@@hundredstringFportuges
+  \def\@hundred{cem}\def\@thousand{mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@numberstringFbrazilian\@numberstringFbrazilian
+\global\let\@numberstringNbrazilian\@numberstringMbrazilian
+\newcommand*{\@NumberstringMbrazilian}[2]{%
+  \let\@unitstring=\@@unitstringportuges
+  \let\@teenstring=\@@Teenstringbrazilian
+  \let\@tenstring=\@@Tenstringportuges
+  \let\@hundredstring=\@@hundredstringportuges
+  \def\@hundred{Cem}\def\@thousand{Mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@NumberstringMbrazilian\@NumberstringMbrazilian
+\newcommand*{\@NumberstringFbrazilian}[2]{%
+  \let\@unitstring=\@@UnitstringFportuges
+  \let\@teenstring=\@@Teenstringbrazilian
+  \let\@tenstring=\@@Tenstringportuges
+  \let\@hundredstring=\@@HundredstringFportuges
+  \def\@hundred{Cem}\def\@thousand{Mil}%
+  \def\@andname{e}%
+  \@@numberstringportuges{#1}{#2}%
+}%
+\global\let\@NumberstringFbrazilian\@NumberstringFbrazilian
+\global\let\@NumberstringNbrazilian\@NumberstringMbrazilian
+\iffalse Local variables: \fi
+\iffalse mode: docTeX     \fi
+\iffalse End:             \fi
+\endinput
+%%
+%% End of file `fc-brazilian.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-brazilian.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-british.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-british.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-british.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-english.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-english.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-french.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-french.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-french.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-german.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-german.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-german.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -51,7 +51,7 @@
 %% Local Variables:
 %% coding: utf-8
 %% End:
-\ProvidesFCLanguage{portuges}[2016/01/12]%
+\ProvidesFCLanguage{portuges}[2017/12/26]%
 \newcommand*\@ordinalMportuges[2]{%
   \ifnum#1=0\relax
     \edef#2{\number#1}%
@@ -120,12 +120,12 @@
     \or onze%
     \or doze%
     \or treze%
-    \or quatorze%
+    \or catorze%
     \or quinze%
-    \or dezesseis%
-    \or dezessete%
+    \or dezasseis%
+    \or dezassete%
     \or dezoito%
-    \or dezenove%
+    \or dezanove%
   \fi
 }%
 \global\let\@@teenstringportuges\@@teenstringportuges
@@ -208,12 +208,12 @@
     \or Onze%
     \or Doze%
     \or Treze%
-    \or Quatorze%
+    \or Catorze%
     \or Quinze%
-    \or Dezesseis%
-    \or Dezessete%
+    \or Dezasseis%
+    \or Dezassete%
     \or Dezoito%
-    \or Dezenove%
+    \or Dezanove%
   \fi
 }%
 \global\let\@@Teenstringportuges\@@Teenstringportuges

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

Modified: trunk/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty	2017-12-28 05:35:17 UTC (rev 46158)
+++ trunk/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty	2017-12-28 23:44:51 UTC (rev 46159)
@@ -21,7 +21,7 @@
 %% 
 %%  The Current Maintainer of this work is Nicola Talbot and Vincent Bela\xEFche.
 %% 
-%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+%%  This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
 %% 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -53,12 +53,11 @@
 %% End:
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2017/09/16 v3.04]
+\ProvidesPackage{fmtcount}[2017/12/24 v3.05]
 \RequirePackage{ifthen}
 \RequirePackage{xkeyval}
 \RequirePackage{etoolbox}
 \RequirePackage{fcprefix}
-\RequirePackage{ifxetex}
 \RequirePackage{amsgen}
 \providecommand*{\fc at orddef@ult}[1]{\fc at textsuperscript{#1}}
 \providecommand*{\fc at ord@multiling}[1]{%
@@ -105,11 +104,13 @@
 \newcommand*\fc at supported@language at list{%
 english,%
 UKenglish,%
+brazilian,%
 british,%
 USenglish,%
 american,%
 spanish,%
 portuges,%
+portuguese,%
 french,%
 frenchb,%
 francais,%
@@ -142,13 +143,15 @@
       \expandafter
     }\@tempa
 }%
-\newcommand*{\@fc at loadifbabelorpolyglossialdf}[1]{%
-  \ifxetex
-    \IfFileExists{gloss-#1.ldf}{\ifcsundef{#1 at loaded}{}{\FCloadlang{#1}}}{}%
-  \else
-     \ifcsundef{ver@#1.ldf}{}{\FCloadlang{#1}}%
-  \fi
-}
+\newcommand*\@fc at loadifbabelldf[1]{\ifcsundef{ver@#1.ldf}{}{\FCloadlang{#1}}}
+\newcommand*{\@fc at loadifbabelorpolyglossialdf}[1]{}
+\@ifpackageloaded{polyglossia}{%
+  \def\@fc at loadifbabelorpolyglossialdf#1{\IfFileExists{gloss-#1.ldf}{\ifcsundef{#1 at loaded}{}{\FCloadlang{#1}}}{}%
+    \@fc at loadifbabelldf{#1}%
+  }%
+}{\@ifpackageloaded{babel}{%
+  \let\@fc at loadifbabelorpolyglossialdf\@fc at loadifbabelldf
+}{}}
 \fc at iterate@on at languages\@fc at loadifbabelorpolyglossialdf
 \def\fc at iterate@on at languages@body#1{%
   \expandafter\def\csname fc@#1 at alias@of\endcsname{#1}}
@@ -991,7 +994,10 @@
   \@decimal{\expandafter\expandafter\expandafter
     \the\value{#1}}%
 }
+\newif\iffc at languagemode@detected
+\fc at languagemode@detectedfalse
 \def\@setdef at ultfmtcount{%
+  \fc at languagemode@detectedtrue
   \ifcsundef{@ordinalMenglish}{\FCloadlang{english}}{}%
   \def\@ordinalstringM{\@ordinalstringMenglish}%
   \let\@ordinalstringF=\@ordinalstringMenglish
@@ -1045,6 +1051,7 @@
   }%
 }
 \def\@set at mulitling@fmtcount{%
+  \fc at languagemode@detectedtrue
   \def\@numberstringM{%
     \fc at multiling{numberstring}{M}%
   }%
@@ -1092,44 +1099,49 @@
   }%
   \let\fmtord\fc at ord@multiling
 }
-\expandafter\@ifpackageloaded
-\expandafter{\ifxetex polyglossia\else babel\fi}%
-{%
-  \@set at mulitling@fmtcount
-}%
-{%
-  \@ifpackageloaded{ngerman}%
-  {%
-    \FCloadlang{ngerman}%
-    \@set at mulitling@fmtcount
-  }%
-  {%
-    \iffmtcount at language@option
+\def\fc at check@for at multiling#1:#2\@nil{%
+  \@ifpackageloaded{#1}{%
+    #2\@set at mulitling@fmtcount
+  }{}%
+}
+\def\fc at loop@on at multiling@pkg#1,{%
+  \def\@tempb{#1}%
+  \ifx\@tempb\@nnil
+     \let\fc at loop@on at multiling@pkg\@empty
+  \else
+     \fc at check@for at multiling#1\@nil
+     \iffc at languagemode@detected
+       \def\fc at loop@on at multiling@pkg##1\@nil,{}%
+     \fi
+  \fi
+  \fc at loop@on at multiling@pkg
+}
+\AtBeginDocument{%
+  \fc at loop@on at multiling@pkg babel:,polyglossia:,ngerman:\FCloadlang{ngerman},\@nil,
+   \unless\iffc at languagemode@detected\iffmtcount at language@option
+      \ifcsundef{languagename}%
+      {%
+         \PackageWarning{fmtcount}{%
+            `\protect\languagename' is undefined, you should use a language package such as babel/polyglossia
+             when loading a language via package option. Reverting to default language.
+         }%
+         \@setdef at ultfmtcount
+      }{%
         \@set at mulitling@fmtcount
-        \AtBeginDocument{%
-          \ifcsundef{languagename}%
-          {%
+
+        \@FC at iflangloaded{\languagename}{}{%
             \PackageWarning{fmtcount}{%
-              `\protect\languagename' is undefined, you should use package babel/polyglossia when loading a
-              language via package option. Reverting to default language.
+               Setting `\protect\languagename' to `\fc at mainlang'.\MessageBreak
+               Reason is that `\protect\languagename' was `\languagename',\MessageBreak
+               but `\languagename' was not loaded by fmtcount,\MessageBreak
+               whereas `\fc at mainlang' was the last language loaded by fmtcount ;
             }%
-            \@setdef at ultfmtcount
-          }{%
-            \@FC at iflangloaded{\languagename}{}{%
-              \PackageWarning{fmtcount}{%
-                Setting `\protect\languagename' to `\fc at mainlang'.\MessageBreak
-                Reason is that `\protect\languagename' was `\languagename',\MessageBreak
-                but `\languagename' was not loaded by fmtcount,\MessageBreak
-                whereas `\fc at mainlang' was the last language loaded by fmtcount ;
-              }%
-              \let\languagename\fc at mainlang
-            }
-          }%
-        }
-    \else
+            \let\languagename\fc at mainlang
+         }%
+      }%
+   \else
        \@setdef at ultfmtcount
-    \fi
-  }%
+   \fi\fi
 }
 \AtBeginDocument{%
    \ifcsundef{FBsupR}{\let\fc at textsuperscript\textsuperscript}{\let\fc at textsuperscript\fup}%



More information about the tex-live-commits mailing list