CbmRoot
Loading...
Searching...
No Matches
CbmQaReportLatexFormat.cxx
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
#include "
CbmQaReportLatexFormat.h
"
11
12
#include <regex>
13
14
using
cbm::qa::report::LatexFormat
;
15
16
// ---------------------------------------------------------------------------------------------------------------------
17
//
18
std::string
LatexFormat::Apply
(std::string_view input)
19
{
20
auto
output = std::string(input);
21
22
// Replace all underscores with "\_"
23
// TODO: ignore replacing in LaTeX formulas
24
{
25
std::regex rex(
"_"
);
26
output = std::regex_replace(output, rex,
"\\_"
);
27
}
28
29
return
output;
30
}
CbmQaReportLatexFormat.h
Common LaTeX utilities (header)
cbm::qa::report::LatexFormat
Definition
CbmQaReportLatexFormat.h:19
cbm::qa::report::LatexFormat::Apply
static std::string Apply(std::string_view input)
Applies a LaTeX-friendly formatting.
Definition
CbmQaReportLatexFormat.cxx:18
core
qa
report
CbmQaReportLatexFormat.cxx
Generated on Sun Dec 22 2024 23:04:10 for CbmRoot by
1.12.0