aboutsummaryrefslogtreecommitdiff
path: root/tex/src/figure-src-demoplot.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/src/figure-src-demoplot.tex')
-rw-r--r--tex/src/figure-src-demoplot.tex32
1 files changed, 32 insertions, 0 deletions
diff --git a/tex/src/figure-src-demoplot.tex b/tex/src/figure-src-demoplot.tex
new file mode 100644
index 0000000..6d788f5
--- /dev/null
+++ b/tex/src/figure-src-demoplot.tex
@@ -0,0 +1,32 @@
+\begin{tcolorbox}[title=\inlinecode{\textcolor{white}{demo-plot.mk}}\hfill(Simplified contents)]
+ \footnotesize
+ \texttt{\mkcomment{1ST MAKE RULE: build the directory hosting the converted table.}}\\
+ \texttt{\mkvar{a2dir} = \$(\mkvar{texdir})/tools-per-year}\\
+ \texttt{\mktarget{\$(a2dir)}:; \mkprog{mkdir} \$@}
+
+ \vspace{2em}
+ \texttt{\mkcomment{2ND MAKE RULE: extract necessary info from raw table.}}\\
+ \texttt{\mkvar{a2mk20f1c} = \$(\mkvar{a2dir})/tools-per-year.txt}\\
+ \texttt{\mktarget{\$(a2mk20f1c)}: \$(\mkvar{mk20tab3}) | \$(\mkvar{a2dir})}\\
+ \texttt{\mktab{}\mkprog{awk} '!/\^{}\#/ \{all[\$\$1]+=\$\$2; id[\$\$1]+=\$\$3;\}} \textbackslash\\
+ \texttt{\mktab{}{ }{ }{ }{ }{ }END\{ for(year in all) print year, 100*id[year]/all[year], all[year] \}}' \textbackslash\\
+ \texttt{\mktab{}{ }{ }{ }{ }> \$@}
+
+ \vspace{2em}
+ \texttt{\mkcomment{3RD MAKE RULE: Main LaTeX macro file for reported values in text.}}\\
+ \texttt{\mkvar{pconfdir} = reproduce/analysis/config}\\
+ \texttt{\mktarget{\$(mtexdir)/demo-plot.tex}: \$(\mkvar{a2mk20f1c}) \$(\mkvar{pconfdir})/menke-demo-year.conf}
+
+ %% We need an empty line here for the extra space to work.
+ \texttt{\recipecomment{First year data were taken (first column of first row).}}\\
+ \texttt{\mktab{}v=\$\$(awk 'NR==1\{print \$\$1\}' \$(\mkvar{a2mk20f1c}))}\\
+ \texttt{\mktab{}\mkprog{echo} "\textbackslash{}newcommand\{\textbackslash{}menkefirstyear\}\{\$\$v\}" > \$@}
+
+ %% We need an empty line here for the extra space to work.
+ \texttt{\recipecomment{Number of papers in the demonstration year. The year is defined in}}
+
+ \texttt{\recipecomment{`\$(pconfdir)/menke-demo-year.conf' as `menke-demo-year' and also passed onto LaTeX.}}\\
+ \texttt{\mktab{}v=\$\$(awk '\$\$1==\$(\mkvar{menke-demo-year})\{print \$\$3\}' \$(\mkvar{a2mk20f1c}))}\\
+ \texttt{\mktab{}\mkprog{echo} "\textbackslash{}newcommand\{\textbackslash{}menkenumpapersdemocount\}\{\$\$v\}"{ }>> \$@} \\
+ \texttt{\mktab{}\mkprog{echo} "\textbackslash{}newcommand\{\textbackslash{}menkenumpapersdemoyear\}\{\$(\mkvar{menke-demo-year})\}"{ }>> \$@}
+\end{tcolorbox}