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