diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-10 21:57:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-10 21:57:05 +0000 |
commit | 2a0bdc5ccb4cff6e0f2b515649ac6ad8f3029b56 (patch) | |
tree | 6471b0db81ecfd12d1da68e91b84dbddc3200ec0 /Master/texmf-dist/tex/generic/babel-greek | |
parent | e284f012774b006f02cc4bdcbb63cb9aa0f0c4aa (diff) |
babel-greek (10nov20)
git-svn-id: svn://tug.org/texlive/trunk@56904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-greek')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-greek/greek.ldf | 221 |
1 files changed, 154 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf index eac039c0b4b..6c920e715eb 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf +++ b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf @@ -32,7 +32,7 @@ %% and covered by LPPL is defined by the unpacking script (babel-greek.ins) %% which is part of the package. \ProvidesLanguage{greek} - [2020/03/17 v1.9j Greek support for the babel system] + [2020/11/10 v1.10 Greek support for the babel system] %% File `babel-greek.dtx' %% Greek language Definition File %% Copyright © 1997, 2005 Apostolos Syropoulos, Johannes Braams @@ -71,23 +71,23 @@ \let\captionsgreek\captionsancientgreek \let\gr@month\gr@c@month % (modern) polytonic month names } -\ifdefined \UTFencname % set by "fontspec.sty" - \providecommand*{\greekfontencoding}{\UTFencname} % TU, EU1, or EU2 - \providecommand*{\bbl@greek@fontencdef}{greek-euenc} - \renewcommand*{\LastDeclaredEncoding}{\UTFencname} +\ifdefined \UnicodeEncodingName % set by LaTeX for Unicode-aware engines + \providecommand*{\greekfontencoding}{\UnicodeEncodingName} + \providecommand*{\bbl@greek@fontencdef}{tuenc-greek} \else \providecommand*{\greekfontencoding}{LGR} \providecommand*{\bbl@greek@fontencdef}{lgrenc} \fi -\@ifl@aded{def}{\bbl@greek@fontencdef}{}{ - \InputIfFileExists{\bbl@greek@fontencdef .def}{}{ - \errhelp{I can't find the \bbl@greek@fontencdef .def file - for the Greek fonts}% - \errmessage{Font support for the Greek script missing.^^J - babel-greek can't typeset Greek.^^J - Install the "greek-fontenc" package^^J - or use XeTeX/LuaTeX with polyglossia.}% - \@@end +\@ifl@aded{def}{\bbl@greek@fontencdef}{} +{% else + \InputIfFileExists{\bbl@greek@fontencdef .def}{}{% else + \bbl@error{Font support for the Greek script missing.\\ + babel-greek can't typeset Greek.\\ + Install the "greek-fontenc" package\\ + or use XeTeX/LuaTeX with polyglossia.} + {I can't find the \bbl@greek@fontencdef .def file + for the Greek fonts (encoding \greekfontencoding)} + \@@end } } \ProvideTextCommandDefault{\greekscript}{% @@ -95,6 +95,15 @@ \def\encodingdefault{\greekfontencoding}} \ProvideTextCommandDefault{\ensuregreek}[1]{% \leavevmode{\greekscript #1}} +\AtBeginDocument{ + \@ifl@aded{def}{puenc}{ + \makeatletter % required inside \AtBeginDocument + \InputIfFileExists{puenc-greek.def}{}{% else + \bbl@warning{I can't find the file puenc-greek.def from "greek-fontenc".} + } + \makeatother + }{} +} \@ifl@aded{def}{lgrenc}{% \ProvideTextCommand{\textcopyright}{LGR}{\ensureascii{\textcopyright}} \ProvideTextCommand{\textregistered}{LGR}{\ensureascii{\textregistered}} @@ -275,39 +284,138 @@ \expandafter\Greeknumeral\expandafter{\the\year}} \addto\extrasgreek{\greekscript} \addto\noextrasgreek{\latintext} -\def\gr@ill@value#1{% - \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}} -\DeclareRobustCommand\anw@false{% - \DeclareRobustCommand\anw@print{}} -\DeclareRobustCommand\anw@true{% - \DeclareRobustCommand\anw@print{\textdexiakeraia}} % \anwtonos -\anw@true \def\greeknumeral#1{% - \ifnum#1<\@ne\space\gr@ill@value{#1}% + {\greekscript + \bbl@greek@GreekNum\@firstoftwo{#1}}% +} +\def\Greeknumeral#1{% + {\greekscript + \bbl@greek@GreekNum\@secondoftwo{#1}}% +} +\def\bbl@greek@ill@value#1{% + \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}% + \@arabic{#1}% +} +\def\bbl@greek@GreekNum#1#2{% + \ifnum#2<\@ne + \bbl@greek@ill@value{#2}% + \else + \ifnum#2<1000000 % + \bbl@greek@@GreekNum#1{#2}% + \else + \bbl@greek@ill@value{#2}% + \fi + \fi +} +\def\bbl@greek@@GreekNum#1#2{% + \ifnum#2<\@m + \ifnum#2<10 % + \expandafter\bbl@greek@GreekNumI + \expandafter\@gobble\expandafter#1\number#2% + \else + \ifnum#2<100 % + \expandafter\bbl@greek@GreekNumII + \expandafter\@gobble\expandafter#1\number#2% + \else + \expandafter\bbl@greek@GreekNumIII + \expandafter\@gobble\expandafter#1\number#2% + \fi + \fi + \ifnum#2>\z@ + \textnumeralsigngreek + \fi \else - \ifnum#1<10\expandafter\gr@num@i\number#1% + \ifnum#2<\@M + \expandafter\bbl@greek@GreekNumIV\expandafter#1\number#2% \else - \ifnum#1<100\expandafter\gr@num@ii\number#1% + \ifnum#2<100000 % + \expandafter\bbl@greek@GreekNumV\expandafter#1\number#2% \else - \ifnum#1<\@m\expandafter\gr@num@iii\number#1% - \else - \ifnum#1<\@M\expandafter\gr@num@iv\number#1% - \else - \ifnum#1<100000\expandafter\gr@num@v\number#1% - \else - \ifnum#1<1000000\expandafter\gr@num@vi\number#1% - \else - \space\gr@ill@value{#1}% - \fi - \fi - \fi - \fi + \expandafter\bbl@greek@GreekNumVI\expandafter#1\number#2% \fi \fi \fi } -\def\Greeknumeral#1{% - \expandafter\MakeUppercase\expandafter{\greeknumeral{#1}}} +\def\bbl@greek@GreekNumI#1#2#3{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textalpha\textAlpha + \or\textbeta\textBeta + \or\textgamma\textGamma + \or\textdelta\textDelta + \or\textepsilon\textEpsilon + \or\textstigmagreek\textStigmagreek + \or\textzeta\textZeta + \or\texteta\textEta + \or\texttheta\textTheta + \else + {}{}% + \fi +} +\def\bbl@greek@GreekNumII#1#2#3#4{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textiota\textIota + \or\textkappa\textKappa + \or\textlambda\textLambda + \or\textmugreek\textMu + \or\textnu\textNu + \or\textxi\textXi + \or\textomicron\textOmicron + \or\textpi\textPi + \or\textkoppa\textKoppa + \else + {}{}% + \fi + \bbl@greek@GreekNumI#1#2#4% +} +\def\bbl@greek@GreekNumIII#1#2#3#4#5{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textrho\textRho + \or\textsigma\textSigma + \or\texttau\textTau + \or\textupsilon\textUpsilon + \or\textphi\textPhi + \or\textchi\textChi + \or\textpsi\textPsi + \or\textomega\textOmega + \or\textsampigreek\textSampigreek + \else + {}{}% + \fi + \bbl@greek@GreekNumII#1#2#4#5% +} +\def\bbl@greek@GreekNumIV#1#2#3#4#5{% + \bbl@greek@GreekNumI\@firstofone#1#2% + \bbl@greek@@GreekNum#1{#3#4#5}% +} +\def\bbl@greek@GreekNumV#1#2#3#4#5#6{% + \bbl@greek@GreekNumII\@firstofone#1#2#3% + \bbl@greek@@GreekNum#1{#4#5#6}% +} +\def\bbl@greek@GreekNumVI#1#2#3#4#5#6#7{% + \bbl@greek@GreekNumIII\@firstofone#1#2#3#4% + \bbl@greek@@GreekNum#1{#5#6#7}% +} \let\latin@alph\@alph \let\latin@Alph\@Alph \def\greek@alph#1{\expandafter\greeknumeral\expandafter{\the#1}} @@ -318,33 +426,6 @@ \addto\noextrasgreek{% \let\@alph\latin@alph \let\@Alph\latin@Alph} -\def\gr@num@i#1{% - \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or \textdelta\or - \textepsilon\or \textstigma\or \textzeta\or \texteta\or \texttheta\fi - \ifnum#1=\z@\else\anw@true\fi\anw@print} -\def\gr@num@ii#1{% - \ifcase#1\or \textiota\or \textkappa\or \textlambda\or \textmu\or - \textnu\or \textxi\or \textomicron\or \textpi\or \textqoppa\fi - \ifnum#1=\z@\else\anw@true\fi\gr@num@i} -\def\gr@num@iii#1{% - \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or - \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi - \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii} -\def\gr@num@iv#1{% - \ifnum#1=\z@\else\textaristerikeraia\fi - \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or \textdelta\or - \textepsilon\or \stigma\or \textzeta\or \texteta\or \texttheta\fi - \gr@num@iii} -\def\gr@num@v#1{% - \ifnum#1=\z@\else\textaristerikeraia\fi - \ifcase#1\or \textiota\or \textkappa\or \textlambda\or \textmu\or - \textnu\or \textxi\or \textomicron\or \textpi\or \textqoppa\fi - \gr@num@iv} -\def\gr@num@vi#1{% - \textaristerikeraia - \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or - \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi - \gr@num@v} \@ifl@aded{def}{lgrenc}{% \begingroup \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} @@ -408,7 +489,8 @@ }{} % End of LGR-specific code. \providecommand*{\anwtonos}{\textdexiakeraia} \providecommand*{\katwtonos}{\textaristerikeraia} -\providecommand*{\qoppa}{\textqoppa} +\providecommand*{\qoppa}{\textkoppa} +\providecommand*{\varqoppa}{\textqoppa} \providecommand*{\stigma}{\textstigma} \providecommand*{\sampi}{\textsampi} \providecommand*{\Digamma}{\textDigamma} @@ -416,6 +498,11 @@ \providecommand*{\vardigamma}{\textvardigamma} \providecommand*{\euro}{\texteuro} \providecommand*{\permill}{\textperthousand} +\@ifl@aded{def}{lgrenc}{% + \ProvideTextCommand{\textKoppa}{LGR}{\textkoppa} + \ProvideTextCommand{\textmugreek}{LGR}{\textmu} +}{} +\ProvideTextCommand{\textmugreek}{\greekfontencoding}{\textmu} \ldf@finish{\CurrentOption} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |