diff options
author | Karl Berry <karl@freefriends.org> | 2011-10-04 23:18:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-10-04 23:18:09 +0000 |
commit | 2ddf01d17c0c9f8e322176749c70d050da2cdaec (patch) | |
tree | 8e0f7dd81d12104c2aa3b8b1d2cf04b836548977 /Master/texmf-dist/tex/latex/textgreek/textgreek.sty | |
parent | a62250f2c859373a29f4dd5dbf3b6ec1ae36be17 (diff) |
textgreek (4oct11)
git-svn-id: svn://tug.org/texlive/trunk@24202 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/textgreek/textgreek.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/textgreek/textgreek.sty | 263 |
1 files changed, 103 insertions, 160 deletions
diff --git a/Master/texmf-dist/tex/latex/textgreek/textgreek.sty b/Master/texmf-dist/tex/latex/textgreek/textgreek.sty index 4099af10042..48c39145283 100644 --- a/Master/texmf-dist/tex/latex/textgreek/textgreek.sty +++ b/Master/texmf-dist/tex/latex/textgreek/textgreek.sty @@ -28,7 +28,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2009/09/24] \ProvidesPackage{textgreek} - [2011/04/08 v0.5 greek symbols in text] + [2011/09/24 v0.6 Greek symbols in text] \InputIfFileExists{lgrenc.def}{% \PackageInfo{textgreek}{Loading the definitions for the Greek font% encoding.}}{% @@ -37,14 +37,15 @@ font encoding LGR. Maybe it comes with the babel package.}} \DeclareOption{cbgreek}{% \renewcommand*{\textgreekfontmap}{% -{eur/*/*}{U/eur/*/*} -{phv/*/*}{U/psy/*/*}}}% + {eur/*/*}{U/eur/*/*} + {phv/*/*}{U/psy/*/*}}}% \DeclareOption{euler}{% \renewcommand*{\textgreekfontmap}{% -{phv/*/*}{U/psy/*/*} -{*/bx/n}{U/eur/b/n} -{*/b/n}{U/eur/b/n} -{*/*/n}{U/eur/m/n}}}% + {phv/*/*}{U/psy/*/*} + {*/bx/n}{U/eur/b/n} + {*/b/n}{U/eur/b/n} + {*/*/n}{U/eur/m/n} + {*/*/it}{OML/*/*/*}}}% \DeclareOption{artemisia}{% \renewcommand*{\textgreekfontmap}{% {eur/*/*}{U/eur/*/*} @@ -104,164 +105,112 @@ \expandafter\textgreek@findfont\textgreek@fontmap\textgreek@eof% \selectfont% }% -\newcommand*{\lgrtoeuler}[1]{% -\if G#1\textgreek@return{\char0}\fi% -\if D#1\textgreek@return{\char1}\fi% -\if J#1\textgreek@return{\char2}\fi% -\if L#1\textgreek@return{\char3}\fi% -\if X#1\textgreek@return{\char4}\fi% -\if P#1\textgreek@return{\char5}\fi% -\if S#1\textgreek@return{\char6}\fi% -\if U#1\textgreek@return{\char7}\fi% -\if F#1\textgreek@return{\char8}\fi% -\if Y#1\textgreek@return{\char9}\fi% -\if W#1\textgreek@return{\char10}\fi% -\if a#1\textgreek@return{\char11}\fi% -\if b#1\textgreek@return{\char12}\fi% -\if g#1\textgreek@return{\char13}\fi% -\if d#1\textgreek@return{\char14}\fi% -\if 3#1\textgreek@return{\char15}\fi% element-of style epsilon -\if z#1\textgreek@return{\char16}\fi% -\if h#1\textgreek@return{\char17}\fi% -\if j#1\textgreek@return{\char18}\fi% temperature style theta -\if i#1\textgreek@return{\char19}\fi% -\if k#1\textgreek@return{\char20}\fi% -\if l#1\textgreek@return{\char21}\fi% -\if m#1\textgreek@return{\char22}\fi% -\if n#1\textgreek@return{\char23}\fi% -\if x#1\textgreek@return{\char24}\fi% -\if p#1\textgreek@return{\char25}\fi% -\if r#1\textgreek@return{\char26}\fi% -\if s#1\textgreek@return{\char27}\fi% -\if t#1\textgreek@return{\char28}\fi% -\if u#1\textgreek@return{\char29}\fi% -\if v#1\textgreek@return{\char30}\fi% o-slash style phi -\if q#1\textgreek@return{\char31}\fi% -\if y#1\textgreek@return{\char32}\fi% -\if w#1\textgreek@return{\char33}\fi% -\if e#1\textgreek@return{\char34}\fi% -\if 0#1\textgreek@return{\char35}\fi% -\if f#1\textgreek@return{\char39}\fi% -\fontencoding{LGR}\selectfont #1% -\textgreek@eof}% -\newcommand*{\lgrtosymbol}[1]{% -\if A#1\textgreek@return{A}\fi% -\if B#1\textgreek@return{B}\fi% -\if Q#1\textgreek@return{C}\fi% -\if D#1\textgreek@return{D}\fi% -\if E#1\textgreek@return{E}\fi% -\if F#1\textgreek@return{F}\fi% -\if G#1\textgreek@return{G}\fi% -\if H#1\textgreek@return{H}\fi% -\if I#1\textgreek@return{I}\fi% -\if 0#1\textgreek@return{J}\fi% -\if K#1\textgreek@return{K}\fi% -\if L#1\textgreek@return{L}\fi% -\if M#1\textgreek@return{M}\fi% -\if N#1\textgreek@return{N}\fi% -\if O#1\textgreek@return{O}\fi% -\if P#1\textgreek@return{P}\fi% -\if J#1\textgreek@return{Q}\fi% -\if R#1\textgreek@return{R}\fi% -\if S#1\textgreek@return{S}\fi% -\if T#1\textgreek@return{T}\fi% -\if U#1\textgreek@return{U}\fi% -\if c#1\textgreek@return{V}\fi% -\if W#1\textgreek@return{W}\fi% -\if X#1\textgreek@return{X}\fi% -\if Y#1\textgreek@return{Y}\fi% -\if Z#1\textgreek@return{Z}\fi% -\if a#1\textgreek@return{a}\fi% -\if b#1\textgreek@return{b}\fi% -\if q#1\textgreek@return{c}\fi% -\if d#1\textgreek@return{d}\fi% -\if e#1\textgreek@return{e}\fi% -\if v#1\textgreek@return{f}\fi% -\if g#1\textgreek@return{g}\fi% -\if h#1\textgreek@return{h}\fi% -\if i#1\textgreek@return{i}\fi% -\if f#1\textgreek@return{j}\fi% -\if k#1\textgreek@return{k}\fi% -\if l#1\textgreek@return{l}\fi% -\if m#1\textgreek@return{m}\fi% -\if n#1\textgreek@return{n}\fi% -\if o#1\textgreek@return{o}\fi% -\if p#1\textgreek@return{p}\fi% -\if j#1\textgreek@return{q}\fi% -\if r#1\textgreek@return{r}\fi% -\if s#1\textgreek@return{s}\fi% -\if t#1\textgreek@return{t}\fi% -\if u#1\textgreek@return{u}\fi% -\if w#1\textgreek@return{w}\fi% -\if x#1\textgreek@return{x}\fi% -\if y#1\textgreek@return{y}\fi% -\if z#1\textgreek@return{z}\fi% -\fontencoding{LGR}\selectfont #1% -\textgreek@eof}% \DeclareRobustCommand*{\TextGreek}[1]{% \begingroup% \textgreekfont% \edef\tempa{\f@family}% +\let\tempd\f@encoding% \def\tempb{eur}\def\tempc{psy}% +\def\tempe{OML}% +\ifx\tempd\tempe\textgreek@return{\lgrtoeuler#1}\fi% \ifx\tempa\tempb\textgreek@return{\lgrtoeuler#1}\fi% \ifx\tempa\tempc\textgreek@return{\lgrtosymbol#1}\fi% #1% \textgreek@eof% \endgroup}% -\newcommand*{\DeclareTextGreekSymbol}[2]{% -\expandafter\DeclareTextCommandDefault\csname text#1\endcsname% -{\TextGreek{#2}}}% -\DeclareTextGreekSymbol{alpha}{a} -\DeclareTextGreekSymbol{beta}{b} -\DeclareTextGreekSymbol{gamma}{g} -\DeclareTextGreekSymbol{delta}{d} -\DeclareTextGreekSymbol{epsilon}{e} -\DeclareTextGreekSymbol{zeta}{z} -\DeclareTextGreekSymbol{eta}{h} -\DeclareTextGreekSymbol{theta}{j} -\DeclareTextGreekSymbol{iota}{i} -\DeclareTextGreekSymbol{kappa}{k} -\DeclareTextGreekSymbol{lambda}{l} +\DeclareRobustCommand*{\TextGreek@Select}[3]{% +\begingroup% +\textgreekfont% +\edef\tempa{\f@family}% +\let\tempd\f@encoding% +\def\tempb{eur}\def\tempc{psy}% +\def\tempe{OML}% +\ifx\tempd\tempe\textgreek@return{#2}\fi% +\ifx\tempa\tempb\textgreek@return{#2}\fi% +\ifx\tempa\tempc\textgreek@return{#3}\fi% +#1% +\textgreek@eof% +\endgroup}% +\def\DeclareTextGreekSymbol#1#2{% + \@ifnextchar[% + {\DeclareTextGreekSymbol@{#1}{#2}}% + {\@DeclareTextGreekSymbol{#1}{#2}% + {\fontencoding{LGR}\fontfamily{cmr}\selectfont#2}{#2}}% +}% +\def\@DeclareTextGreekSymbol#1#2#3#4{% + \expandafter\DeclareTextCommandDefault\csname text#1\endcsname% + {\TextGreek@Select{#2}{#3}{#4}}% +}% +\def\DeclareTextGreekSymbol@#1#2[#3]{% + \ifx\textgreek@eof#3\textgreek@return{% + \DeclareTextGreekSymbol@@{#1}{#2}% + {\fontencoding{LGR}\fontfamily{cmr}\selectfont#2}}% + \else\textgreek@return{% + \DeclareTextGreekSymbol@@{#1}{#2}{#3}}\fi% + \textgreek@eof}% +\def\DeclareTextGreekSymbol@@#1#2#3{% + \@ifnextchar[% + {\DeclareTextGreekSymbol@@@{#1}{#2}{#3}}% + {\@DeclareTextGreekSymbol{#1}{#2}{#3}{#2}}% +}% +\def\DeclareTextGreekSymbol@@@#1#2#3[#4]{% + \ifx\textgreek@eof#4\textgreek@return{% + \@DeclareTextGreekSymbol{#1}{#2}{#3}{#2}}% + \else\textgreek@return{% + \@DeclareTextGreekSymbol{#1}{#2}{#3}{#4}}\fi% + \textgreek@eof}% +\DeclareTextGreekSymbol{alpha}{a}[\char11] +\DeclareTextGreekSymbol{beta}{b}[\char12] +\DeclareTextGreekSymbol{gamma}{g}[\char13] +\DeclareTextGreekSymbol{delta}{d}[\char14] +\DeclareTextGreekSymbol{epsilon}{e}[\char34] +\DeclareTextGreekSymbol{zeta}{z}[\char16] +\DeclareTextGreekSymbol{eta}{h}[\char17] +\DeclareTextGreekSymbol{theta}{j}[\char18][q] +\DeclareTextGreekSymbol{iota}{i}[\char19] +\DeclareTextGreekSymbol{kappa}{k}[\char20] +\DeclareTextGreekSymbol{lambda}{l}[\char21] \expandafter\ifx\csname?\string\textmu\endcsname\relax% -\DeclareTextGreekSymbol{mu}{m}\fi -\DeclareTextGreekSymbol{mugreek}{m} -\DeclareTextGreekSymbol{nu}{n} -\DeclareTextGreekSymbol{xi}{x} +\DeclareTextGreekSymbol{mu}{m}[\char22] +\fi +\DeclareTextGreekSymbol{mugreek}{m}[\char22] +\DeclareTextGreekSymbol{nu}{n}[\char23] +\DeclareTextGreekSymbol{xi}{x}[\char24] \DeclareTextGreekSymbol{omikron}{o} -\DeclareTextGreekSymbol{pi}{p} -\DeclareTextGreekSymbol{rho}{r} -\DeclareTextGreekSymbol{sigma}{s\noboundary} -\DeclareTextGreekSymbol{varsigma}{c} -\DeclareTextGreekSymbol{tau}{t} -\DeclareTextGreekSymbol{upsilon}{u} -\DeclareTextGreekSymbol{phi}{f} -\DeclareTextGreekSymbol{chi}{q} -\DeclareTextGreekSymbol{psi}{y} -\DeclareTextGreekSymbol{omega}{w} +\DeclareTextGreekSymbol{pi}{p}[\char25] +\DeclareTextGreekSymbol{rho}{r}[\char26] +\DeclareTextGreekSymbol{sigma}{s\noboundary}[\char27][s] +\DeclareTextGreekSymbol{varsigma}{c}[][V] +\DeclareTextGreekSymbol{tau}{t}[\char28] +\DeclareTextGreekSymbol{upsilon}{u}[\char29] +\DeclareTextGreekSymbol{phi}{f}[\char39][j] +\DeclareTextGreekSymbol{chi}{q}[\char31][c] +\DeclareTextGreekSymbol{psi}{y}[\char32] +\DeclareTextGreekSymbol{omega}{w}[\char33] \DeclareTextGreekSymbol{Alpha}{A} \DeclareTextGreekSymbol{Beta}{B} -\DeclareTextGreekSymbol{Gamma}{G} -\DeclareTextGreekSymbol{Delta}{D} +\DeclareTextGreekSymbol{Gamma}{G}[\char0] +\DeclareTextGreekSymbol{Delta}{D}[\char1] \DeclareTextGreekSymbol{Epsilon}{E} \DeclareTextGreekSymbol{Zeta}{Z} \DeclareTextGreekSymbol{Eta}{H} -\DeclareTextGreekSymbol{Theta}{J} +\DeclareTextGreekSymbol{Theta}{J}[\char2][Q] \DeclareTextGreekSymbol{Iota}{I} \DeclareTextGreekSymbol{Kappa}{K} -\DeclareTextGreekSymbol{Lambda}{L} +\DeclareTextGreekSymbol{Lambda}{L}[\char3] \DeclareTextGreekSymbol{Mu}{M} \DeclareTextGreekSymbol{Nu}{N} -\DeclareTextGreekSymbol{Xi}{X} +\DeclareTextGreekSymbol{Xi}{X}[\char4] \DeclareTextGreekSymbol{Omikron}{O} -\DeclareTextGreekSymbol{Pi}{P} +\DeclareTextGreekSymbol{Pi}{P}[\char5] \DeclareTextGreekSymbol{Rho}{R} -\DeclareTextGreekSymbol{Sigma}{S} +\DeclareTextGreekSymbol{Sigma}{S}[\char6] \DeclareTextGreekSymbol{Tau}{T} -\DeclareTextGreekSymbol{Upsilon}{U} -\DeclareTextGreekSymbol{Phi}{F} -\DeclareTextGreekSymbol{Chi}{Q} -\DeclareTextGreekSymbol{Psi}{Y} -\DeclareTextGreekSymbol{Omega}{W} +\DeclareTextGreekSymbol{Upsilon}{U}[\char7] +\DeclareTextGreekSymbol{Phi}{F}[\char8] +\DeclareTextGreekSymbol{Chi}{Q}[][C] +\DeclareTextGreekSymbol{Psi}{Y}[\char9] +\DeclareTextGreekSymbol{Omega}{W}[\char10] \DeclareTextCommand{\straightphi}{PU}% {\83\325} % U+03D5 GREEK PHI SYMBOL \DeclareTextCommandDefault{\straightphi}{% @@ -270,26 +219,18 @@ \edef\tempb{\f@shape}% \def\tempc{eur}\def\tempd{psy}% \def\tempe{it}% -\ifx\tempa\tempc\textgreek@return{\lgrtoeuler{v}}\fi% -\ifx\tempa\tempd\textgreek@return{\lgrtosymbol{v}}\fi% +\ifx\tempa\tempc\textgreek@return{\char30}\fi% +\ifx\tempa\tempd\textgreek@return{f}\fi% \ifx\tempb\tempe\textgreek@return{% \fontencoding{OML}\selectfont\char30}\fi% -\fontencoding{U}\fontfamily{eur}\selectfont\lgrtoeuler{v}% +\textgreek@ematch{\f@series}{bx}{\fontseries{b}}{}% +\fontencoding{U}\fontfamily{eur}\selectfont\char30% \textgreek@eof% \endgroup}% \DeclareTextCommand{\scripttheta}{PU}% {\83\321}% U+03D1 GREEK THETA SYMBOL \DeclareTextCommandDefault{\scripttheta}{% -\begingroup\textgreekfont% -\edef\tempa{\f@family}% -\edef\tempb{\f@shape}% -\def\tempc{eur}\def\tempd{psy}% -\def\tempe{it}% -\ifx\tempa\tempc\textgreek@return{\lgrtoeuler{0}}\fi% -\ifx\tempa\tempd\textgreek@return{\lgrtosymbol{0}}\fi% -j% default theta in cbgreek and artemisia -\textgreek@eof% -\endgroup}% + \TextGreek@Select{j}{\char35}{J}}% \DeclareTextCommand{\straighttheta}{PU}% {\83\270} % U+03B8 GREEK THETA SYMBOL \DeclareTextCommandDefault{\straighttheta}{% @@ -298,11 +239,12 @@ j% default theta in cbgreek and artemisia \edef\tempb{\f@shape}% \def\tempc{eur}\def\tempd{psy}% \def\tempe{it}% -\ifx\tempa\tempc\textgreek@return{\lgrtoeuler{j}}\fi% -\ifx\tempa\tempd\textgreek@return{\lgrtosymbol{j}}\fi% +\ifx\tempa\tempc\textgreek@return{\char18}\fi% +\ifx\tempa\tempd\textgreek@return{q}\fi% \ifx\tempb\tempe\textgreek@return{% \fontencoding{OML}\selectfont\char18}\fi% -\fontencoding{U}\fontfamily{eur}\selectfont\lgrtoeuler{j}% +\textgreek@ematch{\f@series}{bx}{\fontseries{b}}{}% +\fontencoding{U}\fontfamily{eur}\selectfont\char18% \textgreek@eof% \endgroup}% \iffalse\fi % U+03F5 GREEK LUNATE EPSILON SYMBOL @@ -313,12 +255,13 @@ j% default theta in cbgreek and artemisia \edef\tempb{\f@shape}% \def\tempc{eur}\def\tempd{psy}% \def\tempe{it}% -\ifx\tempa\tempc\textgreek@return{\lgrtoeuler{3}}\fi% +\ifx\tempa\tempc\textgreek@return{\char15}\fi% \ifx\tempa\tempd\textgreek@return{% - \fontfamily{eur}\fontseries{b}\selectfont\lgrtoeuler{3}}\fi% + \fontfamily{eur}\fontseries{b}\selectfont\char15}\fi% \ifx\tempb\tempe\textgreek@return{% \fontencoding{OML}\selectfont\char15}\fi% -\fontencoding{U}\fontfamily{eur}\selectfont\lgrtoeuler{3}% +\textgreek@ematch{\f@series}{bx}{\fontseries{b}}{}% +\fontencoding{U}\fontfamily{eur}\selectfont\char15% \textgreek@eof% \endgroup}% \endinput |