aboutsummaryrefslogtreecommitdiff
path: root/cer/sem2/cer.tex
blob: a55a489e6b3a3147aed1be7a0b29a1e0dc4afb2b (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
\font\tinyx=cmr8 at 6pt \font\tinym=cmmi8 at 6pt \font\tinyxs=cmmi8 at 5pt \font\tinyms=cmmi8 at 5pt
\def\tiny{\textfont0=\tinyx \textfont1=\tinym \scriptfont0=\tinyxs \scriptfont1=\tinyms \tinyx \baselineskip=6pt}
\font\headx=cmb8 at 9pt \font\headm=cmmi8 at 9pt \font\headms=cmsy8 at 9pt \def\head{\headm \headms \headx \baselineskip=9pt}
%\font\bigx=cmb14        \font\bigm=cmmi14        \font\bigms=\def\big{\bigx \bigm \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}}
\long\def\@claim{} \long\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\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{\smallskip{\bf Data:}\par\noindent\makedata}
    \item{\row{3.6015in}{2}{
      \item{ {\bf Evidence:}\par \@evidence \smallskip}
      \item{ {\bf Justification (Reasoning) of the Evidence:} \par\@justification \smallskip }
    }}
  }
}