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
11
12#include <regex>
13
15
16// ---------------------------------------------------------------------------------------------------------------------
17//
18std::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}
Common LaTeX utilities (header)
static std::string Apply(std::string_view input)
Applies a LaTeX-friendly formatting.