From e9af7499b89170ca5c737240b0cdb9563dcf6c5a Mon Sep 17 00:00:00 2001
From: Norbert Preining
Update test for Unicode fonts. Fix accent in \seename and \alsoname.
1.9j
2020/03/17
Fix ampersand in math.
\ProvidesLanguage{greek}
%\fi
%\ProvidesFile{babel-greek.dtx}
- [2020/02/27 v1.9i Greek support for the babel system]
+ [2020/03/17 v1.9j Greek support for the babel system]
%\iffalse
%% File `babel-greek.dtx'
%% Greek language Definition File
@@ -127,6 +127,7 @@
% to textalpha.}
% \changes{babel-greek-1.9i}{2020/02/28}{Update test for Unicode fonts.
% Fix accent in seename and alsoname.}
+% \changes{babel-greek-1.9j}{2020/03/17}{Fix ampersand in math.}
%
% \title{Babel support for the Greek language}
% \author{Apostolos Syropoulos, Günter Milde}
@@ -527,6 +528,8 @@
% We redefine a few commands in the LGR encoding to work around problems
% because LGR is no \emph{standard text encoding} but has Greek letters in
% the places of Latin ones.
+% The ampersand must work in text and math mode. We provide the text
+% command |\textampersand| and re-define |\&| to use it in text mode.
% \changes{greekfdd-2.2c}{1999/04/05}{Fixed typos, \cs{textrademark}
% misses a `t', \cs{copyright} should be \cs{textcopyright}}
% \changes{greekfdd-2.2d}{1999/04/25}{removed redefinition of \cs{\&}}
@@ -536,14 +539,16 @@
% \changes{greek-1.5}{2013/05/27}{enable use of "textcomp" characters
% for "textcopyright" and "textregistered" macros}
% \changes{greek-1.5}{2013/06/15}{\textbackslash & made TextCommand}
+% \changes{babel-greek-1.9j}{2020/03/17}{Fix ampersand in math.}
%
% \begin{macrocode}
\ProvideTextCommand{\textcopyright}{LGR}{\ensureascii{\textcopyright}}
\ProvideTextCommand{\textregistered}{LGR}{\ensureascii{\textregistered}}
\ProvideTextCommand{\texttrademark}{LGR}{\ensureascii{\texttrademark}}
\let\ltx@amp\&
- \DeclareTextCommandDefault{\&}{\ltx@amp}
- \DeclareTextCommand{\&}{LGR}{\ensureascii{\ltx@amp}}
+ \ProvideTextCommandDefault{\textampersand}{\ltx@amp}
+ \ProvideTextCommand{\textampersand}{LGR}{\ensureascii{\ltx@amp}}
+ \DeclareRobustCommand{\&}{\ifmmode\ltx@amp\else\textampersand\fi}
\ProvideTextCommand{\SS}{LGR}{\ensureascii{\SS}}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
index cba57427b7..e0e0e741cd 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf and b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
index 0751ed7c9f..c4526611d8 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf and b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
index 5498dfc96b..4e5618cf87 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -101,7 +101,7 @@ argument using this 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 (e.g. the Unicode font
-encodings EU1, EU2)) or \verb|\greektext| (always switch to LGR) and the
+encoding TU)) or \verb|\greektext| (always switch to LGR) and the
corresponding macros \verb|\ensuregreek| or \verb|\textgreek|. These
commands do not start a new paragraph:
@@ -109,28 +109,30 @@ commands do not start a new paragraph:
\latintext Friends (\ensuregreek{F\'ilwn}) of TeX.
\texttt{greek.ldf} has some workarounds, so that macros relying on Latin
-characters in the ``right'' positions keep working. We test, that these
+characters in standard positions keep working. We test, that these
definitions do not overwrite the selection of pre-composed characters for
-``copyright'' and ``registered trade mark'' by ``textcomp'' (try copy and
+``copyright'' and ``registered trade mark'' by \emph{textcomp} (try copy and
paste from the PDF output):
-Greek (LGR): \ensuregreek{Α \& Ω, \textcopyright{} \textregistered{}
-\texttrademark{}, © ® ™ } \\
-Latin: A \& O.
+Latin: A \& O, © ® ™ \\
+Greek (LGR): \ensuregreek{Α \textampersand{} Ω,
+\textcopyright{} \textregistered{} \texttrademark{}, \& © ® ™ }.
+
+The ampersand should also work in mathematical mode: $ 1 \& 2 $
To prevent Roman numerals being typeset in Greek letters we need to adopt
the internal LaTeX commands. Note that this may cause errors when roman
numerals are used in a situation where the macros need to be expanded:
\makeatletter
-Greek: \ensuregreek{
+Latin:
\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
-}
-Latin:
+Greek: \ensuregreek{
\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
+}
\makeatother
\section{MakeUppercase, MakeLowercase}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf
index 4a0204a05c..7033176e1a 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf and b/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf b/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf
index cdbfbb0fee..532e132c78 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf and b/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/usage.pdf b/macros/latex/contrib/babel-contrib/greek/usage.pdf
index 769d3ddb3a..67c6fa3699 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/usage.pdf and b/macros/latex/contrib/babel-contrib/greek/usage.pdf differ
--
cgit v1.2.3