prevent greek letters from looking bad by translating them to themselves. this escapes some font mapping. this is all a bit wrong headed, but at least it's consistent now. it's wrong because it uses inconsistently applied fonts and the fact that we typically want a different font for greek letters together. perhaps in the end it's the best solution. Reference: /n/atom/patch/applied2013/eqnfont Date: Wed Jun 19 03:36:19 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/eqn/input.c Wed Jun 19 03:34:36 2013 +++ /sys/src/cmd/eqn/input.c Wed Jun 19 03:34:36 2013 @@ -256,7 +256,6 @@ } char errbuf[200]; -#undef putc void eprint(void) /* try to print context around error */ { --- /sys/src/cmd/eqn/lookup.c Wed Jun 19 03:34:36 2013 +++ /sys/src/cmd/eqn/lookup.c Wed Jun 19 03:34:36 2013 @@ -145,6 +145,60 @@ "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", --- /sys/src/cmd/eqn/main.c Wed Jun 19 03:34:36 2013 +++ /sys/src/cmd/eqn/main.c Wed Jun 19 03:34:36 2013 @@ -206,7 +206,7 @@ printf("\\*(%d", p1); if (spaceval == NULL && after > 0.01) printf("\\x'%gm'", after); - printf("\n"); + putchar('\n'); } if (szstack[0] != 0) printf(".ds %d %s\\*(%d\\s\\n(99\n", p1, DPS(gsize,gsize), p1);