summaryrefslogtreecommitdiff
path: root/language/greek/greek-fontenc/alphabeta-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'language/greek/greek-fontenc/alphabeta-doc.tex')
-rw-r--r--language/greek/greek-fontenc/alphabeta-doc.tex137
1 files changed, 74 insertions, 63 deletions
diff --git a/language/greek/greek-fontenc/alphabeta-doc.tex b/language/greek/greek-fontenc/alphabeta-doc.tex
index 618713a127..c149f517ba 100644
--- a/language/greek/greek-fontenc/alphabeta-doc.tex
+++ b/language/greek/greek-fontenc/alphabeta-doc.tex
@@ -66,6 +66,14 @@
% varbeta and varTheta only defined with unicode-math
\providecommand*{\varbeta}{\missing}
+% Semantic styling:
+
+\newcommand{\file}{\texttt}
+\newcommand{\cs}[1]{\texttt{\textbackslash#1}}
+\newcommand{\pkgref}[1]{\emph{\href{https://ctan.org/pkg/#1}{#1}}}
+
+% Auxiliary macros
+
% print current font encoding:
\makeatletter
\newcommand{\currentEncoding}{\f@encoding}
@@ -84,12 +92,11 @@ mathematical mode also available in text mode. This way, you can input Greek
letters ``by name'' everywhere in the document. The mode determines whether
the characters are taken from the text or math font.
-With 8-bit TeX and
-\emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}},
+With 8-bit TeX and \pkgref{greek-inputenc},
literal Unicode charactes can also be used in mathematical mode.
\footnote{
- This document was compiled using the \href{https://ctan.org/pkg/encguide}%
- {font encoding} \encodingdefault{}
+ This document was compiled using the
+ \href{https://ctan.org/pkg/encguide}{font encoding} \encodingdefault{}
\ifdefined \UTFencname % defined by fontspec
(Unicode fonts).
For a version using 8-bit fonts, see
@@ -97,28 +104,29 @@ literal Unicode charactes can also be used in mathematical mode.
\else
(8-bit fonts).
For a version using Unicode fonts, see
- \href{alphabeta-tu.pdf}{alphabeta-tu.pdf}.
+ \href{alphabeta-doc-tu.pdf}{alphabeta-doc-tu.pdf}.
\fi
}
\end{abstract}
% \tableofcontents
+
\section{Requirements and Conflicts}
The \emph{alphabeta} package depends on
-\emph{\href{textalpha-doc.pdf}{textalpha}} (both are part of
-\emph{\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc}}). It can
-be used under 8-bit TeX as well as XeTeX/LuaTeX (this document is typeset
-with \engine{} and \fontset). Depending on the converter and fonts, different
-\hyperref[sec:limitations]{limitations} apply.
+\emph{\href{textalpha-doc.pdf}{textalpha}}
+(both are part of \pkgref{greek-fontenc}).
+It can be used under 8-bit TeX as well as XeTeX/LuaTeX (this document is
+typeset with \engine{} and \fontset). Depending on the converter and fonts,
+different \hyperref[sec:limitations]{limitations} apply.
-The package conflicts with
-\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}}.
+The package conflicts with \pkgref{unicode-math}.
+
+It also fails, if the \texttt{utf8x} input encoding is selected.
+(The interface to the \pkgref{ucs} package uses a non-compatible
+definition of \cs{DeclareUnicodeCharacter}.)
-It also fails, if the \texttt{utf8x} input encoding is selected (interface
-to the \href{http://www.ctan.org/pkg/ucs}{\emph{ucs}} package using a
-non-compatible definition of \verb+\DeclareUnicodeCharacter+).
\section{Usage}
@@ -132,17 +140,14 @@ Now you can write a single Greek symbol (like \Psi{} or \mu{}) or
a \lambda\omicron\gamma\omicron\varsigma{} in non-Greek text as well as
ISO-conforming formulas with upright symbols for constants
like $A = \text{\pi} r^2$ (instead of $A = \pi r^2$).%
-\footnote{The
- \href{http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html}%
- {\emph{isomath} documentation} describes more alternatives for upright
- Greek symbols in math mode.}
+\footnote{The \pkgref{isomath} documentation describes more alternatives
+ for upright Greek symbols in math mode.}
Just like Latin letters, the Greek counterparts are by default italic in
math mode%
\footnote{Capital Greek letters are upright in TeX unless a package selects
-the ``ISO'' math-style. See the
-\href{http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html}%
-{\emph{isomath} documentation} for a detailled discussion of math-styles.}
+ the ``ISO'' math-style. See the \pkgref{isomath} documentation
+ for a detailled discussion of math-styles.}
and upright in text:
\begin{quote}
@@ -163,16 +168,10 @@ package. Example call with options:
\usepackage[normalize-symbols,keep-semicolon]{alphabeta}
\end{verbatim}
-\texttt{normalize-symbols} merges ``letter'' and ``symbol`` variants of
-some Greek letters to the ``letter'' character:
-\footnote{The normalize-symbols option was added in version 0.13 (2015-08-03).
- Unicode input of the symbol variants requires at least version~1.6
- (2015-08-05) of
- \emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}}.}
-Without this option, the symbol variant characters cannot be used in text,
-because they are not supported by 8-bit Greek fonts (LGR encoding).
-The \texttt{normalize-symbols} option is ignored, if you compile the
-document with XeTeX or LuaTeX using Unicode fonts.
+\texttt{normalize-symbols} merges ``letter'' and ``symbol`` variants of some
+Greek letters (cf. next section) to the ``letter'' character: Without this
+option, the symbol variant characters cannot be used in text, because they
+are not supported by 8-bit Greek fonts (LGR encoding).
\textbf{Attention}: Be careful in cases where the distinction between the
symbol variants may be important (e.g. in a mathematical or scientific
context). Use XeTeX/LuaTeX with Unicode fonts or the respective characters
@@ -182,6 +181,9 @@ The option \texttt{keep-semicolon} prevents conversion of the
semicolon to an \emph{ano teleia} in 8-bit TeX
(see \emph{\href{textalpha-doc.pdf}{textalpha-doc}}).
+Both options are ignored in text set using Unicode fonts.
+
+
\subsection{symbol variants}
Mathematical notation uses variant shapes of some Greek letters as
@@ -195,7 +197,7 @@ some of the variant shape symbols in mathematical mode, but its concept of
“GREEK LETTER ...” vs. “GREEK ... SYMBOL” in the Unicode standard.
The \emph{alphabeta} package defines generic macros for these variants that
-are short forms of the set defined in \texttt{tuenc-greek.def}
+are short forms of the set defined in \file{tuenc-greek.def}
(cf. \href{test-tuenc-greek.pdf}{test-tuenc-greek}):
\begin{quote}
\verb|\<name>| selects the Unicode GREEK LETTER ... variant,
@@ -208,21 +210,21 @@ are short forms of the set defined in \texttt{tuenc-greek.def}
\end{quote}
See Table \ref{tab:symbol-variant-macros} for the full list.
+
\section{Limitations \label{sec:limitations}}
With 8-bit TeX, the limitations described in the
\href{textalpha-doc.pdf}{textalpha documentation} apply. See also the tests
in section \hyperref[sec:8-bit-limitations]{8 bit limitations}.
-These limitations are lifted, if the text language is switched to ``greek''
-with Babel, the text part is wrapped in \verb+\ensuregreek+, or the
-document is compiled with XeTeX/LuaTeX.
+These limitations do not apply, if the text language is switched to ``greek''
+with Babel, the text part is wrapped in \verb+\ensuregreek+, or set using
+Unicode fonts (with XeTeX/LuaTeX).
With XeTeX/LuaTeX and Unicode fonts, literal Unicode characters cannot be
used in formulas (the log file reports missing characters) This is a generic
TeX limitation which \emph{alphabeta} overcomes if used under 8-bit TeX.
-Under XeTeX/LuaTeX it may be lifted using the
-\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}} package.
-However, \emph{unicode-math} conflicts with \emph{alphabeta}.
+Under XeTeX/LuaTeX it may be circumvented using the \pkgref{unicode-math}
+package. Mind, that \emph{unicode-math} conflicts with \emph{alphabeta}.
\section{Tests and examples}
@@ -243,13 +245,10 @@ switch (active font encoding \encodingdefault):
\\
\digamma{} \Digamma{} \stigma{} \varstigma{}%
\footnote{There is no separate Unicode code point for a stigma variant
- symbol, \texttt{\textbackslash varstigma} is not defined with
- Xe/LuaTeX and similar to \texttt{\textbackslash stigma} in some fonts.}
+ symbol, \cs{varstigma} is not defined with
+ Xe/LuaTeX and similar to \cs{stigma} in some fonts.}
\koppa{} \Koppa{}%
- \footnote{In LGR, there is no separate code point for Koppa as
- typographical practice normally does not observe a
- contrast between uppercase and lowercase forms for numeric koppa.}
- % https://en.wikipedia.org/wiki/Koppa_(letter)
+ \footnote{In LGR, there is no separate glyph for uppercase Koppa.}
\qoppa{} \Qoppa{} \Stigma{} \Sampi{} \sampi{}
\end{quote}
%
@@ -261,6 +260,7 @@ Greek letters via Unicode (active font encoding \encodingdefault):
ϝ Ϝ ϛ ϟ Ϟ ϙ Ϙ Ϛ Ϡ ϡ
\end{quote}
+
\subsection{Diacritics}
Accent macros are set up for use with the generic macros by definition of
@@ -319,9 +319,10 @@ In the main document, Greek in math mode should work as usual:
\[\Gamma = \frac{\sin\alpha}{\cos{\beta}}.
\]
-Greek letters and symbols in math input as macro:%
-\footnote{There are no math macros for Greek letters wich exist with similar
-shape in the Latin alphabet}
+Greek letters and symbols in math mode,\footnote{%
+ There are no math macros for Greek letters wich exist with similar
+ shape in the Latin alphabet}
+input as macro:
\begin{align*}
&
% \Alpha{} \Beta{}
@@ -356,35 +357,42 @@ written to the log). This works resonably well for simple formulas (but not,
e.g., for super-/subscripts). With the \emph{alphabeta} package, it works
also for Greek letters.
-\subsection{Greek Unicode characters in math (only under 8-bit TeX)}
-With the \texttt{utf8} option of \emph{inputenc} and
-\href{http://www.ctan.org/pkg/greek-inputenc}{\emph{greek-inputenc}},
-literal Greek Unicode characters are supported also in
-mathematical mode.
+\subsection{Greek Unicode characters in math}
+With 8-bit TeX and \pkgref{greek-inputenc}, literal Greek Unicode characters
+are supported also in mathematical mode.
+%
\ifdefined\DeclareUnicodeCharacter
\[
Γ = \frac{\sin α}{\cos β}.
\]
- Greek letters and symbols in math input as Unicode literals:
+ Greek letters and symbols in math mode, input as Unicode literals:
\begin{align*}
& Γ ΔΘΛΞΠΣΥ ΦΨ Ω \\
& αβγδεζηθικλμνξπρσςτυφχψω \\
& ϑϕϖϝϱϵ
\end{align*}
\fi
-
This does not work with XeTeX/LuaTeX (unless in 8-bit emulation mode).
+Here, \pkgref{unicode-math} can be used instead of \emph{alphabeta}.
+
+The ``normal'' vs. ``variant'' shape of letters is used
+so that the output matches the Unicode reference glyph
+(cf. Table \ref{tab:symbol-variant-macros}).
+This corresponds to the behaviour of \pkgref{unicode-math}.
-The ``normal'' vs. ``variant'' shape of letters is used so that the output
-matches the Unicode reference glyph (cf. Table
-\ref{tab:symbol-variant-macros}). This corresponds to the behaviour of
-\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}}.
\subsection{8-bit limitations \label{sec:8-bit-limitations}}
-Certain limitations apply if Greek symbols are used in non-Greek context.
+Certain limitations apply if Greek LICRs are used in non-Greek context with
+8-bit TeX fonts (this document is typeset using
+\ifdefined \UnicodeEncodingName
+ Unicode fonts%
+\else
+ 8-bit fonts%
+\fi
+).
\begin{itemize}
@@ -400,7 +408,10 @@ Certain limitations apply if Greek symbols are used in non-Greek context.
\ensuregreek{\<'\alpha{} \accdasia\acctonos\alpha{} \accdasiaoxia\alpha{}
(\currentEncoding)} vs. \accdasiaoxia\alpha{} (\currentEncoding)
-\item MakeUppercase fails with composite diacritics in other font encodings.
+\item MakeUppercase fails with composite diacritics in other font encodings.%
+ \footnote{Since the re-implementation 2022/06, MakeUppercase follows
+ the Greek typesetting rules only for text parts given the
+ \pkgref{babel} language \texttt{greek}.}
% \MakeUppercase{%
% \<\alpha{} \>\epsilon{} \'\iota{} \`\eta{} \~\upsilon{}
% }
@@ -415,8 +426,8 @@ font encoding supporting Greek. This keeps kerning (if the kerning pair is
inside the argument, \ensuregreek{\Alpha\"\Upsilon\Alpha}), and allows
combining of accent macros where pre-composed characters are selected
(\ensuregreek{\<'\alpha}).
-Setting the corrct language for Greek quotes with the \emph{Babel} package
-additionally ensures correct hyphenation .
+Setting the corrct language for Greek text parts with the \pkgref{babel}
+package additionally ensures correct hyphenation and upcasing.
\begin{table}[bp]