summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/babel-contrib/greek/test-greek.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/babel-contrib/greek/test-greek.tex')
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.tex134
1 files changed, 64 insertions, 70 deletions
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
index 1bae1bb88d..38958418d4 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -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 @@ The Latin transliteration works in LGR but not TU:
\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 @@ teleia}). As a result, Unicode-encoded texts that use the semicolon as
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 @@ text language is set to Greek
\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 @@ LGR fonts have a middle dot glyph at the place of the ampersand. The new
\makeatletter
\newcommand{\RomanNumeralTest}{\f@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 @@ Setting the language back to English should restore the alphabetic numbering:
\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 @@ More test of the LGR-redefinitions are in \file{test-lgr-fixes.tex}.
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 @@ limitations and problems.
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 @@ the ``empty'' character 0x9f = 159.
\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 @@ No 159 = 0x9f:
\fi
\'<\textalpha\textiota
}%
-\foreignlanguage{greek}{%
- \CombinedAccentSample{} $\mapsto$ \MakeUppercase{\CombinedAccentSample}%
-}.
+.
\newcommand{\AccentCharacters}{" | ' ` > <}
@@ -838,8 +833,7 @@ and language variant ``\GreekLanguageVariant'', we get for
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 @@ in Greek paragraphs if only the encoding is switched:
\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 @@ characters
\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{} αι /