17using std::stringstream;
26 string st =
"\\begin{table}[h] \n";
28 if (caption !=
"") st +=
"\\caption{" + caption +
"} \n";
29 st +=
"\\begin{tabular}{|";
30 for (
unsigned int i = 0; i < colNames.size(); i++) {
35 for (
unsigned int i = 0; i < colNames.size(); i++) {
36 st += (i < (colNames.size() - 1)) ? (colNames[i] +
" & ") : (colNames[i]);
38 st +=
"\\\\ \\hline \n";
47 ss <<
"\\multicolumn{" << nofCols <<
"}{|c|}{" << name <<
"} \\\\ \\hline" << endl;
54 for (
unsigned int i = 0; i < row.size(); i++) {
55 st += (i < (row.size() - 1)) ? (row[i] +
" & ") : (row[i]);
57 st +=
" \\\\ \\hline \n";
65 ss <<
"\\begin{figure}[h]" << endl;
66 ss <<
"\\centering" << endl;
67 ss <<
"\\includegraphics[width=7cm]{" << file <<
".eps}" << endl;
68 ss <<
"\\caption{" << title <<
"}" << endl;
69 ss <<
"\\end{figure}" << endl;
75 string str =
"\\documentclass[a4paper,14pt]{article}";
76 str +=
"\\usepackage{amssymb}";
77 str +=
"\\setlength\\oddsidemargin{-2cm}";
78 str +=
"\\setlength\\evensidemargin{-2cm}";
79 str +=
"\\setlength\\textwidth{17cm}";
80 str +=
"\\setlength\\topmargin{0cm}";
81 str +=
"\\usepackage[dvips]{graphicx}";
82 str +=
"\\begin{document}";
92 for (
int i = 0; i <
size; i++)
94 st +=
"title{" + title +
"}";
ClassImp(CbmConverterManager)
Implementation of CbmReportElement for Latex output.
static constexpr size_t size()
Implementation of CbmLitReportElement for Latex output.
virtual std::string TableEmptyRow(int nofCols, const std::string &name) const
Inherited from CbmReportElement.
virtual std::string Image(const std::string &title, const std::string &file) const
Inherited from CbmReportElement.
virtual std::string TableBegin(const std::string &caption, const std::vector< std::string > &colNames) const
Inherited from CbmReportElement.
virtual std::string TableEnd() const
Inherited from CbmReportElement.
virtual ~CbmLatexReportElement()
Destructor.
virtual std::string Title(int size, const std::string &title) const
Inherited from CbmReportElement.
CbmLatexReportElement()
Constructor.
virtual std::string DocumentEnd() const
Inherited from CbmReportElement.
virtual std::string TableRow(const std::vector< std::string > &row) const
Inherited from CbmReportElement.
virtual std::string DocumentBegin() const
Inherited from CbmReportElement.