aboutsummaryrefslogtreecommitdiff
path: root/gen
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-02-07 19:30:03 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-02-07 19:30:03 -0500
commit88c1d359e29e19264b4fc5e91974f2bdeb5ab148 (patch)
tree23ae4e75ba99aa243ca07fe81eda5dcb167c3215 /gen
parent6da6e7e4b9e1b2c97d5501b62f52ce07e1cec269 (diff)
made .tex file generation more simple
Diffstat (limited to 'gen')
-rwxr-xr-xgen/maketables.sh8
-rw-r--r--gen/tables.orig.tex6
-rw-r--r--gen/tables.tex17
3 files changed, 31 insertions, 0 deletions
diff --git a/gen/maketables.sh b/gen/maketables.sh
new file mode 100755
index 0000000..dffc937
--- /dev/null
+++ b/gen/maketables.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+export TABLE=`mktemp`
+export DEATHTABLE=`mktemp`
+python python/deathtable.py > $DEATHTABLE
+python python/table.py > $TABLE
+sed -e "/%%DEATHTABLE%%/{r $DEATHTABLE" -e "d}" -e "/%%MAINTABLE%%/{r $TABLE" -e "d}" <data/tables.orig.tex >data/tables.tex
+rm $DEATHTABLE $TABLE
diff --git a/gen/tables.orig.tex b/gen/tables.orig.tex
new file mode 100644
index 0000000..3e2de5f
--- /dev/null
+++ b/gen/tables.orig.tex
@@ -0,0 +1,6 @@
+\def\deaths{%
+ %%DEATHTABLE%%{Number of Deaths and Pits Successfully Formed in Each Trial/Subtrial}
+}
+\def\territory{%
+ %%MAINTABLE%%{The Pit Depths, Widths, and ``Territory,'' Observed in Each Trial}
+}
diff --git a/gen/tables.tex b/gen/tables.tex
new file mode 100644
index 0000000..43bdd88
--- /dev/null
+++ b/gen/tables.tex
@@ -0,0 +1,17 @@
+\def\deaths{%
+\table{
+Trial Size& Date& Introduced& Deaths& Pits formed\cr\noalign{\hrule}
+33$\times$32& 2019-10-16& 31& 6& 9\cr\noalign{\hrule}
+24$\times$24& 2019-10-30& 27& 3& 7\cr\noalign{\hrule}
+17$\times$16& 2019-12-3& 19& 3& 7\cr\noalign{\hrule}
+17$\times$16& 2019-12-5& 10& 0& 3\cr\noalign{\hrule}
+8$\times$7& 2019-12-19& 12& 4& 3\cr\noalign{\hrule}
+8$\times$7& 2019-12-20& 5& 0& 4\cr\noalign{\hrule}
+}}
+\def\territory{%
+\vtable{
+Dimensions (in)&\multispan{9}\vfil\line{\hfil33$\times$32\hfil}\vfil\hrule&\multispan{7}\vfil\line{\hfil24$\times$24\hfil}\vfil\hrule&\multispan{7}\vfil\line{\hfil17$\times$16\hfil}\vfil\hrule&\multispan{3}\vfil\line{\hfil17$\times$16\hfil}\vfil\hrule&\multispan{3}\vfil\line{\hfil8$\times$7\hfil}\vfil\hrule&\multispan{4}\vfil\line{\hfil8$\times$7\hfil}\vfil\hrule\cr\noalign{\vrule}
+Pit Depth (cm)&1.3&1.4&1.1&1.8&2.2&1.4&1.2&2.4&1.8&2.0&2.5&0.5&1.2&1.2&1.0&1.5&1.3&1.2&0.9&2.2&1.2&2.0&1.8&1.3&1.5&1.4&0.8&0.9&2.0&0.8&0.8&0.8&0.8\cr\noalign{\vrule}
+Pit Width (cm)&4.2&3.7&3.0&2.3&3.1&2.5&2.1&3.9&3.6&7.0&4.1&2.0&2.5&3.0&3.0&4.0&4.1&3.8&3.2&3.8&2.5&5.0&3.6&3.1&3.1&2.9&0.9&0.8&3.0&0.8&0.8&0.8&0.8\cr\noalign{\vrule}
+Nearest Neighbor (cm)&6.00&12.04&6.00&10.63&3.16&2.24&2.24&3.16&3.16&3.16&3.16&10.20&6.40&7.00&8.00&9.06&3.61&3.61&7.07&3.00&3.00&5.00&6.00&5.10&7.00&5.10&2.24&2.24&5.83&2.24&6.40&2.24&4.47\cr\noalign{\vrule}
+}}