From 8caef57197bd52cddb5d4b38249bf45cdb7feffb Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Tue, 14 Jan 2020 08:30:07 -0500
Subject: now make single, double reports and separated extra picture pages
---
document/report.tex | 3 +++
format.orig.tex | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
format.tex | 68 -----------------------------------------------------
make | 13 +++++++---
4 files changed, 81 insertions(+), 71 deletions(-)
create mode 100644 format.orig.tex
delete mode 100644 format.tex
diff --git a/document/report.tex b/document/report.tex
index 33bb8bd..ed98a7a 100644
--- a/document/report.tex
+++ b/document/report.tex
@@ -15,6 +15,9 @@
\include Conclusion;conclusion
\vfil\eject
+\openout1=pageno\relax
+\write1{\number\pageno}
+\closeout1
\include Appendix A: Graphs;graphs
diff --git a/format.orig.tex b/format.orig.tex
new file mode 100644
index 0000000..73e3039
--- /dev/null
+++ b/format.orig.tex
@@ -0,0 +1,68 @@
+%% Links
+\def\link#1{%
+ \pdfstartlink
+ user{/Subtype /Link
+ /Border [ 0 0 0 ]
+ /A <<
+ /Type /Action
+ /S /URI
+ /URI (#1)
+ >>}%
+ {\it #1}%
+ \pdfendlink
+}
+
+%% Fonts
+\font\fourteenbf=ptmb7t at 14pt
+\font\fourteenrm=ptmb7t at 14pt
+\font\twelverm=ptmr7t at 12pt
+
+\twelverm\baselineskip=24pt
+\parindent=.5in
+
+%% Headers
+\expandafter\ifx\csname headdata\endcsname\relax
+ \let\headdata\relax
+\fi
+\nopagenumbers
+{\parindent=0in\leftskip=0pt plus 1fill\rightskip=0pt plus 1fill\parskip=\bigskipamount
+\hbox{}
+\vskip0pt plus 2fill
+{\obeylines Antlions' Group Distribution and Behavior under Varying Spatial Constraints
+Holden Rohrer and Radeen Dixon
+Georgia Science Fair
+}
+\headdata
+\vskip0pt plus 2fill
+\eject
+}
+\pageno=1
+\headline={\baselineskip=0.5in \twelverm \hfil \vbox{\hbox{\ifnum\pageno=1\else Dixon \& Rohrer \the\pageno \fi}}}
+
+%% Sectioning
+\def\titlesub#1#2{\centerline{\fourteenbf #1}\centerline{#2}\bigskip}
+\def\section#1\par{\thesection{#1:}}
+\def\thesection#1{\vskip .3\hsize\goodbreak\vskip -.3\hsize\bigskip\noindent{\fourteenrm#1}}
+
+%% Modular Sections
+\def\include#1;#2\par{\section #1\par\par\input #2\relax}
+\def\sinclude#1;#2\par{\subsection #1\par\par\input #2\relax}
+
+%% Bullet Points and Numbering
+\def\pre#1{\par\leavevmode\llap{\hbox to \parindent{\hfil #1 \hfil}}}
+
+%% Pictures
+\newcount\pics \pics=0
+\def\pic#1#2{\pdfximage width #1{#2}\pdfrefximage\pdflastximage}
+\def\caption#1{\def\a{#1}\ifx\a\empty\else\line{\vbox{\baselineskip=18pt\smallskip\leftskip=0pt plus 1fill\rightskip=0pt plus 1fill\parindent=0pt\relax Fig \number\pics: #1\bigskip}}\fi}
+\def\picture#1#2{\def\a{#2}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\centerline{\pic{5in}{#1}}\caption{#2}}}
+\def\twopicture#1#2#3{\def\a{#3}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\line{\pic{3in}{#1}\hfil\pic{3in}{#2}}\caption{#3}}}
+
+%% Table
+\def\table#1#2{
+ \medskip
+ \halign{&\vrule\vbox to \baselineskip{\vfil\parindent=0in\hsize=#2\relax \hbox to \hsize{\hfil ##\hfil}\vfil}\vrule\cr\noalign{\hrule}
+ #1
+ }
+ \medskip
+}
diff --git a/format.tex b/format.tex
deleted file mode 100644
index 73e3039..0000000
--- a/format.tex
+++ /dev/null
@@ -1,68 +0,0 @@
-%% Links
-\def\link#1{%
- \pdfstartlink
- user{/Subtype /Link
- /Border [ 0 0 0 ]
- /A <<
- /Type /Action
- /S /URI
- /URI (#1)
- >>}%
- {\it #1}%
- \pdfendlink
-}
-
-%% Fonts
-\font\fourteenbf=ptmb7t at 14pt
-\font\fourteenrm=ptmb7t at 14pt
-\font\twelverm=ptmr7t at 12pt
-
-\twelverm\baselineskip=24pt
-\parindent=.5in
-
-%% Headers
-\expandafter\ifx\csname headdata\endcsname\relax
- \let\headdata\relax
-\fi
-\nopagenumbers
-{\parindent=0in\leftskip=0pt plus 1fill\rightskip=0pt plus 1fill\parskip=\bigskipamount
-\hbox{}
-\vskip0pt plus 2fill
-{\obeylines Antlions' Group Distribution and Behavior under Varying Spatial Constraints
-Holden Rohrer and Radeen Dixon
-Georgia Science Fair
-}
-\headdata
-\vskip0pt plus 2fill
-\eject
-}
-\pageno=1
-\headline={\baselineskip=0.5in \twelverm \hfil \vbox{\hbox{\ifnum\pageno=1\else Dixon \& Rohrer \the\pageno \fi}}}
-
-%% Sectioning
-\def\titlesub#1#2{\centerline{\fourteenbf #1}\centerline{#2}\bigskip}
-\def\section#1\par{\thesection{#1:}}
-\def\thesection#1{\vskip .3\hsize\goodbreak\vskip -.3\hsize\bigskip\noindent{\fourteenrm#1}}
-
-%% Modular Sections
-\def\include#1;#2\par{\section #1\par\par\input #2\relax}
-\def\sinclude#1;#2\par{\subsection #1\par\par\input #2\relax}
-
-%% Bullet Points and Numbering
-\def\pre#1{\par\leavevmode\llap{\hbox to \parindent{\hfil #1 \hfil}}}
-
-%% Pictures
-\newcount\pics \pics=0
-\def\pic#1#2{\pdfximage width #1{#2}\pdfrefximage\pdflastximage}
-\def\caption#1{\def\a{#1}\ifx\a\empty\else\line{\vbox{\baselineskip=18pt\smallskip\leftskip=0pt plus 1fill\rightskip=0pt plus 1fill\parindent=0pt\relax Fig \number\pics: #1\bigskip}}\fi}
-\def\picture#1#2{\def\a{#2}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\centerline{\pic{5in}{#1}}\caption{#2}}}
-\def\twopicture#1#2#3{\def\a{#3}\ifx\a\empty\else\advance\pics by 1\fi\vbox{\line{\pic{3in}{#1}\hfil\pic{3in}{#2}}\caption{#3}}}
-
-%% Table
-\def\table#1#2{
- \medskip
- \halign{&\vrule\vbox to \baselineskip{\vfil\parindent=0in\hsize=#2\relax \hbox to \hsize{\hfil ##\hfil}\vfil}\vrule\cr\noalign{\hrule}
- #1
- }
- \medskip
-}
diff --git a/make b/make
index c830f3c..e4ced2b 100755
--- a/make
+++ b/make
@@ -13,18 +13,25 @@ cd graph
python3 ../data.py depwid || python ../data.py depwid
python3 ../data.py nei || python ../data.py nei
cd ..
+mkdir outputs
cd document
+cp ../format.orig.tex ../format.tex
pdftex report.tex || echo "You must install \`pdftex\` (MacTeX, TeXLive, MikTeX, etc)"
+mv pageno.tex ..
+mv report.pdf ../outputs/report-double.pdf
+sed ../format.orig.tex -e 's/\\baselineskip=24pt/\\baselineskip=14pt/g' >../format.tex
+pdftex report.tex
+mv report.pdf ../outputs/report-single.pdf
cd ..
-mkdir outputs
pdftex pics.tex
mv pics.pdf outputs/pics.pdf
-pdftk document/report.pdf cat 1-end 11-12 15-16 output outputs/report.pdf
-pdftk document/report.pdf cat 13-14 output outputs/tables.pdf
+export pageno=$(cat pageno)
+pdftk outputs/report-double.pdf cat $pageno-$(eval $pageno+5) output outputs/graphs-tables.pdf
rm *.log
rm document/report.log
cp assets/* outputs/
cd $orig
+rm format.tex pageno.tex document/pageno.tex
}
create 2>/dev/null
--
cgit