On Thu May 28 19:07:48 EDT 2009, r...@swtch.com wrote:
> On Thu, May 28, 2009 at 4:08 AM, Gregory Pavelcak
> <g.pavel...@comcast.net> wrote:
> > If you write the eqn-word for a greek letter, "GAMMA" for
> > example; eqn passes the unicode character (the output of
> > Alt-*G) to troff. If, on the other hand, you type Alt-*G in eqn,
> > it passes `"\f2Γ\fP' to troff, thus producing, by my lights anyway,
> > a nicer looking character. I was just wondering if this was
> > intended as a way to give people both a roman-greek letter
> > and an italic one, or if it was intended to discourage the use
> > of eqn's letter names in favor of unicode, or if it just sorta
> > happened. Perhaps none of the above. Anyone know?
> 
> Eqn should not generate different output for GAMMA vs Γ.
> Feel free to fix it.

this is an interesting case.  fonts are not applied to symbols
in the resword table.  the following fix does solve the problem
with historical correctness.  if the font is ugly, perhaps a better
font is in order. :-)

- erik

diffy -c lookup.c
/n/dump/2009/0601/sys/src/cmd/eqn/lookup.c:145,150 - lookup.c:145,204
        "PSI",          "Ψ",
        "chi",          "χ",
        "CHI",          "Χ",
+ 
+       /*
+        * greek letters translate to themselves; this prevents
+        * fonts from being applied to Γ but not GAMMA
+        */
+       "α",    "α",
+       "Α",    "Α",
+       "β",    "β",
+       "Β",    "Β",
+       "γ",    "γ",
+       "Γ",    "Γ",
+       "δ",    "δ",
+       "Δ",    "Δ",
+       "ε",    "ε",
+       "Ε",    "Ε",
+       "ω",    "ω",
+       "Ω",    "Ω",
+       "λ",    "λ",
+       "Λ",    "Λ",
+       "μ",    "μ",
+       "Μ",    "Μ",
+       "ν",    "ν",
+       "Ν",    "Ν",
+       "θ",    "θ",
+       "Θ",    "Θ",
+       "φ",    "φ",
+       "Φ",    "Φ",
+       "π",    "π",
+       "Π",    "Π",
+       "σ",    "σ",
+       "Σ",    "Σ",
+       "ξ",    "ξ",
+       "Ξ",    "Ξ",
+       "ζ",    "ζ",
+       "Ζ",    "Ζ",
+       "ι",    "ι",
+       "Ι",    "Ι",
+       "η",    "η",
+       "Η",    "Η",
+       "κ",    "κ",
+       "Κ",    "Κ",
+       "ρ",    "ρ",
+       "Ρ",    "Ρ",
+       "τ",    "τ",
+       "Τ",    "Τ",
+       "ο",    "ο",
+       "Ο",    "Ο",
+       "υ",    "υ",
+       "Υ",    "Υ",
+       "ψ",    "ψ",
+       "Ψ",    "Ψ",
+       "χ",    "χ",
+       "Χ",    "Χ",
+ 
        "and",          "\\f1and\\fP",
        "for",          "\\f1for\\fP",
        "if",           "\\f1if\\fP",

Reply via email to