Skip to content

Commit

Permalink
Approximate rectangular sections
Browse files Browse the repository at this point in the history
  Use spanning sub titles to bridge top of minipages.
  • Loading branch information
grosscol committed May 19, 2020
1 parent a9fa372 commit 6825744
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions report.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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' >>=
Expand All @@ -120,26 +119,32 @@ 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
@
\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
Expand All @@ -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
Expand All @@ -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\\
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 6825744

Please sign in to comment.