Go to the documentation of this file.
13 using std::stringstream;
21 const vector<string>& colNames)
const {
22 string st =
"\\begin{table}[h] \n";
24 if (caption !=
"") st +=
"\\caption{" + caption +
"} \n";
25 st +=
"\\begin{tabular}{|";
26 for (
unsigned int i = 0;
i < colNames.size();
i++) {
31 for (
unsigned int i = 0;
i < colNames.size();
i++) {
32 st += (
i < (colNames.size() - 1)) ? (colNames[
i] +
" & ") : (colNames[
i]);
34 st +=
"\\\\ \\hline \n";
39 return "\\end{tabular} \\end{table}";
43 const string& name)
const {
45 ss <<
"\\multicolumn{" << nofCols <<
"}{|c|}{" << name <<
"} \\\\ \\hline"
52 for (
unsigned int i = 0;
i < row.size();
i++) {
53 st += (
i < (row.size() - 1)) ? (row[
i] +
" & ") : (row[
i]);
55 st +=
" \\\\ \\hline \n";
60 const string& file)
const {
63 ss <<
"\\begin{figure}[h]" << endl;
64 ss <<
"\\centering" << endl;
65 ss <<
"\\includegraphics[width=7cm]{" << file <<
".eps}" << endl;
66 ss <<
"\\caption{" << title <<
"}" << endl;
67 ss <<
"\\end{figure}" << endl;
72 string str =
"\\documentclass[a4paper,14pt]{article}";
73 str +=
"\\usepackage{amssymb}";
74 str +=
"\\setlength\\oddsidemargin{-2cm}";
75 str +=
"\\setlength\\evensidemargin{-2cm}";
76 str +=
"\\setlength\\textwidth{17cm}";
77 str +=
"\\setlength\\topmargin{0cm}";
78 str +=
"\\usepackage[dvips]{graphicx}";
79 str +=
"\\begin{document}";
88 for (
int i = 0;
i < size;
i++)
90 st +=
"title{" + title +
"}";
virtual std::string Image(const std::string &title, const std::string &file) const
Inherited from CbmReportElement.
virtual std::string TableRow(const std::vector< std::string > &row) const
Inherited from CbmReportElement.
virtual std::string DocumentEnd() const
Inherited from CbmReportElement.
Implementation of CbmReportElement for Latex output.
virtual std::string TableEmptyRow(int nofCols, const std::string &name) 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 std::string DocumentBegin() const
Inherited from CbmReportElement.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
CbmLatexReportElement()
Constructor.
virtual ~CbmLatexReportElement()
Destructor.
Implementation of CbmLitReportElement for Latex output.
virtual std::string Title(int size, const std::string &title) const
Inherited from CbmReportElement.