aboutsummaryrefslogtreecommitdiff
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
parent6da6e7e4b9e1b2c97d5501b62f52ce07e1cec269 (diff)
made .tex file generation more simple
-rw-r--r--Makefile12
-rwxr-xr-xgen/maketables.sh (renamed from data/maketables.sh)0
-rw-r--r--gen/tables.orig.tex (renamed from data/tables.orig.tex)0
-rw-r--r--gen/tables.tex17
-rw-r--r--logbook/document.tex2
l---------logbook/tables.tex1
-rw-r--r--poster/results.tex2
l---------poster/tables.tex1
-rw-r--r--report/tables.tex2
9 files changed, 28 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 78b864c..d2c569a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
-ASSETS := imgs/made graph/depth_width.png graph/nearest_neighbor.png
+ASSETS = imgs/made graph/depth_width.png graph/nearest_neighbor.png
+DIRS = imgs graph outputs
-$(shell mkdir -p imgs graph outputs)
+$(shell mkdir -p $(DIRS))
.PHONY: all
all: outputs/poster.pdf outputs/report.pdf outputs/logbook.pdf
@@ -8,7 +9,7 @@ all: outputs/poster.pdf outputs/report.pdf outputs/logbook.pdf
png: outputs/poster.png
.PHONY: clean
clean:
- rm -rf imgs graph outputs data/tables.tex
+ rm -rf $(DIRS) data/tables.tex
imgs/made: python/data.py python/img.py
cd imgs && \
@@ -24,11 +25,14 @@ graph/nearest_neighbor.png: python/data.py python/neighbor.py
outputs/poster.png: outputs/poster.pdf
gs -sDEVICE=pngalpha -r288 -o outputs/poster.png outputs/poster.pdf
-outputs/%.pdf: data/tables.tex $(wildcard %/*.tex) $(ASSETS)
+outputs/%.pdf: gen/tables.tex $(wildcard %/*.tex) $(ASSETS)
cd $* && pdftex document.tex >/dev/null
rm $*/document.log
mv $*/document.pdf $@
+gen/%.tex: gen/make%.sh gen/%.orig.tex
+ $<
+
outputs/poster.pdf: outputs/qr-source.png outputs/qr.png
outputs/logbook.pdf outputs/report.pdf: generic.tex
diff --git a/data/maketables.sh b/gen/maketables.sh
index dffc937..dffc937 100755
--- a/data/maketables.sh
+++ b/gen/maketables.sh
diff --git a/data/tables.orig.tex b/gen/tables.orig.tex
index 3e2de5f..3e2de5f 100644
--- a/data/tables.orig.tex
+++ b/gen/tables.orig.tex
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}
+}}
diff --git a/logbook/document.tex b/logbook/document.tex
index a6bd206..07c0726 100644
--- a/logbook/document.tex
+++ b/logbook/document.tex
@@ -51,7 +51,7 @@
\noindent{\bf Tables:}
-\input tables
+\input ../gen/tables
\abreak
diff --git a/logbook/tables.tex b/logbook/tables.tex
deleted file mode 120000
index 16a5b5f..0000000
--- a/logbook/tables.tex
+++ /dev/null
@@ -1 +0,0 @@
-../data/tables.tex \ No newline at end of file
diff --git a/poster/results.tex b/poster/results.tex
index 0c433f1..09709a7 100644
--- a/poster/results.tex
+++ b/poster/results.tex
@@ -1,4 +1,4 @@
-\input tables
+\input ../gen/tables
\newfont tablefont=cmr10@11pt
\def\table#1#2{
\vbox{\setbox0=\vbox{\halign{&\vrule\strut\hskip3pt\hfil {\tablefont ##}\hfil\hskip3pt\vrule\cr\noalign{\hrule}
diff --git a/poster/tables.tex b/poster/tables.tex
deleted file mode 120000
index 16a5b5f..0000000
--- a/poster/tables.tex
+++ /dev/null
@@ -1 +0,0 @@
-../data/tables.tex \ No newline at end of file
diff --git a/report/tables.tex b/report/tables.tex
index 0ca794a..a3ebb4d 100644
--- a/report/tables.tex
+++ b/report/tables.tex
@@ -1,4 +1,4 @@
-\input ../data/tables
+\input ../gen/tables
\newdimen\oldbaseskip \oldbaseskip=\baselineskip
\baselineskip=13pt
\deaths