summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex')
-rw-r--r--Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex65
1 files changed, 44 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex
index 52249b089e7..e0e233f03d5 100644
--- a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex
+++ b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.tex
@@ -4,33 +4,33 @@
\usepackage{parskip}
\usepackage{fontspec}
-% \usepackage{libertineotf}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
% \setmainfont{DejaVu Serif}
% \setmainfont{Droid Serif} % only monotonic Greek (subset of Greek and Coptic)
-% Declare the font encoding and Greek LICR definitions:
-\usepackage{textalpha}[2013/09/11]
-
\usepackage[greek,english]{babel}
% \languageattribute{greek}{polutoniko}
-\DeclareTextCommandDefault{\ensuregreek}{\textgreek}
+\message{greek-euenc ist}
+\makeatletter
+\@ifl@aded{def}{greek-fontenc}{\message{geladen}}{\message{nicht geladen}}
+\makeatother
+
\begin{document}
\section*{Greek support for Babel with XeTeX/LuaTeX}
-The babel option ``greek'' activates the support for the Greek language
-defined in the file ``greek.ldf'' (source ``greek.dtx'').
+The babel option «greek» activates the support for the Greek language
+defined in the file «greek.ldf» (source «greek.dtx»).
Typesetting Greek texts requires a font containing Greek letters. With the
-XeTeX or LuaTeX engines, the user should ensure that the choosen font
+XeTeX or LuaTeX engines, the user must ensure that the selected font
contains the required glyphs (the default Latin Modern fonts miss them).
-Examples for suitable fonts are the ``Deja Vu'', ``Linux Libertine'', or
-``Free Serif'' OpenType fonts.
+Examples for suitable fonts are the «Deja Vu», «Linux Libertine», or
+«Free Serif» OpenType fonts.
\section{Language Switch}
@@ -43,15 +43,39 @@ The declaration \verb|\selectlanguage| switches between languages.
ἐρῶν άπῆλθες εὐθύς;
\end{quote}
-The macro \verb|\foreignlanguage| sets its second argument in the specified
-language. This is intended for short text parts like
+The command \verb|\foreignlanguage| sets its second argument in the language
+specified as first argument. This is intended for short text parts like
\foreignlanguage{greek}{Βιβλιοθήκη}.
\section{Font Encoding}
-In Greek text parts, the font encoding is automatically set to LGR if an
-8-bit TeX engine is used. With XeTeX or LuaTeX, the macros
-\verb|\greektext| and \verb|\textgreek| don't change the font encoding.
+Switching to a font encoding supporting the Greek script is possible without
+switching the Babel language using the declarations \verb|\greekscript| (no
+switch if the current encoding supports Greek script) or \verb|\greektext|
+(always switch to LGR). The corresponding macros \verb|\ensuregreek| and
+\verb|\textgreek| typeset their argument in a Greek-supporting font encoding.
+
+With XeTeX or LuaTeX, declaring the LGR font encoding is optional.
+The macros \verb|\greektext| and \verb|\textgreek| are
+only defined, if the LGR font encoding is declared via the \texttt{fontenc}
+package \emph{before} loading babel (see test-unicode-lgr.tex).
+
+Every language switch to \texttt{greek} calls the \verb|\extrasgreek|
+command which in turn calls \verb|\greekscript| to ensure a Greek-supporting
+font encoding (LGR, EU1, or EU2). (For customization, you can add to or
+redefine the \verb|\extrasgreek| command.)
+
+The LGR font encoding does not support Latin characters. Therefore, the
+Babel core defines the declaration \verb|\latintext| and the command
+\verb|\textlatin| to switch to the T1 or OT1 font encoding or typeset the
+argument using this encoding. \texttt{greek-fontenc} adds a test for EU1 and
+EU2. At this point, the «latinencoding» is \latinencoding.
+
+Every language switch from \texttt{greek} calls the \verb|\noextrasgreek|
+command which in turn calls \verb|\latintext|. (For customization, you can
+add to or redefine the \verb|\noextrasgreek| command.)
+
+% don't change the font encoding.
Latin characters can be used in Greek text parts,
input via the Latin transcription defined in LGR is not possible.%
\footnote{%
@@ -60,8 +84,8 @@ input via the Latin transcription defined in LGR is not possible.%
}
\begin{quote}
- \greektext Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
- \latintext Friends (\textgreek{F\'ilwn}) of TeX.%
+ \greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
+ \latintext Friends (\ensuregreek{F\'ilwn}) of TeX.%
\footnote{Compare the printout to the similar example in test-greek.pdf.}
\end{quote}
@@ -193,10 +217,9 @@ Babel defines macros for several autogenerated strings so that they may
appear in the choosen language. \emph{babel-greek} uses LICR macros in
order to let the string macros work independent of the font encoding.
-Until automatically done by \emph{euenc} for EU1 and EU2 font encodings, the
-recommended way to load Greek LICR definitions is via the \emph{textalpha}
-or \emph{alphabeta} packages provided with \emph{greek-fontenc} since
-version~0.10.
+If \texttt{fontspec} is loaded before babel, babel-greek loads Greek LICR
+for EU1 or EU2 from the file \texttt{greek-euenc.def}
+provided with \emph{greek-fontenc} since version~0.10.
\subsection{Hiatus}