summaryrefslogtreecommitdiff
path: root/language/greek/greek-fontenc/greek-fontenc.def
blob: 0ebda570156258fa12c50c26f037a482fd362122 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
% greek-fontenc.def
% *****************
%
% Common Greek font encoding definitions
% ======================================
%
% :Version: 2.2.1 (changelog_)
%
% :Copyright: © 2013 -- 2023 Günter Milde
%
% :Licence:   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 any later version.
%
% :Abstract:  This file provides definitions that are shared between
%             font encodings providing Greek characters.
%
% .. contents::
%
% Usage
% -----
%
% This file is input by the font encoding definition files lgrenc.def_. and
% tuenc-greek.def_.
%
% Implementation
% --------------
%
% Identification
% ~~~~~~~~~~~~~~
% ::

\ProvidesFile{greek-fontenc.def}
  [2023/03/08 2.2.1 Common Greek font encoding definitions]

% ensuregreek, greekscript
% ~~~~~~~~~~~~~~~~~~~~~~~~
%
% Provide "empty" encoding-specific definitions for ``\ensuregreek`` and
% ``\greekscript``. The definitions in this file make the font encoding fit
% for use with the Greek script. (See ``textalpha.sty`` for default
% definitions.)
%
% The ``\ensuregreek`` macro can be used to ensure that its argument is set
% in a font encoding with support for Greek. If the active font encoding
% supports it, kerning between adjacent command calls (e.g.
% ``\ensuregreek{A}\ensuregreek{\Upsilon}``) is preserved. This allows, e.g.,
% wrapping of compound Unicode character definitions. ::

\ProvideTextCommand{\ensuregreek}{\LastDeclaredEncoding}{\@firstofone}

% The ``\greekscript`` declaration switches to a font encoding supporting
% the Greek script, if required. The following definition announces the
% ``\LastDeclaredEncoding`` as Greek-supporting::

\ProvideTextCommand{\greekscript}{\LastDeclaredEncoding}{}


% Aliases
% ~~~~~~~
%
% Aliases are defined via `DeclareTextCommand` so that up/downcasing works
% without the need for additional uclclist_ entries.
%
%
% Names matching mathematical variant symbols::

% \var... matching GREEK ... SYMBOL
\DeclareTextCommand{\textvarbeta}{\LastDeclaredEncoding}{\textbetasymbol}   % ϐ
\DeclareTextCommand{\textvarkappa}{\LastDeclaredEncoding}{\textkappasymbol} % ϰ
\DeclareTextCommand{\textvarTheta}{\LastDeclaredEncoding}{\textThetasymbol} % ϴ
\DeclareTextCommand{\textvartheta}{\LastDeclaredEncoding}{\textthetasymbol} % ϑ
\DeclareTextCommand{\textvarpi}{\LastDeclaredEncoding}{\textpisymbol}       % ϖ
\DeclareTextCommand{\textvarrho}{\LastDeclaredEncoding}{\textrhosymbol}     % ϱ
% \var... matching GREEK LETTER ...
\DeclareTextCommand{\textvarepsilon}{\LastDeclaredEncoding}{\textepsilon}   % ε
\DeclareTextCommand{\textvarphi}{\LastDeclaredEncoding}{\textphi}           % φ
\DeclareTextCommand{\textvarsigma}{\LastDeclaredEncoding}{\textfinalsigma}  % ς

% Compatibility aliases for hyperref_'s puenc.def::

\DeclareTextCommand{\textnumeralsigngreek}{\LastDeclaredEncoding}{\textdexiakeraia}
\DeclareTextCommand{\textnumeralsignlowergreek}{\LastDeclaredEncoding}{\textaristerikeraia}

\DeclareTextCommand{\textmugreek}{\LastDeclaredEncoding}{\textmu}
\DeclareTextCommand{\textStigmagreek}{\LastDeclaredEncoding}{\textStigma}
\DeclareTextCommand{\textstigmagreek}{\LastDeclaredEncoding}{\textstigma}
\DeclareTextCommand{\textDigammagreek}{\LastDeclaredEncoding}{\textDigamma}
\DeclareTextCommand{\textdigammagreek}{\LastDeclaredEncoding}{\textdigamma}
\DeclareTextCommand{\textKoppagreek}{\LastDeclaredEncoding}{\textKoppa}
\DeclareTextCommand{\textkoppagreek}{\LastDeclaredEncoding}{\textkoppa}
\DeclareTextCommand{\textSampigreek}{\LastDeclaredEncoding}{\textSampi}
\DeclareTextCommand{\textsampigreek}{\LastDeclaredEncoding}{\textsampi}


% Names from babel_ and teubner_ (do we want to define them here as alias?)
%
% .. code:: latex
%
%   \DeclareTextCommand{\anwtonos}{\LastDeclaredEncoding}{\textdexiakeraia}     % ʹ
%   \DeclareTextCommand{\katwtonos}{\LastDeclaredEncoding}{\textaristerikeraia} % ͵
%
% Two Unicode code points and names for one character::

\DeclareTextCommand{\accoxia}{\LastDeclaredEncoding}{\acctonos}
\DeclareTextCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\accdialyikatonos}
\DeclareTextCommand{\acckoronis}{\LastDeclaredEncoding}{\accpsili}

% Symbol macros for the breathings:
%
% Moved to ``textalpha.sty`` to avoid clashes with local definitions
% of ``\<`` and ``\>`` in documents using LGR or babel-greek.
% (Bugreport David Kastrup). If you want to use the short macros without
% loading `textalpha`, you can define them in the document preamble like
%
% .. code:: latex
%
%   \DeclareTextCommand{\<}{LGR}{\accdasia}
%   \DeclareTextCommand{\>}{LGR}{\accpsili}
%   \DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia}
%   \DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria}
%   \DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni}
%   \DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia}
%   \DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria}
%   \DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni}
%
% Or use alternative symbols for the breathings (cf. X compose
% table, LCI encoding)?
%
% .. code:: latex
%
%   \DeclareTextCommand{\(}{\LastDeclaredEncoding}{\accdasia}
%   \DeclareTextCommand{\)}{\LastDeclaredEncoding}{\accpsili}
%
% Composite diacritics
% ~~~~~~~~~~~~~~~~~~~~
%
% Composite accents can be input as sequence of simple diacritics (in
% arbitrary order) via named macro, symbol macro and "transliteration
% characters", e.g. one of
%
% .. code:: latex
%
%   \accdialyticavaria\textalpha,
%   \accdialytica\accvaria\textalpha,
%   \"\'\textalpha,
%   \"'\textalpha, or
%   \'"\textalpha.
%
% Separate definitions for the supported variants of the second input token
% are required as composition is based on the non-expanded input
%
% The composition with simple "transliteration characters" must also be defined
% for the symbol macros, otherwise it fails with ``\Makeuppercase``.
%
% For Unicode encodings (where they do not resolve to Greek named macros),
% composite definitions starting with standard macros are requried::

\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\acctonos}{\accdialytikatonos}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accoxia}{\accdialytikatonos}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\'}{\accdialytikatonos}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{'}{\accdialytikatonos}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\'}{\accdialytikatonos}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{'}{\accdialytikatonos}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accvaria}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\`}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{`}{\accdialytikavaria}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\`}{\accdialytikavaria}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{`}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accperispomeni}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni}

\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikatonos}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\"}{\accdialytikatonos}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{"}{\accdialytikatonos}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\"}{\accdialytikatonos}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{"}{\accdialytikatonos}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdasia}{\accdasiaoxia}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\<}{\accdasiaoxia}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{<}{\accdasiaoxia}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\<}{\accdasiaoxia}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{<}{\accdasiaoxia}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accpsili}{\accpsilioxia}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\>}{\accpsilioxia}
\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{>}{\accpsilioxia}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\>}{\accpsilioxia}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{>}{\accpsilioxia}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\'}{\textquoteright}
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{'}{\textquoteright}

\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\"}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{"}{\accdialytikavaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\"}{\accdialytikavaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{"}{\accdialytikavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdasia}{\accdasiavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\<}{\accdasiavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{<}{\accdasiavaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\<}{\accdasiavaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{<}{\accdasiavaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accpsili}{\accpsilivaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\>}{\accpsilivaria}
\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{>}{\accpsilivaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\>}{\accpsilivaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{>}{\accpsilivaria}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\`}{\textquoteleft}
\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{`}{\textquoteleft}

\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdasia}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accpsili}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni}

\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\acctonos}{\accpsilioxia}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accoxia}{\accpsilioxia}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\'}{\accpsilioxia}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{'}{\accpsilioxia}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accvaria}{\accpsilivaria}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\`}{\accpsilivaria}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{`}{\accpsilivaria}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accperispomeni}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\~}{\accpsiliperispomeni}
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{~}{\accpsiliperispomeni}

\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\acctonos}{\accdasiaoxia}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accoxia}{\accdasiaoxia}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\'}{\accdasiaoxia}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{'}{\accdasiaoxia}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accvaria}{\accdasiavaria}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\`}{\accdasiavaria}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{`}{\accdasiavaria}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accperispomeni}{\accdasiaperispomeni}
\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\~}{\accdasiaperispomeni}

% .. _uclclist:
%
% Case changing
% ~~~~~~~~~~~~~
%
% UPPERCASE (all-caps) is generated with ``\MakeUppercase``. The
% implementation of this command changed in June 2022 [ltnews35]_.
%
% According to Greek typographical tradition, diacritics (except dialytika)
% are placed before capital letters in Titlecase and dropped in UPPERCASE.
%
% Different conventions exist for the treatment of the `mute iota`_ with
% uppercase letters. The traditional typographic form and the most common
% used in Greece is a subscript, corresponding to the COMBINING GREEK
% YPOGEGRAMMENI (U+0345). Even if the pre-composed characters are named ...
% WITH [... AND] PROSGEGRAMMENI, capitalization should not use the GREEK
% PROSGEGRAMMENI (U+1FBE) [Nicholas-03]_, [Haralambous-98]_.  Upper case
% glyphs with adscript are a stylistic choice, provided by the font. In the
% CB Fonts, a small capital adscript iota is used.
%
% The "Latin" diacritics *macron* and *breve* are used to denote the
% length of vowels. They are sometimes used in dictionaries and textbooks
% but not part of the Greek orthography. There is no established rule
% regarding their handling in uppercase. LaTeX used to keep them but
% the `Unicode reference implementation`__ drops them.
%
% __ https://icu.unicode.org/design/case/greek-upper
%
% Up to 2022/06, macro substitutions in the ``\@uclclist`` could be used to
% get the expected behaviour:
%
%
% @uclclist extension
% """""""""""""""""""
%
% Based on Werner Lemberg's 2008 `babel patch`_ and ``fontenc.sty``.
%
% The definition of an auxiliary, self-resetting macro makes this idempotent
% (only the first use of this function will expand the ``@uclclist``).
% The second and third lines are TeX' way of writing ``uclclist += …``
%
% The ``\LGR@…`` auxiliary macros are defined below.
% ::

\providecommand*\update@uclc@with@greek{%
  \expandafter\def\expandafter\@uclclist\expandafter{%
    \@uclclist
    \accdasia\LGR@accdropped
    \accdasiaoxia\LGR@hiatus
    \accdasiavaria\LGR@accdropped
    \accdasiaperispomeni\LGR@accdropped
    \accpsili\LGR@hiatus
    \accpsilioxia\LGR@hiatus
    \accpsilivaria\LGR@hiatus
    \accpsiliperispomeni\LGR@accdropped
    \acctonos\LGR@hiatus
    \accoxia\LGR@hiatus
    \accvaria\LGR@accdropped
    \accdialytikatonos\LGR@accDialytika
    \accdialytikavaria\LGR@accDialytika
    \accdialytikaperispomeni\LGR@accDialytika
    \accperispomeni\LGR@accdropped
    \LGR@ypogegrammeni\prosgegrammeni
    \textalpha      \textAlpha
    \textbeta       \textBeta
    \textgamma      \textGamma
    \textdelta      \textDelta
    \textepsilon    \textEpsilon
    \textzeta       \textZeta
    \texteta        \textEta
    \texttheta      \textTheta
    \textiota       \textIota
    \textkappa      \textKappa
    \textlambda     \textLambda
    \textmu         \textMu
    \textnu         \textNu
    \textxi         \textXi
    \textomicron    \textOmicron
    \textpi         \textPi
    \textrho        \textRho
    \textfinalsigma \textSigma
    \textsigma      \textSigma
    \textautosigma  \textSigma
    \texttau        \textTau
    \textupsilon    \textUpsilon
    \textphi        \textPhi
    \textchi        \textChi
    \textpsi        \textPsi
    \textomega      \textOmega
    \textkoppa      \textKoppa
    \textqoppa      \textQoppa
    \textvarstigma  \LGR@Stigma
    \textstigma     \textStigma
    \textsampi      \textSampi
    \textdigamma    \textDigamma
  }%
  \let\update@uclc@with@greek\relax
}

% Expand the uclc list using the just defined macro::

\update@uclc@with@greek

% Substitution macros
% """""""""""""""""""
%
% Drop diacritics (The argument passing ensures that kerning is preserved) ::

\DeclareTextCommand{\LGR@accdropped}{\LastDeclaredEncoding}[1]{#1}

% Keep dialytika: Define a dummy alias so that downcasing with
% ``\MakeLowercase`` does not convert a simple dialytika to a composite
% accent::

\DeclareTextCommand{\LGR@accDialytika}{\LastDeclaredEncoding}{\accdialytika}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\LGR@hiatus}{\accdialytika}
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\LGR@accdropped}{\accdialytika}

% The prosgegrammeni (adscript iota) is used only with capital letters.
% We define a dummy macro to enable the conversion of ``\prosgegrammeni``
% to ``\ypogegrammeni`` (subscript iota) but not vice versa::

\DeclareTextCommand{\LGR@ypogegrammeni}{\LastDeclaredEncoding}{\ypogegrammeni}

% Prevent downcasing ``\textStigma`` to the stigma variant ``\textvarstigma``
% (only available in LGR). This happened sometimes with the post-2022/06
% ``\MakeLowercase``::

\DeclareTextCommand{\LGR@Stigma}{\LastDeclaredEncoding}{\textStigma}

% Mark hiatus
% """""""""""
%
% Tonos and dasia mark a hiatus if placed on the
% first vowel of a diphthong (ΑΙ, ΑΥ, ΕΙ). A dialytika must be placed on the
% second vowel if they are dropped (άυλος → ΑΫΛΟΣ, μάινα → ΜΑΪΝΑ, κέικ → ΚΕΪΚ,
% ἀυπνία → ΑΫΠΝΙΑ)::

\DeclareTextCommand{\LGR@hiatus}{\LastDeclaredEncoding}[1]{#1}
\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{>}{\LGR@hiatus}
\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{<}{\LGR@accdropped}
\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textAlpha}{\LGR@A@hiatus}
\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textEpsilon}{\LGR@E@hiatus}

% The font encoding file must define the ``\LGR@hiatus`` TextCommand. See
% ``lgrenc.def`` for an example.
%
% The following macro can be used to test if the next character is an Alpha or
% Epsilon. As ``\@ifnextchar`` gobbles spaces the lookahead macro definition
% from ``amsgen.sty`` is used:
%
% This macro is a variant of LaTeX’s ``\@ifnextchar``, macro
% that does not skip over spaces.
%
% ::

\providecommand*{\LGR@ifnextchar}[3]{%
  \let\reserved@d= #1%
  \def\reserved@a{#2}\def\reserved@b{#3}%
  \futurelet\@let@token\LGR@ifnch
}
\providecommand*{\LGR@ifnch}{%
  \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi
  \reserved@b
}

% Changelog
% ---------
%
% .. class:: borderless
%
% ====== ============  ========================================================
% 0.9    2013-07-03    code "outsourced" from lgrxenc.def
% 0.9.1  2013-07-17    composite definitions starting with standard accent cmds
% 0.11   2013-11-28    ``\greekscript`` TextCommand
% 0.12   2014-12-12    Remove symbol macros for breathing accents.
% 0.13   2015-08-04    No @uclclist entry for ypogegrammeni/prosgegrammeni.
% 0.13.4 2019-07-10    ``@uclclist`` entry for ``\prosgegrammeni``.
% 1.0    2020-09-25    ``\textKoppagreek`` and ``\textstigmagreek`` aliases.
% 2.0    2020/10/30    Alias definitions matching mathematical variant symbols.
% 2.2    2023-02-28    Add missing accent composite commands.
% 2.2.1  2023-03-08    ``@uclclist`` entry for ``\accoxia``, prevent
%                      downcasing ``\textStigma`` to ``\textvarstigma``.
% ====== ============  ========================================================
%
%
% References
% ----------
%
% .. [Haralambous-98] Yannis Haralambous
%    `From Unicode to Typography, a Case Study: the Greek Script`, 1998.
%    https://hal.science/hal-02101618
% .. [ltnews35] LaTeX Project Team `LaTeX News 35`, June 2022.
%    https://www.latex-project.org/news/latex2e-news/ltnews35.pdf
% .. [Nicholas-03] Nick Nicholas `Titlecase and Adscripts` 2003.
%    https://opoudjis.net/unicode/unicode_adscript.html
%
% .. _mute iota: https://en.wikipedia.org/wiki/Iota_subscript
%
% .. _alphabeta: alphabeta.sty.html
% .. _athnum: https://ctan.org/pkg/athnum
% .. _Babel: https://ctan.org/pkg/babel
% .. _babel patch: http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf
% .. _fntguide: https://mirrors.ctan.org/macros/latex/base/fntguide.pdf
% .. _fontenc:  https://ctan.org/pkg/fontenc
% .. _hyperref: https://ctan.org/pkg/hyperref
% .. _ibycus: https://ctan.org/pkg/ibycus-babel
% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
% .. _lgrenc.def: lgrenc.def.html
% .. _teubner: https://ctan.org/pkg/teubner
% .. _teubner-doc:
%     https://mirrors.ctan.org/macros/latex/contrib/teubner/teubner-doc.pdf
% .. _textalpha: textalpha.sty.html
% .. _tuenc-greek.def: tuenc-greek.def.html
% .. _ucs: https://ctan.org/pkg/unicode
%
%
%