diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-24 23:45:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-24 23:45:45 +0000 |
commit | d6f69adcdd2a4f41183336025041848a5dee6398 (patch) | |
tree | 89563d7c7df821eb03996563d1d352d89e96d160 /Master/texmf-dist/tex/generic/babel-greek | |
parent | 8e6beb966f4cb90d2deac853ee674032892fc7ab (diff) |
babel-greek (24jun13)
git-svn-id: svn://tug.org/texlive/trunk@30912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-greek')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-greek/greek.ldf | 340 |
1 files changed, 215 insertions, 125 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf index 4fa267b8be2..7ade8596776 100644 --- a/Master/texmf-dist/tex/generic/babel-greek/greek.ldf +++ b/Master/texmf-dist/tex/generic/babel-greek/greek.ldf @@ -32,7 +32,7 @@ %% and covered by LPPL is defined by the unpacking script (greek.ins) %% which is part of the package. \ProvidesLanguage{greek} - [2013/05/17 v1.4 Greek support from the babel system] + [2013/06/21 v1.5 Greek support for the babel system] %% File `greek.dtx' %% Babel package for LaTeX version 2e %% Copyright (C) 1989 -- 2005 @@ -57,82 +57,171 @@ \let\extraspolutonikogreek\extrasgreek \let\noextraspolutonikogreek\noextrasgreek } -\InputIfFileExists{lgrenc.def}{}{% - \errhelp{I can't find the lgrenc.def file for the Greek fonts}% - \errmessage{Since I do not know what the LGR encoding means^^J - I can't typeset Greek.^^J - I stop here, while you get a suitable lgrenc.def file}\@@end - } -\ProvideTextCommand{\textcopyright}{LGR}{% - \textcircled{\textlatin{c}}} -\ProvideTextCommand{\textregistered}{LGR}{% - \textcircled{\textlatin{\textsc r}}} -\ProvideTextCommand{\texttrademark}{LGR}{% - \textsuperscript{\textlatin{TM}}} -\ProvideTextCommand{\SS}{LGR}{% - \textlatin{SS}} -\DeclareTextCompositeCommand{\"}{LGR}{Ÿ}{\accdialytika} -\DeclareTextCompositeCommand{\'}{LGR}{Ÿ}{\@hiatus} -\DeclareTextCompositeCommand{\`}{LGR}{Ÿ}{\@hiatus} -\DeclareTextCompositeCommand{\<}{LGR}{Ÿ}{\@hiatus} -\DeclareTextCompositeCommand{\>}{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} +\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 + \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 + } + \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}} + \let\latin@roman\@roman + \DeclareTextCommandDefault{\@roman}[1]{\latin@roman{#1}} + \DeclareTextCommand{\@roman}{LGR}[1]{\textlatin{\latin@roman{#1}}} + \let\latin@Roman\@Roman + \DeclareTextCommandDefault{\@Roman}[1]{\latin@Roman{#1}} + \DeclareTextCommand{\@Roman}{LGR}[1]{\textlatin{\latin@Roman{#1}}} + \DeclareTextCompositeCommand{\"}{LGR}{Ÿ}{\accdialytika} + \DeclareTextCompositeCommand{\'}{LGR}{Ÿ}{\LGR@hiatus} + \DeclareTextCompositeCommand{\`}{LGR}{Ÿ}{\LGR@hiatus} + \DeclareTextCompositeCommand{\<}{LGR}{Ÿ}{\LGR@hiatus} + \DeclareTextCompositeCommand{\>}{LGR}{Ÿ}{\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. \providehyphenmins{\CurrentOption}{\@ne\@ne} \addto\captionsgreek{% - \def\prefacename{Pr'ologos}% - \def\refname{Anafor'es}% - \def\abstractname{Per'ilhyh}% - \def\bibname{Bibliograf'ia}% - \def\chaptername{Kef'alaio}% - \def\appendixname{Par'arthma}% - \def\contentsname{Perieq'omena}% - \def\listfigurename{Kat'alogos Sqhm'atwn}% - \def\listtablename{Kat'alogos Pin'akwn}% - \def\indexname{Euret'hrio}% - \def\figurename{Sq'hma}% - \def\tablename{P'inakas}% - \def\partname{M'eros}% - \def\enclname{Sunhmm'ena}% - \def\ccname{Koinopo'ihsh}% - \def\headtoname{Pros}% - \def\pagename{Sel'ida}% - \def\seename{bl'epe}% - \def\alsoname{bl'epe ep'ishs}% - \def\proofname{Ap'odeixh}% - \def\glossaryname{Glwss'ari}% + \def\prefacename{\textPi\textrho\'\textomicron\textlambda\textomicron% + \textgamma\textomicron\textfinalsigma}% + \def\refname{\textAlpha\textnu\textalpha% + \textphi\textomicron\textrho\'\textepsilon\textfinalsigma}% + \def\abstractname{\textPi\textepsilon\textrho\'\textiota% + \textlambda\texteta\textpsi\texteta}% + \def\bibname{\textBeta\textiota\textbeta\textlambda\textiota\textomicron% + \textgamma\textrho\textalpha\textphi\'\textiota\textalpha}% + \def\chaptername{\textKappa\textepsilon\textphi\'\textalpha% + \textlambda\textalpha\textiota\textomicron}% + \def\appendixname{\textPi\textalpha\textrho\'\textalpha\textrho% + \texttau\texteta\textmu\textalpha}% + \def\contentsname{\textPi\textepsilon\textrho\textiota% + \textepsilon\textchi\'\textomicron\textmu\textepsilon\textnu\textalpha}% + \def\listfigurename{\textKappa\textalpha\texttau\'\textalpha% + \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} + \textSigma\textchi\texteta\textmu\'\textalpha\texttau\textomega\textnu}% + \def\listtablename{\textKappa\textalpha\texttau\'\textalpha% + \textlambda\textomicron\textgamma\textomicron\textfinalsigma{} + \textPi\textiota\textnu\'\textalpha\textkappa\textomega\textnu}% + \def\indexname{\textEpsilon\textupsilon\textrho\textepsilon% + \texttau\'\texteta\textrho\textiota\textomicron}% + \def\figurename{\textSigma\textchi\'\texteta\textmu\textalpha}% + \def\tablename{\textPi\'\textiota\textnu\textalpha% + \textkappa\textalpha\textfinalsigma}% + \def\partname{\textMu\'\textepsilon\textrho\textomicron\textfinalsigma}% + \def\enclname{\textSigma\textupsilon\textnu\texteta\textmu% + \textmu\'\textepsilon\textnu\textalpha}% + \def\ccname{\textKappa\textomicron\textiota\textnu\textomicron% + \textpi\textomicron\'\textiota\texteta\textsigma\texteta}% + \def\headtoname{\textPi\textrho\textomicron\textfinalsigma}% + \def\pagename{\textSigma\textepsilon\textlambda\'\textiota% + \textdelta\textalpha}% + \def\seename{\textbeta\textlambda\'\textepsilon\textpi\textepsilon}% + \def\alsoname{\textbeta\textlambda\'\textepsilon\textpi\textepsilon{} + \textepsilon\textpi\'\textiota\textsigma\texteta\textfinalsigma}% + \def\proofname{\textAlpha\textpi\'\textomicron% + \textdelta\textepsilon\textiota\textxi\texteta}% + \def\glossaryname{\textGamma\textlambda\textomega\textsigma% + \textsigma\'\textalpha\textrho\textiota}% } \let\captionspolutonikogreek\captionsgreek \addto\captionspolutonikogreek{% - \def\refname{>Anafor`es}% - \def\indexname{E<uret'hrio}% - \def\figurename{Sq~hma}% - \def\headtoname{Pr`os}% - \def\alsoname{bl'epe >ep'ishs}% - \def\proofname{>Ap'odeixh}% + \def\refname{\>\textAlpha\textnu\textalpha% + \textphi\textomicron\textrho\`\textepsilon\textfinalsigma}% + \def\indexname{\textEpsilon\<\textupsilon\textrho\textepsilon% + \texttau\'\texteta\textrho\textiota\textomicron}% + \def\figurename{\textSigma\textchi\~\texteta\textmu\textalpha}% + \def\headtoname{\textPi\textrho\`\textomicron\textfinalsigma}% + \def\alsoname{\textbeta\textlambda\'\textepsilon\textpi\textepsilon{} + \>\textepsilon\textpi\'\textiota\textsigma\texteta\textfinalsigma}% + \def\proofname{\>\textAlpha\textpi\'\textomicron% + \textdelta\textepsilon\textiota\textxi\texteta}% } \def\gr@month{% \ifcase\month\or - Ianouar'iou\or Febrouar'iou\or Mart'iou\or April'iou\or - Ma'"iou\or Ioun'iou\or Ioul'iou\or Augo'ustou\or - Septembr'iou\or Oktwbr'iou\or Noembr'iou\or Dekembr'iou\fi} + \textIota\textalpha\textnu\textomicron\textupsilon\textalpha% + \textrho\'\textiota\textomicron\textupsilon\or + \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon% + \textalpha\textrho\'\textiota\textomicron\textupsilon\or + \textMu\textalpha\textrho\texttau\'\textiota\textomicron\textupsilon\or + \textAlpha\textpi\textrho\textiota\textlambda\'\textiota% + \textomicron\textupsilon\or + \textMu\textalpha\'\"\textiota\textomicron\textupsilon\or + \textIota\textomicron\textupsilon\textnu\'\textiota% + \textomicron\textupsilon\or + \textIota\textomicron\textupsilon\textlambda\'\textiota% + \textomicron\textupsilon\or + \textAlpha\textupsilon\textgamma\textomicron\'\textupsilon\textsigma% + \texttau\textomicron\textupsilon\or + \textSigma\textepsilon\textpi\texttau\textepsilon\textmu% + \textbeta\textrho\'\textiota\textomicron\textupsilon\or + \textOmicron\textkappa\texttau\textomega\textbeta% + \textrho\'\textiota\textomicron\textupsilon\or + \textNu\textomicron\textepsilon\textmu\textbeta% + \textrho\'\textiota\textomicron\textupsilon\or + \textDelta\textepsilon\textkappa\textepsilon\textmu\textbeta% + \textrho\'\textiota\textomicron\textupsilon% + \fi% +} \def\dategreek{% \def\today{\number\day \space \gr@month\space \number\year}} \def\gr@c@month{% - \ifcase\month\or >Ianouar'iou\or - Febrouar'iou\or Mart'iou\or >April'iou\or Ma"'iou\or - >Ioun'iou\or >Ioul'iou\or A>ugo'ustou\or Septembr'iou\or - >Oktwbr'iou\or Noembr'iou\or Dekembr'iou\fi} + \ifcase\month\or + \>\textIota\textalpha\textnu\textomicron\textupsilon\textalpha% + \textrho\'\textiota\textomicron\textupsilon\or + \textPhi\textepsilon\textbeta\textrho\textomicron\textupsilon% + \textalpha\textrho\'\textiota\textomicron\textupsilon\or + \textMu\textalpha\textrho\texttau\'\textiota\textomicron\textupsilon\or + \>\textAlpha\textpi\textrho\textiota\textlambda% + \'\textiota\textomicron\textupsilon\or + \textMu\textalpha\"\'\textiota\textomicron\textupsilon\or + \>\textIota\textomicron\textupsilon\textnu% + \'\textiota\textomicron\textupsilon\or + \>\textIota\textomicron\textupsilon\textlambda% + \'\textiota\textomicron\textupsilon\or + \textAlpha\>\textupsilon\textgamma\textomicron\'\textupsilon\textsigma% + \texttau\textomicron\textupsilon\or + \textSigma\textepsilon\textpi\texttau\textepsilon\textmu\textbeta% + \textrho\'\textiota\textomicron\textupsilon\or + \>\textOmicron\textkappa\texttau\textomega\textbeta% + \textrho\'\textiota\textomicron\textupsilon\or + \textNu\textomicron\textepsilon\textmu\textbeta% + \textrho\'\textiota\textomicron\textupsilon\or + \textDelta\textepsilon\textkappa\textepsilon\textmu% + \textbeta\textrho\'\textiota\textomicron\textupsilon% + \fi +} \def\Grtoday{% \expandafter\Greeknumeral\expandafter{\the\day}\space \gr@c@month \space \expandafter\Greeknumeral\expandafter{\the\year}} -\addto\extrasgreek{\greektext} -\addto\noextrasgreek{\latintext} +\if@bbl@greek@unicode + \relax +\else + \addto\extrasgreek{\greektext} + \addto\noextrasgreek{\latintext} +\fi \def\gr@ill@value#1{% \PackageWarning{babel}{Illegal value (#1) for greeknumeral}} \DeclareRobustCommand\anw@false{% @@ -176,84 +265,85 @@ \addto\noextrasgreek{% \let\@alph\latin@alph \let\@Alph\latin@Alph} -\let\latin@roman\@roman -\let\latin@Roman\@Roman -\def\greek@roman#1{\textlatin{\latin@roman{#1}}} -\def\greek@Roman#1{\textlatin{\latin@Roman{#1}}} -\addto\extrasgreek{% - \let\@roman\greek@roman - \let\@Roman\greek@Roman} -\addto\noextrasgreek{% - \let\@roman\latin@roman - \let\@Roman\latin@Roman} -\let\ltx@amp\& -\def\greek@amp{\textlatin{\ltx@amp}} -\addto\extrasgreek{\let\&\greek@amp} -\addto\noextrasgreek{\let\&\ltx@amp} \def\gr@num@i#1{% - \ifcase#1\or a\or b\or g\or d\or e\or \stigma\or z\or h\or j\fi + \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 i\or k\or l\or m\or n\or x\or o\or p\or \qoppa\fi + \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 r\or sv\or t\or u\or f\or q\or y\or w\or \sampi\fi + \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or + \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii} \def\gr@num@iv#1{% \ifnum#1=\z@\else\katwtonos\fi - \ifcase#1\or a\or b\or g\or d\or e\or \stigma\or z\or h\or j\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\katwtonos\fi - \ifcase#1\or i\or k\or l\or m\or n\or x\or o\or p\or \qoppa\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{% \katwtonos - \ifcase#1\or r\or sv\or t\or u\or f\or q\or y\or w\or \sampi\fi + \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or + \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi \gr@num@v} -\begingroup - \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} - \catcode`\~=12 - \lccode`\!=`\~ - \lowercase{\def\x{\endgroup - \def\greek@tilde{!}}\x} -\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`\`=`\`} -\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} -\@tempcnta=\lccode`\~ -\lccode`\~=159 -\lowercase{% - \initiate@active@char{~}% - \declare@shorthand{greek}{~}{}} -\lccode`\~=\@tempcnta -\addto\extraspolutonikogreek{\languageshorthands{greek}}% -\declare@shorthand{greek}{~}{\greek@tilde} -\DeclareTextCommand{\anwtonos}{LGR}{\char"FE\relax} -\DeclareTextCommand{\katwtonos}{LGR}{\char"FF\relax} -\DeclareTextCommand{\qoppa}{LGR}{\char"12\relax} -\DeclareTextCommand{\stigma}{LGR}{\char"06\relax} -\DeclareTextCommand{\sampi}{LGR}{\char"1B\relax} -\DeclareTextCommand{\Digamma}{LGR}{\char"C3\relax} -\DeclareTextCommand{\ddigamma}{LGR}{\char"93\relax} -\DeclareTextCommand{\vardigamma}{LGR}{\char"07\relax} -\DeclareTextCommand{\euro}{LGR}{\char"18\relax} -\DeclareTextCommand{\permill}{LGR}{\char"19\relax} + +\if@bbl@greek@unicode + \InputIfFileExists{xgreek-fixes.def}{}{% + \PackageWarning{babel}{Can't find the file "xgreek-fixes.def".\MessageBreak + For correct up/downcasing of Greek text, + install the "polyglossia" package.}% + } +\else % 8-bit TeX + \begingroup + \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} + \catcode`\~=12 + \lccode`\!=`\~ + \lowercase{\def\x{\endgroup + \def\greek@tilde{!}}\x} + \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`\`=`\`} + \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} + \@tempcnta=\lccode`\~ + \lccode`\~=159 + \lowercase{% + \initiate@active@char{~}% + \declare@shorthand{greek}{~}{}} + \lccode`\~=\@tempcnta + \addto\extraspolutonikogreek{\languageshorthands{greek}}% + \declare@shorthand{greek}{~}{\greek@tilde} +\fi % End of LGR-specific code not required with XeTeX/LuaTeX. +\providecommand*{\anwtonos}{\textnumeralsigngreek} +\providecommand*{\katwtonos}{\textnumeralsignlowergreek} +\providecommand*{\qoppa}{\textqoppa} +\providecommand*{\stigma}{\textstigma} +\providecommand*{\sampi}{\textsampi} +\providecommand*{\Digamma}{\textDigamma} +\providecommand*{\ddigamma}{\textdigamma} +\providecommand*{\vardigamma}{\textvardigamma} +\providecommand*{\euro}{\texteuro} +\providecommand*{\permill}{\textperthousand} \ldf@finish{\CurrentOption} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |