10 outfile_<<
"\\documentclass[8pt,aspectratio="+aspect_ratio+
"]{beamer}\n";
11 outfile_<<
"\\usepackage{graphicx}\n\n";
17 unsigned nplots = pnames.size();
18 if (nplots>15) cout<<
"Too many plots for this slide: "<<nplots<<endl;
19 if (ncols==-1) ncols = nplots/2;
20 int nrows = nplots/ncols;
21 if (nplots%ncols!=0) nrows +=1;
26 outfile_<<
" \\frametitle{"+title+
"}\n";
27 for (
size_t i(0); i<nplots; i++){
28 if (pnames[i]==
"")
continue;
29 string line =
" \\includegraphics[height="+height+
"\\textheight,width=" 30 +width+
"\\textwidth,keepaspectratio]{plots/"+pnames[i]+
"}";
31 if ((i+1)%
unsigned(ncols)==0) line +=
"\\\\";
41 execute(
"pdflatex -output-directory=slides slides/"+
filename_+
" > /dev/null");
SlideMaker(std::string fname, std::string aspect_ratio="169")
void ReplaceAll(std::string &str, const std::string &orig, const std::string &rep)
std::string execute(const std::string &cmd)
TString RoundNumber(double num, int decimals, double denom=1.)
void AddSlide(std::vector< std::string > pnames, int ncols=-1, std::string title="")