From dc3645665fd98e15f4a251d1e78c283e37658119 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 4 Dec 2013 00:01:17 +0000 Subject: babel-greek (3dec13) git-svn-id: svn://tug.org/texlive/trunk@32309 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/babel-greek/README | 31 +- .../texmf-dist/doc/generic/babel-greek/README.html | 44 +- .../doc/generic/babel-greek/babel-greek.pdf | Bin 0 -> 252709 bytes .../texmf-dist/doc/generic/babel-greek/greek.pdf | Bin 213463 -> 0 bytes .../doc/generic/babel-greek/test-greek.pdf | Bin 189424 -> 183472 bytes .../doc/generic/babel-greek/test-greek.tex | 32 +- .../doc/generic/babel-greek/test-unicode-greek.pdf | Bin 59438 -> 59837 bytes .../doc/generic/babel-greek/test-unicode-greek.tex | 65 +- .../doc/generic/babel-greek/test-unicode-lgr.pdf | Bin 0 -> 39295 bytes .../doc/generic/babel-greek/test-unicode-lgr.tex | 273 +++++ .../texmf-dist/doc/generic/babel-greek/usage.pdf | Bin 174589 -> 176289 bytes .../texmf-dist/doc/generic/babel-greek/usage.tex | 9 + .../source/generic/babel-greek/babel-greek.dtx | 1172 ++++++++++++++++++++ .../source/generic/babel-greek/babel-greek.ins | 106 ++ .../source/generic/babel-greek/greek.dtx | 1074 ------------------ .../source/generic/babel-greek/greek.ins | 106 -- .../texmf-dist/tex/generic/babel-greek/athnum.sty | 2 +- .../texmf-dist/tex/generic/babel-greek/greek.ldf | 121 +- .../texmf-dist/tex/generic/babel-greek/grmath.sty | 2 +- .../texmf-dist/tex/generic/babel-greek/grsymb.sty | 2 +- 20 files changed, 1739 insertions(+), 1300 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf delete mode 100644 Master/texmf-dist/doc/generic/babel-greek/greek.pdf create mode 100644 Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.pdf create mode 100644 Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.tex create mode 100644 Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx create mode 100644 Master/texmf-dist/source/generic/babel-greek/babel-greek.ins delete mode 100644 Master/texmf-dist/source/generic/babel-greek/greek.dtx delete mode 100644 Master/texmf-dist/source/generic/babel-greek/greek.ins (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/generic/babel-greek/README b/Master/texmf-dist/doc/generic/babel-greek/README index c7338a350e0..36ba8455ce6 100644 --- a/Master/texmf-dist/doc/generic/babel-greek/README +++ b/Master/texmf-dist/doc/generic/babel-greek/README @@ -40,6 +40,11 @@ News .. Do not auto-load euenc.def with XeTeX/LuaTeX. 1.7a 2013-09-13 Fix bug `babel/4360`_: spurious ``\fi``. 1.7b 2013-10-01 bugfix: correct upcasing of babel strings with Xe/LuaTeX. +1.8 2013-12-02 Rename ``greek.dtx`` to ``babel-greek`` so that texdoc_ + shows the right documentation. +.. Compatibility with Xe/LuaTeX in Unicode and 8-bit mode. +1.8a 2013-12-03 Set ``\encodingdefault`` in ``\greekscript`` to fix + Greek in footnotes etc. with document language Greek. ===== ========== =========================================================== @@ -54,9 +59,6 @@ The "babel-greek" package requires the babel_ base package and parts of the greek-fontenc_ package. The greek-inputenc_ package is recommended when using 8-bit TeX engines. -The language definition file makes use of the `e-TeX`_ extensions (present -in all current TeX distributions). - Use with XeTeX/LuaTeX requires also ``xgreek-fixes.def`` from polyglossia_ for correct up/downcasing. @@ -83,7 +85,6 @@ Otherwise, make sure LaTeX can find the required files: * To produce the documentation run the files ``usage.tex`` and all files ending in ``.dtx`` through LaTeX. - Usage ----- @@ -91,21 +92,24 @@ Pass the "greek" option to babel:: \usepackage[greek]{babel} -For polytonic greek, set the language attribute "polutoniko":: +For polytonic Greek, set the language attribute "polutoniko":: \languageattribute{greek}{polutoniko} -When compiling with XeTeX or LuaTeX, it is recommended to load Greek LICR -macro definitions via ``textalpha.sty`` or ``alphabeta.sty`` that are part -of the greek-fontenc_ bundle since version 0.10 (2013-09-13):: +With XeTeX/LuaTeX, load fontspec_ before babel_, so that babel-greek can +set up the Unicode font encoding for use with Greek, e.g. :: - \usepackage{textalpha} - \usepackage[greek]{babel} + \usepackage{fontspec} + \setmainfont{Linux Libertine O} + \setsansfont{Linux Biolinum O} + \usepackage[greek,english]{babel} -For details see ``_, ``_ and the babel_ documentation. -Literal input of Greek characters is possible with the greek-inputenc_ -package or with XeTeX or LuaTeX. +For details see ``_ and the babel_ documentation. +Literal input of Greek characters is possible with the greek-inputenc_ +package or with XeTeX or LuaTeX. For the Latin transliteration provided by +the LGR font encoding see ``_ and the example files provided with +greek-fontenc_. Greek text fonts ---------------- @@ -157,3 +161,4 @@ Unicode (with XeTeX or LuaTeX). .. _Linux Libertine: http://www.ctan.org/pkg/libertine .. _polyglossia: http://www.ctan.org/pkg/polyglossia .. _substitutefont: http://www.ctan.org/pkg/substitutefont +.. _texdoc: http://www.ctan.org/pkg/texdoc diff --git a/Master/texmf-dist/doc/generic/babel-greek/README.html b/Master/texmf-dist/doc/generic/babel-greek/README.html index 42085387bd3..adf7d7009c3 100644 --- a/Master/texmf-dist/doc/generic/babel-greek/README.html +++ b/Master/texmf-dist/doc/generic/babel-greek/README.html @@ -97,6 +97,21 @@ Greek language and script via the greek.dtx to babel-greek so that texdoc +shows the right documentation.

+ + + +  +

Compatibility with Xe/LuaTeX in Unicode and 8-bit mode.

+ +

1.8a

+

2013-12-03

+

Set \encodingdefault in \greekscript to fix +Greek in footnotes etc. with document language Greek.

+ @@ -105,8 +120,6 @@ Greek language and script via the babel base package and parts of the greek-fontenc package. The greek-inputenc package is recommended when using 8-bit TeX engines.

-

The language definition file makes use of the e-TeX extensions (present -in all current TeX distributions).

Use with XeTeX/LuaTeX requires also xgreek-fixes.def from polyglossia for correct up/downcasing.

Typesetting Greek texts requires Greek text fonts.

@@ -131,24 +144,27 @@ ending in .dtx through LaTeX.

Pass the “greek” option to babel:

\usepackage[greek]{babel}
 
-

For polytonic greek, set the language attribute “polutoniko”:

+

For polytonic Greek, set the language attribute “polutoniko”:

\languageattribute{greek}{polutoniko}
 
-

When compiling with XeTeX or LuaTeX, it is recommended to load Greek LICR -macro definitions via textalpha.sty or alphabeta.sty that are part -of the greek-fontenc bundle since version 0.10 (2013-09-13):

-
\usepackage{textalpha}
-\usepackage[greek]{babel}
+

With XeTeX/LuaTeX, load fontspec before babel, so that babel-greek can +set up the Unicode font encoding for use with Greek, e.g.

+
\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+\setsansfont{Linux Biolinum O}
+\usepackage[greek,english]{babel}
 
-

For details see usage.pdf, greek.pdf and the babel documentation. -Literal input of Greek characters is possible with the greek-inputenc -package or with XeTeX or LuaTeX.

+

For details see babel-greek.pdf and the babel documentation.

+

Literal input of Greek characters is possible with the greek-inputenc +package or with XeTeX or LuaTeX. For the Latin transliteration provided by +the LGR font encoding see usage.pdf and the example files provided with +greek-fontenc.

Greek text fonts

A list of Greek text fonts for use with LaTeX is available at the CTAN http://www.ctan.org/topic/font-greek

-

With the XeTeX or LuaTeX engines, the user should ensure that the choosen +

With the XeTeX or LuaTeX engines, the user should ensure that the chosen font contains the required glyphs (the default Latin Modern fonts miss them). Examples for suitable fonts are the CM-unicode or the Linux Libertine OpenType fonts as well as any system-wide installed OTF fonts @@ -165,9 +181,9 @@ font (see usage.pdf).

A major drawback of this transliteration is, that you cannot access Latin letters if LGR is the active font encoding (e.g. in documents or parts of documents given the Babel language greek or polutionikogreek). -This means that for every Latin-written word or acronym an explicite +This means that for every Latin-written word or acronym an explicit language-switch is required. This problem can only be solved via a -font-encoding comprising both Latin and Greek like the hypothetic T7 or +font-encoding comprising both Latin and Greek like the hypothetical T7 or Unicode (with XeTeX or LuaTeX).

diff --git a/Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf b/Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf new file mode 100644 index 00000000000..dcbbe84e439 Binary files /dev/null and b/Master/texmf-dist/doc/generic/babel-greek/babel-greek.pdf differ diff --git a/Master/texmf-dist/doc/generic/babel-greek/greek.pdf b/Master/texmf-dist/doc/generic/babel-greek/greek.pdf deleted file mode 100644 index a52873f3585..00000000000 Binary files a/Master/texmf-dist/doc/generic/babel-greek/greek.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf b/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf index cab6de96b9b..e4c9306d8df 100644 Binary files a/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf and b/Master/texmf-dist/doc/generic/babel-greek/test-greek.pdf differ diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex b/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex index 7d0d3c2b22c..75db933b4f0 100644 --- a/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex +++ b/Master/texmf-dist/doc/generic/babel-greek/test-greek.tex @@ -1,7 +1,16 @@ \documentclass[a4paper]{article} -\usepackage{cmap} % fix search and cut-and-paste in Acrobat Reader \usepackage[LGR,T1]{fontenc} -\usepackage[utf8]{inputenc} + +% Xe/LuaTeX in 8-bit compatibility mode: +% TODO: hyphenation in Greek text parts fails! +\ifdefined \XeTeXrevision + \XeTeXinputencoding "bytes" +\fi +\ifdefined\luatexversion + \usepackage[utf8]{luainputenc} +\else + \usepackage[utf8]{inputenc} +\fi % \usepackage{textalpha} \usepackage{textcomp} \usepackage{hyperref,bookmark} @@ -14,13 +23,12 @@ \usepackage[greek,english]{babel} % \languageattribute{greek}{polutoniko} +\message{Latin encoding is \latinencoding} \DeclareTextCommandDefault{\ensuregreek}{\textgreek} \begin{document} -% \message{Latin encoding is \latinencoding} - \section*{Test the Greek support for Babel} The babel option ``greek'' activates the support for the Greek language @@ -52,13 +60,17 @@ font encoding}. This means you need an explicit font encoding change for every Latin letter and some other symbols if the current font encoding is LGR. -Switching between Latin and Greek script/font encoding is possible without -switching the Babel language using the declarations \verb|\latintext|, -\verb|\greektext| and the macros \verb|\textlatin|, \verb|\textgreek|. These -commands do not start a new paragraph: +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. + +Switching to a font encoding supporting the Greek script is possible without +switching the Babel language using the declarations \verb|\greekscript| or +\verb|\greektext| (always LGR) and the macros \verb|\ensuregreek| or +\verb|\textgreek|. These commands do not start a new paragraph: -\greektext Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) -- -\latintext Friends (\textgreek{F\'ilwn}) of TeX. +\greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) -- +\latintext Friends (\ensuregreek{F\'ilwn}) of TeX. ``greek.ldf'' has some workarounds, so that macros relying on Latin characters in the ``right'' positions keep working. We test, that these diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.pdf b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.pdf index 835ec064594..318f4776189 100644 Binary files a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.pdf and b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-greek.pdf differ 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} diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.pdf b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.pdf new file mode 100644 index 00000000000..6dc3bd1b53a Binary files /dev/null and b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.pdf differ diff --git a/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.tex b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.tex new file mode 100644 index 00000000000..5e5711f2313 --- /dev/null +++ b/Master/texmf-dist/doc/generic/babel-greek/test-unicode-lgr.tex @@ -0,0 +1,273 @@ +\documentclass[a4paper]{article} +% \usepackage{textcomp} +\usepackage{hyperref,bookmark} +\usepackage{parskip} + +% Declare the font encoding and Greek LICR definitions: +\usepackage[LGR]{fontenc} +\usepackage{textalpha}[2013/09/11] + +% Set up Latin Modern OpenType unicode font +\usepackage{fontspec} + +\usepackage[greek,english]{babel} +% \languageattribute{greek}{polutoniko} + +% use LGR (8-bit CB-fonts) instead of Unicode fonts for Greek: +% \renewcommand*{\greekscript}{\fontencoding{LGR}\selectfont} +\addto{\extrasgreek}{\greektext} + + +\begin{document} + + +\section*{XeTeX/LuaTeX with LGR fonts} + +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 must ensure that the selected font +contains the required glyphs (the default Latin Modern fonts miss them). + +Latin Modern can combined with the matching CB-Greek 8-bit font. For the +setup, see the preamble of this document \texttt{test-unicode-lgr.tex} + +Caveat: Currently, hyphenation does not work with this setup. Use it only +for short Greek quotes or as a last ressort. + +\section{Language Switch} + +The declaration \verb|\selectlanguage| switches between languages. +With XeTeX/LuaTeX and LGR, Unicode input is not possible. Instead, use the +Latin transliteration or LICR macros: + +\begin{quote} + \selectlanguage{greek} + T'i f'hic? enj'ede pa~id'' >eleuj'eran\\ + t`ac plhs'ion N'umfac stefano~usan, S'wstrate,\\ + >er~wn 'ap~hljec e>uj'uc? +\end{quote} + +The macro \verb|\foreignlanguage| sets its second argument in the specified +language. This is intended for short text parts like +\foreignlanguage{greek}{Βιβλιοθήκη}. + +\section{Font Encoding} + +Switching to a font encoding supporting the Greek script is possible without +switching the Babel language using the declarations \verb|\greekscript| or +\verb|\greektext| (always LGR) and the macros \verb|\ensuregreek| or +\verb|\textgreek|. These commands do not start a new paragraph. + +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. greek-fontenc adds a test for EU1 and EU2, if +the TeX engine is XeTeX or LuaTeX. Here, the «latinencoding» is +\latinencoding. + +With XeTeX or LuaTeX, the macros \verb|\greektext| and \verb|\textgreek| +are only defined, if the LGR font encoding is loaded via the +\texttt{fontenc} package (see test-unicode-lgr.tex). + +% don't change the font encoding. +With LGR, Latin characters in Greek text parts are typeset as Greek characters +according to the Latin transcription defined in LGR.% + +\begin{quote} + \greektext F\'ilwn to\~u \textlatin{TeX} (EFT) -- + \latintext{Friends (\textgreek{F\'ilwn}) of TeX.}% +\end{quote} + +\section{MakeUppercase, MakeLowercase} + +Capital Greek letters have diacritics (except the dialytika and sub-iota) to +the left (instead of above) and drop them in uppercase. + +Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if placed on +the first vowel of a diphtong (\textgreek{\'ai, \'au, \'ei, \'>ai, \'>au, +\'>ei}). A dialytika must be placed on the second vowel if they are dropped. +(\foreignlanguage{greek}{\MakeUppercase{\'ai, \'au, \'ei, \'>ai, \'>au, +\'>ei}}). + +\section{LICR Macros} + +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. + +\subsection{Hiatus} + +The «hiatus» feature works with macro input: + +\selectlanguage{greek} +% from teubner: άυλος/ΑΫΛΟΣ +\acctonos\textalpha\textupsilon λος $\mapsto$ +\MakeUppercase{\acctonos\textalpha\textupsilon λος}, +\>'\textalpha\textupsilon λος $\mapsto$ +\MakeUppercase{\>'\textalpha\textupsilon λος}, +% from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ +m\acctonos\textalpha\textiota να $\mapsto$ +\MakeUppercase{m\acctonos\textalpha\textiota να}, +% from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema +% κέικ, ἀυπνία/αϋπνία +\textkappa\acctonos\textepsilon\textiota\textkappa $\mapsto$ +\MakeUppercase{\textkappa\acctonos\textepsilon\textiota\textkappa}, +\>\textalpha\textupsilon πνία $\mapsto$ +\MakeUppercase{\>\textalpha\textupsilon πνία}. +\selectlanguage{english} + +\subsection{Captions} + +\selectlanguage{greek} +\prefacename, +\refname, +\abstractname, +\bibname, +\chaptername, +\appendixname, +\contentsname, +\listfigurename , +\listtablename, +\indexname, +\figurename, +\tablename, +\partname, +\enclname, +\ccname, +\headtoname, +\pagename, +\seename, +\alsoname, +\proofname, +\glossaryname +\selectlanguage{english} + +Test correct upcasing (dropping of accents): + +\selectlanguage{greek} +\MakeUppercase{ +\prefacename, +\refname, +\abstractname, +\bibname, +\chaptername, +\appendixname, +\contentsname, +\listfigurename, +\listtablename, +\indexname, +\figurename, +\tablename, +\partname, +\enclname, +\ccname, +\headtoname, +\pagename, +\seename, +\alsoname, +\proofname, +\glossaryname +} +\selectlanguage{english} + + +\subsection{Months} + +\selectlanguage{greek} +\newcounter{foo} +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\stepcounter{foo} \month=\value{foo} \today \\ +\selectlanguage{english} + +\section{Greek Numerals} + +See greek.pdf for the formation rules of Greek numerals. +Some examples: + +\selectlanguage{greek} + +\greeknumeral{1}, +\greeknumeral{2}, +\greeknumeral{3}, +\greeknumeral{4}, +\greeknumeral{5}, +\greeknumeral{6}, +\greeknumeral{7}, +\greeknumeral{8}, +\greeknumeral{9}, +\greeknumeral{10}, +\greeknumeral{11}, +\greeknumeral{12}, +\greeknumeral{20}, +\greeknumeral{345}, +\greeknumeral{500}, +\greeknumeral{1997}, +\greeknumeral{2013}, + +\Greeknumeral{1}, +\Greeknumeral{2}, +\Greeknumeral{3}, +\Greeknumeral{4}, +\Greeknumeral{5}, +\Greeknumeral{6}, +\Greeknumeral{7}, +\Greeknumeral{8}, +\Greeknumeral{9}, +\Greeknumeral{10}, +\Greeknumeral{11}, +\Greeknumeral{12}, +\Greeknumeral{20}, +\Greeknumeral{345}, +\Greeknumeral{500}, +\Greeknumeral{1997}, +\Greeknumeral{2013}, + + +Enumerated lists use Greek characters/numerals in the second and fourth level: + +\selectlanguage{greek} +\begin{enumerate} + \item item 1 + \begin{enumerate} + \item item 1.1 + \begin{enumerate} + \item item 1.1.1 + \begin{enumerate} + \item item 1.1.1.1 + \item item 1.1.1.2 + \end{enumerate} + \item item 1.1.2 + \end{enumerate} + \end{enumerate} +\end{enumerate} +\selectlanguage{english} + + +This may be problematic with fonts that only partially support Greek and +miss the numeral signs (dexiakeraia and aristerikeraia). If you prefer the +"normal" enumeration, write in the preamble after loading babel: + +\begin{verbatim} + \makeatletter + \addto\extrasgreek{\let\@alph\latin@alph + \let\@Alph\latin@Alph} + \makeatother +\end{verbatim} + +\end{document} diff --git a/Master/texmf-dist/doc/generic/babel-greek/usage.pdf b/Master/texmf-dist/doc/generic/babel-greek/usage.pdf index 0c4e0d954c9..4ab9dae3344 100644 Binary files a/Master/texmf-dist/doc/generic/babel-greek/usage.pdf and b/Master/texmf-dist/doc/generic/babel-greek/usage.pdf differ diff --git a/Master/texmf-dist/doc/generic/babel-greek/usage.tex b/Master/texmf-dist/doc/generic/babel-greek/usage.tex index 57edc7f78a5..c5bd0dc87ea 100644 --- a/Master/texmf-dist/doc/generic/babel-greek/usage.tex +++ b/Master/texmf-dist/doc/generic/babel-greek/usage.tex @@ -45,8 +45,17 @@ e-mail: \texttt{apostolo@platon.ee.duth.gr}} \date{October 15, 1997} \maketitle + +\abstract{\noindent +This document describes the use of the Latin transliteration for Greek that +is defined by the LGR font encoding. Today, all modern LaTeX distributions +support literal input of Greek, which is the preferred method for new +documents. [G. Milde 2013/12/02]} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Overview} + The \texttt{greek} option of the \texttt{babel} package is an attempt to make it possible for someone to write Greek text with \LaTeX. The current version of the \texttt{greek} option supports the diff --git a/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx b/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx new file mode 100644 index 00000000000..aaacb299664 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel-greek/babel-greek.dtx @@ -0,0 +1,1172 @@ +% \iffalse meta-comment +% +% Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams +% and the authors listed elsewhere in this file. All rights reserved. +% +% This file is part of the babel-greek package. +% --------------------------------------------- +% +% It may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Günter Milde . +% +% Babel-greek is a contributed package providing support for the Greek +% language and script via the Babel system (http://www.ctan.org/pkg/babel). +% +% The list of derived (unpacked) files belonging to this work +% and covered by LPPL is defined by the unpacking script (babel-greek.ins) +% which is part of the package. +% \fi +% \CheckSum{1218} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{babel-greek.dtx} +% +%\ProvidesLanguage{greek} +%\fi +%\ProvidesFile{babel-greek.dtx} + [2013/12/03 v1.8a Greek support for the babel system] +%\iffalse +%% File `babel-greek.dtx' +%% Greek language Definition File +%% Copyright © 1997, 2005 Apostolos Syropoulos, Johannes Braams +%% Copyright © 2013 Günter Milde +% +%% Please report errors to: Günter Milde +% +% This file is part of the babel-greek package, it provides the source +% code for the greek language definition file. The original +% version of this file was written by Apostolos Syropoulos. +% It was then enhanced by adding code from kdgreek.sty from David +% Kastrup with his +% consent. +%<*filedriver> +\documentclass{ltxdoc} +% \usepackage{lmodern} +\usepackage[utf8]{inputenc} +\usepackage{hyperref,bookmark} +\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=black} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\newcommand*{\pkg}[1]{\texttt{#1}} +\begin{document} + \DocInput{babel-greek.dtx} +\end{document} +% +%\fi +% \GetFileInfo{babel-greek.dtx} +% +% \changes{greek-1.0b}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{greek-1.0b}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning} +% \changes{greek-1.2}{1997/10/28}{Classical Greek is now a dialect} +% \changes{greek-1.2b}{1997/11/01}{Classical Greek is now called +% ``Polutoniko'' Greek. The previous name was at least misleading} +% \changes{greek-1.2c}{1998/06/26}{This version conforms to version +% 2.0 of the CB fonts and consequently we added a few new +% symbol-producing commands} +% \changes{greek-1.3a}{1998/07/04}{polutoniko is now an attribute to +% Greek, no longer a `dialect'} +% \changes{greek-1.4}{2013/05/17}{new maintainer} +% \changes{greek-1.5}{2013/06/21}{bugfixes, +% change some symbol macros to aliases, +% LGR fixes via DeclareTextCommand instead of +% extrasgreek/noextrasgreek definitions, +% LICR macros in string definitions, +% LGR font encoding not used with XeTeX/LuaTeX.} +% \changes{greek-1.5a}{2013/06/27}{``extraspolutonikogreek'' definition +% was missing with Xe/LuaTeX. +% Replaced non-printable literal character with ^^-notation.} +% \changes{greek-1.6}{2013/07/18}{fix \cs{@roman} and \cs{@Roman} +% redefinition (thanks to Enrico Gregorio and Claudio Beccari), +% load LICR macro definitions for Xe/LuaTeX.} +% \changes{greek-1.7}{2013/09/09}{Do not load euenc.def with XeTeX/LuaTeX. +% Prevent re-loading lgrenc.def.} +% \changes{greek-1.7a}{2013/09/13}{bugfix: remove spurious ``fi''.} +% \changes{greek-1.7b}{2013/10/01}{bugfix: correct upcasing of babel strings +% with Xe/LuaTeX.} +% \changes{greek-1.8}{2013/11/27}{Rename to ``babel-greek.dtx''. +% Restore compatibility with Xe/LuaTeX in 8-bit and Unicode mode. +% Load ``euenc.def'' if EU1 or EU2 font encoding is detected. +% New TextCommands ``greekscript'' and ``ensuregreek''.} +% \changes{greek-1.8a}{2013/12/03}{Set `encodingdefault' in `greekscript' +% to fix Greek in footnotes etc. with document language Greek.} +% +% \title{Babel support for the Greek language} +% \author{Apostolos Syropoulos, Günter Milde} +% \maketitle +% +% Babel-greek is a contributed package providing support for the Greek +% language and script via the \href{http://www.ctan.org/pkg/babel}{Babel} +% system. See the \href{README.html}{README} file for an overwiew of the +% \pkg{babel-greek} package and links to requirements and related packages. +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Apostolos Syropoulos +% (\texttt{apostolo@platon.ee.duth.gr}), code from +% \file{kdgreek.sty} by David Kastrup +% \texttt{dak@neuroinformatik.ruhr-uni-bochum.de} was used to +% enhance the support for typesetting greek texts.} defines all the +% language definition macros for the Greek language, i.e., +% as it used today with only one accent, and the attribute +% \Lopt{polutoniko} for typesetting greek text with all accents +% (classical and polytonic Greek). +% +% \section{Requirements} +% +% Typesetting Greek with Babel requires (of course) the +% \href{http://www.ctan.org/pkg/babel}{Babel core}, support for Greek font +% encodings (\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc}) +% and a font supporting the Greek script. +% +% The \href{http://www.ctan.org/pkg/cbgreek-complete}{CB Greek fonts} +% created by \textsc{Claudio Beccari}\footnote{Apostolos Syropoulos +% wishes to thank Claudio Beccari for his +% patience, collaboration, comments and suggestions.} +% are a complete set of 8-bit TeX fonts matching \textsc{Knuth}'s +% Computer Modern. +% The package \pkg{\href{http://www.ctan.org/pkg/cbfonts-fd}{cbfonts-fd}} +% sets them up as Greek substitute for the Computer Modern and Latin Modern +% font families. +% The \pkg{\href{http://www.ctan.org/pkg/substitutefont}{substitutefont}} +% package can be used to set up Greek supplements for other +% font families (like Times or Palatino). +% +% The \href{http://ctan.org/pkg/lm}{Latin Modern} OpenType font that is the +% default font for XeTeX/LuaTeX does not support the Greek script. The user +% needs to set up an alternative font like Linux Libertine or DejaVu with +% \pkg{\href{http://www.ctan.org/pkg/fontspec}{fontspec}}. + +% \section{Usage} +% +% To activate Greek support with babel, specify the option +% \Lopt{greek}, either as global option or as option to the +% \pkg{babel} package. Remember, that the \emph{last} language +% option determines the document language, e.g. +% \begin{verbatim} +% \usepackage[greek,english]{babel}\end{verbatim} +% activates support for Greek in an English document while +% \begin{verbatim} +% \usepackage[english,greek]{babel} +% \languageattribute{greek}{polutoniko}\end{verbatim} +% sets the document language to Greek with ``polytonic'' +% spelling of auto-generated strings. +% +% \DescribeMacro\selectlanguage +% \DescribeMacro\foreignlanguage +% The Babel core provides two commands to switch the active language: +% The declaration \verb|\selectlanguage{greek}| switches to the Greek languages. +% The macro \verb|\foreignlanguage{greek}{}| sets its second argument +% in the Greek language. This is intended for short text parts. +% For details see the \href{http://www.ctan.org/pkg/babel}{Babel} documentation. +% +% For backwards compatibility, ``polytonic'' spelling can also be +% selected via the dummy language \Lopt{polutonikogreek}. In this +% case, the language name \Lopt{polutonikogreek} must also be +% used for language switches with |\selectlanguage| or +% |\foreignlanguage|. However, it is not possible to use +% both options, \Lopt{greek} and \Lopt{polutonikogreek} in one document. +% +% \subsection{Input of Greek text} +% +% There are several alternatives for input of Greek text. +% \begin{itemize} +% \item With the packages \pkg{inputenc} and +% \pkg{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}}, +% literal Greek characters can be input using the utf-8, iso-8859-7, +% or macgreek encoding. +% +% Literal input using the utf-8 encoding is also the standard input +% method if compiling with the XeTeX and LuaTeX engines. +% +% \item The Latin transliteration defined by the LGR font encoding +% is explained in the file \file{\href{usage.pdf}{usage.pdf}}. +% +% \item The package +% \pkg{\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc}} +% defines \emph{LaTeX internal character representation} (LICR) macros +% for Greek letters and text symbols. It is required by \pkg{babel-greek}, +% so the |\textAlpha| \ldots |\textomega| +% macros are a save but cumbersome method to input Greek characters. +% +% \item The \pkg{alphabeta} package bundled with +% \href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc} makes the +% short macro names |\Alpha| \ldots |\omega| available in text mode, too. +% \end{itemize} +% The \href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc} bundle +% has details and examples for all these input methods. +% +% \subsection{Greek vs. Latin script} +% When switching the language to Greek, \pkg{babel-greek} ensures that the +% Greek script is supported. +% With 8-bit LaTeX, Greek text fonts use a non-standard +% font encoding\footnote{LaTeX font encodings are described in +% the \emph{LaTeX font guide} (fntguide.pdf).} +% (LGR) that misses Latin letters. Latin characters in the source are +% instead interpreted as a transcription for Greek symbols. +% The following macros allow the use of Greek vs. Latin script without +% changing the active language. +% \DescribeMacro\greekscript +% \DescribeMacro\greektext +% The \emph{TextCommand}\footnote{For a discussion of TextCommands, see +% the \emph{LaTeX font guide} (fntguide.pdf), too.} +% |\greekscript| switches to a font encoding +% supporting the Greek script. +% The declaration |\greektext| always switches the font encoding +% to LGR. Both declarations do not change the active language. +% \DescribeMacro\latintext +% |\latintext| (defined by the Babel +% core) can be used to switch back to an encoding supporting the Latin +% script. +% +% \DescribeMacro\ensuregreek +% \DescribeMacro\textgreek +% The macros |\ensuregreek| and |\textgreek| take one argument +% which is typeset using a font encoding supporting the Greek +% script. While |\ensuregreek| only switches the +% font encoding if required, |\textgreek| always uses the LGR font +% encoding. +% \DescribeMacro\textlatin +% The Babel core defines a corresponding |\textlatin| macro. +% +% \section{Greek numbering} +% +% The Greek alphabetical numbering system, like the Roman one, is +% still used in everyday life for short enumerations. Unfortunately +% most Greeks don't know how to write Greek numbers bigger than 20 or +% 30. Nevertheless, in official editions of the last century and +% beginning of this century this numbering system was also used for +% dates and numbers in the range of several thousands. Nowadays +% this numbering system is primary used by the Eastern Orthodox +% Church and by certain scholars. It is hence necessary to be able +% to typeset any Greek numeral up to \hbox{999\,999}. Here are the +% conventions: +% \begin{itemize} +% \item There is no Greek numeral for any number less than or equal +% to $0$. +% \item Numbers from $1$ to $9$ are denoted by letters alpha, beta, +% gamma, delta, epsilon, stigma, zeta, eta, theta, followed by a +% mark similar to the mathematical symbol ``prime''. (Nowadays +% instead of letter stigma the digraph sigma tau is used for number +% $6$. Mainly because the letter stigma is not always available, so +% people opt to write down the first two letters of its name as an +% alternative. In our implementation we produce the letter stigma, +% not the digraph sigma tau.) +% \item Decades from $10$ to $90$ are denoted by letters iota, +% kappa, lambda, mu, nu, xi, omikron, pi, qoppa, again followed by +% the numeric mark. The qoppa used for this purpose has a special +% zig-zag form, which doesn't resemble at all the original +% `q'-like qoppa. +% \item Hundreds from $100$ to $900$ are denoted by letters rho, +% sigma, tau, upsilon, phi, chi, psi, omega, sampi, followed by the +% numeric mark. +% \item Any number between $1$ and $999$ is obtained by a group of +% letters denoting the hundreds decades and units, followed by a +% numeric mark. +% \item To denote thousands one uses the same method, but this time +% the mark is placed in front of the letter, and under the baseline +% (it is inverted by 180 degrees). When a group of letters denoting +% thousands is followed by a group of letters denoting a number +% under $1000$, then both marks are used. +% \end{itemize} +% +% Using these conventions one obtains numbers up to \hbox{999\,999}. +% \DescribeMacro{\greeknumeral} +% The command |\greeknumeral| makes it possible to typeset Greek +% numerals. There is also an +% \DescribeMacro{\Greeknumeral} +% ``uppercase'' version of this macro: |\Greeknumeral|. +% +% Another system which was in wide use only in Athens, could +% express any positive number. This system is implemented in +% package |athnum|. +% +% \StopEventually{} +% +% \section{Implementation} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{greek-1.0b}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% When the option \Lopt{polutonikogreek} was used, redefine +% |\CurrentOption| to prevent problems later on. +% \begin{macrocode} +\gdef\CurrentOption{greek}% +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{greek} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@greek| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\l@greek\@undefined + \@nopatterns{greek} + \adddialect\l@greek0\fi +% \end{macrocode} +% +% Now we declare the |polutoniko| language attribute. +% \begin{macrocode} +\bbl@declare@ttribute{greek}{polutoniko}{% +% \end{macrocode} +% This code adds the expansion of |\extraspolutonikogreek| to +% |\extrasgreek| and changes the definition of |\today| for Greek +% to produce polytonic month names. +% \begin{macrocode} + \expandafter\addto\expandafter\extrasgreek + \expandafter{\extraspolutonikogreek}% + \let\captionsgreek\captionspolutonikogreek + \let\gr@month\gr@c@month +% \end{macrocode} +% We need to take some extra precautions in order not to break +% older documents which still use the old \Lopt{polutonikogreek} +% option. +% \changes{greek-1.3f}{1999/09/29}{Added some code to make older +% documents work} +% \changes{greek-1.3g}{2000/02/04}{\cs{noextraspolutonikogreek} was +% missing} +% \begin{macrocode} + \let\l@polutonikogreek\l@greek + \let\datepolutonikogreek\dategreek + \let\extraspolutonikogreek\extrasgreek + \let\noextraspolutonikogreek\noextrasgreek + } +% \end{macrocode} +% +% \section{Font setup} +% +% Typesetting Greek texts requires a font with Greek characters: +% +% For 8-bit LaTeX, this package uses fonts with the +% \href{http://www.ctan.org/pkg/greek-fontenc}{LGR font encoding}. +% With the XeTeX or LuaTeX engines and Unicode fonts, the user must ensure +% that the selected font contains the required glyphs. +% LGR-encoded fonts can also be used alongside Unicode fonts with XeTeX/LuaTeX +% to enable the input of Greek letters via the Latin transcription provided by +% this font encoding. +% +% \changes{greek-1.2a}{1997/10/31}{filename \file{lgrenc.def} now +% lowercase} +% \changes{greek-1.4}{2013/05/17}{\file{lgrenc.def} moved to the +% separate package `greek-fontenc'} +% \changes{greek-1.5}{2013/06/21}{LGR setup skipped with XeTeX/LuaTeX} +% \changes{greek-1.7}{2013/09/09}{Do not load euenc.def with XeTeX/LuaTeX +% (too complicated to get it right).} +% \changes{greek-1.8}{2013/11/30}{Check for EU1/EU2 font encoding +% instead of engine} +% +% \DescribeMacro\greekfontencoding +% We test for available font encodings and set |\greekfontencoding| +% and the internal macro |\bbl@greek@fontencdef| with the name of the +% font definition file with Greek LICR macros. The fallback is LGR. +% \begin{macrocode} +\@ifl@aded{def}{eu1enc}{ + \providecommand*{\greekfontencoding}{EU1} + \providecommand*{\bbl@greek@fontencdef}{greek-euenc} + \renewcommand*{\LastDeclaredEncoding}{EU1} +}{} +\@ifl@aded{def}{eu2enc}{ + \providecommand*{\greekfontencoding}{EU2} + \providecommand*{\bbl@greek@fontencdef}{greek-euenc} + \renewcommand{\LastDeclaredEncoding}{EU2} +}{} +\providecommand*{\greekfontencoding}{LGR} +\providecommand*{\bbl@greek@fontencdef}{lgrenc} +% \end{macrocode} +% Ensure that the Greek LICR macros are available: +% \begin{macrocode} +\@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 + } +} +% \end{macrocode} +% \begin{macro}{\greekscript} +% The TextCommand |\greekscript| is a declaration that switches the font +% encoding to |\greekfontencoding| if the current font encoding does not +% provide a (typically empty) local variant. +% \changes{greek-1.8.1}{2013/12/03}{Set `encodingdefault' in `greekscript' +% to fix Greek in footnotes etc. with document language Greek. +% TODO: This is from `greektext' but are there side effects?} +% \begin{macrocode} +\ProvideTextCommandDefault{\greekscript}{% + \fontencoding{\greekfontencoding}\selectfont + \def\encodingdefault{\greekfontencoding}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ensuregreek} +% The TextCommand |\ensuregreek| sets it argument in |\greekfontencoding| +% if the current font encoding does not provide a (typically empty) local +% variant. +% \begin{macrocode} +\ProvideTextCommandDefault{\ensuregreek}[1]{% + \leavevmode{\greekscript #1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\latinencoding} +% The babel core defines the macro |\latinencoding| and sets it to either +% OT1 or (if available) T1. We extend the choice with the Unicode encodings +% EU1 and EU2 so that |\latintext| under XeTeX/LuaTeX does not prevent the +% use of Unicode fonts. +% \begin{macrocode} +\AtBeginDocument{ + \@ifl@aded{def}{eu1enc}{\xdef\latinencoding{EU1}}{}% XeTeX + \@ifl@aded{def}{eu2enc}{\xdef\latinencoding{EU2}}{}% LuaTeX +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Fixes for the LGR font encoding} +% +% \begin{macrocode} +\@ifl@aded{def}{lgrenc}{% +% \end{macrocode} +% +% 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. +% \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{\&}} +% \changes{greek-1.4}{2013/05/17}{moved here from \file{lgrenc.def} because +% the definitions require the \texttt{\textbackslash latintext} macro +% defined by Babel.} +% \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} +% +% \begin{macrocode} + \ProvideTextCommand{\textcopyright}{LGR}{\textlatin{\textcopyright}} + \ProvideTextCommand{\textregistered}{LGR}{\textlatin{\textregistered}} + \ProvideTextCommand{\texttrademark}{LGR}{\textlatin{\texttrademark}} + \let\ltx@amp\& + \DeclareTextCommandDefault{\&}{\ltx@amp} + \DeclareTextCommand{\&}{LGR}{\textlatin{\ltx@amp}} + \ProvideTextCommand{\SS}{LGR}{\textlatin{\SS}} +% \end{macrocode} +% +% \begin{macro}{\greek@roman} +% \begin{macro}{\greek@Roman} +% \changes{greek-1.2e}{1999/04/16}{Moved redefinition of \cs{@roman} +% back to the language specific file} +% \changes{greek-1.3d}{1999/08/27}{\cs{@roman} and \cs{@Roman} need to +% be added to \cs{extraspolutonikogreek}} +% \changes{greek-1.3e}{1999/09/24}{\cs{@roman} and \cs{@Roman} need +% \emph{not} be in \cs{extraspolutonikogreek} when they are already +% in \cs{extrasgreek}} +% \changes{greek-1.5}{2013/06/15}{\cs{@roman} and \cs{@Roman} as TextCommands +% (BUG: this extended the expansion problem to all languages!)} +% \changes{greek-1.6}{2013/07/19}{apply a patch by Enrico Gregorio. +% Thanks to Claudio Beccari for testing and reporting.} +% +% To prevent roman numerals being typeset in greek letters we need +% to adopt the internal \LaTeX\ commands |\@roman| and +% |\@Roman|. \emph{Up to version 1.5, the definition caused errors where +% |\@roman| ends up in a situation where the argument needs to be expanded +% (e.g. Roman page numbers in the ToC).} +% \begin{macrocode} + \def\@roman#1{\expandafter\textlatin\expandafter{\romannumeral#1}} + \def\@Roman#1{\expandafter\textlatin\expandafter{% + \expandafter\@slowromancap\romannumeral#1@}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Now we define two commands that switch +% to the LGR font encoding. The Babel core defines corresponding commands +% to switch to a Latin font encoding. +% +% \begin{macro}{\greektext} +% The declaration |\greektext| switches to LGR. +% For shorter pieces of text the |\textgreek| macro should be +% used. +% \begin{macrocode} + \DeclareRobustCommand{\greektext}{% + \fontencoding{LGR}\selectfont + \def\encodingdefault{LGR}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textgreek} +% This command takes an argument which is then typeset using the +% LGR font encoding. In order to avoid many encoding switches +% it operates in a local scope. +% \changes{greek-1.0b}{1996/09/23}{Added a level of braces to keep +% encoding change local} +% \changes{greek-1.3k}{2003/03/19}{Added \cs{leavevmode} as was done +% with \cs{latintext}} +% \begin{macrocode} + \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textol} +% The \href{http://www.ctan.org/pkg/cbgreek-complete}{CB Greek fonts} +% contain an outline family. In order to make it available, +% we define the command |\textol|. (This font-specific macro does not +% fit in a language defintion file is and only kept for backwards +% compatibility.) +% \begin{macrocode} + \def\outlfamily{\usefont{LGR}{cmro}{m}{n}} + \DeclareTextFontCommand{\textol}{\outlfamily} +}{} % End of LGR fixes. +% \end{macrocode} +% \end{macro} +% +% \section{Definitions for the Greek language} +% +% The next step consists in defining commands to switch to (and +% from) the Greek language. +% +% \begin{macro}{\greekhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{greek-1.3h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +% Yannis Haralambous has suggested this value +\providehyphenmins{\CurrentOption}{\@ne\@ne} +% \end{macrocode} +% \end{macro} +% +% \changes{greek-1.1e}{1997/10/12}{Added caption name for proof} +% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe ep'ishc} +% instead of \texttt{bl'pe ep'ishc}} +% +% \begin{macro}{\captionsgreek} +% The macro |\captionsgreek| defines all strings used in the +% four standard document classes provided with \LaTeX. +% \changes{greek-1.3h}{2000/09/20}{Added \cs{glossaryname}} +% \changes{greek-1.3i}{2000/10/02}{The final sigma in all names appears +% as `s' instead of `c'.} +% \begin{macrocode} +\addto\captionsgreek{% + \def\prefacename{\textPi\textrho\acctonos\textomicron\textlambda + \textomicron\textgamma\textomicron\textfinalsigma}% + \def\refname{\textAlpha\textnu\textalpha + \textphi\textomicron\textrho\acctonos\textepsilon\textfinalsigma}% + \def\abstractname{\textPi\textepsilon\textrho\acctonos\textiota + \textlambda\texteta\textpsi\texteta}% + \def\bibname{\textBeta\textiota\textbeta\textlambda\textiota\textomicron + \textgamma\textrho\textalpha\textphi\acctonos\textiota\textalpha}% + \def\chaptername{\textKappa\textepsilon\textphi\acctonos\textalpha + \textlambda\textalpha\textiota\textomicron}% + \def\appendixname{\textPi\textalpha\textrho\acctonos\textalpha\textrho + \texttau\texteta\textmu\textalpha}% + \def\contentsname{\textPi\textepsilon\textrho\textiota + \textepsilon\textchi\acctonos\textomicron\textmu\textepsilon + \textnu\textalpha}% + \def\listfigurename{\textKappa\textalpha\texttau\acctonos\textalpha + \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} + \textSigma\textchi\texteta\textmu\acctonos\textalpha\texttau + \textomega\textnu}% + \def\listtablename{\textKappa\textalpha\texttau\acctonos\textalpha + \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} + \textPi\textiota\textnu\acctonos\textalpha\textkappa\textomega\textnu}% + \def\indexname{\textEpsilon\textupsilon\textrho\textepsilon + \texttau\acctonos\texteta\textrho\textiota\textomicron}% + \def\figurename{\textSigma\textchi\acctonos\texteta\textmu\textalpha}% + \def\tablename{\textPi\acctonos\textiota\textnu\textalpha + \textkappa\textalpha\textfinalsigma}% + \def\partname{\textMu\acctonos\textepsilon\textrho\textomicron + \textfinalsigma}% + \def\enclname{\textSigma\textupsilon\textnu\texteta\textmu + \textmu\acctonos\textepsilon\textnu\textalpha}% + \def\ccname{\textKappa\textomicron\textiota\textnu\textomicron + \textpi\textomicron\acctonos\textiota\texteta\textsigma\texteta}% + \def\headtoname{\textPi\textrho\textomicron\textfinalsigma}% + \def\pagename{\textSigma\textepsilon\textlambda\acctonos\textiota + \textdelta\textalpha}% + \def\seename{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon}% + \def\alsoname{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon{} + \textepsilon\textpi\acctonos\textiota\textsigma\texteta\textfinalsigma}% + \def\proofname{\textAlpha\textpi\acctonos\textomicron + \textdelta\textepsilon\textiota\textxi\texteta}% + \def\glossaryname{\textGamma\textlambda\textomega\textsigma + \textsigma\acctonos\textalpha\textrho\textiota}% + } +% \end{macrocode} +% \end{macro} +% \changes{greek-1.2}{1997/10/28}{Added caption names for +% \cs{polutonikogreek}} +% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe >ep'ishc} +% instead of \texttt{bl'pe >ep'ishc}} +% +% \begin{macro}{\captionspolutonikogreek} +% For texts written in the $\pi o\lambda\upsilon\tau +% o\nu\kappa\acute{o}$ (polytonic greek) the translations are +% the same as above, but some words are spelled differently. For +% now we just add extra definitions to |\captionsgreek| in order to +% override the earlier definitions. +% \begin{macrocode} +\let\captionspolutonikogreek\captionsgreek +\addto\captionspolutonikogreek{% + \def\refname{\>\textAlpha\textnu\textalpha + \textphi\textomicron\textrho\accvaria\textepsilon\textfinalsigma}% + \def\indexname{\textEpsilon\<\textupsilon\textrho\textepsilon + \texttau\acctonos\texteta\textrho\textiota\textomicron}% + \def\figurename{\textSigma\textchi\accperispomeni\texteta\textmu\textalpha}% + \def\headtoname{\textPi\textrho\accvaria\textomicron\textfinalsigma}% + \def\alsoname{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon{} + \>\textepsilon\textpi\acctonos\textiota\textsigma\texteta\textfinalsigma}% + \def\proofname{\>\textAlpha\textpi\acctonos\textomicron + \textdelta\textepsilon\textiota\textxi\texteta}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\gr@month} +% \changes{greek-1.1e}{1997/10/12}{Macro added} +% \begin{macro}{\dategreek} +% The macro |\dategreek| redefines the command |\today| to +% produce greek dates. The name of the month is now produced +% by the macro |\gr@month| since it is needed in the definition +% of the macro |\Grtoday|. +% \changes{greek-1.1a}{1997/03/03}{Fixed typo, \texttt{Oktwbr'iou} +% instead of \texttt{Oktobr'iou}} +% \changes{greek-1.1d}{1997/10/12}{Macro \cs{gr@month} now produces +% the name of the month} +% \changes{greek-1.2a}{1997/10/31}{Use \cs{edef} to define \cs{today}} +% \changes{greek-1.2b}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\gr@month{% + \ifcase\month\or + \textIota\textalpha\textnu\textomicron\textupsilon\textalpha + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon + \textalpha\textrho\acctonos\textiota\textomicron\textupsilon \or + \textMu\textalpha\textrho\texttau\acctonos\textiota\textomicron\textupsilon + \or \textAlpha\textpi\textrho\textiota\textlambda\acctonos\textiota + \textomicron\textupsilon \or + \textMu\textalpha\'"\textiota\textomicron\textupsilon \or + \textIota\textomicron\textupsilon\textnu\acctonos\textiota + \textomicron\textupsilon \or + \textIota\textomicron\textupsilon\textlambda\acctonos\textiota + \textomicron\textupsilon \or + \textAlpha\textupsilon\textgamma\textomicron\acctonos\textupsilon + \textsigma\texttau\textomicron\textupsilon \or + \textSigma\textepsilon\textpi\texttau\textepsilon\textmu + \textbeta\textrho\acctonos\textiota\textomicron\textupsilon \or + \textOmicron\textkappa\texttau\textomega\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textNu\textomicron\textepsilon\textmu\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textDelta\textepsilon\textkappa\textepsilon\textmu\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon + \fi +} +\def\dategreek{% + \def\today{\number\day \space \gr@month\space \number\year}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\gr@c@greek} +% \changes{greek-1.2}{1997/10/28}{Added macro \cs{gr@cl@month}} +% \changes{greek-1.2}{1997/10/28}{Added macro +% \cs{datepolutonikogreek}} +% \changes{greek-1.3a}{1997/10/28}{removed macro +% \cs{datepolutonikogreek}} +% \begin{macrocode} +\def\gr@c@month{% + \ifcase\month\or + \>\textIota\textalpha\textnu\textomicron\textupsilon\textalpha + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon + \textalpha\textrho\acctonos\textiota\textomicron\textupsilon \or + \textMu\textalpha\textrho\texttau\acctonos\textiota\textomicron + \textupsilon \or + \>\textAlpha\textpi\textrho\textiota\textlambda + \acctonos\textiota\textomicron\textupsilon \or + \textMu\textalpha\"'\textiota\textomicron\textupsilon \or + \>\textIota\textomicron\textupsilon\textnu + \acctonos\textiota\textomicron\textupsilon \or + \>\textIota\textomicron\textupsilon\textlambda + \acctonos\textiota\textomicron\textupsilon \or + \textAlpha\>\textupsilon\textgamma\textomicron\acctonos + \textupsilon\textsigma\texttau\textomicron\textupsilon \or + \textSigma\textepsilon\textpi\texttau\textepsilon\textmu\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon \or + \>\textOmicron\textkappa\texttau\textomega\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textNu\textomicron\textepsilon\textmu\textbeta + \textrho\acctonos\textiota\textomicron\textupsilon \or + \textDelta\textepsilon\textkappa\textepsilon\textmu + \textbeta\textrho\acctonos\textiota\textomicron\textupsilon + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Grtoday} +% \changes{greek-1.1}{1996/10/28}{Added macro \cs{Grtoday}} +% The macro |\Grtoday| produces the current date, only that the +% month and the day are shown as greek numerals instead of arabic +% as it is usually the case. +% \begin{macrocode} +\def\Grtoday{% + \expandafter\Greeknumeral\expandafter{\the\day}\space + \gr@c@month \space + \expandafter\Greeknumeral\expandafter{\the\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasgreek} +% \begin{macro}{\noextrasgreek} +% The macro |\extrasgreek| will perform all the extra definitions +% needed for the Greek language. The macro |\noextrasgreek| is used +% to cancel the actions of |\extrasgreek|. For the moment these +% macros switch the fontencoding (with 8-bit TeX) and the definition of +% the internal macros |\@alph| and |\@Alph| because in Greek we do use +% the Greek numerals. +% \changes{greek-1.5}{2013/06/21}{LGR not used with XeTeX/LuaTeX.} +% \changes{greek-1.8}{2013/11/27}{use font-encoding specific TextCommands. +% Use EU1 or EU2 for Latin script if available} +% \begin{macrocode} +\addto\extrasgreek{\greekscript} +\addto\noextrasgreek{\latintext} +% \addto\noextrasgreek{\RestoreFontEncoding} +% \end{macrocode} +% +% \begin{macro}{\gr@ill@value} +% When the argument of |\greeknumeral| has a value outside of the +% acceptable bounds ($0 < x < 999999$) a warning will be issued +% (and nothing will be printed). +% \begin{macrocode} +\def\gr@ill@value#1{% + \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\anw@true} +% \begin{macro}{\anw@false} +% \begin{macro}{\anw@print} +% When a a large number with three \emph{trailing} zero's is to be +% printed those zeros \emph{and} the numeric mark need to be +% discarded. As each `digit' is processed by a separate macro +% \emph{and} because the processing needs to be expandable we need +% some helper macros that help remember to \emph{not} print the +% numeric mark (|\anwtonos|). +% +% The command |\anw@false| switches the printing of the numeric +% mark off by making |\anw@print| expand to nothing. The command +% |\anw@true| (re)enables the printing of the numeric marc. These +% macro's need to be robust in order to prevent improper expansion +% during writing to files or during |\uppercase|. +% \begin{macrocode} +\DeclareRobustCommand\anw@false{% + \DeclareRobustCommand\anw@print{}} +\DeclareRobustCommand\anw@true{% + \DeclareRobustCommand\anw@print{\textdexiakeraia}} % \anwtonos +\anw@true +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\greeknumeral} +% The command |\greeknumeral| needs to be \emph{fully} expandable +% in order to get the right information in auxiliary +% files. Therefore we use a big |\if|-construction to check the +% value of the argument and start the parsing at the right level. +% \begin{macrocode} +\def\greeknumeral#1{% +% \end{macrocode} +% If the value is negative or zero nothing is printed and a warning +% is issued. +% \changes{greek-1.3b}{1999/04/03}{Added \cs{expandafter} and +% \cs{number} (PR3000) in order to make a counter an acceptable +% argument} +% \begin{macrocode} + \ifnum#1<\@ne\space\gr@ill@value{#1}% + \else + \ifnum#1<10\expandafter\gr@num@i\number#1% + \else + \ifnum#1<100\expandafter\gr@num@ii\number#1% + \else +% \end{macrocode} +% We use the available shorthands for 1.000 (|\@m|) and 10.000 +% (|\@M|) to save a few tokens. +% \begin{macrocode} + \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 +% \end{macrocode} +% If the value is too large, nothing is printed and a warning +% is issued. +% \begin{macrocode} + \space\gr@ill@value{#1}% + \fi + \fi + \fi + \fi + \fi + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Greeknumeral} +% The command |\Greeknumeral| prints uppercase greek numerals. +% The parsing is performed by the macro |\greeknumeral|. +% \begin{macrocode} +\def\Greeknumeral#1{% + \expandafter\MakeUppercase\expandafter{\greeknumeral{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\greek@alph} +% \begin{macro}{\greek@Alph} +% In the previous release of this language definition the +% commands |\greek@aplh| and |\greek@Alph| were kept just for +% reasons of compatibility. Here again they become meaningful macros. +% They are definited in a way that even page numbering with greek +% numerals is possible. Since the macros |\@alph| and |\@Alph| will +% lose their original meaning while the Greek option is active, we +% must save their original value. +% macros |\@alph| +% \begin{macrocode} +\let\latin@alph\@alph +\let\latin@Alph\@Alph +% \end{macrocode} +% Then we define the Greek versions; the additional |\expandafter|s +% are needed in order to make sure the table of contents will be +% correct, e.g., when we have appendixes. +% \begin{macrocode} +\def\greek@alph#1{\expandafter\greeknumeral\expandafter{\the#1}} +\def\greek@Alph#1{\expandafter\Greeknumeral\expandafter{\the#1}} +% \end{macrocode} +% +% Now we can set up the switching. +% \changes{greek-1.1a}{1997/03/03}{removed two superfluous @'s which +% made \cs{@alph} undefined} +% \begin{macrocode} +\addto\extrasgreek{% + \let\@alph\greek@alph + \let\@Alph\greek@Alph} +\addto\noextrasgreek{% + \let\@alph\latin@alph + \let\@Alph\latin@Alph} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% What is left now is the definition of a set of macros to produce +% the various digits. +% \begin{macro}{\gr@num@i} +% \begin{macro}{\gr@num@ii} +% \begin{macro}{\gr@num@iii} +% \changes{greek-1.2b}{1997/11/13}{No longer use \cs{\let} in the +% expansion of the \cs{gr@num@x} macros as they ned to be +% expandable} +% As there is no representation for $0$ in this system the zeros +% are simply discarded. When we have a large number with three +% \emph{trailing} zero's also the numeric mark is discarded. +% Therefore these macros need to pass the information to each other +% about the (non-)translation of a zero. +% \begin{macrocode} +\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} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\gr@num@iv} +% \begin{macro}{\gr@num@v} +% \begin{macro}{\gr@num@vi} +% The first three `digits' always have the numeric mark, except +% when one is discarded because it's value is zero. +% \begin{macrocode} +\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} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \section{Character codes} +% +% Greek letters drop diacritics (eccept dialytika and sub-iota) in +% UPPERCASE. This is not cared for by the Unicode standard. +% The file \file{xgreek-fixes.def} from \pkg{polyglossia} +% contains the required |\lccode| and |\uccode| corrections from the +% \pkg{xgreek} package by Apostolos Syropoulos. +% \changes{greek-1.5}{2013/06/21}{Support XeTeX/LuaTeX.} +% \begin{macrocode} +\@ifl@aded{def}{greek-euenc}{ + \InputIfFileExists{xgreek-fixes.def}{}{\PackageWarningNoLine{babel}{% + Can't find the file "xgreek-fixes.def".\MessageBreak + For correct up/down-casing of Greek text,\MessageBreak + install the "polyglossia" package}% + } + \addto\extraspolutonikogreek{} % prevent command missing error. +}{} +% \end{macrocode} +% +% The LGR encoded fonts that are used to typeset Greek with 8-bit TeX +% define ligatures for characters with diacritics. In order for this to +% work, some characters need to be considered as letters. These +% characters are |<|, |>|, |~|, |`|, |'|, |"| and +% \verb=|=. Therefore their |\lccode| is changed when Greek is in +% effect. In order to let |\uppercase| give correct results, the +% |\uccode| of these characters is set to a non-existing character +% to make them disappear. Of course not all characters are needed +% when typesetting ``modern'' $\mu o\nu o\tau o\nu +% \iota\kappa\acute{o}$. In that case we only need the |'| and |"| +% symbols which are treated in the proper way. +% +% \begin{macro}{\greek@tilde} +% \changes{greek-1.0c}{1997/02/19}{Added command} +% The Greek script uses a number of characters with more +% than one accent. In LGR encoded fonts combined diacritics can be +% obtained using Knuth's ligature mechanism (see usage.pdf). +% Characters we need to have ligatures with are the tilde, the +% acute and grave accent characters, the rough and smooth breathings, +% the subscript, and the double quote character. +% In text input the |~| is normally used to produce an +% unbreakable space. +% \changes{greek-1.3k}{2003/04/10}{Make sure the character `!' is not +% active during the definition of \cs{greek@tilde}} +% \changes{greek-1.4}{2013/05/17}{do not re-define the tilde accent macro: +% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.} +% \begin{macrocode} +\@ifl@aded{def}{lgrenc}{% + \begingroup + \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} + \catcode`\~=12 + \lccode`\!=`\~ + \lowercase{\def\x{\endgroup + \def\greek@tilde{!}}\x} +% \end{macrocode} +% \end{macro} +% In order to get correct hyphenation we need to set the lower case +% code of a number of characters. The `v' character has a special +% usage for the |cb| fonts: in fact this ligature mechanism detects +% the end of a word and assures that a final sigma is typeset with +% the proper sign wich is different from that of an initial or +% medial sigma; the `v 'after an \textit{isolated} sigma fools +% the ligature mechanism in order to typeset $\sigma$ in place of +% $\varsigma$. Because of this we make sure its lowercase code is +% not changed. For ``modern'' greek we have to deal only with |'| +% and |"| and so things are easy. +% \changes{greek-1.1c}{1997/04/30}{fixed two typos} +% \changes{greek-1.1e}{1997/10/12}{Added lowercase code for v} +% \changes{greek-1.2}{1997/10/28}{Definitions for ``modern'' Greek are +% now the definitions of ``Polutoniko'' Greek} +% \changes{greek-1.2}{1997/10/28}{Added lowercase codes for ``modern'' +% greek} +% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and +% \cs{extraspolutonikogreek} should be complementary} +% \begin{macrocode} + \addto\extrasgreek{% + \babel@savevariable{\lccode`v}\lccode`v=`v% + \babel@savevariable{\lccode`\'}\lccode`\'=`\'% + \babel@savevariable{\lccode`\"}\lccode`\"=`\"} + \addto\extraspolutonikogreek{% + \babel@savevariable{\lccode`\<}\lccode`\<=`\<% + \babel@savevariable{\lccode`\>}\lccode`\>=`\>% + \babel@savevariable{\lccode`\~}\lccode`\~=`\~% + \babel@savevariable{\lccode`\|}\lccode`\|=`\|% + \babel@savevariable{\lccode`\`}\lccode`\`=`\`} +% \end{macrocode} +% And in order to get rid of all accents and breathings when a +% string is |\uppercase|d we also change a number of uppercase +% codes. +% \changes{greek-1.1b}{1997/03/06}{Added setting of \cs{uccode}s +% (after \file{kdgreek.sty})} +% \changes{greek-1.1e}{1997/10/12}{Added uppercase code for special +% letter ``v''. Uppercase code for accents is now \texttt{9f}, +% instead of \texttt{ff}} +% \changes{greek-1.2}{1997/10/28}{Added uppercase codes for ``modern'' +% Greek. The old codes are now for ``Polutoniko'' Greek} +% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and +% \cs{extraspolutonikogreek} should be complementary} +% {\catcode`|=12\relax\gdef\indexbar{\cs{|}}} +% \changes{greek-1.3g}{1999/11/17}{uc code of \indexbar{} is now just +% \indexbar{} to reflect recent changes in the cb fonts} +% \changes{greek-1.3i}{2000/10/02}{uc code of `v' is switched to V +% so that mixed text appears correctly in headers.} +% \changes{greek-1.3j}{2001/02/03}{Because other languages might +% make the caret active, we can't use the double caret notation +% here} +% \begin{macrocode} + \addto\extrasgreek{% + \babel@savevariable{\uccode`\"}\uccode`\"=`\"% + \babel@savevariable{\uccode`\'}\uccode`\'=159} %% 159 == ^^9f + \addto\extraspolutonikogreek{% + \babel@savevariable{\uccode`\~}\uccode`\~=159% + \babel@savevariable{\uccode`\>}\uccode`\>=159% + \babel@savevariable{\uccode`\<}\uccode`\<=159% + \babel@savevariable{\uccode`\|}\uccode`\|=`\|% + \babel@savevariable{\uccode`\`}\uccode`\`=159} +% \end{macrocode} +% For this to work we make the character |^^9f| a shorthand that +% expands to nothing. In order for this to work we need to make a +% character look like |^^9f| in \TeX's eyes. The trick is to have +% another character and assign it a different lowercase code. The +% execute the macros needed in a |\lowercase| environment. Usually +% the tilde |~| character is used for such purposes. Before we do +% this we save it's original lowercase code to restore it once +% we're done. +% \changes{greek-1.1b}{1997/03/06}{Added shorthand for \cs{char255}} +% \changes{greek-1.1e}{1997/10/12}{Shorthand is changed. Active +% character is now \cs{char159}} +% \changes{greek-1.2a}{1997/10/31}{Need shorthand to exist for +% ``monotoniko'' Greek, not ``polutoniko'' Greek} +% \changes{greek-1.3j}{2001/02/03}{Use the tilde as an alias for +% character 159} +% \begin{macrocode} + \@tempcnta=\lccode`\~ + \lccode`\~=159 + \lowercase{% + \initiate@active@char{~}% + \declare@shorthand{greek}{~}{}} + \lccode`\~=\@tempcnta +% \end{macrocode} +% Add composite commands, so that the dialytika is kept or put on the +% following character of a diphthong with |\MakeUppercase| +% (see lgrdef.enc from the the greek-fontenc package for details). +% \changes{greek-1.4}{2013/05/17}{Add TextCompositeCommands for +% ``uppercase diacritics''.} +% \changes{greek-1.5}{2013/05/27}{Bugfix: @hiatus->LGR@hiatus} +% \changes{greek-1.5a}{2013/07/02}{Replaced non-printable literal character +% with ^^-notation (thanks to Heiko Oberdiek for the hint).} +% \begin{macrocode} + \DeclareTextCompositeCommand{\"}{LGR}{^^9F}{\accdialytika} + \DeclareTextCompositeCommand{\'}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\`}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\<}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\>}{LGR}{^^9F}{\LGR@hiatus} +% \end{macrocode} +% +% We can also make the tilde character itself expand to a tilde with +% category code 12 to make the typing of texts easier. +% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with +% \cs{catcode 12}.} +% \changes{greek-1.5a}{2013/06/27}{provide ``extraspolutonikogreek'' also +% for Xe/LuaTeX.} +% \begin{macrocode} + \addto\extraspolutonikogreek{\languageshorthands{greek}}% + \declare@shorthand{greek}{~}{\greek@tilde} +}{} % End of LGR-specific code. +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \section{symbol name aliases} +% For backwards compatibility, we keep aliases for a few symbols. +% \changes{greek-1.1c}{1997/03/10}{Added a couple of symbols, needed +% for \cs{greeknumeral}} +% \changes{greek-1.1e}{1997/10/12}{Most symbols are removed and are +% now defined in package grsymb} +% \changes{greek-1.2c}{1998/06/26}{Package grsymb has been eliminated +% because the CB fonts v2.0 do not inlcude certain symbols and so +% the remaining symbol definitions have been moved here} +% \changes{greek-1.5}{2013/06/11}{change symbol macros to aliases} +% \begin{macrocode} +\providecommand*{\anwtonos}{\textdexiakeraia} +\providecommand*{\katwtonos}{\textaristerikeraia} +\providecommand*{\qoppa}{\textqoppa} +\providecommand*{\stigma}{\textstigma} +\providecommand*{\sampi}{\textsampi} +\providecommand*{\Digamma}{\textDigamma} +\providecommand*{\ddigamma}{\textdigamma} +\providecommand*{\vardigamma}{\textvardigamma} +\providecommand*{\euro}{\texteuro} +\providecommand*{\permill}{\textperthousand} +% \end{macrocode} +% +% \changes{greek-1.3l}{2004/02/19}{Commented these lines out as this +% change has made it into \LaTeX{} itself.} +% \changes{greek-1.8}{2013/11/27}{Remove the redefintion of fnum@figure +% and fnum@table.} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{greek-1.0b}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{\CurrentOption} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel-greek/babel-greek.ins b/Master/texmf-dist/source/generic/babel-greek/babel-greek.ins new file mode 100644 index 00000000000..40690f0f58a --- /dev/null +++ b/Master/texmf-dist/source/generic/babel-greek/babel-greek.ins @@ -0,0 +1,106 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2008 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the babel-greek package. +%% --------------------------------------------- +%% +%% Babel-greek is a contributed package providing support for the Greek +%% language and script via the Babel system (http://www.ctan.org/pkg/babel) +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Günter Milde . +%% +%% The list of derived (unpacked) files belonging to the package +%% and covered by LPPL is defined by the unpacking script (babel-greek.ins) +%% which is part of the distribution. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2013/09/10} +\def\batchfile{babel-greek.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams, Guenter Milde, +and the authors listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the babel-greek package. +---------------------------------------------------------------- + +It may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Günter Milde . + +Babel-greek is a contributed package providing support for the Greek +language and script via the Babel system (http://www.ctan.org/pkg/babel). + +The list of derived (unpacked) files belonging to this work +and covered by LPPL is defined by the unpacking script (babel-greek.ins) +which is part of the package. +\endpreamble + + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{greek.ldf}{\from{babel-greek.dtx}{code}} + \file{athnum.sty}{\from{athnum.dtx}{package}} + \file{grmath.sty}{\from{grmath.dtx}{package}} + \file{grsymb.sty}{\from{grsymb.dtx}{package}} + } + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation, move `greek.ldf and all files} +\Msg{* ending with `.sty' into a directory searched by TeX.} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel-greek/greek.dtx b/Master/texmf-dist/source/generic/babel-greek/greek.dtx deleted file mode 100644 index de29fa78b45..00000000000 --- a/Master/texmf-dist/source/generic/babel-greek/greek.dtx +++ /dev/null @@ -1,1074 +0,0 @@ -% \iffalse meta-comment -% -% Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams -% and the authors listed elsewhere in this file. All rights reserved. -% -% This file is part of the babel-greek package. -% --------------------------------------------- -% -% It may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2003/12/01 or later. -% -% This work has the LPPL maintenance status "maintained". -% -% The Current Maintainer of this work is G\"unter Milde . -% -% Babel-greek is a contributed package providing support for the Greek -% language and script via the Babel system (http://www.ctan.org/pkg/babel). -% -% The list of derived (unpacked) files belonging to this work -% and covered by LPPL is defined by the unpacking script (greek.ins) -% which is part of the package. -% \fi -% \CheckSum{1216} -% -% \iffalse -% Tell the \LaTeX\ system who we are and write an entry on the -% transcript. -%<*dtx> -\ProvidesFile{greek.dtx} -% -%\ProvidesLanguage{greek} -%\fi -%\ProvidesFile{greek.dtx} - [2013/10/01 v1.7b Greek support for the babel system] -%\iffalse -%% File `greek.dtx' -%% Babel package for LaTeX version 2e -%% Copyright (C) 1989 -- 2005 -%% by Johannes Braams, TeXniek -% -%% Greek language Definition File -%% Copyright (C) 1997, 2005 -%% by Apostolos Syropoulos -%% Johannes Braams, TeXniek -% -%% Please report errors to: G\"unter Milde -% -% This file is part of the babel-greek package, it provides the source -% code for the greek language definition file. The original -% version of this file was written by Apostolos Syropoulos. -% It was then enhanced by adding code from kdgreek.sty from David -% Kastrup with his -% consent. -%<*filedriver> -\documentclass{ltxdoc} -% \usepackage{lmodern} -\newcommand*{\TeXhax}{\TeX hax} -\newcommand*{\babel}{\textsf{babel}} -\newcommand*{\langvar}{$\langle \mathit lang \rangle$} -\newcommand*{\note}[1]{} -\newcommand*{\Lopt}[1]{\textsf{#1}} -\newcommand*{\file}[1]{\texttt{#1}} -\newcommand*{\pkg}[1]{\texttt{#1}} -\begin{document} - \DocInput{greek.dtx} -\end{document} -% -%\fi -% \GetFileInfo{greek.dtx} -% -% \changes{greek-1.0b}{1996/07/10}{Replaced \cs{undefined} with -% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency -% with \LaTeX} -% \changes{greek-1.0b}{1996/10/10}{Moved the definition of -% \cs{atcatcode} right to the beginning} -% \changes{greek-1.2}{1997/10/28}{Classical Greek is now a dialect} -% \changes{greek-1.2b}{1997/11/01}{Classical Greek is now called -% ``Polutoniko'' Greek. The previous name was at least misleading} -% \changes{greek-1.2c}{1998/06/26}{This version conforms to version -% 2.0 of the CB fonts and consequently we added a few new -% symbol-producing commands} -% \changes{greek-1.3a}{1998/07/04}{polutoniko is now an attribute to -% Greek, no longer a `dialect'} -% \changes{greek-1.4}{2013/05/17}{new maintainer} -% \changes{greek-1.5}{2013/06/21}{bugfixes, -% change some symbol macros to aliases, -% LGR fixes via DeclareTextCommand instead of -% extrasgreek/noextrasgreek definitions, -% LICR macros in string definitions, -% LGR font encoding not used with XeTeX/LuaTeX.} -% \changes{greek-1.5a}{2013/06/27}{``extraspolutonikogreek'' definition -% was missing with Xe/LuaTeX. -% Replaced non-printable literal character with ^^-notation.} -% \changes{greek-1.6}{2013/07/18}{fix \cs{@roman} and \cs{@Roman} -% redefinition (thanks to Enrico Gregorio and Claudio Beccari), -% load LICR macro definitions for Xe/LuaTeX.} -% \changes{greek-1.7}{2013/09/09}{Do not load euenc.def with XeTeX/LuaTeX. -% Prevent re-loading lgrenc.def.} -% \changes{greek-1.7a}{2013/09/13}{bugfix: remove spurious ``fi''.} -% \changes{greek-1.7b}{2013/10/01}{bugfix: correct upcasing of babel strings -% with Xe/LuaTeX.} -% -% \section{Babel support for the Greek language} -% -% The file \file{\filename}\footnote{The file described in this -% section has version number \fileversion\ and was last revised on -% \filedate. The original author is Apostolos Syropoulos -% (\texttt{apostolo@platon.ee.duth.gr}), code from -% \file{kdgreek.sty} by David Kastrup -% \texttt{dak@neuroinformatik.ruhr-uni-bochum.de} was used to -% enhance the support for typesetting greek texts.} defines all the -% language definition macros for the Greek language, i.e., -% as it used today with only one accent, and the attribute -% \Lopt{polutoniko} for typesetting greek text with all accents -% (classical and polytonic Greek). -% -% \DescribeMacro\greektext -% \DescribeMacro\latintext -% With 8-bit LaTeX, Greek text fonts use a non-standard font encoding -% (LGR) that misses Latin letters. Latin characters in the source are -% instead interpreted as a transcription for Greek symbols. -% The commands |\greektext| and |\latintext| can be used to switch -% to Greek or Latin font encodings but do not change the active language. -% These are declarations. -% \DescribeMacro\textgreek -% \DescribeMacro\textlatin -% The commands |\textgreek| and |\textlatin| both take one argument -% which is then typeset using the requested font encoding. -% -% \DescribeMacro\textol -% The command |\greekol| switches to the greek outline font family, -% while the command |\textol| typests a short text in outline font. -% A number of extra greek characters are made available through the -% added text commands |\stigma|, |\qoppa|, |\sampi|, |\ddigamma|, -% |\Digamma|, |\euro|, |\permill|, and |\vardigamma|. -% -% \subsection{Usage} -% -% To activate Greek support with babel, specify the option -% \Lopt{greek}, either as global option or as option to the -% \pkg{babel} package. Remember, that the \emph{last} language -% option determines the document language, e.g. -% \begin{verbatim} -% \usepackage[greek,english]{babel}\end{verbatim} -% activates support for Greek in an English document while -% \begin{verbatim} -% \usepackage[english,greek]{babel} -% \languageattribute{greek}{polutoniko}\end{verbatim} -% sets the document language to Greek with ``polytonic'' -% spelling of auto-generated strings. -% -% For backwards compatibility, ``polytonic'' spelling can also be -% selected via the dummy language \Lopt{polutonikogreek}. In this -% case, the language name \Lopt{polutonikogreek} must also be -% used for language switches with |\selectlanguage| or -% |\foreignlanguage|. However, it is not possible to use -% both options, \Lopt{greek} and \Lopt{polutonikogreek} in one document. -% -% \subsubsection{Input of Greek text} -% -% There are several alternatives for input of Greek text. -% The required package \pkg{greek-fontenc} defines -% \emph{LaTeX internal character representation} (LICR) macros -% for Greek letters and text symbols. -% With the packages \pkg{inputenc} and \pkg{greek-inputenc}, -% Greek characters can be input using the utf-8, iso-8859-7, -% or macgreek encoding. The file \file{usage.pdf} explains a Latin -% transliteration defined by the LGR font encoding. -% -% \subsection{Greek numbering} -% -% The Greek alphabetical numbering system, like the Roman one, is -% still used in everyday life for short enumerations. Unfortunately -% most Greeks don't know how to write Greek numbers bigger than 20 or -% 30. Nevertheless, in official editions of the last century and -% beginning of this century this numbering system was also used for -% dates and numbers in the range of several thousands. Nowadays -% this numbering system is primary used by the Eastern Orthodox -% Church and by certain scholars. It is hence necessary to be able -% to typeset any Greek numeral up to \hbox{999\,999}. Here are the -% conventions: -% \begin{itemize} -% \item There is no Greek numeral for any number less than or equal -% to $0$. -% \item Numbers from $1$ to $9$ are denoted by letters alpha, beta, -% gamma, delta, epsilon, stigma, zeta, eta, theta, followed by a -% mark similar to the mathematical symbol ``prime''. (Nowadays -% instead of letter stigma the digraph sigma tau is used for number -% $6$. Mainly because the letter stigma is not always available, so -% people opt to write down the first two letters of its name as an -% alternative. In our implementation we produce the letter stigma, -% not the digraph sigma tau.) -% \item Decades from $10$ to $90$ are denoted by letters iota, -% kappa, lambda, mu, nu, xi, omikron, pi, qoppa, again followed by -% the numeric mark. The qoppa used for this purpose has a special -% zig-zag form, which doesn't resemble at all the original -% `q'-like qoppa. -% \item Hundreds from $100$ to $900$ are denoted by letters rho, -% sigma, tau, upsilon, phi, chi, psi, omega, sampi, followed by the -% numeric mark. -% \item Any number between $1$ and $999$ is obtained by a group of -% letters denoting the hundreds decades and units, followed by a -% numeric mark. -% \item To denote thousands one uses the same method, but this time -% the mark is placed in front of the letter, and under the baseline -% (it is inverted by 180 degrees). When a group of letters denoting -% thousands is followed by a group of letters denoting a number -% under $1000$, then both marks are used. -% \end{itemize} -% -% Using these conventions one obtains numbers up to \hbox{999\,999}. -% \DescribeMacro{\greeknumeral} -% The command |\greeknumeral| makes it possible to typeset Greek -% numerals. There is also an -% \DescribeMacro{\Greeknumeral} -% ``uppercase'' version of this macro: |\Greeknumeral|. -% -% Another system which was in wide use only in Athens, could -% express any positive number. This system is implemented in -% package |athnum|. -% -% \StopEventually{} -% -% \subsection{Implementation} -% -% The macro |\LdfInit| takes care of preventing that this file is -% loaded more than once, checking the category code of the -% \texttt{@} sign, etc. -% \changes{greek-1.0b}{1996/11/02}{Now use \cs{LdfInit} to perform -% initial checks} -% \begin{macrocode} -%<*code> -\LdfInit\CurrentOption{captions\CurrentOption} -% \end{macrocode} -% When the option \Lopt{polutonikogreek} was used, redefine -% |\CurrentOption| to prevent problems later on. -% \begin{macrocode} -\gdef\CurrentOption{greek}% -% \end{macrocode} -% -% When this file is read as an option, i.e. by the |\usepackage| -% command, \texttt{greek} could be an `unknown' language in -% which case we have to make it known. So we check for the -% existence of |\l@greek| to see whether we have to do -% something here. -% -% \begin{macrocode} -\ifx\l@greek\@undefined - \@nopatterns{greek} - \adddialect\l@greek0\fi -% \end{macrocode} -% -% Now we declare the |polutoniko| language attribute. -% \begin{macrocode} -\bbl@declare@ttribute{greek}{polutoniko}{% -% \end{macrocode} -% This code adds the expansion of |\extraspolutonikogreek| to -% |\extrasgreek| and changes the definition of |\today| for Greek -% to produce polytonic month names. -% \begin{macrocode} - \expandafter\addto\expandafter\extrasgreek - \expandafter{\extraspolutonikogreek}% - \let\captionsgreek\captionspolutonikogreek - \let\gr@month\gr@c@month -% \end{macrocode} -% We need to take some extra precautions in order not to break -% older documents which still use the old \Lopt{polutonikogreek} -% option. -% \changes{greek-1.3f}{1999/09/29}{Added some code to make older -% documents work} -% \changes{greek-1.3g}{2000/02/04}{\cs{noextraspolutonikogreek} was -% missing} -% \begin{macrocode} - \let\l@polutonikogreek\l@greek - \let\datepolutonikogreek\dategreek - \let\extraspolutonikogreek\extrasgreek - \let\noextraspolutonikogreek\noextrasgreek - } -% \end{macrocode} -% -% Next, we check if Lua\LaTeX\ or Xe\LaTeX\ is running. If so, we set -% boolean key |\if@babel@greek@unicode| to true. -% (The test code is taken from russian.ldf. We hope that a future -% version of \file{babel.sty} will do the check and provide a boolean. -% -% We don't load the \pkg{ifluatex} or \pkg{ifxetex} package because -% |\RequirePackage| is not allowed at the stage of processing options -% (note that babel loads this file right when it processes its own options) -% but we borrow code from these packages. -% -% The test requires the e-TeX extensions (provided by all TeX engines in -% contemporary TeX distributions). -% -% \changes{greek-1.5}{2013/06/21}{Check for XeTeX/LuaTeX} -% \begin{macrocode} -\ifdefined\if@bbl@greek@unicode - \PackageError{babel}{if@bbl@greek@unicode already defined.\MessageBreak - Please contact author of greek.ldf} - \relax -\fi -\newif\if@bbl@greek@unicode -\ifdefined\luatexversion \@bbl@greek@unicodetrue \else -\ifdefined\XeTeXrevision \@bbl@greek@unicodetrue \fi\fi -% \end{macrocode} -% -% Typesetting Greek texts requires a font containing Greek letters. -% With the modern XeTeX or LuaTeX engines, the user should ensure that -% the choosen font contains the required glyphs. Examples for suitable -% fonts are the ``Deja Vu'' or the ``Linux Libertine'' OpenType fonts. -% -% For 8-bit LaTeX, this package uses fonts with the LGR font encoding -% (see the `greek-fontenc' package http://www.ctan.org/pkg/greek-fontenc). -% The |cb| fonts created by Claudio Beccari% -% \footnote{Apostolos Syropoulos wishes to thank him for his -% patience, collaboration, comments and suggestions.} -% are a complete set of LGR encoded Greek text fonts matching -% Computer Modern. -% \changes{greek-1.2a}{1997/10/31}{filename \file{lgrenc.def} now -% lowercase} -% \changes{greek-1.4}{2013/05/17}{\file{lgrenc.def} moved to the -% separate package `greek-fontenc'} -% \changes{greek-1.5}{2013/06/21}{LGR setup skipped with XeTeX/LuaTeX} -% \changes{greek-1.7}{2013/09/09}{Do not load euenc.def with XeTeX/LuaTeX -% (too complicated to get it right).} -% \begin{macrocode} -\if@bbl@greek@unicode -% \end{macrocode} - % No font encoding switch required with Unicode fonts. - % Define dummy commands for |\textgreek| and |\greektext| (cf. below): -% \begin{macrocode} - \let\greektext\relax - \let\textgreek\@firstofone -\else - \@ifundefined{ver@lgrenc.def}{ - \InputIfFileExists{lgrenc.def}{}{% - \errhelp{I can't find the lgrenc.def file for the Greek fonts}% - \errmessage{Since I do not know the LGR font encoding^^J - I can't typeset Greek with 8-bit TeX.^^J - Please install the "greek-fontenc" package or use XeTeX/LuaTeX.}% - \@@end - } - }{} -% \end{macrocode} -% -% 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. -% \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{\&}} -% \changes{greek-1.4}{2013/05/17}{moved here from \file{lgrenc.def} because -% the definitions require the \texttt{\textbackslash latintext} macro -% defined by Babel.} -% \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} -% \begin{macrocode} - \ProvideTextCommand{\textcopyright}{LGR}{\textlatin{\textcopyright}} - \ProvideTextCommand{\textregistered}{LGR}{\textlatin{\textregistered}} - \ProvideTextCommand{\texttrademark}{LGR}{\textlatin{\texttrademark}} - \let\ltx@amp\& - \DeclareTextCommandDefault{\&}{\ltx@amp} - \DeclareTextCommand{\&}{LGR}{\textlatin{\ltx@amp}} - \ProvideTextCommand{\SS}{LGR}{\textlatin{\SS}} -% \end{macrocode} -% -% \begin{macro}{\greek@roman} -% \begin{macro}{\greek@Roman} -% \changes{greek-1.2e}{1999/04/16}{Moved redefinition of \cs{@roman} -% back to the language specific file} -% \changes{greek-1.3d}{1999/08/27}{\cs{@roman} and \cs{@Roman} need to -% be added to \cs{extraspolutonikogreek}} -% \changes{greek-1.3e}{1999/09/24}{\cs{@roman} and \cs{@Roman} need -% \emph{not} be in \cs{extraspolutonikogreek} when they are already -% in \cs{extrasgreek}} -% \changes{greek-1.5}{2013/06/15}{\cs{@roman} and \cs{@Roman} as TextCommands -% (BUG: this extended the expansion problem to all languages!)} -% \changes{greek-1.6}{2013/07/19}{apply a patch by Enrico Gregorio. -% Thanks to Claudio Beccari for testing and reporting.} -% -% To prevent roman numerals being typeset in greek letters we need -% to adopt the internal \LaTeX\ commands |\@roman| and -% |\@Roman|. \emph{Up to version 1.5, the definition caused errors where -% |\@roman| ends up in a situation where the argument needs to be expanded -% (e.g. Roman page numbers in the ToC).} -% \begin{macrocode} - \def\@roman#1{\expandafter\textlatin\expandafter{\romannumeral#1}} - \def\@Roman#1{\expandafter\textlatin\expandafter{% - \expandafter\@slowromancap\romannumeral#1@}} -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% Later in this file, the charcter No 159 is defined as uppercase of -% |<|, |>|, |~|, |`|, |'|, |"| and \verb=|=. -% Add composite commands, so that the dialytika is kept or put on the -% following character of a diphthong with |\MakeUppercase| -% (see lgrdef.enc from the the greek-fontenc package for details). -% As a the TextCompositeCommand mechanism compares the -% unexpanded literal strings, we need the literal character in the -% declarations, too. -% \changes{greek-1.4}{2013/05/17}{Add TextCompositeCommands for -% ``uppercase diacritics''.} -% \changes{greek-1.5}{2013/05/27}{Bugfix: @hiatus->LGR@hiatus} -% \changes{greek-1.5a}{2013/07/02}{Replaced non-printable literal character -% with ^^-notation (thanks to Heiko Oberdiek for the hint).} -% \begin{macrocode} - \DeclareTextCompositeCommand{\"}{LGR}{^^9F}{\accdialytika} - \DeclareTextCompositeCommand{\'}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\`}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\<}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\>}{LGR}{^^9F}{\LGR@hiatus} -% \end{macrocode} -% -% Now we define two commands that offer the possibility to switch -% to the LGR font encoding. Babel defines corresponding macros -% to switch to a Latin font encoding. -% -% \begin{macro}{\greektext} -% The command |\greektext| will switch to -% a Greek font encoding. This command is a \emph{declaration}, -% for shorter pieces of text the command |\textgreek| should be -% used. -% \begin{macrocode} - \DeclareRobustCommand{\greektext}{% - \fontencoding{LGR}\selectfont - \def\encodingdefault{LGR}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\textgreek} -% This command takes an argument which is then typeset using the -% requested font encoding. In order to avoid many encoding switches -% it operates in a local scope. -% \changes{greek-1.0b}{1996/09/23}{Added a level of braces to keep -% encoding change local} -% \changes{greek-1.3k}{2003/03/19}{Added \cs{leavevmode} as was done -% with \cs{latintext}} -% \begin{macrocode} - \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\textol} -% A last aspect of the set of fonts provided with this version of -% support for typesetting Greek texts is that it contains an -% outline family. In order to make it available we define the command -% |\textol|. -% \begin{macrocode} - \def\outlfamily{\usefont{LGR}{cmro}{m}{n}} - \DeclareTextFontCommand{\textol}{\outlfamily} -\fi % End of LGR fixes not required with XeTeX/LuaTeX. -% \end{macrocode} -% \end{macro} -% -% The next step consists in defining commands to switch to (and -% from) the Greek language. -% -% \begin{macro}{\greekhyphenmins} -% This macro is used to store the correct values of the hyphenation -% parameters |\lefthyphenmin| and |\righthyphenmin|. -% \changes{greek-1.3h}{2000/09/22}{Now use \cs{providehyphenmins} to -% provide a default value} -% \begin{macrocode} -% Yannis Haralambous has suggested this value -\providehyphenmins{\CurrentOption}{\@ne\@ne} -% \end{macrocode} -% \end{macro} -% -% \changes{greek-1.1e}{1997/10/12}{Added caption name for proof} -% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe ep'ishc} -% instead of \texttt{bl'pe ep'ishc}} -% -% \begin{macro}{\captionsgreek} -% The macro |\captionsgreek| defines all strings used in the -% four standard document classes provided with \LaTeX. -% \changes{greek-1.3h}{2000/09/20}{Added \cs{glossaryname}} -% \changes{greek-1.3i}{2000/10/02}{The final sigma in all names appears -% as `s' instead of `c'.} -% \begin{macrocode} -\addto\captionsgreek{% - \def\prefacename{\textPi\textrho\acctonos\textomicron\textlambda\textomicron - \textgamma\textomicron\textfinalsigma}% - \def\refname{\textAlpha\textnu\textalpha - \textphi\textomicron\textrho\acctonos\textepsilon\textfinalsigma}% - \def\abstractname{\textPi\textepsilon\textrho\acctonos\textiota - \textlambda\texteta\textpsi\texteta}% - \def\bibname{\textBeta\textiota\textbeta\textlambda\textiota\textomicron - \textgamma\textrho\textalpha\textphi\acctonos\textiota\textalpha}% - \def\chaptername{\textKappa\textepsilon\textphi\acctonos\textalpha - \textlambda\textalpha\textiota\textomicron}% - \def\appendixname{\textPi\textalpha\textrho\acctonos\textalpha\textrho - \texttau\texteta\textmu\textalpha}% - \def\contentsname{\textPi\textepsilon\textrho\textiota - \textepsilon\textchi\acctonos\textomicron\textmu\textepsilon - \textnu\textalpha}% - \def\listfigurename{\textKappa\textalpha\texttau\acctonos\textalpha - \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} - \textSigma\textchi\texteta\textmu\acctonos\textalpha\texttau - \textomega\textnu}% - \def\listtablename{\textKappa\textalpha\texttau\acctonos\textalpha - \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} - \textPi\textiota\textnu\acctonos\textalpha\textkappa\textomega\textnu}% - \def\indexname{\textEpsilon\textupsilon\textrho\textepsilon - \texttau\acctonos\texteta\textrho\textiota\textomicron}% - \def\figurename{\textSigma\textchi\acctonos\texteta\textmu\textalpha}% - \def\tablename{\textPi\acctonos\textiota\textnu\textalpha - \textkappa\textalpha\textfinalsigma}% - \def\partname{\textMu\acctonos\textepsilon\textrho\textomicron - \textfinalsigma}% - \def\enclname{\textSigma\textupsilon\textnu\texteta\textmu - \textmu\acctonos\textepsilon\textnu\textalpha}% - \def\ccname{\textKappa\textomicron\textiota\textnu\textomicron - \textpi\textomicron\acctonos\textiota\texteta\textsigma\texteta}% - \def\headtoname{\textPi\textrho\textomicron\textfinalsigma}% - \def\pagename{\textSigma\textepsilon\textlambda\acctonos\textiota - \textdelta\textalpha}% - \def\seename{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon}% - \def\alsoname{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon{} - \textepsilon\textpi\acctonos\textiota\textsigma\texteta\textfinalsigma}% - \def\proofname{\textAlpha\textpi\acctonos\textomicron - \textdelta\textepsilon\textiota\textxi\texteta}% - \def\glossaryname{\textGamma\textlambda\textomega\textsigma - \textsigma\acctonos\textalpha\textrho\textiota}% - } -% \end{macrocode} -% \end{macro} -% \changes{greek-1.2}{1997/10/28}{Added caption names for -% \cs{polutonikogreek}} -% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe >ep'ishc} -% instead of \texttt{bl'pe >ep'ishc}} -% -% \begin{macro}{\captionspolutonikogreek} -% For texts written in the $\pi o\lambda\upsilon\tau -% o\nu\kappa\acute{o}$ (polytonic greek) the translations are -% the same as above, but some words are spelled differently. For -% now we just add extra definitions to |\captionsgreek| in order to -% override the earlier definitions. -% \begin{macrocode} -\let\captionspolutonikogreek\captionsgreek -\addto\captionspolutonikogreek{% - \def\refname{\>\textAlpha\textnu\textalpha - \textphi\textomicron\textrho\accvaria\textepsilon\textfinalsigma}% - \def\indexname{\textEpsilon\<\textupsilon\textrho\textepsilon - \texttau\acctonos\texteta\textrho\textiota\textomicron}% - \def\figurename{\textSigma\textchi\accperispomeni\texteta\textmu\textalpha}% - \def\headtoname{\textPi\textrho\accvaria\textomicron\textfinalsigma}% - \def\alsoname{\textbeta\textlambda\acctonos\textepsilon\textpi\textepsilon{} - \>\textepsilon\textpi\acctonos\textiota\textsigma\texteta\textfinalsigma}% - \def\proofname{\>\textAlpha\textpi\acctonos\textomicron - \textdelta\textepsilon\textiota\textxi\texteta}% -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\gr@month} -% \changes{greek-1.1e}{1997/10/12}{Macro added} -% \begin{macro}{\dategreek} -% The macro |\dategreek| redefines the command |\today| to -% produce greek dates. The name of the month is now produced -% by the macro |\gr@month| since it is needed in the definition -% of the macro |\Grtoday|. -% \changes{greek-1.1a}{1997/03/03}{Fixed typo, \texttt{Oktwbr'iou} -% instead of \texttt{Oktobr'iou}} -% \changes{greek-1.1d}{1997/10/12}{Macro \cs{gr@month} now produces -% the name of the month} -% \changes{greek-1.2a}{1997/10/31}{Use \cs{edef} to define \cs{today}} -% \changes{greek-1.2b}{1998/03/28}{use \cs{def} instead of \cs{edef}} -% \begin{macrocode} -\def\gr@month{% - \ifcase\month\or - \textIota\textalpha\textnu\textomicron\textupsilon\textalpha - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon - \textalpha\textrho\acctonos\textiota\textomicron\textupsilon \or - \textMu\textalpha\textrho\texttau\acctonos\textiota\textomicron\textupsilon - \or \textAlpha\textpi\textrho\textiota\textlambda\acctonos\textiota - \textomicron\textupsilon \or - \textMu\textalpha\'"\textiota\textomicron\textupsilon \or - \textIota\textomicron\textupsilon\textnu\acctonos\textiota - \textomicron\textupsilon \or - \textIota\textomicron\textupsilon\textlambda\acctonos\textiota - \textomicron\textupsilon \or - \textAlpha\textupsilon\textgamma\textomicron\acctonos\textupsilon - \textsigma\texttau\textomicron\textupsilon \or - \textSigma\textepsilon\textpi\texttau\textepsilon\textmu - \textbeta\textrho\acctonos\textiota\textomicron\textupsilon \or - \textOmicron\textkappa\texttau\textomega\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textNu\textomicron\textepsilon\textmu\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textDelta\textepsilon\textkappa\textepsilon\textmu\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon - \fi -} -\def\dategreek{% - \def\today{\number\day \space \gr@month\space \number\year}} -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\gr@c@greek} -% \changes{greek-1.2}{1997/10/28}{Added macro \cs{gr@cl@month}} -% \changes{greek-1.2}{1997/10/28}{Added macro -% \cs{datepolutonikogreek}} -% \changes{greek-1.3a}{1997/10/28}{removed macro -% \cs{datepolutonikogreek}} -% \begin{macrocode} -\def\gr@c@month{% - \ifcase\month\or - \>\textIota\textalpha\textnu\textomicron\textupsilon\textalpha - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon - \textalpha\textrho\acctonos\textiota\textomicron\textupsilon \or - \textMu\textalpha\textrho\texttau\acctonos\textiota\textomicron - \textupsilon \or - \>\textAlpha\textpi\textrho\textiota\textlambda - \acctonos\textiota\textomicron\textupsilon \or - \textMu\textalpha\"'\textiota\textomicron\textupsilon \or - \>\textIota\textomicron\textupsilon\textnu - \acctonos\textiota\textomicron\textupsilon \or - \>\textIota\textomicron\textupsilon\textlambda - \acctonos\textiota\textomicron\textupsilon \or - \textAlpha\>\textupsilon\textgamma\textomicron\acctonos\textupsilon - \textsigma\texttau\textomicron\textupsilon \or - \textSigma\textepsilon\textpi\texttau\textepsilon\textmu\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon \or - \>\textOmicron\textkappa\texttau\textomega\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textNu\textomicron\textepsilon\textmu\textbeta - \textrho\acctonos\textiota\textomicron\textupsilon \or - \textDelta\textepsilon\textkappa\textepsilon\textmu - \textbeta\textrho\acctonos\textiota\textomicron\textupsilon - \fi -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\Grtoday} -% \changes{greek-1.1}{1996/10/28}{Added macro \cs{Grtoday}} -% The macro |\Grtoday| produces the current date, only that the -% month and the day are shown as greek numerals instead of arabic -% as it is usually the case. -% \begin{macrocode} -\def\Grtoday{% - \expandafter\Greeknumeral\expandafter{\the\day}\space - \gr@c@month \space - \expandafter\Greeknumeral\expandafter{\the\year}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\extrasgreek} -% \begin{macro}{\noextrasgreek} -% The macro |\extrasgreek| will perform all the extra definitions -% needed for the Greek language. The macro |\noextrasgreek| is used -% to cancel the actions of |\extrasgreek|. For the moment these -% macros switch the fontencoding (with 8-bit TeX) and the definition of -% the internal macros |\@alph| and |\@Alph| because in Greek we do use -% the Greek numerals. -% \changes{greek-1.5}{2013/06/21}{LGR not used with XeTeX/LuaTeX.} -% \begin{macrocode} -\if@bbl@greek@unicode - \relax -\else - \addto\extrasgreek{\greektext} - \addto\noextrasgreek{\latintext} -\fi -% \end{macrocode} -% -% \begin{macro}{\gr@ill@value} -% When the argument of |\greeknumeral| has a value outside of the -% acceptable bounds ($0 < x < 999999$) a warning will be issued -% (and nothing will be printed). -% \begin{macrocode} -\def\gr@ill@value#1{% - \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\anw@true} -% \begin{macro}{\anw@false} -% \begin{macro}{\anw@print} -% When a a large number with three \emph{trailing} zero's is to be -% printed those zeros \emph{and} the numeric mark need to be -% discarded. As each `digit' is processed by a separate macro -% \emph{and} because the processing needs to be expandable we need -% some helper macros that help remember to \emph{not} print the -% numeric mark (|\anwtonos|). -% -% The command |\anw@false| switches the printing of the numeric -% mark off by making |\anw@print| expand to nothing. The command -% |\anw@true| (re)enables the printing of the numeric marc. These -% macro's need to be robust in order to prevent improper expansion -% during writing to files or during |\uppercase|. -% \begin{macrocode} -\DeclareRobustCommand\anw@false{% - \DeclareRobustCommand\anw@print{}} -\DeclareRobustCommand\anw@true{% - \DeclareRobustCommand\anw@print{\textdexiakeraia}} % \anwtonos -\anw@true -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\greeknumeral} -% The command |\greeknumeral| needs to be \emph{fully} expandable -% in order to get the right information in auxiliary -% files. Therefore we use a big |\if|-construction to check the -% value of the argument and start the parsing at the right level. -% \begin{macrocode} -\def\greeknumeral#1{% -% \end{macrocode} -% If the value is negative or zero nothing is printed and a warning -% is issued. -% \changes{greek-1.3b}{1999/04/03}{Added \cs{expandafter} and -% \cs{number} (PR3000) in order to make a counter an acceptable -% argument} -% \begin{macrocode} - \ifnum#1<\@ne\space\gr@ill@value{#1}% - \else - \ifnum#1<10\expandafter\gr@num@i\number#1% - \else - \ifnum#1<100\expandafter\gr@num@ii\number#1% - \else -% \end{macrocode} -% We use the available shorthands for 1.000 (|\@m|) and 10.000 -% (|\@M|) to save a few tokens. -% \begin{macrocode} - \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 -% \end{macrocode} -% If the value is too large, nothing is printed and a warning -% is issued. -% \begin{macrocode} - \space\gr@ill@value{#1}% - \fi - \fi - \fi - \fi - \fi - \fi - \fi -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\Greeknumeral} -% The command |\Greeknumeral| prints uppercase greek numerals. -% The parsing is performed by the macro |\greeknumeral|. -% \begin{macrocode} -\def\Greeknumeral#1{% - \expandafter\MakeUppercase\expandafter{\greeknumeral{#1}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\greek@alph} -% \begin{macro}{\greek@Alph} -% In the previous release of this language definition the -% commands |\greek@aplh| and |\greek@Alph| were kept just for -% reasons of compatibility. Here again they become meaningful macros. -% They are definited in a way that even page numbering with greek -% numerals is possible. Since the macros |\@alph| and |\@Alph| will -% lose their original meaning while the Greek option is active, we -% must save their original value. -% macros |\@alph| -% \begin{macrocode} -\let\latin@alph\@alph -\let\latin@Alph\@Alph -% \end{macrocode} -% Then we define the Greek versions; the additional |\expandafter|s -% are needed in order to make sure the table of contents will be -% correct, e.g., when we have appendixes. -% \begin{macrocode} -\def\greek@alph#1{\expandafter\greeknumeral\expandafter{\the#1}} -\def\greek@Alph#1{\expandafter\Greeknumeral\expandafter{\the#1}} -% \end{macrocode} -% -% Now we can set up the switching. -% \changes{greek-1.1a}{1997/03/03}{removed two superfluous @'s which -% made \cs{@alph} undefined} -% \begin{macrocode} -\addto\extrasgreek{% - \let\@alph\greek@alph - \let\@Alph\greek@Alph} -\addto\noextrasgreek{% - \let\@alph\latin@alph - \let\@Alph\latin@Alph} -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% What is left now is the definition of a set of macros to produce -% the various digits. -% \begin{macro}{\gr@num@i} -% \begin{macro}{\gr@num@ii} -% \begin{macro}{\gr@num@iii} -% \changes{greek-1.2b}{1997/11/13}{No longer use \cs{\let} in the -% expansion of the \cs{gr@num@x} macros as they ned to be -% expandable} -% As there is no representation for $0$ in this system the zeros -% are simply discarded. When we have a large number with three -% \emph{trailing} zero's also the numeric mark is discarded. -% Therefore these macros need to pass the information to each other -% about the (non-)translation of a zero. -% \begin{macrocode} -\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} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\gr@num@iv} -% \begin{macro}{\gr@num@v} -% \begin{macro}{\gr@num@vi} -% The first three `digits' always have the numeric mark, except -% when one is discarded because it's value is zero. -% \begin{macrocode} -\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} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% Handling of Diacritics differs between Unicode and LGR encoding. -% \changes{greek-1.5}{2013/06/21}{Support XeTeX/LuaTeX.} - -% Greek letters drop diacritics (eccept dialytika and sub-iota) in -% UPPERCASE. This is not cared for by the Unicode standard. -% The file \file{xgreek-fixes.def} from \pkg{polyglossia} -% contains the required |\lccode| and |\uccode| corrections from the -% \pkg{xgreek} package by Apostolos Syropoulos. -% \begin{macrocode} -\if@bbl@greek@unicode - \InputIfFileExists{xgreek-fixes.def}{}{\PackageWarningNoLine{babel}{% - Can't find the file "xgreek-fixes.def".\MessageBreak - For correct up/downcasing of Greek text,\MessageBreak - install the "polyglossia" package}% - } -\else % 8-bit TeX -% \end{macrocode} -% The LGR encoded fonts that are used to typeset Greek with 8-bit TeX -% define ligatures for characters with diacritics. In order for this to -% work, some characters need to be considered as letters. These -% characters are |<|, |>|, |~|, |`|, |'|, |"| and -% \verb=|=. Therefore their |\lccode| is changed when Greek is in -% effect. In order to let |\uppercase| give correct results, the -% |\uccode| of these characters is set to a non-existing character -% to make them disappear. Of course not all characters are needed -% when typesetting ``modern'' $\mu o\nu o\tau o\nu -% \iota\kappa\acute{o}$. In that case we only need the |'| and |"| -% symbols which are treated in the proper way. -% -% \begin{macro}{\greek@tilde} -% \changes{greek-1.0c}{1997/02/19}{Added command} -% The Greek script uses a number of characters with more -% than one accent. In LGR encoded fonts combined diacritics can be -% obtained using Knuth's ligature mechanism (see usage.pdf). -% Characters we need to have ligatures with are the tilde, the -% acute and grave accent characters, the rough and smooth breathings, -% the subscript, and the double quote character. -% In text input the |~| is normally used to produce an -% unbreakable space. -% \changes{greek-1.3k}{2003/04/10}{Make sure the character `!' is not -% active during the definition of \cs{greek@tilde}} -% \changes{greek-1.4}{2013/05/17}{do not re-define the tilde accent macro: -% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.} -% \begin{macrocode} - \begingroup - \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} - \catcode`\~=12 - \lccode`\!=`\~ - \lowercase{\def\x{\endgroup - \def\greek@tilde{!}}\x} -% \end{macrocode} -% \end{macro} -% In order to get correct hyphenation we need to set the lower case -% code of a number of characters. The `v' character has a special -% usage for the |cb| fonts: in fact this ligature mechanism detects -% the end of a word and assures that a final sigma is typeset with -% the proper sign wich is different from that of an initial or -% medial sigma; the `v 'after an \textit{isolated} sigma fools -% the ligature mechanism in order to typeset $\sigma$ in place of -% $\varsigma$. Because of this we make sure its lowercase code is -% not changed. For ``modern'' greek we have to deal only with |'| -% and |"| and so things are easy. -% \changes{greek-1.1c}{1997/04/30}{fixed two typos} -% \changes{greek-1.1e}{1997/10/12}{Added lowercase code for v} -% \changes{greek-1.2}{1997/10/28}{Definitions for ``modern'' Greek are -% now the definitions of ``Polutoniko'' Greek} -% \changes{greek-1.2}{1997/10/28}{Added lowercase codes for ``modern'' -% greek} -% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and -% \cs{extraspolutonikogreek} should be complementary} -% \begin{macrocode} - \addto\extrasgreek{% - \babel@savevariable{\lccode`v}\lccode`v=`v% - \babel@savevariable{\lccode`\'}\lccode`\'=`\'% - \babel@savevariable{\lccode`\"}\lccode`\"=`\"} - \addto\extraspolutonikogreek{% - \babel@savevariable{\lccode`\<}\lccode`\<=`\<% - \babel@savevariable{\lccode`\>}\lccode`\>=`\>% - \babel@savevariable{\lccode`\~}\lccode`\~=`\~% - \babel@savevariable{\lccode`\|}\lccode`\|=`\|% - \babel@savevariable{\lccode`\`}\lccode`\`=`\`} -% \end{macrocode} -% And in order to get rid of all accents and breathings when a -% string is |\uppercase|d we also change a number of uppercase -% codes. -% \changes{greek-1.1b}{1997/03/06}{Added setting of \cs{uccode}s -% (after \file{kdgreek.sty})} -% \changes{greek-1.1e}{1997/10/12}{Added uppercase code for special -% letter ``v''. Uppercase code for accents is now \texttt{9f}, -% instead of \texttt{ff}} -% \changes{greek-1.2}{1997/10/28}{Added uppercase codes for ``modern'' -% Greek. The old codes are now for ``Polutoniko'' Greek} -% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and -% \cs{extraspolutonikogreek} should be complementary} -% {\catcode`|=12\relax\gdef\indexbar{\cs{|}}} -% \changes{greek-1.3g}{1999/11/17}{uc code of \indexbar{} is now just -% \indexbar{} to reflect recent changes in the cb fonts} -% \changes{greek-1.3i}{2000/10/02}{uc code of `v' is switched to V -% so that mixed text appears correctly in headers.} -% \changes{greek-1.3j}{2001/02/03}{Because other languages might -% make the caret active, we can't use the double caret notation -% here} -% \begin{macrocode} - \addto\extrasgreek{% - \babel@savevariable{\uccode`\"}\uccode`\"=`\"% - \babel@savevariable{\uccode`\'}\uccode`\'=159} %% 159 == ^^9f - \addto\extraspolutonikogreek{% - \babel@savevariable{\uccode`\~}\uccode`\~=159% - \babel@savevariable{\uccode`\>}\uccode`\>=159% - \babel@savevariable{\uccode`\<}\uccode`\<=159% - \babel@savevariable{\uccode`\|}\uccode`\|=`\|% - \babel@savevariable{\uccode`\`}\uccode`\`=159} -% \end{macrocode} -% For this to work we make the character |^^9f| a shorthand that -% expands to nothing. In order for this to work we need to make a -% character look like |^^9f| in \TeX's eyes. The trick is to have -% another character and assign it a different lowercase code. The -% execute the macros needed in a |\lowercase| environment. Usually -% the tile |~| character is used for such purposes. Before we do -% this we save it's original lowercase code to restore it once -% we're done. -% \changes{greek-1.1b}{1997/03/06}{Added shorthand for \cs{char255}} -% \changes{greek-1.1e}{1997/10/12}{Shorthand is changed. Active -% character is now \cs{char159}} -% \changes{greek-1.2a}{1997/10/31}{Need shorthand to exist for -% ``monotoniko'' Greek, not ``polutoniko'' Greek} -% \changes{greek-1.3j}{2001/02/03}{Use the tilde as an alias for -% character 159} -% \begin{macrocode} - \@tempcnta=\lccode`\~ - \lccode`\~=159 - \lowercase{% - \initiate@active@char{~}% - \declare@shorthand{greek}{~}{}} - \lccode`\~=\@tempcnta -% \end{macrocode} -% We can also make the tilde character itself expand to a tilde with -% category code 12 to make the typing of texts easier. -% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with -% \cs{catcode 12}.} -% \changes{greek-1.5a}{2013/06/27}{provide ``extraspolutonikogreek'' also -% for Xe/LuaTeX.} -% \begin{macrocode} - \addto\extraspolutonikogreek{\languageshorthands{greek}}% - \declare@shorthand{greek}{~}{\greek@tilde} -\fi % End of LGR-specific code not required with XeTeX/LuaTeX. -\addto\extraspolutonikogreek{} % set up \extraspolutonikogreek for Xe/LuaTeX -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \changes{greek-1.1c}{1997/03/10}{Added a couple of symbols, needed -% for \cs{greeknumeral}} -% \changes{greek-1.1e}{1997/10/12}{Most symbols are removed and are -% now defined in package grsymb} -% \changes{greek-1.2c}{1998/06/26}{Package grsymb has been eliminated -% because the CB fonts v2.0 do not inlcude certain symbols and so -% the remaining symbol definitions have been moved here} -% We now define a few symbols which are used in the typesetting of -% greek numerals, as well as some other symbols which are usefull, -% such as the $\epsilon\upsilon\rho\omega$ symbol, etc. -% \changes{greek-1.5}{2013/06/11}{change symbol macros to aliases} -% \begin{macrocode} -\providecommand*{\anwtonos}{\textdexiakeraia} -\providecommand*{\katwtonos}{\textaristerikeraia} -\providecommand*{\qoppa}{\textqoppa} -\providecommand*{\stigma}{\textstigma} -\providecommand*{\sampi}{\textsampi} -\providecommand*{\Digamma}{\textDigamma} -\providecommand*{\ddigamma}{\textdigamma} -\providecommand*{\vardigamma}{\textvardigamma} -\providecommand*{\euro}{\texteuro} -\providecommand*{\permill}{\textperthousand} -% \end{macrocode} -% -% Since the |~| cannot be used to produce an unbreakable white -% space we must redefine at least the commands |\fnum@figure| and -% |\fnum@table| so they do not produce a |~| instead of white -% space. -% \changes{greek-1.3l}{2004/02/19}{Commented these lines out as this -% change has made it into \LaTeX{} itself.} -% \begin{macrocode} -%\def\fnum@figure{\figurename\nobreakspace\thefigure} -%\def\fnum@table{\tablename\nobreakspace\thetable} -% \end{macrocode} -% -% The macro |\ldf@finish| takes care of looking for a -% configuration file, setting the main language to be switched on -% at |\begin{document}| and resetting the category code of -% \texttt{@} to its original value. -% \changes{greek-1.0b}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} -% \begin{macrocode} -\ldf@finish{\CurrentOption} -% -% \end{macrocode} -% -% \Finale -%\endinput -%% \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 -%% Lower-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 -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -%% diff --git a/Master/texmf-dist/source/generic/babel-greek/greek.ins b/Master/texmf-dist/source/generic/babel-greek/greek.ins deleted file mode 100644 index 8ea536d1ffd..00000000000 --- a/Master/texmf-dist/source/generic/babel-greek/greek.ins +++ /dev/null @@ -1,106 +0,0 @@ -%% -%% This file will generate fast loadable files and documentation -%% driver files from the doc files in this package when run through -%% LaTeX or TeX. -%% -%% Copyright 1989-2008 Johannes L. Braams and any individual authors -%% listed elsewhere in this file. All rights reserved. -%% -%% This file is part of the babel-greek package. -%% --------------------------------------------- -%% -%% Babel-greek is a contributed package providing support for the Greek -%% language and script via the Babel system (http://www.ctan.org/pkg/babel) -%% -%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. -%% -%% This work has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Günter Milde . -%% -%% The list of derived (unpacked) files belonging to the package -%% and covered by LPPL is defined by the unpacking script (greek.ins) -%% which is part of the distribution. -%% -%% --------------- start of docstrip commands ------------------ -%% -\def\filedate{2013/09/10} -\def\batchfile{greek.ins} -\input docstrip.tex - -{\ifx\generate\undefined -\Msg{**********************************************} -\Msg{*} -\Msg{* This installation requires docstrip} -\Msg{* version 2.3c or later.} -\Msg{*} -\Msg{* An older version of docstrip has been input} -\Msg{*} -\Msg{**********************************************} -\errhelp{Move or rename old docstrip.tex.} -\errmessage{Old docstrip in input path} -\batchmode -\csname @@end\endcsname -\fi} - -\declarepreamble\mainpreamble -This is a generated file. - -Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams, Guenter Milde, -and the authors listed elsewhere in this file. All rights reserved. - -This file was generated from file(s) of the babel-greek package. ----------------------------------------------------------------- - -It may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.3 -of this license or (at your option) any later version. -The latest version of this license is in - http://www.latex-project.org/lppl.txt -and version 1.3 or later is part of all distributions of LaTeX -version 2003/12/01 or later. - -This work has the LPPL maintenance status "maintained". - -The Current Maintainer of this work is Günter Milde . - -Babel-greek is a contributed package providing support for the Greek -language and script via the Babel system (http://www.ctan.org/pkg/babel). - -The list of derived (unpacked) files belonging to this work -and covered by LPPL is defined by the unpacking script (greek.ins) -which is part of the package. -\endpreamble - - -\keepsilent - -\usedir{tex/generic/babel} - -\usepreamble\mainpreamble -\generate{\file{greek.ldf}{\from{greek.dtx}{code}} - \file{athnum.sty}{\from{athnum.dtx}{package}} - \file{grmath.sty}{\from{grmath.dtx}{package}} - \file{grsymb.sty}{\from{grsymb.dtx}{package}} - } - -\ifToplevel{ -\Msg{***********************************************************} -\Msg{*} -\Msg{* To finish the installation, move `greek.ldf and all files} -\Msg{* ending with `.sty' into a directory searched by TeX.} -\Msg{*} -\Msg{* To produce the documentation run the files ending with} -\Msg{* '.dtx' and `.fdd' through LaTeX.} -\Msg{*} -\Msg{* Happy TeXing} -\Msg{***********************************************************} -} - -\endinput diff --git a/Master/texmf-dist/tex/generic/babel-greek/athnum.sty b/Master/texmf-dist/tex/generic/babel-greek/athnum.sty index f1869476be3..420deb58cba 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/athnum.sty +++ b/Master/texmf-dist/tex/generic/babel-greek/athnum.sty @@ -29,7 +29,7 @@ %% language and script via the Babel system (http://www.ctan.org/pkg/babel). %% %% The list of derived (unpacked) files belonging to this work -%% and covered by LPPL is defined by the unpacking script (greek.ins) +%% and covered by LPPL is defined by the unpacking script (babel-greek.ins) %% which is part of the package. %% \CheckSum{125} %% This is file `athnum.dtx' diff --git a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf index e399b8de2ef..cf87b52c22c 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf +++ b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% greek.dtx (with options: `code') +%% babel-greek.dtx (with options: `code') %% This is a generated file. %% %% Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams, Guenter Milde, @@ -29,19 +29,16 @@ %% language and script via the Babel system (http://www.ctan.org/pkg/babel). %% %% The list of derived (unpacked) files belonging to this work -%% and covered by LPPL is defined by the unpacking script (greek.ins) +%% and covered by LPPL is defined by the unpacking script (babel-greek.ins) %% which is part of the package. \ProvidesLanguage{greek} - [2013/10/01 v1.7b Greek support for the babel system] -%% File `greek.dtx' -%% Babel package for LaTeX version 2e -%% Copyright (C) 1989 -- 2005 -%% by Johannes Braams, TeXniek + [2013/12/03 v1.8a Greek support for the babel system] +%% File `babel-greek.dtx' %% Greek language Definition File -%% Copyright (C) 1997, 2005 -%% by Apostolos Syropoulos -%% Johannes Braams, TeXniek -%% Please report errors to: G\"unter Milde +%% Copyright © 1997, 2005 Apostolos Syropoulos, Johannes Braams +%% Copyright © 2013 Günter Milde +%% Please report errors to: Günter Milde + \LdfInit\CurrentOption{captions\CurrentOption} \gdef\CurrentOption{greek}% \ifx\l@greek\@undefined @@ -57,29 +54,39 @@ \let\extraspolutonikogreek\extrasgreek \let\noextraspolutonikogreek\noextrasgreek } -\ifdefined\if@bbl@greek@unicode - \PackageError{babel}{if@bbl@greek@unicode already defined.\MessageBreak - Please contact author of greek.ldf} - \relax -\fi -\newif\if@bbl@greek@unicode -\ifdefined\luatexversion \@bbl@greek@unicodetrue \else -\ifdefined\XeTeXrevision \@bbl@greek@unicodetrue \fi\fi -\if@bbl@greek@unicode - % No font encoding switch required with Unicode fonts. - % Define dummy commands for |\textgreek| and |\greektext| (cf. below): - \let\greektext\relax - \let\textgreek\@firstofone -\else - \@ifundefined{ver@lgrenc.def}{ - \InputIfFileExists{lgrenc.def}{}{% - \errhelp{I can't find the lgrenc.def file for the Greek fonts}% - \errmessage{Since I do not know the LGR font encoding^^J - I can't typeset Greek with 8-bit TeX.^^J - Please install the "greek-fontenc" package or use XeTeX/LuaTeX.}% - \@@end - } - }{} +\@ifl@aded{def}{eu1enc}{ + \providecommand*{\greekfontencoding}{EU1} + \providecommand*{\bbl@greek@fontencdef}{greek-euenc} + \renewcommand*{\LastDeclaredEncoding}{EU1} +}{} +\@ifl@aded{def}{eu2enc}{ + \providecommand*{\greekfontencoding}{EU2} + \providecommand*{\bbl@greek@fontencdef}{greek-euenc} + \renewcommand{\LastDeclaredEncoding}{EU2} +}{} +\providecommand*{\greekfontencoding}{LGR} +\providecommand*{\bbl@greek@fontencdef}{lgrenc} +\@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 + } +} +\ProvideTextCommandDefault{\greekscript}{% + \fontencoding{\greekfontencoding}\selectfont + \def\encodingdefault{\greekfontencoding}} +\ProvideTextCommandDefault{\ensuregreek}[1]{% + \leavevmode{\greekscript #1}} +\AtBeginDocument{ + \@ifl@aded{def}{eu1enc}{\xdef\latinencoding{EU1}}{}% XeTeX + \@ifl@aded{def}{eu2enc}{\xdef\latinencoding{EU2}}{}% LuaTeX +} +\@ifl@aded{def}{lgrenc}{% \ProvideTextCommand{\textcopyright}{LGR}{\textlatin{\textcopyright}} \ProvideTextCommand{\textregistered}{LGR}{\textlatin{\textregistered}} \ProvideTextCommand{\texttrademark}{LGR}{\textlatin{\texttrademark}} @@ -90,22 +97,17 @@ \def\@roman#1{\expandafter\textlatin\expandafter{\romannumeral#1}} \def\@Roman#1{\expandafter\textlatin\expandafter{% \expandafter\@slowromancap\romannumeral#1@}} - \DeclareTextCompositeCommand{\"}{LGR}{^^9F}{\accdialytika} - \DeclareTextCompositeCommand{\'}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\`}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\<}{LGR}{^^9F}{\LGR@hiatus} - \DeclareTextCompositeCommand{\>}{LGR}{^^9F}{\LGR@hiatus} \DeclareRobustCommand{\greektext}{% \fontencoding{LGR}\selectfont \def\encodingdefault{LGR}} \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}} \def\outlfamily{\usefont{LGR}{cmro}{m}{n}} \DeclareTextFontCommand{\textol}{\outlfamily} -\fi % End of LGR fixes not required with XeTeX/LuaTeX. +}{} % End of LGR fixes. \providehyphenmins{\CurrentOption}{\@ne\@ne} \addto\captionsgreek{% - \def\prefacename{\textPi\textrho\acctonos\textomicron\textlambda\textomicron - \textgamma\textomicron\textfinalsigma}% + \def\prefacename{\textPi\textrho\acctonos\textomicron\textlambda + \textomicron\textgamma\textomicron\textfinalsigma}% \def\refname{\textAlpha\textnu\textalpha \textphi\textomicron\textrho\acctonos\textepsilon\textfinalsigma}% \def\abstractname{\textPi\textepsilon\textrho\acctonos\textiota @@ -204,8 +206,8 @@ \acctonos\textiota\textomicron\textupsilon \or \>\textIota\textomicron\textupsilon\textlambda \acctonos\textiota\textomicron\textupsilon \or - \textAlpha\>\textupsilon\textgamma\textomicron\acctonos\textupsilon - \textsigma\texttau\textomicron\textupsilon \or + \textAlpha\>\textupsilon\textgamma\textomicron\acctonos + \textupsilon\textsigma\texttau\textomicron\textupsilon \or \textSigma\textepsilon\textpi\texttau\textepsilon\textmu\textbeta \textrho\acctonos\textiota\textomicron\textupsilon \or \>\textOmicron\textkappa\texttau\textomega\textbeta @@ -220,12 +222,8 @@ \expandafter\Greeknumeral\expandafter{\the\day}\space \gr@c@month \space \expandafter\Greeknumeral\expandafter{\the\year}} -\if@bbl@greek@unicode - \relax -\else - \addto\extrasgreek{\greektext} - \addto\noextrasgreek{\latintext} -\fi +\addto\extrasgreek{\greekscript} +\addto\noextrasgreek{\latintext} \def\gr@ill@value#1{% \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}} \DeclareRobustCommand\anw@false{% @@ -296,14 +294,15 @@ \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi \gr@num@v} - -\if@bbl@greek@unicode +\@ifl@aded{def}{greek-euenc}{ \InputIfFileExists{xgreek-fixes.def}{}{\PackageWarningNoLine{babel}{% - Can't find the file "xgreek-fixes.def".\MessageBreak - For correct up/downcasing of Greek text,\MessageBreak - install the "polyglossia" package}% - } -\else % 8-bit TeX + Can't find the file "xgreek-fixes.def".\MessageBreak + For correct up/down-casing of Greek text,\MessageBreak + install the "polyglossia" package}% + } + \addto\extraspolutonikogreek{} % prevent command missing error. +}{} +\@ifl@aded{def}{lgrenc}{% \begingroup \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} \catcode`\~=12 @@ -335,10 +334,14 @@ \initiate@active@char{~}% \declare@shorthand{greek}{~}{}} \lccode`\~=\@tempcnta + \DeclareTextCompositeCommand{\"}{LGR}{^^9F}{\accdialytika} + \DeclareTextCompositeCommand{\'}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\`}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\<}{LGR}{^^9F}{\LGR@hiatus} + \DeclareTextCompositeCommand{\>}{LGR}{^^9F}{\LGR@hiatus} \addto\extraspolutonikogreek{\languageshorthands{greek}}% \declare@shorthand{greek}{~}{\greek@tilde} -\fi % End of LGR-specific code not required with XeTeX/LuaTeX. -\addto\extraspolutonikogreek{} % set up \extraspolutonikogreek for Xe/LuaTeX +}{} % End of LGR-specific code. \providecommand*{\anwtonos}{\textdexiakeraia} \providecommand*{\katwtonos}{\textaristerikeraia} \providecommand*{\qoppa}{\textqoppa} diff --git a/Master/texmf-dist/tex/generic/babel-greek/grmath.sty b/Master/texmf-dist/tex/generic/babel-greek/grmath.sty index a30f81a1375..9a03a216ace 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/grmath.sty +++ b/Master/texmf-dist/tex/generic/babel-greek/grmath.sty @@ -29,7 +29,7 @@ %% language and script via the Babel system (http://www.ctan.org/pkg/babel). %% %% The list of derived (unpacked) files belonging to this work -%% and covered by LPPL is defined by the unpacking script (greek.ins) +%% and covered by LPPL is defined by the unpacking script (babel-greek.ins) %% which is part of the package. %% \CheckSum{126} %% This is file `grmath.sty' diff --git a/Master/texmf-dist/tex/generic/babel-greek/grsymb.sty b/Master/texmf-dist/tex/generic/babel-greek/grsymb.sty index 2cd1647a99c..7873c38613c 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/grsymb.sty +++ b/Master/texmf-dist/tex/generic/babel-greek/grsymb.sty @@ -29,7 +29,7 @@ %% language and script via the Babel system (http://www.ctan.org/pkg/babel). %% %% The list of derived (unpacked) files belonging to this work -%% and covered by LPPL is defined by the unpacking script (greek.ins) +%% and covered by LPPL is defined by the unpacking script (babel-greek.ins) %% which is part of the package. %% \CheckSum{55} %% This is file `grsymb.sty' -- cgit v1.2.3