annotate Paper/slashbox.sty @ 75:454ddda8d306

modify explanation of CbC
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 03 Jan 2012 21:13:11 +0900
parents 9adf0d4a6033
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 % slashbox.sty by Koichi Yasuoka, May 27, 1993
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 % minor modification by Toru Sato, May 31, 1993
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 \typeout{slashbox style by K.Yasuoka, May 1993.}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 \newbox\@slashboxa
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 \newbox\@slashboxb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 \newbox\@slashboxc
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 \newcount\@slashboxwd
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 \newcount\@slashboxht
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 \newdimen\@slashsepl
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 \newdimen\@slashsepr
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 \def\slashbox{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 \def\@slashboxpicture##1{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 \put(0,0){\line(##1,1){\@slashboxwd}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 \put(0,\@slashboxht){\makebox(0,0)[tl]{\box\@slashboxa}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 \put(\@slashboxwd,0){\makebox(0,0)[br]{\box\@slashboxb}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 }%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 \@slashbox
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 }%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 \def\backslashbox{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 \def\@slashboxpicture##1{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 \put(0,\@slashboxht){\line(##1,-1){\@slashboxwd}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 \put(0,0){\makebox(0,0)[bl]{\box\@slashboxa}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 \put(\@slashboxwd,\@slashboxht){\makebox(0,0)[tr]{\box\@slashboxb}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 }%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 \@slashbox
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 }%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 \def\@slashbox{\@ifnextchar [{\@@slashbox}{\@@slashbox[0pt]}}
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 \def\@@slashbox[#1]{\@ifnextchar [{\@@@slashbox[#1]}{\@@@slashbox[#1][c]}}
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 \def\@@@slashbox[#1][#2]#3#4{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 % #1: width, #2: suppression of \tabcolsep on `l', `r', or `lr' side
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 % #3: left item, #4: right item
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 \@slashsepl=\tabcolsep
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 \@slashsepr=\tabcolsep
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 \@tfor\@tempa :=#2\do{\expandafter\let
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 \csname @slashsep\@tempa\endcsname=\z@}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 \setbox\@slashboxa=\hbox{\strut\hskip\tabcolsep\shortstack[l]{#3}}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 \setbox\@slashboxb=\hbox{\shortstack[r]{#4}\hskip\tabcolsep\strut}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 \setbox\@slashboxa=\hbox{\raise\dp\@slashboxa\box\@slashboxa}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 \setbox\@slashboxb=\hbox{\raise\dp\@slashboxb\box\@slashboxb}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 \setbox\@slashboxc=\hbox{%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 \@tempdima=\wd\@slashboxa
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 \advance\@tempdima by \wd\@slashboxb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 \advance\@tempdima by \@slashsepl
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 \advance\@tempdima by \@slashsepr
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 \@tempdimb=#1\relax%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 \ifdim\@tempdimb>\@tempdima \@tempdima=\@tempdimb\fi%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 \@tempdimb=\ht\@slashboxa
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 \advance\@tempdimb by \dp\@slashboxa
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 \advance\@tempdimb by \ht\@slashboxb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 \advance\@tempdimb by \dp\@slashboxb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 \@tempcnta=\@tempdima
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 \@tempcntb=\@tempdimb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 \advance\@tempcnta by \@tempcntb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 \advance\@tempcnta by -1
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 \divide\@tempcnta by \@tempcntb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 \ifnum\@tempcnta>6 \@tempcnta=6
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 \@tempdimb=0.166666666\@tempdima
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 \else
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 \ifnum\@tempcnta<1 \@tempcnta=1\fi
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 \@tempdima=\@tempdimb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 \multiply\@tempdima by \@tempcnta
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 \fi%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 \advance\@tempdima by -\@slashsepl
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 \advance\@tempdima by -\@slashsepr
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 \@slashboxwd=\@tempdima
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 \@slashboxht=\@tempdimb
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 \@tempcntb=\@slashsepl
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 \setlength{\unitlength}{1sp}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 \begin{picture}(\@slashboxwd,\@slashboxht)(\@tempcntb,0)
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 \advance\@tempdima by \@slashsepl
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 \advance\@tempdima by \@slashsepr
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 \@slashboxwd=\@tempdima
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 \@slashboxpicture{\@tempcnta}
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 \end{picture}%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 }%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 $\vcenter{\box\@slashboxc}$%
9adf0d4a6033 add some file
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 }%