add LM 5 hw, caryatid
[light-and-matter.git] / lm / protcode.tex
blob76e4cf6e5924b5c3f066d3214a486e8d2a71b263
1 % The following are the defaults that came with pdftex, except
2 % that I felt the margin protrusion of the punctuation marks was
3 % too big, so I cut them all in half.
4 \def\setprotcode#1{%
5 \rpcode#1`\!=100
6 \rpcode#1`\,=350
7 \rpcode#1`\-=350
8 \rpcode#1`\.=350
9 \rpcode#1`\;=250
10 \rpcode#1`\:=250
11 \rpcode#1`\?=100
12 \lpcode#1`\`=350
13 \rpcode#1`\'=350
14 \lpcode#1 92=250 % ``
15 \rpcode#1 34=250 % ''
16 \rpcode#1 123=150 % --
17 \rpcode#1 124=100 % ---
18 \rpcode#1`\)=50
19 \rpcode#1`\A=50
20 \rpcode#1`\F=50
21 \rpcode#1`\K=50
22 \rpcode#1`\L=50
23 \rpcode#1`\T=50
24 \rpcode#1`\V=50
25 \rpcode#1`\W=50
26 \rpcode#1`\X=50
27 \rpcode#1`\Y=50
28 \rpcode#1`\k=50
29 \rpcode#1`\r=50
30 \rpcode#1`\t=50
31 \rpcode#1`\v=50
32 \rpcode#1`\w=50
33 \rpcode#1`\x=50
34 \rpcode#1`\y=50
35 \lpcode#1`\(=50
36 \lpcode#1`\A=50
37 \lpcode#1`\J=50
38 \lpcode#1`\T=50
39 \lpcode#1`\V=50
40 \lpcode#1`\W=50
41 \lpcode#1`\X=50
42 \lpcode#1`\Y=50
43 \lpcode#1`\v=50
44 \lpcode#1`\w=50
45 \lpcode#1`\x=50
46 \lpcode#1`\y=50
47 \adjustprotcode#1
50 \makeatletter
51 \newif\ifneedadjustprotcode
52 \def\adjustprotcode#1{%
53 \needadjustprotcodefalse
54 \ifnum\pdftexversion > 14
55 \needadjustprotcodetrue
56 \else\ifnum\pdftexversion > 13
57 \ifnum \expandafter`\pdftexrevision > `g
58 \needadjustprotcodetrue
59 \fi
60 \fi\fi
61 \ifneedadjustprotcode
62 \@tempcnta=0
63 \loop
64 \ifcase\lpcode#1\@tempcnta\else
65 \adjustcp\lpcode#1\@tempcnta
66 \fi
67 \ifcase\rpcode#1\@tempcnta\else
68 \adjustcp\rpcode#1\@tempcnta
69 \fi
70 \advance\@tempcnta 1
71 \ifnum\@tempcnta < 256 \repeat
72 \fi
74 \def\adjustcp#1#2#3{%
75 \setbox0=\hbox{%
76 \ifx#2\font\else#2\fi
77 \char#3}%
78 \@tempcntb=\wd0
79 \multiply\@tempcntb #1#2#3%
80 \divide\@tempcntb \fontdimen6 #2%
81 #1#2#3=\@tempcntb
83 \makeatother