-
Notifications
You must be signed in to change notification settings - Fork 0
/
TCMN_Operations_PDF_Local.Rnw
191 lines (167 loc) · 6.63 KB
/
TCMN_Operations_PDF_Local.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Template TCMN data sheet version 3
%
% Alberto Sanchez [email protected] Dec 2015
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
%%%%%%%%%%%%%% package declaration %%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{This is my name}
\rhead{this is page \thepage}
\cfoot{center of the footer!}
\usepackage[top=0.3in, bottom=0.1in, left=0.5in, right=0.6in]{geometry}
\usepackage{graphicx} % to load images
\usepackage[export]{adjustbox} % add alignment to includegraphics
\usepackage[font=small]{caption}
\usepackage{xcolor} % color text
\usepackage{tabularx} % to adjust table width, etc.
\usepackage{titlesec} % format titles and headers
\usepackage{sectsty} % format sections & subsections
\usepackage{booktabs} % For \toprule, \midrule and \bottomrule
\usepackage{longtable} % add pages for long tables
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref} % to include hyperlinks in the doc
\sectionfont{\fontsize{16}{15}\selectfont\raggedright} % formats title newsletter (section)
\subsectionfont{\fontsize{14}{12}\selectfont\raggedright} % formats title newsletter (section)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
<<setup,echo=FALSE,message=FALSE,cache=FALSE>>=
#library(knitr)
# Global chunk options: Cache chunks which source R code
read_chunk("TCMN_portfolio_PDF.R")
#opts_chunk$set(cache=TRUE,autodep=TRUE)
@
%
<<params,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE>>=
#source("/Users/asanchez3/Desktop/Work/TCMN/ReportGenerators/generic_functions.R")
#c <- "Spain"
couName <- countryNames[countryNames$Country==c,]$Country
couISO2 <- countries[countries$Country==couName,]$CountryCodeISO2
@
%%%%%%%%%%%%%%%% PAGE 1 %%%%%%%%%%%%%%%%%%%
%World Bank logo and TCMN branding
\begin{figure}
\vspace{-3ex} % move up this figure
\hspace{-7ex} % move left this figure
\includegraphics[width=5cm]{/Users/asanchez3/shinyTCMN/www/wb_logo_background.png}
\end{figure}
\begin{figure}
\begin{minipage}[t]{0.99\textwidth} % top section
\vspace{-30ex}
\hspace{-2ex}
\raggedright{\includegraphics[width=5.5cm,right]{/Users/asanchez3/shinyTCMN/www/TC_snapshots_operations.png}}
\end{minipage}
\end{figure}
%
%%%% Macro Indicators
\begin{minipage}[t]{0.99\textwidth} % top section
\vspace{-1.5cm}
\begin{minipage}[c]{0.36\textwidth}
\begin{minipage}[c]{0.28\textwidth} % flag
\includegraphics[width=1.2cm,height=1.2cm]{/Users/asanchez3/shinyTCMN/www/\Sexpr{couISO2}.png}
\end{minipage}
\begin{minipage}[c]{0.70\textwidth} % Country name
\section*{\color{blue!40!black}\Sexpr{couName}}
\end{minipage}
\end{minipage}
\begin{minipage}[c]{0.63\textwidth}
% \begin{flushleft}
% \center{\color{blue!20!black} \textbf{\Large T\&C Product Line Operations Board Approved On or After FY14}}
% \end{flushleft}
\end{minipage}
\end{minipage} % end top section
%\begin{minipage}[b]{0.99\textwidth} % main body
\raggedright{\color{white!30!blue} \textbf{\Large SCD/CPF}}
\begin{minipage}[c]{0.99\textwidth}
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Most Recent}}
\vspace*{0.3cm}
<<mostRecentDocs,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
\begin{minipage}[c]{0.99\textwidth} % imports/exports
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Planned}}
\vspace*{0.3cm}
<<plannedDocs,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
%\end{minipage}
\vspace*{0.5cm}
\raggedright{\color{white!30!blue} \textbf{\Large WB Lending Pipeline}}
\begin{minipage}[b]{0.99\textwidth} % overview tables
\begin{minipage}[c]{0.99\textwidth}
\vspace*{0.5cm}
<<lendingPipeline,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
\raggedright{\color{white!30!blue} \textbf{\Large WB Portfolio}}
\begin{minipage}[c]{0.99\textwidth} % imports/exports
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Active}}
\vspace*{0.3cm}
<<portfolioActive,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
\begin{minipage}[c]{0.99\textwidth} % imports/exports
\raggedright{\color{white!30!blue} \textbf{\large Closed}}
\vspace*{0.5cm}
<<portfolioClosed,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
\end{minipage}
\newpage
%%%%%%%%%%%%%%%% PAGE 2 %%%%%%%%%%%%%%%%%%%
\begin{minipage}[t]{0.99\textwidth}
\raggedright{\color{white!30!blue} \textbf{\Large WB ASA}}
\begin{minipage}[b]{0.99\textwidth}
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Active}}
\vspace*{0.3cm}
<<ASAActive,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.2cm}
\end{minipage}
\begin{minipage}[b]{0.99\textwidth}
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Closed}}
\vspace*{0.3cm}
<<ASAClosed,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.5cm}
\end{minipage}
\raggedright{\color{white!30!blue} \textbf{\Large IFC ASA}}
\begin{minipage}[b]{0.99\textwidth}
\vspace*{0.2cm}
\raggedright{\color{white!30!blue} \textbf{\large Active}}
\vspace*{0.3cm}
<<ASA_IFCActive,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.2cm}
\end{minipage}
\raggedright{\color{white!30!blue} \textbf{\large Pipeline}}
\vspace*{0.3cm}
<<ASA_IFCPipeline,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.2cm}
\end{minipage}
\begin{minipage}[b]{0.99\textwidth}
\raggedright{\color{white!30!blue} \textbf{\large Closed}}
\vspace*{0.3cm}
<<ASA_IFCClosed,echo=FALSE,message=FALSE,cache=FALSE,warning=FALSE,fig.align='center',results="asis">>=
@
\vspace*{0.2cm}
\end{minipage}
%%%%%%%%%%%%%%%% END OF DOCUMENT %%%%%%%%%%%%%%%%%%%
\end{document}