texlive[68532] Master/texmf-dist: babel-greek (13oct23)

commits+karl at tug.org commits+karl at tug.org
Fri Oct 13 22:50:32 CEST 2023


Revision: 68532
          https://tug.org/svn/texlive?view=revision&revision=68532
Author:   karl
Date:     2023-10-13 22:50:32 +0200 (Fri, 13 Oct 2023)
Log Message:
-----------
babel-greek (13oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/babel-greek/README.md
    trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.html
    trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.rst
    trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-athnum.pdf
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.tex
    trunk/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx
    trunk/Master/texmf-dist/tex/generic/babel-greek/greek.ldf

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-encoding-switch.tex
    trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/README.md	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/README.md	2023-10-13 20:50:32 UTC (rev 68532)
@@ -4,7 +4,7 @@
 Comprehensive support for the Greek language and script with
 [Babel](https://ctan.org/pkg/babel).
 
-**Version**: 1.14
+**Version**: 1.15
 
 **Copyright**: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
                © 2013 - 2023 Günter Milde.

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.html
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.html	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.html	2023-10-13 20:50:32 UTC (rev 68532)
@@ -794,7 +794,7 @@
 <p class="subtitle" id="babel-support-for-the-greek-language-and-script">Babel support for the Greek language and script</p>
 <dl class="docinfo">
 <dt class="version">Version<span class="colon">:</span></dt>
-<dd class="version">1.14 (<a class="reference internal" href="#changelog">changelog</a>)</dd>
+<dd class="version">1.15 (<a class="reference internal" href="#changelog">changelog</a>)</dd>
 <dt class="copyright">Copyright<span class="colon">:</span></dt>
 <dd class="copyright">© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
 © 2013 – 2023 Günter Milde.</dd>
@@ -1144,7 +1144,7 @@
 <td><p><span class="docutils literal">))</span></p></td>
 <td><p>»</p></td>
 </tr>
-<tr><td><p>perispomeni</p></td>
+<tr><td><p>perispomeni<a class="superscript" href="#footnote-4" id="footnote-reference-6" role="doc-noteref"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p></td>
 <td><p><span class="docutils literal">\~a</span></p></td>
 <td><p>ᾶ</p></td>
 <td><p>erotimatiko</p></td>
@@ -1154,7 +1154,7 @@
 <tr><td><p>dialytika</p></td>
 <td><p><span class="docutils literal">"i</span></p></td>
 <td><p>ϊ</p></td>
-<td><p>ano teleia<a class="superscript" href="#footnote-4" id="footnote-reference-6" role="doc-noteref"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p></td>
+<td><p>ano teleia<a class="superscript" href="#footnote-5" id="footnote-reference-7" role="doc-noteref"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></a></p></td>
 <td><p><span class="docutils literal">;</span></p></td>
 <td><p>·</p></td>
 </tr>
@@ -1174,6 +1174,12 @@
 <aside class="footnote-list superscript">
 <aside class="footnote superscript" id="footnote-4" role="doc-footnote">
 <span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-6">5</a><span class="fn-bracket">]</span></span>
+<p>The tilde can be used without backslash in the language variants
+“ancient” and “polutoniko”. In monotonic Greek, it keeps its default
+expansion to a no-break space.</p>
+</aside>
+<aside class="footnote superscript" id="footnote-5" role="doc-footnote">
+<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-7">6</a><span class="fn-bracket">]</span></span>
 <p>The “<span class="target" id="keep-semicolon">keep-semicolon</span>” language attribute prevents the mapping of
 a semicolon to a middle dot to allow its use as Greek question mark
 (erotimatiko).</p>
@@ -1405,6 +1411,17 @@
 <li><p>New modifier <cite>local-MakeUppercase-fixes</cite>.</p></li>
 </ul>
 </dd>
+<dt>1.15 (2023-10-13)</dt>
+<dd><ul class="simple">
+<li><p>Switch to the previous <span class="docutils literal">\encodingdefault</span> (not <span class="docutils literal">\cf@encoding</span>)
+when exiting Greek text parts.
+Exception: use <span class="docutils literal">\latinencoding</span> if the initial <span class="docutils literal">\encodingdefault</span>
+is LGR and “greek” is the main document language.</p></li>
+<li><p>Fix standard accent macros also with pre-2022 <span class="docutils literal">\MakeUppercase</span>.</p></li>
+<li><p>Rename modifier <cite>local-MakeUppercase-fixes</cite> to
+<cite>no-MakeUppercase-fixes</cite>.</p></li>
+</ul>
+</dd>
 </dl>
 </section>
 <section id="references">

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.rst
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.rst	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek-doc.rst	2023-10-13 20:50:32 UTC (rev 68532)
@@ -3,7 +3,7 @@
 Babel support for the Greek language and script
 ===============================================
 
-:Version: 1.14 (changelog_)
+:Version: 1.15 (changelog_)
 
 :Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
             © 2013 -- 2023 Günter Milde.
@@ -222,15 +222,15 @@
 
 Accent symbols and punctuation:
 
-============== ======= ==  ====================== ======= ==
-tonos/oxia     ``'a``  ά   right apostrophe       ``''``  ’
-varia          ```a``  ὰ   left apostrophe        \`\`    ‘
-dasia          ``<a``  ἁ   left quotation mark    ``((``  «
-psili          ``>a``  ἀ   right quotation mark   ``))``  »
-perispomeni    ``\~a`` ᾶ   erotimatiko            ``?``   ;
-dialytika      ``"i``  ϊ   ano teleia [#]_        ``;``   ·
-ypogegrammeni  ``a|``  ᾳ   zero width non-joiner  ``av|`` αͺ
-============== ======= ==  ====================== ======= ==
+================ ======= ==  ====================== ======= ==
+tonos/oxia       ``'a``  ά   right apostrophe       ``''``  ’
+varia            ```a``  ὰ   left apostrophe        \`\`    ‘
+dasia            ``<a``  ἁ   left quotation mark    ``((``  «
+psili            ``>a``  ἀ   right quotation mark   ``))``  »
+perispomeni [#]_ ``\~a`` ᾶ   erotimatiko            ``?``   ;
+dialytika        ``"i``  ϊ   ano teleia [#]_        ``;``   ·
+ypogegrammeni    ``a|``  ᾳ   zero width non-joiner  ``av|`` αͺ
+================ ======= ==  ====================== ======= ==
 
 The downside is, that you cannot print Latin letters and some symbols if
 LGR is the active font encoding. This means that for every Latin-written
@@ -237,6 +237,10 @@
 word or acronym in a Greek text part, an explicit font encoding switch is
 required.
 
+.. [#] The tilde can be used without backslash in the language variants
+   "ancient" and "polutoniko". In monotonic Greek, it keeps its default
+   expansion to a no-break space.
+
 .. [#] The "_`keep-semicolon`" language attribute prevents the mapping of
    a semicolon to a middle dot to allow its use as Greek question mark
    (erotimatiko).
@@ -410,7 +414,16 @@
 1.14 (2023-08-18)
      - Fix upcasing of Greek letters with standard accent macros.
      - New modifier `local-MakeUppercase-fixes`.
+1.15 (2023-10-13)
+     - Switch to the previous ``\encodingdefault`` (not ``\cf at encoding``)
+       when exiting Greek text parts.
+       Exception: use ``\latinencoding`` if the initial ``\encodingdefault``
+       is LGR and "greek" is the main document language.
+     - Fix standard accent macros also with pre-2022 ``\MakeUppercase``.
+     - Rename modifier `local-MakeUppercase-fixes` to
+       `no-MakeUppercase-fixes`.
 
+
 .. _babel/4303: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4303
 .. _babel/4305: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4305
 .. _babel/4360: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4360

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/test-athnum.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/generic/babel-greek/test-encoding-switch.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/test-encoding-switch.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/test-encoding-switch.tex	2023-10-13 20:50:32 UTC (rev 68532)
@@ -0,0 +1,109 @@
+\documentclass{article}
+\usepackage{parskip}
+\usepackage{lmodern}
+
+% We load LGR last, which as a bad idea (see below).
+% play with the font encodings:
+% \usepackage[T1]{fontenc}
+\usepackage[T1,T2A,LGR]{fontenc}
+
+\DeclareFontFamilySubstitution{T2A}{lmr}{cmr}
+
+\usepackage[english,greek.ancient]{babel}
+
+\makeatletter % we want to see the value of some internal macros
+
+\@ifl at aded{def}{t1enc}
+  {\newcommand*{\T at one@detected}{loaded}}
+  {\newcommand*{\T at one@detected}{\textbf{not} loaded}}
+
+\newcommand*{\cs}[1]{\ensureascii{\texttt{\textbackslash#1}}}
+
+% the title may be given before or after \begin{document}
+\title{\foreignlanguage{english}{Test font encoding switches}}
+\author{\ensureascii{Günter Milde}}
+
+\begin{document}
+
+\maketitle
+
+\ensureascii{The document's main language is \texttt{\bbl at main@language}}
+(Ελληνικά).
+
+\ensureascii{The initial font encodings are:}
+\cs{cf at encoding}:     \cf at encoding,
+\cs{encodingdefault}: \encodingdefault.
+
+\selectlanguage{english}
+
+After switching to \texttt{english}, we get:\\
+\cs{cf at encoding}:     \cf at encoding,
+\cs{encodingdefault}: \encodingdefault.
+
+\subsection*{\LaTeX2e Font Encodings}
+
+\emph{Fontenc} stores known encodings in \cs{@fontenc at load@list}:\\
+\@fontenc at load@list\ (sic! note the missing comma).
+The last encoding in this list becomes the document's
+default font encoding. It should be a \emph{standard text encoding}
+(cf. encguide.pdf).
+
+\emph{Babel} defines a \cs{latinencoding} (\latinencoding) and
+\cs{ensureascii}, which uses the standard last loaded text encoding
+(\ensureascii{\cf at encoding}).
+
+\emph{Babel-Greek} ensures that a font encoding supporting the Greek
+script is used in Greek text parts.
+The previous font encoding is restored in \cs{noextrasgreek}.
+Exception:
+If the default language is \texttt{greek} and the initial
+\cs{encodingdefault} is LGR, \cs{noextrasgreek} switches to
+\cs{latinencoding} because the LGR font encoding is only suited for the
+Greek script.
+% cf. https://github.com/latex3/babel/pull/263
+% and https://www.lyx.org/trac/ticket/12882
+
+\newpage
+\subsection*{Tests}
+
+Test that we are using a \emph{standard text encoding}:
+język polski.\footnote{The ogonek accent fails with LGR or OT1.}
+
+% A command local to the Polish QX font encoding: \textanglearc
+
+Call fontencoding T2A: \fontencoding{T2A} \selectfont
+\cs{cf at encoding} \cf at encoding, \cs{encodingdefault} \encodingdefault.
+\\
+Now I can use Кириллица\footnote{
+  exept for footnotes, where encodingdefault is used:
+  \cf at encoding, \encodingdefault}
+and Latin (including the ogonek) język polski
+(caveat: wrong result with drag-and-drop from the PDF).
+
+Greek with \cs{foreignlanguage}: \foreignlanguage{greek}{Ελληνικά \\
+\cs{cf at encoding} \cf at encoding, \cs{encodingdefault}: \encodingdefault{}
+}
+\\
+Back to English -- the font encoding is restored to what it was
+outside the group:
+\cs{cf at encoding} \cf at encoding, \cs{encodingdefault} \encodingdefault.
+I can still use Кириллица.
+
+Greek with \cs{selectlanguage}: \selectlanguage{greek} Ελληνικά\\
+\cs{cf at encoding} \cf at encoding, \cs{encodingdefault} \encodingdefault.
+
+\selectlanguage{english}
+Back to English -- the font encoding
+is restored by babel-greek to the previous default encoding:
+\cs{cf at encoding} \cf at encoding, \cs{encodingdefault} \encodingdefault.
+I can use the ogonek (język) but Cyrillic fails because it was not set
+as \cs{encodingdefault} before the switch to Greek.
+% Кириллица fails
+
+\subsection*{\emph{fontenc} curiosities}
+
+The encodings OT1 and T1 are always pre-loaded.
+However, according to \cs{@ifl at aded} the encoding file ``t1enc.def'' is
+\T at one@detected{}.
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/generic/babel-greek/test-encoding-switch.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex	2023-10-13 20:50:32 UTC (rev 68532)
@@ -32,9 +32,12 @@
   \fi
 
   % Load and configure Babel:
-
-  \usepackage[greek,% comment out "greek" to test the "basic support"
+  % Support for the pseudo-language "polutonikogreek",
+  % used instead of "greek", is kept for backwards compatibility.
+  \usepackage[
+              greek,% comment out "greek" to test the "basic support"
               % greek.local-LGR-fixes,
+              % polutonikogreek,
               english]{babel}
   % Uncomment the desired language variant
   % Default: modern monotonic Greek
@@ -43,9 +46,6 @@
   % \languageattribute{greek}{polytonic} % alias for polutoniko
   % \languageattribute{greek}{ancient}  % ancient Greek
   %
-  % Support for the pseudo-language "polutonikogreek", used instead of "greek",
-  % is kept for backwards compatibility:
-  % \usepackage[polutonikogreek,english]{babel}
   %
   % For backwards compatibility, you can also use
   % \selectlanguage{polutonikogreek} instead of \selectlanguage{greek} etc.
@@ -125,6 +125,10 @@
    \exhyphenpenalty=10000 % \box2 vyšoupnu do vnějšího seznamu
    \emergencystretch=4em \leavevmode\unhbox2 \endgraf\egroup}
 
+\newcommand*{\TestUppercase}[1]{%
+   \foreignlanguage{greek}{#1 → \MakeUppercase{#1}}%
+}
+
 % --------------------------------------------------------------------------
 
 \begin{document}
@@ -487,9 +491,9 @@
 \end{quote}
 
 \ifdefined\lgrfont
-  The Latin transliteration can be used with also with
-  Xe/LuaTeX, if the input text is wrapped in \cs{lgrfont}
-    \footnote{available, if the LGR encoding is loaded
+  The Latin transliteration can also be used with
+  Xe/LuaTeX, if the input text is wrapped in \cs{lgrfont}\footnote{
+    available, if the LGR encoding is loaded
     with the \pkgref{fontenc} package}
   but may result in non-matching fonts and wrong hyphenation:
   \begin{quote}
@@ -509,12 +513,12 @@
 
 The character 037E GREEK QUESTION MARK works with both, Xe/LuaTeX and 8-bit
 TeX. However it is deprecated and Unicode normalizes it to 003B SEMICOLON.
-This means that even texts wich use the GREEK QUESTION MARK may and up with
+This means that even texts wich use the GREEK QUESTION MARK may end up with
 SEMICOLON after drag-and-drop or other processing and with a middle dot in
 the final output.
 
 With the \texttt{keep-semicolon} language attribute, 003B SEMICOLON is made
-active and inserts an \emph{erotimatiko} also with LGR encoded fonts, if the
+active and inserts an \emph{erotimatiko} also with LGR-encoded fonts, if the
 text language is set to Greek
 (in this document, the semicolon is
 \ifnum\catcode59 = 13
@@ -524,17 +528,17 @@
 \fi
 
 \begin{tabular}{lccc}
-  Input & \latinencoding{} & \greekfontencoding
-                           & Greek language                       \\
-  003F QUESTION MARK       & ? & \ensuregreek{?}
-                               & \foreignlanguage{greek}{?}       \\
-                                                                  \\
-  037E GREEK QUESTION MARK & {\footnotesize n/d} & \ensuregreek{;}
-                               & \foreignlanguage{greek}{;}       \\
-  003B SEMICOLON           & ; & \ensuregreek{;}
-                               & \foreignlanguage{greek}{;}       \\
-  00B7 MIDDLE DOT          & · & \ensuregreek{·}
-                               & \foreignlanguage{greek}{·}       \\
+  Input                    & \latinencoding{}
+     & \greekfontencoding  & Greek language             \\
+  003F QUESTION MARK       & ?
+     & \ensuregreek{?}     & \foreignlanguage{greek}{?} \\
+                                                        \\
+  037E GREEK QUESTION MARK & {\footnotesize n/d}
+     & \ensuregreek{;}     & \foreignlanguage{greek}{;} \\
+  003B SEMICOLON           & ;
+     & \ensuregreek{;}     & \foreignlanguage{greek}{;} \\
+  00B7 MIDDLE DOT          & ·
+     & \ensuregreek{·}     & \foreignlanguage{greek}{·} \\
 \end{tabular}
 
 {\footnotesize n/d}: character not defined in T1 encoding.
@@ -590,7 +594,7 @@
   \makeatletter
   \newcommand{\RomanNumeralTest}{\f at encoding:
               \romannumeral 1, \romannumeral 2, \romannumeral 3,
-              \romannumeral 4, \ldots, \romannumeral 1975}
+              \romannumeral 4, \romannumeral 5, \romannumeral 6}
   \makeatother
   \begin{quote}
     \RomanNumeralTest\\
@@ -651,7 +655,7 @@
   \end{enumerate}
 \end{enumerate}
 
-More test of the LGR-redefinitions are in \file{test-lgr-fixes.tex}.
+More tests of the LGR-redefinitions are in \file{test-lgr-fixes.tex}.
 
 \ifdefined\lgrfont
 \else
@@ -663,54 +667,53 @@
 
 Capital Greek letters have diacritics (except the dialytika and sub-iota) to
 the left (instead of above) and drop them in uppercase (except the
-dialytika), e.g., \ensuregreek{μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}}.
+dialytika), e.g., \TestUppercase{μαΐστρος}.
 
 Tonos and psili mark a \emph{hiatus} (break-up of a diphthong) if
 placed on the first vowel of a diphthong.
 A dialytika must be placed on the second vowel if they are dropped, e.g.
 %
-\newcommand{\HiatusLICR}{\acctonos\textalpha\textiota,
-                         \acctonos\textalpha\textupsilon,
-                         \acctonos\textepsilon\textiota,
-                         \'>\textalpha\textiota,
-                         \'>\textalpha\textupsilon,
-                         \accpsili\textalpha\textupsilon,
-                         \accpsilioxia\textepsilon\textiota}%
-\foreignlanguage{greek}{\HiatusLICR\ $\mapsto$ \MakeUppercase{\HiatusLICR}}.
+\TestUppercase{\acctonos\textalpha\textiota,
+               \acctonos\textalpha\textupsilon,
+               \acctonos\textepsilon\textiota,
+               \'>\textalpha\textiota,
+               \'>\textalpha\textupsilon,
+               \accpsili\textalpha\textupsilon,
+               \accpsilioxia\textepsilon\textiota}%
 
 Some affected words:
 \begin{quotation}
-  \selectlanguage{greek}
-  \newcommand*{\aylos}{% from teubner.sty: άυλος → ΑΫΛΟΣ
+  % from teubner.sty:
+  \TestUppercase{% άυλος → ΑΫΛΟΣ
     \acctonos\textalpha\textupsilon\textlambda\textomicron\textfinalsigma}
-  \aylos{} $\mapsto$ \MakeUppercase{\aylos},
-  \renewcommand*{\aylos}{% polytonic: ἄυλος → ΑΫΛΟΣ
+  \TestUppercase{% polytonic: ἄυλος → ΑΫΛΟΣ
     \'>\textalpha\textupsilon\textlambda\textomicron\textfinalsigma}
-  \aylos{} $\mapsto$ \MakeUppercase{\aylos},
 
   % from http://diacritics.typo.cz/index.php?id=69
-  \newcommand*{\maine}{%μάινη → ΜΑΪΝΗ
+  \TestUppercase{%μάινη → ΜΑΪΝΗ
     \textmu\acctonos\textalpha\textiota\textnu\texteta}
-  \maine{} $\mapsto$ \MakeUppercase{\maine},
 
   % from  http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema
-  \newcommand*{\keik}{% κέικ → ΚΕΪΚ
+  \TestUppercase{% κέικ → ΚΕΪΚ
     \textkappa\acctonos\textepsilon\textiota\textkappa}
-  \keik{} $\mapsto$ \MakeUppercase{\keik},
 
-  \newcommand*{\ahypnia}{% ἀυπνία → ΑΫΠΝΙΑ
+  \TestUppercase{% ἀυπνία → ΑΫΠΝΙΑ
     \accpsili\textalpha\textupsilon\textpi\textnu\acctonos\textiota\textalpha}
-  \ahypnia{} $\mapsto$ \MakeUppercase{\ahypnia},
 
   % from http://multilingualtypesetting.co.uk/blog/greek-typesetting-tips/
-  \newcommand*{\romeika}{\textrho\textomega\textmu
-                         \acctonos\textepsilon\textiota\textkappa\textalpha}
-  \romeika{} $\mapsto$ \MakeUppercase{\romeika}.
+  \TestUppercase{% ρωμέικα → ΡΩΜΕΪΚΑ
+    \textrho\textomega\textmu
+    \acctonos\textepsilon\textiota\textkappa\textalpha}
 
   % from Yannis Haralambous https://hal.science/hal-02101618
-  \newcommand*{\aute}{% ἀυτή → ΑΫΤΗ a cry, shout, esp. battle-shout
+  \TestUppercase{% ἀυτή → ΑΫΤΗ a cry, shout, esp. battle-shout
     \accpsili\textalpha\textupsilon\texttau\acctonos\texteta}
-  \aute{} → \MakeUppercase{\aute}
+
+  % from https://r12a.github.io/scripts/grek/el.html#transforms
+  % νεράιδα -> ΝΕΡΑΪΔΑ
+  \TestUppercase{νεράιδα}\footnote{
+    This example uses literal input.
+    It fails with pre-2022 \cs{MakeUppercase}.}
 \end{quotation}
 
 The file \file{char-list.tex} in the \pkgref{greek-fontenc} package includes
@@ -728,28 +731,22 @@
 With \cs{greekfontencoding} \greekfontencoding, LaTeX version \fmtversion,
 and language variant ``\GreekLanguageVariant'', we get
 
-\newcommand{\precomposed}{ῶ, ή, ΐ, ᾂ, άι}
-\newcommand{\translit}{{~w, 'h, '"i, >`a|, 'ai}}
-\newcommand{\acconLICR}{\~\textomega, \'\texteta, \'"\textiota,
-                        \`>\textalpha\ypogegrammeni, \'\textalpha\textiota}
-\newcommand{\accontranslit}{{\~w, \'h, \'"i, \`>a|, \'ai}}
-\newcommand{\acconliteral}{\~ω, \'η, \'"ι, \`>ᾳ, \'αι}
-
 pre-composed:
-\foreignlanguage{greek}{\precomposed\ → \MakeUppercase{\precomposed}}
+\TestUppercase{ῶ, ή, ΐ, ᾂ, άι}
 
 transliteration:
-\foreignlanguage{greek}{\translit\ → \MakeUppercase{\translit}}
+\TestUppercase{{~w, 'h, '"i, >`a|, 'ai}}
 
 accent macro + LICR:
-\foreignlanguage{greek}{\acconLICR\ → \MakeUppercase{\acconLICR}}
+\TestUppercase{\~\textomega, \'\texteta, \'"\textiota,
+                        \`>\textalpha\ypogegrammeni, \'\textalpha\textiota}
 
 accent macro + transliteration:
-\foreignlanguage{greek}{\accontranslit\ → \MakeUppercase{\accontranslit}}
+\TestUppercase{{\~w, \'h, \'"i, \`>a|, \'ai}}
 
 accent macro + literal:
 \ifdefined \UnicodeEncodingName
-  \foreignlanguage{greek}{\acconliteral\ → \MakeUppercase{\acconliteral}}
+  \TestUppercase{\~ω, \'η, \'"ι, \`>ᾳ, \'αι}
 \else
   → inputenc Error: Invalid UTF-8 byte sequence
 \fi
@@ -817,7 +814,7 @@
 \emph{Composite command} definitions ensure that combined accents
 also work for accent characters ``upcased'' to the charcter
 No 159 = 0x9f:
-\newcommand{\CombinedAccentSample}{%
+\TestUppercase{%
   \ifdefined \UnicodeEncodingName
     \"'υ{} \"`υ{} \`"υ{} \'"υ{} \`<α{} \'<α{}
   \else
@@ -825,9 +822,7 @@
   \fi
   \'<\textalpha\textiota
 }%
-\foreignlanguage{greek}{%
-  \CombinedAccentSample{} $\mapsto$ \MakeUppercase{\CombinedAccentSample}%
-}.
+.
 
 
 \newcommand{\AccentCharacters}{" | ' ` > <}
@@ -838,8 +833,7 @@
   is converted to an upper right apostrophe by LGR.},
 sub-iota, tonos/oxia, varia, psili, and dasia):
 \begin{quote}
-  \selectlanguage{greek}
-  \AccentCharacters{} $\mapsto$ \MakeUppercase{\AccentCharacters}
+  \TestUppercase{\AccentCharacters}
 \end{quote}
 
 The changed uc/lccodes have strange effects on Latin text parts
@@ -847,10 +841,10 @@
 \begin{quote}
   \selectlanguage{greek}
   \foreignlanguage{english}{English:
-    Let's see: \AccentCharacters{} $\mapsto$
+    Let's see: \AccentCharacters{} →
     \MakeUppercase{Let's see: \AccentCharacters}}\\
   \ensureascii{\cs{ensureascii}:
-    Let's see: \AccentCharacters{} $\mapsto$
+    Let's see: \AccentCharacters{} →
     \MakeUppercase{Let's see: \AccentCharacters}}
 \end{quote}
 
@@ -883,8 +877,8 @@
   \ensureascii{MakeLowercase} \MakeLowercase{\alphaypo}
 \end{quotation}
 
-and letters followed by \verb|\prosgegrammeni|
-with literal character + literal GREEK YPOGEGRAMMENI:
+and letters followed by \cs{prosgegrammeni}
+with literal character + GREEK YPOGEGRAMMENI:
 \begin{quotation}
   \selectlanguage{greek}
   \newcommand{\alphapros}{\textalpha\prosgegrammeni α\prosgegrammeni{} αι  /

Added: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf	2023-10-13 20:50:32 UTC (rev 68532)

Property changes on: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.tex	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/doc/generic/babel-greek/test-greeknum.tex	2023-10-13 20:50:32 UTC (rev 68532)
@@ -16,7 +16,7 @@
 \else
   \usepackage{lmodern}
   % \usepackage{kerkis}   % !! Data loss: \textStigma and \textSampi
-    			  %    characters missing!
+                          %    characters missing!
   % \usepackage{gfsdidot} % !! Data loss: \textsampi, \textSampi,
                           %    and \textStigma characters missing!
   % \usepackage{dejavu}   % !! Data loss: \textSampi character missing!
@@ -25,9 +25,9 @@
   % \renewcommand*{\greeknumeralNinety}{\textsampi}      % default \textSampi
 \fi
 
-
 \usepackage[greek,english]{babel}
 
+
 \begin{document}
 \section*{Test Greek (Milesian) numerals}
 \author{Günter Milde}
@@ -38,8 +38,15 @@
 \verb|\romannumeral|. For details and configuration options, see
 \texttt{babel-greek.pdf}.
 
+% Compare also with the "ready-made" counter styles for CSS
+% https://www.w3.org/TR/predefined-counter-styles/#greek-styles
+%
+% CSS counters greek-lower-modern and greek-upper-modern
+% use Sigma+Tau instead of Stigma for 6.
+%
+% CSS counters greek-lower-ancient and greek-upper-ancient use Stigma
+
 Examples:
-
 \newcommand*{\greeknumeralsample}[1]{\mbox{#1 = \greeknumeral{#1}}}
 \newcommand*{\Greeknumeralsample}[1]{\mbox{#1 = \Greeknumeral{#1}}}
 

Modified: trunk/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx	2023-10-13 20:50:32 UTC (rev 68532)
@@ -26,7 +26,7 @@
 % and covered by LPPL is defined by the unpacking script (babel-greek.ins)
 % which is part of the package.
 % \fi
-% \CheckSum{1701}
+% \CheckSum{1694}
 %
 % \iffalse
 %    Tell the \LaTeX\ system who we are and write an entry on the
@@ -37,7 +37,7 @@
 %<code>\ProvidesLanguage{greek}
 %\fi
 %\ProvidesFile{babel-greek.dtx}
-        [2023/08/18 1.14 Greek support for the babel system]
+        [2023/10/13 1.15 Greek support for the babel system]
 %\iffalse
 %% File `babel-greek.dtx'
 %% Greek language Definition File
@@ -210,8 +210,11 @@
 %
 % \changes{babel-greek-1.12}{2023/03/04}{
 %   New modifiers \Lopt{local-LGR-fixes} and \Lopt{no-LGR-fixes}.}
-% \changes{babel-greek-1.14}{2023-08-18}{
+% \changes{babel-greek-1.14}{2023/08/18}{
 %   New modifier \Lopt{local-MakeUppercase-fixes}.}
+% \changes{babel-greek-1.15}{2023/10/13}{
+%   Rename modifier \Lopt{local-MakeUppercase-fixes} to
+%   \Lopt{no-MakeUppercase-fixes}.}
 %
 % All language attributes may also be used as modifiers, e.g.
 % \begin{verbatim}
@@ -231,7 +234,7 @@
 % Check for problems with enumerations in Greek text parts and with
 % Roman and Greek numerals everywhere (especially in the ToC).
 %
-% The \hyperref[sec:MakeUppercase-fixes]{\Lopt{local-MakeUppercase-fixes}}
+% The \hyperref[sec:MakeUppercase-fixes]{\Lopt{no-MakeUppercase-fixes}}
 % modifier skips the mapping of standard accents to ``capital'' accents
 % in section~\ref{sec:MakeUppercase-fixes}.
 %
@@ -433,6 +436,11 @@
 %    \begin{macrocode}
 \addto\extrasgreek{\languageshorthands{greek}}
 %    \end{macrocode}
+% An auxiliary macro allows to test whether a macro holds the string `LGR'
+% with |\ifx|:
+%    \begin{macrocode}
+\def\bbl at greek@LGR{LGR}
+%    \end{macrocode}
 %
 %
 % \subsection{Hyphenation patterns \label{sec:hyphenation-patterns}}
@@ -608,8 +616,7 @@
 % active and inserts an \emph{erotimatiko} also with LGR encoded fonts:
 %    \begin{macrocode}
 \bbl at declare@ttribute{greek}{keep-semicolon}{%
-  \def\bbl at tempa{LGR}
-  \ifx\greekfontencoding\bbl at tempa
+    \ifx\greekfontencoding\bbl at greek@LGR
     \ProvideTextCommandDefault{\textsemicolon}{;}
     \ProvideTextCommand{\textsemicolon}{LGR}{\texterotimatiko}
     \initiate at active@char{;}
@@ -622,7 +629,7 @@
 %
 % \subsection{Report unsupported modifiers}
 %
-% \changes{babel-greek-1.13.2}{2023-06-01}{Warn of unsupported modifiers.}
+% \changes{babel-greek-1.13.2}{2023/06/01}{Warn of unsupported modifiers.}
 %
 % Test for unsupported (or misspelled) \hyperref[sec:modifiers]{modifiers}
 % (code contributed by Javier Bezos).
@@ -629,7 +636,7 @@
 %    \begin{macrocode}
 \def\bbl at greek@modifiers{,%
   polutoniko,polytonic,ancient,keep-semicolon,%
-  local-LGR-fixes,no-LGR-fixes,local-MakeUppercase-fixes,}
+  local-LGR-fixes,no-LGR-fixes,no-MakeUppercase-fixes,}
 \ifx\BabelModifiers\relax\else
   \bbl at foreach\BabelModifiers{%
     \@expandtwoargs\in@{,#1,}{\bbl at greek@modifiers}
@@ -687,10 +694,11 @@
 \else
   \providecommand*{\greekfontencoding}{LGR}
   \providecommand*{\bbl at greek@fontencdef}{lgrenc}
-  % TODO the more generic version fails :(
-  % \edef\bbl at greek@fontencdef{\lowercase{\greekfontencoding}enc}
 \fi
 %    \end{macrocode}
+% TODO: Why does the more generic version\\
+% |  \edef\bbl at greek@fontencdef{\lowercase{\greekfontencoding}.enc}|\\
+% fail when used in |\ifl at aded|?
 % \end{macro}
 %
 % \subsubsection{Ensure loading of Greek font encoding definitions.
@@ -697,21 +705,24 @@
 %                \label{load-greek-font-encoding-definitions}}
 %
 % If the \emph{encoding definition file} for |\greekfontencoding| is not yet
-% loaded, do this now:
+% loaded, do this now.
+% (Using |\RequirePackage| fails as we are in an ``Options Section''.)
+% TODO: set with |\AtEndOfPackage|?
+% (All definitions requiring the font encoding must be delayed as well!)
 %    \begin{macrocode}
-\@ifl at aded{def}{\bbl at greek@fontencdef}{}
-{% else
-  \InputIfFileExists{\bbl at greek@fontencdef .def}{}
-  {% else
-    \bbl at error{Font support for the Greek script missing.\\
-               babel-greek can't typeset Greek.\\
-               Install the "greek-fontenc" package\\
-               or use XeTeX/LuaTeX with polyglossia.}
-              {I can't find the \bbl at greek@fontencdef .def file
-               for the Greek fonts (encoding \greekfontencoding)}
-    \@@end
+\@ifl at aded{def}{\bbl at greek@fontencdef}
+  {}
+  {\InputIfFileExists{\bbl at greek@fontencdef .def}
+     {}
+     {\bbl at error{Font support for the Greek script missing.\\
+                 babel-greek can't typeset Greek.\\
+                 Install the "greek-fontenc" package\\
+                 or use XeTeX/LuaTeX with polyglossia.}
+                {I can't find the \bbl at greek@fontencdef .def file
+                 for the Greek fonts (encoding \greekfontencoding)}
+      \@@end
+     }
   }
-}
 %    \end{macrocode}
 % If the PU font encoding is defined (by \pkgref{hyperref}), load extended
 % Greek support for it. Do this in the |\AtBeginDocument| hook because
@@ -734,8 +745,8 @@
         \makeatletter
         \InputIfFileExists{puenc-greek.def}%
           {}%
-          {\bbl at warning{I cannot find the "puenc" Greek fixes
-                        from "greek-fontenc".}%
+          {\bbl at warning{I cannot find the Greek fixes for PDF strings
+                        ("punec-greek.def" from "greek-fontenc").}%
           }%
         \RestoreAtCatcode
        }%
@@ -745,6 +756,22 @@
 %    \end{macrocode}
 %
 % \subsubsection{Font encoding switches \label{sec:font-encoding-switches}}
+%
+% Add font encoding switches (see below) to the language hooks
+% (cf.\ section~\ref{sec:language-hooks}) to ensure a font encoding
+% supporting the Greek script is used in Greek text parts:
+% \changes{greek-1.5}{2013/06/21}{LGR not used with XeTeX/LuaTeX.}
+% \changes{babel-greek-1.08}{2013/11/27}{
+%          Use EU1 or EU2 for Latin script if available}
+% \changes{babel-greek-1.11}{2020/11/20}{Save/restore previous font encoding
+%          instead of switching to \cs{latinencoding} when leaving Greek.}
+%    \begin{macrocode}
+\addto\extrasgreek{%
+  \let\BabelGreekPreviousFontEncoding\encodingdefault
+  \greekscript}
+\addto\noextrasgreek{\BabelGreekRestoreFontEncoding}
+%    \end{macrocode}
+%
 % \begin{macro}{\greekscript}
 %   The TextCommand\footnote{See
 %      \href{https://www.latex-project.org/help/documentation/fntguide.pdf}
@@ -775,12 +802,14 @@
 % \end{macro}
 % \begin{macro}{\BabelGreekRestoreFontEncoding}
 %   The declaration |\BabelGreekRestoreFontEncoding| changes the font encoding
-%   to the value it had before the switch to the Greek language. It does
-%   nothing, if the language switch did not trigger a font encoding switch.
+%   to the value of |\encodingdefault| before the switch to the Greek language.
+%   It does nothing, if there was no font encoding change when entering Greek.
 % \changes{babel-greek-1.12}{2023/03/04}{New macro.}
+% \changes{babel-greek-1.15}{2023/10/13}{
+%          Do not ``restore'' LGR when leaving Greek.}
 %    \begin{macrocode}
 \def\BabelGreekRestoreFontEncoding{%
-  \ifx\cf at encoding\BabelGreekPreviousFontEncoding
+  \ifx\encodingdefault\BabelGreekPreviousFontEncoding
   \else
     \let\encodingdefault\BabelGreekPreviousFontEncoding
     \fontencoding{\encodingdefault}\selectfont
@@ -788,21 +817,18 @@
 }
 %    \end{macrocode}
 % \end{macro}
-% Add font encoding switches to the language hooks
-% (cf.\ section~\ref{sec:language-hooks}) to ensure a font encoding
-% supporting the Greek script is used in Greek text parts:
-% \changes{greek-1.5}{2013/06/21}{LGR not used with XeTeX/LuaTeX.}
-% \changes{babel-greek-1.08}{2013/11/27}{
-%          Use EU1 or EU2 for Latin script if available}
-% \changes{babel-greek-1.11}{2020/11/20}{Save/restore previous font encoding
-%          instead of switching to \cs{latinencoding} when leaving Greek.}
-% \changes{babel-greek-1.12}{2023/03/04}{Save previous font encoding
-%          in \cs{BabelGreekPreviousFontEncoding}.}
+% Exception: don't keep LGR if it was the initial encoding
+% as it is clearly unsuited for non-Greek texts.
+% If Greek is the main language, |\extrasgreek| is called before
+% |\begin{document}| --- we can check the saved value of the previous
+% font encoding and replace LGR with the default generic text font encoding.
+% ^^A TODO: Use the font encoding detection from \cs{ensureascii}?
 %    \begin{macrocode}
-\addto\extrasgreek{%
-  \let\BabelGreekPreviousFontEncoding\cf at encoding
-  \greekscript}
-\addto\noextrasgreek{\BabelGreekRestoreFontEncoding}
+\AtBeginDocument{
+  \ifx\BabelGreekPreviousFontEncoding\bbl at greek@LGR
+    \let\BabelGreekPreviousFontEncoding\latinencoding
+  \fi
+}
 %    \end{macrocode}
 %
 % \subsubsection{Additional commands for the LGR font encoding}
@@ -912,11 +938,15 @@
 %    \begin{macrocode}
   \ProvideTextCommandDefault{\EnsureStandardFontEncoding}{\@firstofone}
   \ProvideTextCommand{\EnsureStandardFontEncoding}{LGR}[1]{%
-                                                      \ensureascii{#1}}
-  \AtBeginDocument{\@ifpackageloaded{hyperref}
-                     {\pdfstringdefDisableCommands{%
-                         \let\EnsureStandardFontEncoding\@firstofone}}
-                     {}}
+    \ensureascii{#1}
+  }
+  \AtBeginDocument{%
+    \@ifpackageloaded{hyperref}
+      {\pdfstringdefDisableCommands{%
+         \let\EnsureStandardFontEncoding\@firstofone}
+      }
+      {}
+  }
 %    \end{macrocode}
 % \end{macro}
 % End the LGR additions block:
@@ -966,8 +996,7 @@
 % Let it use the new defined \emph{TextCommand} |\textampersand|
 % in text mode.
 %    \begin{macrocode}
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \def\bbl at greek@roman#1{\expandafter\EnsureStandardFontEncoding%
                          \expandafter{\romannumeral#1}}
   \def\bbl at greek@Roman#1{\expandafter\EnsureStandardFontEncoding%
@@ -1548,8 +1577,7 @@
 % without it becoming a $\varsigma$.
 % Because of this we make sure its lowercase code is not changed.
 %    \begin{macrocode}
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \addto\extrasgreek{%
     \babel at savevariable{\lccode`v}\lccode`v=`v%
     \babel at savevariable{\lccode`\'}\lccode`\'=`\'%
@@ -1640,10 +1668,12 @@
 %   are now in greek-euenc.def (the polyglossia version has bugs).}
 % \changes{babel-greek-1.12}{2023/03/04}{
 %   Only change uccodes if LaTeX is older than 2022/06/01.}
-% \changes{babel-greek-1.13.2}{2023-06-01}{
+% \changes{babel-greek-1.13.2}{2023/06/01}{
 %   \cs{MakeUppercase} fix for transliteration input.}
-% \changes{babel-greek-1.14}{2023-08-18}{
+% \changes{babel-greek-1.14}{2023/08/18}{
 %   \cs{MakeUppercase} fix for standard accent macros.}
+% \changes{babel-greek-1.15}{2023/10/13}{
+%   Fix standard accent macros also with pre-2022 \cs{MakeUppercase}.}
 % In Greek typographical praxis,
 % letters drop accents (eccept dialytika) and breathings in
 % UPPERCASE. This is not cared for by the Unicode standard.
@@ -1658,21 +1688,17 @@
 % macros.
 % Font-encoding specific definitions for the ``capital'' accent macros
 % in \pkgref{greek-fontenc}~$\ge 2.4$ suppress them on Greek letters.
-% The \Lopt{local-MakeUppercase-fixes} modifier can be used to skip this step
+% The \Lopt{no-MakeUppercase-fixes} modifier can be used to skip this step
 % (cf. section~\ref{sec:modifiers}).
 %    \begin{macrocode}
-\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion} % new in 2020
-\bbl at xin@{,local-MakeUppercase-fixes,}{,\BabelModifiers,}%
+\bbl at xin@{,no-MakeUppercase-fixes,}{,\BabelModifiers,}%
 \ifin@
 \else
-  \IfFormatAtLeastTF{2022/06/01}
-    {\ProvideTextCommandDefault{\accACUTE}{\@tabacckludge'}
-     \ProvideTextCommandDefault{\accGRAVE}{\@tabacckludge`}
-     \ProvideTextCommandDefault{\accTILDE}{\@tabacckludge~}
-     \ProvideTextCommandDefault{\accDIAERESIS}{\@tabacckludge"}
-     \addto\@uclclist{\'\accACUTE \`\accGRAVE \~\accTILDE \"\accDIAERESIS}%
-    }
-    {}
+  \ProvideTextCommandDefault{\accACUTE}{\@tabacckludge'}
+  \ProvideTextCommandDefault{\accGRAVE}{\@tabacckludge`}
+  \ProvideTextCommandDefault{\accTILDE}{\@tabacckludge~}
+  \ProvideTextCommandDefault{\accDIAERESIS}{\@tabacckludge"}
+  \addto\@uclclist{\'\accACUTE \`\accGRAVE \~\accTILDE \"\accDIAERESIS}%
 \fi
 %    \end{macrocode}
 % Drop diacritics also with ``input ligatures'' defined in LGR fonts:
@@ -1684,8 +1710,7 @@
 % The optional ``locale'' argument |[el]| restricts the mapping to Greek
 % text parts.
 %    \begin{macrocode}
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \ifdefined\DeclareUppercaseMapping % new in 2023
     % \DeclareUppercaseMapping[el]{"1FBE}{\prosgegrammeni}%
     \DeclareUppercaseMapping[el]{"0027}{}% '

Modified: trunk/Master/texmf-dist/tex/generic/babel-greek/greek.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-greek/greek.ldf	2023-10-13 20:50:19 UTC (rev 68531)
+++ trunk/Master/texmf-dist/tex/generic/babel-greek/greek.ldf	2023-10-13 20:50:32 UTC (rev 68532)
@@ -32,7 +32,7 @@
 %% and covered by LPPL is defined by the unpacking script (babel-greek.ins)
 %% which is part of the package.
 \ProvidesLanguage{greek}
-        [2023/08/18 1.14 Greek support for the babel system]
+        [2023/10/13 1.15 Greek support for the babel system]
 %% File `babel-greek.dtx'
 %% Greek language Definition File
 %% Copyright © 1997, 2005 Apostolos Syropoulos, Johannes Braams
@@ -41,6 +41,7 @@
 \LdfInit\CurrentOption{captions\CurrentOption}
 \gdef\CurrentOption{greek}
 \addto\extrasgreek{\languageshorthands{greek}}
+\def\bbl at greek@LGR{LGR}
 \ifx\l at greek\@undefined
   \@nopatterns{greek}
   \adddialect\l at greek 0
@@ -85,8 +86,7 @@
   \renewcommand{\greeknumeralNinety}{\textQoppa}%
 }
 \bbl at declare@ttribute{greek}{keep-semicolon}{%
-  \def\bbl at tempa{LGR}
-  \ifx\greekfontencoding\bbl at tempa
+    \ifx\greekfontencoding\bbl at greek@LGR
     \ProvideTextCommandDefault{\textsemicolon}{;}
     \ProvideTextCommand{\textsemicolon}{LGR}{\texterotimatiko}
     \initiate at active@char{;}
@@ -97,7 +97,7 @@
 }
 \def\bbl at greek@modifiers{,%
   polutoniko,polytonic,ancient,keep-semicolon,%
-  local-LGR-fixes,no-LGR-fixes,local-MakeUppercase-fixes,}
+  local-LGR-fixes,no-LGR-fixes,no-MakeUppercase-fixes,}
 \ifx\BabelModifiers\relax\else
   \bbl at foreach\BabelModifiers{%
     \@expandtwoargs\in@{,#1,}{\bbl at greek@modifiers}
@@ -114,22 +114,20 @@
 \else
   \providecommand*{\greekfontencoding}{LGR}
   \providecommand*{\bbl at greek@fontencdef}{lgrenc}
-  % TODO the more generic version fails :(
-  % \edef\bbl at greek@fontencdef{\lowercase{\greekfontencoding}enc}
 \fi
-\@ifl at aded{def}{\bbl at greek@fontencdef}{}
-{% else
-  \InputIfFileExists{\bbl at greek@fontencdef .def}{}
-  {% else
-    \bbl at error{Font support for the Greek script missing.\\
-               babel-greek can't typeset Greek.\\
-               Install the "greek-fontenc" package\\
-               or use XeTeX/LuaTeX with polyglossia.}
-              {I can't find the \bbl at greek@fontencdef .def file
-               for the Greek fonts (encoding \greekfontencoding)}
-    \@@end
+\@ifl at aded{def}{\bbl at greek@fontencdef}
+  {}
+  {\InputIfFileExists{\bbl at greek@fontencdef .def}
+     {}
+     {\bbl at error{Font support for the Greek script missing.\\
+                 babel-greek can't typeset Greek.\\
+                 Install the "greek-fontenc" package\\
+                 or use XeTeX/LuaTeX with polyglossia.}
+                {I can't find the \bbl at greek@fontencdef .def file
+                 for the Greek fonts (encoding \greekfontencoding)}
+      \@@end
+     }
   }
-}
 \AtBeginDocument{%
   \@ifl at aded{def}{puenc}%
     {\@ifl at aded{def}{puenc-greek}
@@ -138,8 +136,8 @@
         \makeatletter
         \InputIfFileExists{puenc-greek.def}%
           {}%
-          {\bbl at warning{I cannot find the "puenc" Greek fixes
-                        from "greek-fontenc".}%
+          {\bbl at warning{I cannot find the Greek fixes for PDF strings
+                        ("punec-greek.def" from "greek-fontenc").}%
           }%
         \RestoreAtCatcode
        }%
@@ -146,6 +144,10 @@
     }% end "puenc.def loaded" branch
     {}% empty "puenc.def not loaded" branch
 }
+\addto\extrasgreek{%
+  \let\BabelGreekPreviousFontEncoding\encodingdefault
+  \greekscript}
+\addto\noextrasgreek{\BabelGreekRestoreFontEncoding}
 \ProvideTextCommandDefault{\greekscript}{%
   \fontencoding{\greekfontencoding}\selectfont
   \def\encodingdefault{\greekfontencoding}}
@@ -152,16 +154,17 @@
 \ProvideTextCommandDefault{\ensuregreek}[1]{%
   \leavevmode {\greekscript #1}}
 \def\BabelGreekRestoreFontEncoding{%
-  \ifx\cf at encoding\BabelGreekPreviousFontEncoding
+  \ifx\encodingdefault\BabelGreekPreviousFontEncoding
   \else
     \let\encodingdefault\BabelGreekPreviousFontEncoding
     \fontencoding{\encodingdefault}\selectfont
   \fi
 }
-\addto\extrasgreek{%
-  \let\BabelGreekPreviousFontEncoding\cf at encoding
-  \greekscript}
-\addto\noextrasgreek{\BabelGreekRestoreFontEncoding}
+\AtBeginDocument{
+  \ifx\BabelGreekPreviousFontEncoding\bbl at greek@LGR
+    \let\BabelGreekPreviousFontEncoding\latinencoding
+  \fi
+}
 \@ifl at aded{def}{lgrenc}{%
   \DeclareRobustCommand{\greektext}{%
     \fontencoding{LGR}\selectfont
@@ -180,15 +183,18 @@
     \ensureascii{\bbl at greek@original at amp}}
   \ProvideTextCommandDefault{\EnsureStandardFontEncoding}{\@firstofone}
   \ProvideTextCommand{\EnsureStandardFontEncoding}{LGR}[1]{%
-                                                      \ensureascii{#1}}
-  \AtBeginDocument{\@ifpackageloaded{hyperref}
-                     {\pdfstringdefDisableCommands{%
-                         \let\EnsureStandardFontEncoding\@firstofone}}
-                     {}}
+    \ensureascii{#1}
+  }
+  \AtBeginDocument{%
+    \@ifpackageloaded{hyperref}
+      {\pdfstringdefDisableCommands{%
+         \let\EnsureStandardFontEncoding\@firstofone}
+      }
+      {}
+  }
 }{}
 
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \def\bbl at greek@roman#1{\expandafter\EnsureStandardFontEncoding%
                          \expandafter{\romannumeral#1}}
   \def\bbl at greek@Roman#1{\expandafter\EnsureStandardFontEncoding%
@@ -534,8 +540,7 @@
   \let\@alph\greek at alph
   \let\@Alph\greek at Alph
 }
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \addto\extrasgreek{%
     \babel at savevariable{\lccode`v}\lccode`v=`v%
     \babel at savevariable{\lccode`\'}\lccode`\'=`\'%
@@ -573,21 +578,16 @@
     \declare at shorthand{greek}{~}{\bbl at greek@tilde}
   }
 \fi % End of LGR-specific code.
-\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion} % new in 2020
-\bbl at xin@{,local-MakeUppercase-fixes,}{,\BabelModifiers,}%
+\bbl at xin@{,no-MakeUppercase-fixes,}{,\BabelModifiers,}%
 \ifin@
 \else
-  \IfFormatAtLeastTF{2022/06/01}
-    {\ProvideTextCommandDefault{\accACUTE}{\@tabacckludge'}
-     \ProvideTextCommandDefault{\accGRAVE}{\@tabacckludge`}
-     \ProvideTextCommandDefault{\accTILDE}{\@tabacckludge~}
-     \ProvideTextCommandDefault{\accDIAERESIS}{\@tabacckludge"}
-     \addto\@uclclist{\'\accACUTE \`\accGRAVE \~\accTILDE \"\accDIAERESIS}%
-    }
-    {}
+  \ProvideTextCommandDefault{\accACUTE}{\@tabacckludge'}
+  \ProvideTextCommandDefault{\accGRAVE}{\@tabacckludge`}
+  \ProvideTextCommandDefault{\accTILDE}{\@tabacckludge~}
+  \ProvideTextCommandDefault{\accDIAERESIS}{\@tabacckludge"}
+  \addto\@uclclist{\'\accACUTE \`\accGRAVE \~\accTILDE \"\accDIAERESIS}%
 \fi
-\def\bbl at tempa{LGR}
-\ifx\greekfontencoding\bbl at tempa
+\ifx\greekfontencoding\bbl at greek@LGR
   \ifdefined\DeclareUppercaseMapping % new in 2023
     % \DeclareUppercaseMapping[el]{"1FBE}{\prosgegrammeni}%
     \DeclareUppercaseMapping[el]{"0027}{}% '



More information about the tex-live-commits mailing list.