From 68257445da25af762b78d9522872bd5eb62a5cb2 Mon Sep 17 00:00:00 2001 From: Colin Gross Date: Tue, 19 May 2020 09:41:14 -0400 Subject: [PATCH] Approximate rectangular sections Use spanning sub titles to bridge top of minipages. --- report.Rnw | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/report.Rnw b/report.Rnw index 72b0889..587ecc8 100644 --- a/report.Rnw +++ b/report.Rnw @@ -68,7 +68,6 @@ knitr::opts_chunk$set(echo = FALSE, warning=FALSE, message=FALSE) knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackage{xcolor}', x, fixed = TRUE)}) @ -\title{MICCA Report} \begin{document} % Turn off top skip so minpages can sit bottom to top without a skip between @@ -79,7 +78,7 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{minipage}[t][0.07\textheight][t]{\textwidth} \centering -\Huge \Sexpr{RECIP} Jan - Apr 2020 +\Huge MICCA Quarterly Report for \Sexpr{RECIP} Jan - Apr 2020 \end{minipage} \nointerlineskip @@ -105,7 +104,7 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag \end{minipage}\hfill \begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline - \parbox{\textwidth}{ {\tiny \Sexpr{info7F5D3}} \par } + \parbox{\textwidth}{ {\tiny \Sexpr{info7F5D31}} \par } \centering Payer Proportion of Deliveries << p1-top-right, include=TRUE, fig.show='hold', fig.width=4, fig.height=2.9, dev='pdf' >>= @@ -120,14 +119,19 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PAGE 1: MIDDLE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% SUBTITLE Spanning entire page +\begin{minipage}[t][0.02\textheight][t]{\textwidth} +\centering +\textbf{Prenatal Contraceptive Counseling} +\end{minipage} -\begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} +\begin{minipage}[t][0.26\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline \captionsetup{margin=.5cm} \setlength{\abovecaptionskip}{-10pt plus 3pt minus 2pt} \parbox{\textwidth}{ {\tiny \Sexpr{info540727}} \par } \centering - Counseling Rate\\ + Recieved Prenatal Counseling\\ \vspace{2mm} << p2-top-left, include=TRUE, fig.show='hold', fig.width=2.5, fig.height=2.5, dev='pdf' >>= fig540727 @@ -135,11 +139,12 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag \vfill \makebox[\linewidth]{} \end{minipage}\hfill -\begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} +\begin{minipage}[t][0.26\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline \parbox{\textwidth}{ {\tiny \Sexpr{info5BF5D0}} \par } \centering - << p2-top-right, include=TRUE, fig.show='hold', fig.width=4, fig.height=3, dev='pdf' >>= + Monthly Rate + << p2-top-right, include=TRUE, fig.show='hold', fig.width=4, fig.height=2.5, dev='pdf' >>= fig5BF5D0 @ \vfill @@ -149,9 +154,14 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PAGE 1: BOTTOM % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% SUBTITLE Spanning entire page +\begin{minipage}[t][0.02\textheight][t]{\textwidth} +\centering +\textbf{Preference Provision} +\end{minipage} \nointerlineskip -\begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} +\begin{minipage}[t][0.26\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline \parbox{\textwidth}{ {\tiny \Sexpr{infoBDBC81}} \par } \centering @@ -163,7 +173,7 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag \vfill \makebox[\linewidth]{} \end{minipage}\hfill -\begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} +\begin{minipage}[t][0.26\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline \parbox{\textwidth}{ {\tiny \Sexpr{infoE8F578}} \par } Provision of Preference Counts\\ @@ -187,11 +197,12 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag \begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline + \parbox{\textwidth}{ {\tiny \Sexpr{info82C4A3}} \par } \parbox{\textwidth}{\centering Long Acting Contraceptive Preference} \centering{ << p2-mid-left, include=TRUE, message=FALSE, echo=FALSE>>= # DON"T INCLUDE A CAPTION. It will bork the environment - knitr::kable(tbl_82C4A3, format.args = list(digits=3), align='c', + knitr::kable(tbl82C4A3, format.args = list(digits=3), align='c', booktabs=T, format="latex") %>% kable_styling(font_size = 14) %>% row_spec(0, bold=T) @@ -203,6 +214,7 @@ knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackag \begin{minipage}[t][0.30\textheight][t]{0.5\textwidth} \strut\vspace*{-\baselineskip}\newline \parbox{\textwidth}{ {\tiny \Sexpr{info1903AB}} \par } + \centering Preference of Women with Documented Choice << p2-mid-right, include=TRUE, fig.show='hold', fig.width=4, fig.height=3, dev='pdf' >>= fig1903AB