aboutsummaryrefslogtreecommitdiff
path: root/cer/cer.tex
blob: 7a60ab1abf033bd3b5ddec9bc898cd52f90f6936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\font\tinyx=cmr8 at 6pt \def\tiny{\tinyx \baselineskip=6pt}
\font\headx=cmb8 at 9pt \def\head{\headx \baselineskip=9pt}
\font\bigx=cmb14 \def\big{\bigx \baselineskip=14pt}

\hoffset -0.5in
\voffset -0.5in
\hsize 7.5in
\vsize 10in

\catcode `\@11
\def\@name{}
\def\@course{}
\def\@teacher{}
\def\name#1{\def\@name{#1}}
\def\course#1{\def\@course{#1}}
\def\teacher#1{\def\@teacher{#1}}
\def\makeheader{
\noindent Your Name: \@name
\vskip 2ex plus 0pt
\noindent Course: \@course
\vskip 2ex plus 0pt
\noindent Teacher: \@teacher
\vskip 2ex plus 0pt
}

\long\def\column#1#2{ %width %count %text=
  \long\def\item##1{
    \noindent \vrule \vbox{
      \hrule \hsize#1 ##1
      \hrule
    }\vrule\par \vskip -1.5pt
  }
  #2%
}

\long\def\row#1#2#3{ %width %count %text
  \count10=0
  \long\def\item##1{
    \hskip 0.4em
    \vbox{
      \hsize #1 \smallskip
      ##1
    }
    \advance \count10 by 1 \ifnum\count10<#2 \vrule \fi
  }
  \hbox{\hskip -0.15em #3 \hskip -0.6em}
}

\def\@question{}
\def\question#1{\def\@question{#1}}
\def\@claim{} \def\claim#1{\def\@claim{#1}}
\long\def\@evidence{} \long\def\evidence#1{\def\@evidence{#1}}
\long\def\@justification{} \long\def\justification#1{\def\@justification{#1}}

\def\@data{} \dimendef\@tablewidth=1
\def\data#1#2#3{
  \dimen1=#2
  \def\endlinex{\cr \noexpand\endliner}
  \edef\@data{#3}
  \def\preamb{#1}
}

%\def\cp#1{#1}
%\def\preambloop{
%  & \vrule \text{##}
%  \advance \@columns by -1
%  \ifnum \@columns>0 \span\preambloop \fi
%}
%\def\makepreamb{
%  \vrule width 1pt \text{##}
%  \advance \@columns by -1
%  \ifnum \@columns>0 \span\preambloop \fi
%  \vrule width 1pt \cr
%}

\def\makedata{
  \def\text##1{\tiny \tolerance=10000 \hbadness=10000 \hbox to \@tablewidth{\hskip1em \vbox{\vskip1ex \noindent \advance \@tablewidth by -2.25em \hsize\@tablewidth ##1 \smallskip} \hskip1em} }
  \def\endliner{\noalign{\hrule height 0.05pt}}
  \halign{\span\preamb
    \noalign{\hrule height 1pt}
    \@data
    \noalign{\hrule height 1pt}
  }
}

\long\def\pad#1{\smallskip #1 \smallskip}
\long\def\makedoc{
  \column{7.4in}{
    \item{\pad{{\bf Question:} \@question}}
    \item{\pad{{\bf Claim:} \@claim}}
    \item{\row{3.6015in}{2}{
      \item{ {\bf Evidence:}\par \noindent\makedata\par\smallskip \@evidence \smallskip}
      \item{ {\bf Justification (Reasoning) of the Evidence:} \par\@justification \smallskip }
    }}
  }
}