reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
185 stars 52 forks source link

Polyglossia update crash ancient greek and english #629

Closed HAMUNOZ5 closed 4 months ago

HAMUNOZ5 commented 4 months ago

For my book I am using some ancient Greek, Latin and English words, where the polyglossia package was working perfectly.

Today just after updating the package stopped working completely the English and Greek language. It does not recognize anything at all.

this is my code

\setotherlanguage[variant=classic]{latin}
\newfontfamily\latinfont[Script=Latin,Scale=MatchLowercase]{Times New Roman}
\newfontfamily\latinfontsf[Script=Latin,Scale=MatchLowercase]{Times New Roman}
\setotherlanguage[variant=ancient, numerals=arabic]{greek}
\newfontfamily\greekfont[Script=Greek]{Times New Roman}
\newfontfamily\greekfontsf[Script=Greek]{Times New Roman}

\setotherlanguage[variant=american]{english}
\newfontfamily\englishfont{Times New Roman}
\newfontfamily\englishfontsf{Times New Roman}

this is the crash with english

% Language definition file (part of polyglossia v1.66 -- 2023/12/11)
%
\ProvidesFile{gloss-english.ldf}[polyglossia: module for English]

\PolyglossiaSetup{english}{
  bcp47=en-US,
  bcp47-language=en,
  bcp47-region=US,
  bcp47-script=Latn,
  hyphennames={english,american,usenglish,USenglish},
  hyphenmins={2,3},
  langtag=ENG,
  fontsetup=true,
  babelname=english
}

% BCP-47 compliant aliases
\setlanguagealias*{english}{en}
\setlanguagealias*[variant=australian]{english}{en-AU}
\setlanguagealias*[variant=canadian]{english}{en-CA}
\setlanguagealias*[variant=british]{english}{en-GB}
\setlanguagealias*[variant=newzealand]{english}{en-NZ}
\setlanguagealias*[variant=us]{english}{en-US}

% Babel aliases
\setlanguagealias[variant=us]{english}{american}
\setlanguagealias[variant=australian]{english}{australian}
\setlanguagealias[variant=british]{english}{british}
\setlanguagealias[variant=canadian]{english}{canadian}
\setlanguagealias[variant=newzealand]{english}{newzealand}

\providebool{british@hyphen}
\providebool{english@ordinalmonthday}
\providebool{british@dateformat}

% US English (\l@english) is default
% Initialize its settings
\def\english@variant{english}
\british@hyphenfalse
\english@ordinalmonthdayfalse
\british@dateformatfalse

% Option ordinalmonthday
\define@boolkey{english}[english@]{ordinalmonthday}[true]{}

\define@choicekey*+{english}{variant}[\xpg@val\xpg@nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
   \ifcase\xpg@nr\relax
      % uk:
      \british@hyphentrue
      \british@dateformattrue
      \english@ordinalmonthdaytrue
      \SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}%
      \xpg@info{Option: English, variant=british}%
   \or
      % british:
      \british@hyphentrue
      \british@dateformattrue
      \english@ordinalmonthdaytrue
      \SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}%
      \xpg@info{Option: english variant=british}%
   \or
      % us:
      \british@hyphenfalse
      \british@dateformatfalse
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
      \xpg@info{Option: English, variant=american}%
   \or
      % american:
      \british@hyphenfalse
      \british@dateformatfalse
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
      \xpg@info{Option: English, variant=american}%
   \or
      % usmax:
      \british@hyphenfalse
      \british@dateformatfalse
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
      \xpg@info{Option: english variant=american (with additional patterns)}%
      \xpg@ifdefined{usenglishmax}{}%
         {\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
                       I will use the standard patterns for US English instead}%
          \adddialect\l@usenglishmax\l@english\relax%
         }%
      \def\english@variant{usenglishmax}%
   \or
      % australian:
      % These use the british hyphenation patterns
      % but date formats without ordinals
      \british@hyphentrue
      \british@dateformattrue
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=australian,bcp47=en-AU,bcp47-language=en,bcp47-region=AU}%
      \xpg@info{Option: English, variant=australian}%
      \adddialect\l@australian\l@english%
   \or
      % newzealand:
      % These use the british hyphenation patterns
      % but date formats without ordinals
      \british@hyphentrue
      \british@dateformattrue
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ,bcp47-language=en,bcp47-region=NZ}%
      \xpg@info{Option: English, variant=newzealand}%
      \adddialect\l@newzealand\l@english%
   \or
      % canadian:
      % This is currently equivalent to usenglish (as in babel)
      \british@hyphenfalse
      \british@dateformatfalse
      \english@ordinalmonthdayfalse
      \SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA,bcp47-language=en,bcp47-region=CA}%
      \xpg@info{Option: English, variant=american}%
      \adddialect\l@canadian\l@english%
   \fi
   \ifbritish@hyphen
      \xpg@ifdefined{ukenglish}{}%
         {\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak
                       I will use the patterns for US English instead}%
          \adddialect\l@ukenglish\l@english\relax%
         }%
      \def\english@variant{ukenglish}%
   \fi
}{\xpg@warning{Unknown English variant `#1'}}

% Register default options
\xpg@initialize@gloss@options{english}{variant=us,ordinalmonthday=false}
% Register alias options
\xpg@set@alias@values{english}{variant}{us}{american}
\xpg@set@alias@values{english}{variant}{uk}{british}

\ifxetex
   % Check if \l@english is defined. If not, try to set it to some variety
   % (specific order as in the csv list below), or null language if everything fails
   \xpg@ifdefined{english}{}{%
      \def\do##1{%
         \xpg@ifdefined{#1}%
            {\csletcs{l@english}{l@#1}\listbreak}%
            {%
               \xpg@warning{No hyphenation patterns for English found"\MessageBreak
                            I will use the 'null' language instead}%
               \adddialect\l@english0
            }%
      }%
      \docsvlist{british, american, usenglishmax, australian, newzealand}
      \xpg@ifdefined{english}{}{}
   }%
\fi

\def\english@language{%
   \polyglossia@setup@language@patterns{\english@variant}%
}%

\def\captionsenglish{%
   \def\prefacename{Preface}%
   \def\refname{References}%
   \def\abstractname{Abstract}%
   \def\bibname{Bibliography}%
   \def\chaptername{Chapter}%
   \def\appendixname{Appendix}%
   \def\contentsname{Contents}%
   \def\listfigurename{List of Figures}%
   \def\listtablename{List of Tables}%
   \def\indexname{Index}%
   \def\figurename{Figure}%
   \def\tablename{Table}%
   \def\partname{Part}%
   \def\enclname{encl}%
   \def\ccname{cc}%
   \def\headtoname{To}%
   \def\pagename{Page}%
   \def\seename{see}%
   \def\alsoname{see also}%
   \def\proofname{Proof}%
}

\def\dateenglish{%
   \def\english@day{%
     \ifenglish@ordinalmonthday
       \ifcase\day\or
        1st\or 2nd\or 3rd\or 4th\or 5th\or
        6th\or 7th\or 8th\or 9th\or 10th\or
        11th\or 12th\or 13th\or 14th\or 15th\or
        16th\or 17th\or 18th\or 19th\or 20th\or
        21st\or 22nd\or 23rd\or 24th\or 25th\or
        26th\or 27th\or 28th\or 29th\or 30th\or
        31st\fi
     \else\number\day\fi}%
     \def\english@month{\ifcase\month\or
      January\or February\or March\or April\or May\or June\or
      July\or August\or September\or October\or November\or December\fi}%
   \def\today{%
    \ifbritish@dateformat
      \english@day\space\english@month\space\number\year
    \else
      \english@month\space\english@day,\space\number\year
    \fi}%
}

\endinput

crash with Greek

% Language definition file (part of polyglossia v1.66 -- 2023/12/11)
%
\ProvidesFile{gloss-greek.ldf}[polyglossia: module for Greek]

\PolyglossiaSetup{greek}{
  bcp47=el-monoton,
  bcp47-language=el,
  bcp47-variant=monoton,
  bcp47-script=Grek,
  bcp47-extension-u=nu-grek,
  bcp47-casing=el,
  script=Greek,
  scripttag=grek,
  langtag=ELL,
  frenchspacing=true,
  indentfirst=true,
  fontsetup=true,
  localnumeral=greeknumerals,
  Localnumeral=Greeknumerals
  %TODO localalph={greek@alph,greek@Alph}
}

% BCP-47 compliant aliases
\setlanguagealias*[variant=ancient]{greek}{grc}
\setlanguagealias*[varant=polytonic]{greek}{el-polyton}
\setlanguagealias*[variant=monotonic]{greek}{el-monoton}
\setlanguagealias*{greek}{el}

% Babel aliases
\setlanguagealias[variant=polytonic]{greek}{polutonikogreek}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The code in this file was initially adapted from the antomega
%% module for greek. Currently large parts of it derive from the 
%% package xgreek.sty (c) Apostolos Syropoulos 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this file imported from xgreek fixes the \lccode and \uccode of Greek letters:
\input{xgreek-fixes.def}

\def\greek@variant{monogreek}

\newif\if@greek@ancient\@greek@ancientfalse
\newif\if@greek@poly\@greek@polyfalse

\define@choicekey*+{greek}{variant}[\xpg@val\xpg@nr]{monotonic,mono,polytonic,poly,ancient,ancientgreek}[monotonic]{%
   \xpg@ifdefined{greek}{}{%
      \xpg@nopatterns{greek}%
      \adddialect\l@greek\l@nohyphenation
   }%
   \ifcase\xpg@nr\relax
      % monotonic:
      \@greek@polyfalse
      \@greek@ancientfalse
   \or
      % mono:
      \@greek@polyfalse
      \@greek@ancientfalse
   \or
      % polytonic:
      \@greek@polytrue
      \@greek@ancientfalse
   \or
      % poly:
      \@greek@polytrue
      \@greek@ancientfalse
   \or
      % ancient:
      \@greek@polyfalse
      \@greek@ancienttrue
   \or
      % ancientgreek:
      \@greek@polyfalse
      \@greek@ancienttrue
   \fi
   \greek@set@langdata
   \xpg@info{Option: Greek, variant=\xpg@val}%
}{\xpg@warning{Unknown Greek variant `#1'}}

\def\greek@set@langdata{%
   \if@greek@ancient
       \xpg@ifdefined{ancientgreek}{}%
           {\xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
                     I will use the patterns loaded for \string\l@greek\space instead}%
            \adddialect\l@ancientgreek\l@greek\relax}%
       \def\greek@variant{ancientgreek}%
       \def\captionsgreek{\ancientgreekcaptions}%
       \def\dategreek{\dateancientgreek}%
       \SetLanguageKeys{greek}{babelname=greek,bcp47=grc,bcp47-language=grc,bcp47-variant={}}%
   \else
      \if@greek@poly
          \xpg@ifdefined{polygreek}{}%
              {\xpg@warning{No hyphenation patterns were loaded for Polytonic Greek\MessageBreak
                        I will use the patterns loaded for \string\l@greek\space instead}%
               \adddialect\l@polygreek\l@greek\relax}%
          \def\greek@variant{polygreek}%
          \def\captionsgreek{\polygreekcaptions}%
          \def\dategreek{\datepolygreek}%
          \SetLanguageKeys{greek}{babelname=polutonikogreek,bcp47=el-polyton,bcp47-language=el,bcp47-variant=polyton}%
      \else% monotonic greek
          \xpg@ifdefined{monogreek}{}%
              {\xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
                        I will use the patterns loaded for \string\l@greek\space instead}%
               \adddialect\l@monogreek\l@greek\relax}%
          \def\greek@variant{monogreek}% monotonic
          \def\captionsgreek{\monogreekcaptions}%
          \def\dategreek{\datemonogreek}%
          \SetLanguageKeys{greek}{babelname=greek,bcp47=el-monoton,bcp47-language=el,bcp47-variant=monoton}%
      \fi%   
   \fi%
}

\def\greek@language{%
  \polyglossia@setup@language@patterns{\greek@variant}%
}

\newif\if@greek@numerals
\define@choicekey*+{greek}{numerals}[\xpg@val\xpg@nr]{greek,arabic}[greek]{%
   \ifcase\xpg@nr\relax
      % greek:
      \@greek@numeralstrue%
      \SetLanguageKeys{greek}{bcp47-extension-u=nu-grek}%
   \or
      % arabic:
      \@greek@numeralsfalse%
      \SetLanguageKeys{greek}{bcp47-extension-u=nu-latn}%
   \fi
   \xpg@info{Option: Greek, numerals=\xpg@val}%
}{\xpg@warning{Unknown Greek numerals value `#1'}}

\define@boolkey{greek}[greek@]{capitaliota}[true]{%
  \ifgreek@capitaliota
     % \MakeUppercase converts the ypogegrammeni (subscript muted iota) to capital iota
     \SetLanguageKeys{greek}{bcp47-casing=el-x-iota,bcp47-extension-x=iota}
  \else
     % \MakeUppercase retains the subscript versions (default)
     \SetLanguageKeys{greek}{bcp47-casing=el,bcp47-extension-x={}}
  \fi
}

\define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}}

% Register default options
\xpg@initialize@gloss@options{greek}{variant=monotonic,numerals=greek}
% Register alias options
\xpg@set@alias@values{greek}{variant}{monotonic}{mono}
\xpg@set@alias@values{greek}{variant}{polytonic}{poly}

\def\monogreekcaptions{%
   \def\refname{Αναφορές}%
   \def\abstractname{Περίληψη}%
   \def\bibname{Βιβλιογραφία}%
   \def\prefacename{Πρόλογος}%
   \def\chaptername{Κεφάλαιο}%
   \def\appendixname{Παράρτημα}%
   \def\contentsname{Περιεχόμενα}%
   \def\listfigurename{Κατάλογος σχημάτων}%
   \def\listtablename{Κατάλογος πινάκων}%
   \def\indexname{Ευρετήριο}%
   \def\figurename{Σχήμα}%
   \def\tablename{Πίνακας}%
   \def\partname{Μέρος}%
   \def\pagename{Σελίδα}%
   \def\seename{βλέπε}%
   \def\alsoname{βλέπε επίσης}%
   \def\enclname{Συνημμένα}%
   \def\ccname{Κοινοποίηση}%
   \def\headtoname{Προς}%
   \def\proofname{Απόδειξη}%
   \def\glossaryname{Γλωσσάρι}}%

\def\datemonogreek{%   
   \def\today{\number\day\space%
      \greek@month%
      \space\number\year}%
   \def\greektoday{\greeknumber\day\space%
      \greek@month%
      \space\greeknumber\year}%
   \def\Greektoday{\Greeknumber\day\space%
      \greek@month%
      \space\Greeknumber\year}%
   \def\greek@month{\ifcase\month\or%
      Ιανουαρίου\or
      Φεβρουαρίου\or
      Μαρτίου\or
      Απριλίου\or
      Μαΐου\or
      Ιουνίου\or
      Ιουλίου\or
      Αυγούστου\or
      Σεπτεμβρίου\or
      Οκτωβρίου\or
      Νοεμβρίου\or
      Δεκεμβρίου\fi}}%

\def\polygreekcaptions{%
   \def\refname{Ἀναφορές}%
   \def\abstractname{Περίληψη}%
   \def\bibname{Βιβλιογραφία}%
   \def\prefacename{Πρόλογος}%
   \def\chaptername{Κεφάλαιο}%
   \def\appendixname{Παράρτημα}%
   \def\contentsname{Περιεχόμενα}%
   \def\listfigurename{Κατάλογος σχημάτων}%
   \def\listtablename{Κατάλογος πινάκων}%
   \def\indexname{Εὑρετήριο}%
   \def\figurename{Σχῆμα}%
   \def\tablename{Πίνακας}%
   \def\partname{Μέρος}%
   \def\pagename{Σελίδα}%
   \def\seename{βλέπε}%
   \def\alsoname{βλέπε ἐπίσης}%
   \def\enclname{Συνημμένα}%
   \def\ccname{Κοινοποίηση}%
   \def\headtoname{Πρὸς}%
   \def\proofname{Ἀπόδειξη}}%

\def\datepolygreek{%   
   \def\today{\number\day\space%
      \greek@month%
      \space\number\year}%
   \def\greektoday{\greeknumber\day\space%
      \greek@month%
      \space\greeknumber\year}%
   \def\Greektoday{\Greeknumber\day\space%
      \greek@month%
      \space\Greeknumber\year}%
   \def\greek@month{\ifcase\month\or%
      Ἰανουαρίου\or
      Φεβρουαρίου\or
      Μαρτίου\or
      Ἀπριλίου\or
      Μαΐου\or
      Ἰουνίου\or
      Ἰουλίου\or
      Αὐγούστου\or
      Σεπτεμβρίου\or
      Ὀκτωβρίου\or
      Νοεμβρίου\or
      Δεκεμβρίου\fi}}%

% this is copied verbatim from xgreek.sty:      
\def\ancientgreekcaptions{%
  \def\prefacename{Προοίμιον}%
  \def\refname{Αναφοραί}%
  \def\abstractname{Περίληψις}%
  \def\bibname{Βιβλιογραφία}%
  \def\chaptername{Κεφάλαιον}%
  \def\appendixname{Παράρτημα}%
  \def\contentsname{Περιεχόμενα}%
  \def\listfigurename{Κατάλογος σχημάτων}%
  \def\listtablename{Κατάλογος πινάκων}%
  \def\indexname{Εὑρετήριον}%
  \def\figurename{Σχήμα}%
  \def\tablename{Πίναξ}%
  \def\partname{Μέρος}%
  \def\enclname{Συνημμένως}%
  \def\ccname{Κοινοποίησις}%
  \def\headtoname{Πρὸς}%
  \def\pagename{Σελὶς}%
  \def\seename{ὅρα}%
  \def\alsoname{ὅρα ὡσαύτως}%
  \def\proofname{Ἀπόδειξις}%
  \def\glossaryname{Γλωσσάριον}%
  \def\refname{Ἀναφοραὶ}%
  \def\indexname{Εὑρετήριο}%
  \def\figurename{Σχῆμα}%
  \def\headtoname{Πρὸς}}%

\def\dateancientgreek{%
  \def\today{\number\day\space%
      \greek@month%
      \space\number\year}%
   \def\greektoday{\greeknumber\day\space%
      \greek@month%
      \space\greeknumber\year}%
   \def\Greektoday{\Greeknumber\day\space%
      \greek@month%
      \space\Greeknumber\year}%
   \def\greek@month{\ifcase\month\or%
      Ἰανουαρίου\or
      Φεβρουαρίου\or
      Μαρτίου\or
      Ἀπριλίου\or
      Μαΐου\or
      Ἰουνίου\or
      Ἰουλίου\or
      Αὐγούστου\or
      Σεπτεμβρίου\or
      Ὀκτωβρίου\or
      Νοεμβρίου\or
      Δεκεμβρίου\fi}}

% the code for alphabetic numbers and attic numerals 
\newrobustcmd\anw@print{}
\newrobustcmd\anw@false{%
  \renewrobustcmd\anw@print{}}
\newrobustcmd\anw@true{%
   \renewrobustcmd\anw@print{ʹ}}
\anw@true

% Use \providecommand here as the ldf file might
% be reloaded via politunikogreek.
\providecommand{\greeknumerals}[2]{\greeknumber{#2}}
\providecommand{\Greeknumerals}[2]{\Greeknumber{#2}}

\protected\def\greeknumber#1{\expandafter\@greeknumber\expandafter{\number#1}}
\def\@greeknumber#1{%
  \ifnum#1<\@ne\space\gr@ill@value{#1}%
  \else
    \ifnum#1<10\expandafter\gr@num@i\number#1%
    \else
      \ifnum#1<100\expandafter\gr@num@ii\number#1%
      \else
        \ifnum#1<\@m\expandafter\gr@num@iii\number#1%
        \else
          \ifnum#1<\@M\expandafter\gr@num@iv\number#1%
          \else
            \ifnum#1<100000\expandafter\gr@num@v\number#1%
            \else
              \ifnum#1<1000000\expandafter\gr@num@vi\number#1%
              \else
                \space\gr@ill@value{#1}%
              \fi
            \fi
          \fi
        \fi
      \fi
    \fi
  \fi
}
\protected\def\Greeknumber#1{\expandafter\@Greeknumber\expandafter{\number#1}}
\def\@Greeknumber#1{%
  \ifnum#1<\@ne\space\gr@ill@value{#1}%
  \else
    \ifnum#1<10\expandafter\gr@Num@i\number#1%
    \else
      \ifnum#1<100\expandafter\gr@Num@ii\number#1%
      \else
        \ifnum#1<\@m\expandafter\gr@Num@iii\number#1%
        \else
          \ifnum#1<\@M\expandafter\gr@Num@iv\number#1%
          \else
            \ifnum#1<100000\expandafter\gr@Num@v\number#1%
            \else
              \ifnum#1<1000000\expandafter\gr@Num@vi\number#1%
              \else
                \space\gr@ill@value{#1}%
              \fi
            \fi
          \fi
        \fi
      \fi
    \fi
  \fi
}
\let\greeknumeral=\greeknumber
\let\Greeknumeral=\Greeknumber
\def\gr@num@i#1{%
  \ifcase#1\or α\or β\or γ\or δ\or ε\or ϛ\or ζ\or η\or θ\fi
  \ifnum#1=\z@\else\anw@true\fi\anw@print}
\def\gr@num@ii#1{%
  \ifcase#1\or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi
  \ifnum#1=\z@\else\anw@true\fi\gr@num@i}
\def\gr@num@iii#1{%
  \ifcase#1\or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi
  \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
\def\gr@num@iv#1{%
  \ifnum#1=\z@\else ͵\fi
  \ifcase#1\or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi
  \gr@num@iii}
\def\gr@num@v#1{%
  \ifnum#1=\z@\else ͵\fi
  \ifcase#1\or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi
  \gr@num@iv}
\def\gr@num@vi#1{%
  ͵\ifcase#1\or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi
  \gr@num@v}
\def\gr@Num@i#1{%
  \ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or Ϛ\or Ζ\or Η\or θ\fi
  \ifnum#1=\z@\else\anw@true\fi\anw@print}
\def\gr@Num@ii#1{%
  \ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi
  \ifnum#1=\z@\else\anw@true\fi\gr@Num@i}
\def\gr@Num@iii#1{%
  \ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi
  \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@Num@ii}
\def\gr@Num@iv#1{%
  \ifnum#1=\z@\else ͵\fi
  \ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or \MakeUppercase{Ϛ}\or Ζ\or Η\or θ\fi
  \gr@Num@iii}
\def\gr@Num@v#1{%
  \ifnum#1=\z@\else ͵\fi
  \ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi
\gr@Num@iv}
  \def\gr@Num@vi#1{%
͵ \ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi
  \gr@Num@v}
\def\gr@ill@value#1{\xpg@warning{Illegal value (#1) for Greek numeral}[$#1$]}

%%%% Attic numerals (no longer optional)
\newcount\@attic@num
\DeclareRobustCommand*{\@@atticnum}[1]{%
        \@attic@num#1\relax
        \ifnum\@attic@num<\@ne%
          \space%
          \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
        \else\ifnum\@attic@num>249999%
          \space%
      \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
        \else
            \@whilenum\@attic@num>49999\do{%
               \char"10147\advance\@attic@num-50000}%
            \@whilenum\@attic@num>9999\do{%
               M\advance\@attic@num-\@M}%
            \ifnum\@attic@num>4999%
               \char"10146\advance\@attic@num-5000%
            \fi\relax
            \@whilenum\@attic@num>999\do{%
               Χ\advance\@attic@num-\@m}%
            \ifnum\@attic@num>499%
               \char"10145\advance\@attic@num-500%
            \fi\relax
            \@whilenum\@attic@num>99\do{%
               Η\advance\@attic@num-100}%
            \ifnum\@attic@num>49%
               \char"10144\advance\@attic@num-50%
            \fi\relax
            \@whilenum\@attic@num>9\do{%
               Δ\advance\@attic@num by-10}%
            \@whilenum\@attic@num>4\do{%
               Π\advance\@attic@num-5}%
            \ifcase\@attic@num\or Ι\or ΙΙ\or ΙΙΙ\or ΙΙΙΙ\fi%
   \fi\fi}
\def\@atticnum#1{%
     \expandafter\@@atticnum\expandafter{\the#1}}
\def\atticnumeral#1{%
     \@attic@num#1\relax
     \@atticnum{\@attic@num}}
\let\atticnum=\atticnumeral

\def\greek@numbers{%
   \if@greek@numerals
      \def\greek@alph##1{\expandafter\greeknumeral\expandafter{\the##1}}%
      \def\greek@Alph##1{\expandafter\Greeknumeral\expandafter{\the##1}}%
      \let\@alph\greek@alph%
      \let\@Alph\greek@Alph%
   \fi}

\def\nogreek@numbers{%
  \let\@alph\latin@alph%
  \let\@Alph\latin@Alph%
  \let\greek@alph\@undefined%
  \let\greek@Alph\@undefined%
  }

\endinput
jspitz commented 4 months ago

Your ldf files indicate this is polyglossia 1.66, right? If so, please update to version 2.0 (just released this weekend), as we have fixed a similar issue there (#626).

If the error persists with version 2.0, please provide a full minimal example file and the exact error message.

HAMUNOZ5 commented 4 months ago

Hi, changing the font to stix2 instead of Times New Roman solved the problem.

jspitz commented 4 months ago

Did you also upgrade to polyglossia 2.0, as advised?

jspitz commented 4 months ago

No response. Let's assume this is a duplicate of #626 unless we got counter-evidence.