CbmRoot
Loading...
Searching...
No Matches
CbmQaReportLatexEngine.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "CbmQaReportEngine.h"
13
14#include <string>
15#include <string_view>
16
17namespace cbm::qa::report
18{
21 class LatexEngine : public Engine {
22 public:
26 std::string FigureBody(const Figure& figure) const override;
27
31 std::string HeaderBody(const Header& header) const override;
32
36 std::string SectionBody(const Section& section) const override;
37
41 std::string TableBody(const Table& table) const override;
42
46 std::string TailBody(const Tail& tail) const override;
47
49 std::string ScriptExtention() const override { return "tex"; };
50
52 std::string MyName() const override { return "LaTeX plain document engine"; }
53
56 void Compile(const std::string& source) const override;
57
61 void SetLatexCompiler(std::string_view latexCompiler) { fsLatexCompiler = latexCompiler; }
62
63 private:
64 static constexpr double kFigureWidth = 1.0;
65
66 std::string fsLatexCompiler = "pdflatex -interaction=nonstopmode";
67 };
68} // namespace cbm::qa::report
A base abstract class to provide an interface for element body (a visitor in the Visitor pattern)
Figure in the report.
Header of the report.
Plain LaTeX document engine.
std::string TailBody(const Tail &tail) const override
Creates a body for tail.
void Compile(const std::string &source) const override
Compiles source.
std::string FigureBody(const Figure &figure) const override
Creates a body for figure.
static constexpr double kFigureWidth
Figure width [in textwidth].
std::string SectionBody(const Section &section) const override
Creates a body for section.
void SetLatexCompiler(std::string_view latexCompiler)
Sets the LaTeX compilation program name.
std::string MyName() const override
Returns engine name.
std::string ScriptExtention() const override
Returns script extention.
std::string TableBody(const Table &table) const override
Creates a body for table.
std::string HeaderBody(const Header &header) const override
Creates a body for header.
Section of the report.
Table element in the report.
Tail of the report.