|
|
1.1 root 1: #include "e.h"
2: #include "y.tab.h"
3:
4: extern float Dvshift, Dhshift, Dh2shift, Dheight, Barv, Barh;
5: extern char *Vec, *Dyad, *Hat, *Tilde, *Dot, *Dotdot, *Utilde;
6:
7: diacrit(p1, type)
8: int p1, type;
9: {
10: int c, t;
11:
12: c = salloc();
13: t = salloc();
14: nrwid(p1, ps, p1);
15: printf(".nr 10 %gm\n", max(REL(eht[p1]-ebase[p1]-1,ps), 0)); /* vert shift if high */
16: if (type == HIGHBAR)
17: printf(".nr 10 \\n(10+%gm\n", Dvshift);
18: else if (type == LOWBAR)
19: printf(".nr 10 0\n");
20: else
21: printf(".if \\n(ct>1 .nr 10 \\n(10+%gm\n", Dvshift);
22: printf(".nr %d %gm\n", t, Dhshift); /* horiz shift if high */
23: printf(".if \\n(ct>1 .nr %d %gm\n", t, Dh2shift); /* was .1 and .15 */
24: switch (type) {
25: case VEC:
26: printf(".ds %d %s\n", c, Vec);
27: break;
28: case DYAD:
29: printf(".ds %d %s\n", c, Dyad);
30: break;
31: case HAT:
32: printf(".ds %d %s\n", c, Hat);
33: break;
34: case TILDE:
35: printf(".ds %d %s\n", c, Tilde);
36: break;
37: case DOT:
38: printf(".ds %d %s\n", c, Dot);
39: break;
40: case DOTDOT:
41: printf(".ds %d %s\n", c, Dotdot);
42: break;
43: case BAR:
44: case LOWBAR:
45: case HIGHBAR:
46: printf(".ds %d \\v'%gm'\\h'%gm'\\l'\\n(%du-%gm'\\h'%gm'\\v'%gm'\n",
47: c, -Barv, Barh, p1, 2*Barh, Barh, Barv);
48: break;
49: case UNDER:
50: printf(".ds %d \\l'\\n(%du\\(ul'\n", c, p1);
51: printf(".nr %d 0\n", t);
52: printf(".nr 10 0-.1m-%gm\n", REL(ebase[p1],ps));
53: printf(".if \\n(ct%%2=1 .nr 10 0\\n(10-.25m\n");
54: break;
55: case UTILDE:
56: printf(".ds %d %s\n", c, Utilde);
57: printf(".nr %d 0\n", t);
58: printf(".nr 10 0-%gm\n", REL(ebase[p1],ps));
59: printf(".if \\n(ct%%2=1 .nr 10 0\\n(10-%gm\n", Dvshift);
60: break;
61: }
62: nrwid(c, ps, c);
63: if (lfont[p1] != ITAL)
64: printf(".nr %d 0\n", t);
65: printf(".as %d \\h'-\\n(%du-\\n(%du/2u+\\n(%du'\\v'0-\\n(10u'\\*(%d",
66: p1, p1, c, t, c);
67: printf("\\v'\\n(10u'\\h'-\\n(%du+\\n(%du/2u-\\n(%du'\n", c, p1, t);
68: if (type != UNDER && type != UTILDE)
69: eht[p1] += EM(Dheight, ps); /* was .15 */
70: dprintf(".\tdiacrit: %c over S%d, lf=%c, rf=%c, h=%g, b=%g\n",
71: type, p1, lfont[p1], rfont[p1], eht[p1], ebase[p1]);
72: sfree(c); sfree(t);
73: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.